Run two instances of lsslot concurrently and often one of them will error out:
[root@ltczep4-lp3 ~]# lsslot & lsslot
[1] 2920840
/var/lock/dr_config_lock: Resource temporarily unavailable
[root@ltczep4-lp3 ~]# # Slot Description Linux Name Device(s)
U9040.MR9.1328F4X-V10-C0 Virtual I/O Slot 30000000 vty
U9040.MR9.1328F4X-V10-C2 Virtual I/O Slot 30000002 l-lan
U9040.MR9.1328F4X-V10-C103 Virtual I/O Slot 30000067 v-scsi
[1]+ Done lsslot
The intention of dr_lock() is to wait for the lock either indefinitely or until an optional timeout expires. But at this point in the program's execution, the dr_timeout variable is always 0 since main() has yet to call set_timeout(). This causes any lock contention to make the program exit:
int drmgr_timed_out(void)
{
if (dr_timeout == -1)
return 0; /* No timeout specified */
if (dr_timeout > time((time_t *)0))
return 0;
say(WARN, "Drmgr has exceeded its specified wait time and will not "
"continue\n");
return 1;
}
lsslot makes for an easy illustration, but more importantly I believe this problem affects the drmgr command as well.
Run two instances of lsslot concurrently and often one of them will error out:
The intention of
dr_lock()is to wait for the lock either indefinitely or until an optional timeout expires. But at this point in the program's execution, thedr_timeoutvariable is always 0 sincemain()has yet to callset_timeout(). This causes any lock contention to make the program exit:lsslot makes for an easy illustration, but more importantly I believe this problem affects the drmgr command as well.