Suzannah found a problem with more recent MIDAS; it seems to me that the problem is the result of having an ODB link to a hot-linked (open record) variable.
Description of bug:
I start with a simple MIDAS experiment, just running mhttpd and odbedit. sor shows that mhttpd has open records for a bunch of variables, including "Allowed hosts"
[local:simdaq:R]/>sor /Experiment/Security/RPC hosts/Allowed hosts open 2 times by "ODBEdit" "mhttpd" /Experiment/Security/mhttpd hosts/Allowed hosts open 1 times by "mhttpd" /Sequencer/State open 1 times by "mhttpd" /RCParams/testtest2 open 1 times by a deleted client
Now create a symbolic link to that hot-linked variable: [local:simdaq:R]/>mkdir Params [local:simdaq:R]/>cd Params/ [local:simdaq:R]/Params>ln "/Experiment/Security/mhttpd hosts/Allowed hosts" testlink
Now stop and restart odbedit and we get error message:
bash-4.1$ odbedit odbedit: src/odb.c:970: db_update_open_record: Assertion `xkey->notify_count == pkey->notify_count' failed. Aborted
More debugging info: - If mhttpd is stopped (ie, the hot-linking program stopped) then we stop getting this error. - If the symbolic link is removed we stop getting this error. - If the symbolic link is made to the whole array (like a like to "Allowed Hosts", rather than "Allowed Hosts") then we don't get the error.
It seems that we probably need to add code so that we ignore symbolic links when doing these checks:
if(pkey->type == TID_LINK) return; assert(xkey->notify_count == pkey->notify_count);
but I don't understand this function well enough to be sure.