Red Hat Bugzilla – Bug 490876
init hang and zombie invasion due to tty block
Last modified: 2017-02-28 07:59:06 EST
Created attachment 335690 [details]
patch to prevent init hang and zombie invasion
OpenVZ linux kernel team reports about the init's ability to hang in zombie state.
* at virtual terminal:
* ( sleep 3 ; init u ) & yes
* press scroll-lock
* wait 3 seconds
# cat /proc/29595/status
State: Z (zombie)
# ps -p 29595
PID TTY TIME CMD
29595 ? 00:00:00 init <defunct>
no hang in zombie state
This is fixed by mainstream commit 9c1729db3 in v2.6.23 by Alan Cox <email@example.com>
Prevent an O_NDELAY writer from blocking when a tty write is blocked by the tty atomic writer mutex
Without this a tty write could block if a previous blocking tty write was
in progress on the same tty and blocked by a line discipline or hardware
event. Originally found and reported by Dave Johnson.
Signed-off-by: Alan Cox <firstname.lastname@example.org>
Acked-by: Dave Johnson <email@example.com>
Signed-off-by: Andrew Morton <firstname.lastname@example.org>
Signed-off-by: Linus Torvalds <email@example.com>
Backported patch attached.
I tried to reprocude it here on x86_64 without success. Could you please provide more details about your tests?
Hi. Sorry for being silent for so long.
i rechecked the reproducer and it again worked for me.
i did exactly that steps that are written in comment 1:
1) get a RHEL5 node (my kernel was 2.6.18-128.1.1).
i mean a hardware node, not a virtual box, etc.
2) go to text mode (init 3). Login.
3) execute following command:
# ( sleep 3 ; init u ) & yes
4) Right after you pressed enter executing the command above, press "Scroll Lock" and do not release it for 5 seconds.
5) Then go to another virtual text console and check init processes via ps. i've got:
[root@ts76 ~]# ps axf |grep init
1 ? Ss 0:00 init 
3691 pts/0 S+ 0:00 \_ grep init
3640 ? Z 0:00 [init] <defunct>
Please, let me know if it helps to trigger the issue or not.
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).
i believe the issue can be safely buried.