Comment 14 for bug 151440

Revision history for this message
Kelledin (kelledin-3) wrote :

Also encountering this issue with "tail -f <log>", for a log file produced by a script with a LOT of rapid output.

Similar issues happen with a simple bash builtin like "read -s -t 1 -N 1 <var>": it periodically gets in a state where it immediately reports "read: 0: read failed: Resource temporarily unavailable". I initially noticed this with a log watcher script that periodically (every 1s) gathers the tail-end of a log file (same one I'm monitoring with "tail -f" above), then checks for single-character user commands between log polling cycles. I verified that stdin was NOT left in a non-blocking state and managed to reproduce it without even watching the log file or doing anything else (just a tight loop with the above "read" command). This happens a lot more frequently than "tail -f" getting interrupted above, and the event tends to repeat in bursts.

This has so far happened under MATE Terminal and konsole, with or without byobu. It does not happen with other distros I've tried. Nothing amiss appears in the system/kernel logs around this time either. Load average on this system commonly reaches 10-16 with almost no swap usage (it's an 8-core+8-thread machine doing various CI builds). I have yet to try it on a text-only TTY, but I suppose I could try that next.

System info: Ubuntu 18.04.2
Linux motsognir 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux