ash: does not restore tty pgrp if killed by HUP

Darcy Watkins DWatkins at tranzeo.com
Tue Jan 19 14:53:05 UTC 2010


Do you recall what release version it was fixed for (or can you point me
to the changeset)?   I have a system that occasionally (after running
idle for say overnight) gets its shell and some processes mixed up.  It
uses busybox 1.7.2 (but I still saw it even after upgrading to the
latest of the 1.7.x lineup).

We have net-snmp using pass-through shell scripts to implement some
MIBs, we have busybox ash (multiple instances running scripts in the
background sleeping, waking up and checking things), some web CGI are
shell scripts, and some daemons run shell scripts on occasion in
response to events.

We have signals being fired at some of these SIGUSR1 and SIGUSR2 to
indicate events and we occasionally kill processes as part of cleanup /
resync before starting another cycle.  (The product is a powerpc based
WiMax CPE radio unit that has to respond to changes in levels of radio
channel availability).

When using the 2.6.19 kernel, I observed the condition and had to reset
the device.  It is easier to catch it when using 2.6.25 kernel.  When
caught using 2.6.25, I can recover by using Ctrl-C on the console.

In one case (using 2.6.25 kernel), the console was hung (pressed enter
and it echoes back but no command prompt), I tried to telnet, the
connection hung.  I tried connecting to the web server, the connection
hung.  When I pressed Ctrl-C from the console, all these hung connection
requests connected at the same time as the prompt came back up on the
console.

I also googled / found notes wrt the 2.6.25 kernel where they rewrote a
kernel locking mechanism for tty->pgrp which may explain why the
difference in behavior between the two kernel versions.

The reason I ask all these questions is that I will have to justify the
effort to carry forward a series of patches that apply against busybox
1.7.x to apply against busybox 1.15.x and I want some degree of
confidence that I have identified the right root cause (i.e. as in
having an "educated guess" versus just having a "wild guess" ;-)

Regards,

Darcy



-----Original Message-----
From: Denys Vlasenko [mailto:vda.linux at googlemail.com] 
Sent: Tuesday, January 19, 2010 5:17 AM

On Mon, Jan 18, 2010 at 8:42 PM, Darcy L. Watkins <dwatkins at tranzeo.com>
wrote:
> In $topdir/shell/README is a note...
>
> "2008-02-14
> ash: does not restore tty pgrp if killed by HUP. Symptom: Midnight
> Commander
> is backgrounded if you started ash under it, and then killed it with
> HUP."
>
> Anyone know if this was that amongst items fixed between busybox
version
> 1.7.2 and 1.15.3 or is it still a bug present?

This is fixed long ago. It isn't too hard to test for it, btw...
--
vda


More information about the busybox mailing list