A somewhat easy way to reproduce this (a scenario where this happens frequently) is if the consoles are being spammed with log messages and you exit a remote sysop console using ^C. Perhaps the console file descriptors are going away while they are being logged to, but that doesn't entirely make sense either.
This causes a deadlock, but only at the thread level, i.e. not all logging is broken. Because threads get stuck with a RDLOCK held on the remote logger fd's, it becomes impossible to obtain a WRLOCK, which blocks sysop console registration/unregistration. Otherwise, other logging and other threads remain nominally unaffected.
Split off from #12, since this is a separate issue:
Logging can also get stuck here due to write blocking forever:
A somewhat easy way to reproduce this (a scenario where this happens frequently) is if the consoles are being spammed with log messages and you exit a remote sysop console using
^C
. Perhaps the console file descriptors are going away while they are being logged to, but that doesn't entirely make sense either.This causes a deadlock, but only at the thread level, i.e. not all logging is broken. Because threads get stuck with a
RDLOCK
held on the remote logger fd's, it becomes impossible to obtain aWRLOCK
, which blocks sysop console registration/unregistration. Otherwise, other logging and other threads remain nominally unaffected.