I can already see some of this by greping wfReadOnly() on /includes. This function simply reads a file on the disk, so it is not cached, nor per-transaction. Therefore it can change in the short time one operation of an a larger set of operations was called, and the next. This can cause broken "transactions" on occasion.
I suspect this is what caused the logging problems. It only occurred during heavy traffic or when someone was rapidly doing something (I got a report from someone using a commons mass deletion script) and somewhat randomly (only a portion of the time). This is consistent with the wfReadOnly() check that used to be in LogPage.php.