closing SSH session leaves a zombie bash process

Patrick Herbst paherbst@gmail.com
Wed Feb 7 03:36:00 GMT 2007


ok, i've determined it is a problem with the handling of signals.

here's the process list when i SSH in...

      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
     2272    1120    2272       1532    0 1000 22:20:57 /usr/bin/bash
     2120    2272    2120       1996    0 1000 22:21:07 /usr/bin/ps

once i X out of putty and come back in it looks like this...

      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
I    2272       1    2272       1532    0 1000 22:20:57 /usr/bin/bash
     1832    1444    1832       1864    1 1000 22:23:44 /usr/bin/bash
     2208    1832    2208       2084    1 1000 22:23:46 /usr/bin/ps

so the Parent is lost... and somehow does not send SIGHUP or bash does
not acknowlege receiving SIGHUP.... and the parent is reassigned to
1...

if i start up a SSH session then go into a local session i get this ps -a

      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
      956       1     956        956    ?   18   Feb  5 /usr/bin/cygrunsrv
     1096     956    1096       1076    ?   18   Feb  5 /usr/sbin/sshd
     1444    1096    1444       1840    ?   18 22:23:41 /usr/sbin/sshd
I    1832    1444    1832       1864    1 1000 22:23:44 /usr/bin/bash
     1668       1    1668       1668  con 1000 22:27:03 /usr/bin/bash
     1700    1668    1700       2084  con 1000 22:27:08 /usr/bin/ps

i do a kill -HUP 1444 and i get...

      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
      956       1     956        956    ?   18   Feb  5 /usr/bin/cygrunsrv
     1096     956    1096       1076    ?   18   Feb  5 /usr/sbin/sshd
I    1832       1    1832       1864    1 1000 22:23:44 /usr/bin/bash
     1668       1    1668       1668  con 1000 22:27:03 /usr/bin/bash
     1444    1668    1444       2216  con 1000 22:28:33 /usr/bin/ps

bash's parent is reassigned to 1 and is left sitting there...

so..... like i said before, i didn't have this problem with the
versions of everything that installed in november... so something
broke... and i'm guessing its cygwin considering the problems with
other people having bash zombies...

anyone know where else to look?  what else can be done?


DePriest, Jason R. wrote:

> On 1/30/07, Patrick Herbst wrote:
>
>    i just noticed this today after i updated my base cygwin yesterday.
>    if i use putty to establish a ssh session and just hit the X to close
>    (instead of typing 'exit'), the server leaves a copy of bash running
>    till i go in an manually end process.
>
>
>    i've tried reinstalling everything and still have the same problem
>
>    i'm using the base install with only openssh added.
>
>    i dont think i had this problem before i updated yesterday.
>
>    can anyone duplicate this?  and does anyone have any idea about what
>    could fix it?
>
>
>    thanks,
>    patrick
>
>
> See if this helps: http://www.cygwin.com/ml/cygwin/2006-12/msg00261.html
>
> I know the referenced message is rxvt + bash specific, but it should
> give you some things to look for in putty + ssh + bash.
>
>
> http://www.cygwin.com/ml/cygwin/2005-12/msg00209.html seems less relevant.
>
> A search of the archives for zombie bash or zombie ssh gives tons of pointers.
>
> Basically, don't hit the X, type in 'exit'.
>
> -Jason
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list