Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-parentheses -Wno-format-security uname output: Linux mcroce-redhat 5.3.1-matteo #87 SMP Mon Sep 30 14:20:06 CEST 2019 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x86_64-redhat-linux-gnu
Bash Version: 5.0 Patch Level: 7 Release Status: release Description: Sometimes bash leaves the pts with O_NONBLOCK set, and all programs reading from stdin will get an EAGAIN: # cat cat: -: Resource temporarily unavailable # strace -e read cat read(0, 0x7f2a70511000, 131072) = -1 EAGAIN (Resource temporarily unavailable) : Resource temporarily unavailable +++ exited with 1 +++ Initially I thought it was a kernel bug, so I filed a bug on the kernel bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201641 but then I tested with fcntl() that the stding had te flag set. Repeat-By: random after some usage Fix: `exec bash` resolves it -- Matteo Croce per aspera ad upstream