l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
November 4: Social gathering
Next Installfest:
TBD
Latest News:
Oct. 10: LUGOD Installfests coming again soon
Page last updated:
2009 Oct 02 12:23

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] sshd not reaping my login shell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] sshd not reaping my login shell



On Fri 02 Oct 09,  1:21 PM, Ken Bloom <kbloom@gmail.com> said:
> When I ssh from little-cat-a to cat-in-the-hat, exiting the login shell
> on cat-in-the-hat doesn't end my ssh connection. After running ps on
> cat-in-the-hat, I noticed that the login shell in question was still
> sitting around as a zombie process, meaning that sshd isn't reaping the
> shell.
> 
> Here's an strace of the problem (from sshd on cat-in-the-hat), attaching
> to the sshd process (as root) after I am already logged in. You can see
> that sshd is changing the signal mask an awful lot (blocking and
> unblocking SIGCHLD), and it appears sshd isn't responding to SIGCHLD.
> (It's definitley not calling waitpid to reap the shell.)
> 
> Anybody seen this before? Anybody know how to fix it? Anybody know where
> to report a bug?
> 
> ii  openssh-server 1:5.1p1-7      secure shell server, an rshd
> replacement
> 
> 
> [bloom@cat-in-the-hat ~]$ sudo strace -p 8124
> [sudo] password for bloom: 
> Process 8124 attached - interrupt to quit
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(3, "?m\3\270^\316,\314\0v\375\240\36\rG\263\203`f\210\210\264\340
> \366\3\341\366\230_X\5\276"..., 16384) = 48
> select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(10, "e", 1)                       = 1
> ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
> -echo ...}) = 0
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(12, "e", 16384)                    = 1
> select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(3, "X\263\2A\350\235\233\355,\3149\223\364\221\265Ut\346\225h\275
> \215z\234Z\3039\31\356x[\27"..., 48) = 48
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(3, "\233`\205l\271\25\217\245\311j\307\2614\267t\226D\212\275h&q
> \314+\262\23\25\321\302\261D\235"..., 16384) = 48
> select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(10, "x", 1)                       = 1
> ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
> -echo ...}) = 0
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(12, "x", 16384)                    = 1
> select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(3, "\206\331V\270\377\4\356\34rA\211c\336\200-e\264M\205\244\263
> \250Qg$\227\307\205\270\36\201t"..., 48) = 48
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(3, "<\326\326|\204\343[G\22\230\211\231\2\240\324xs~\257\35\250TT
> \212,>\1\376U\231\374\264"..., 16384) = 48
> select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(10, "i", 1)                       = 1
> ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
> -echo ...}) = 0
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(12, "i", 16384)                    = 1
> select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(3, "\320\230 \245\237\230[\261\33\16K1\207\270\241\270\310\\tkU
> \231\n\347\232H2*LENf"..., 48) = 48
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(3, "\236\347\243\35\22\235\241v\247k\246<\r\305a\271\335V\305&\30
> \324-=\204\256\4`@\302`\333"..., 16384) = 48
> select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(10, "t", 1)                       = 1
> ioctl(10, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig -icanon
> -echo ...}) = 0
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(12, "t", 16384)                    = 1
> select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(3, ")(\353\317\2G(<\374e\346\253\277&R\214\37719\\\306\341\241d\5
> \247\237\3059\35B}"..., 48) = 48
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(3, "i2xeL\20\215\266~s\264\264/fIZe\314v\304\216E\323GO\236\34\331
> \364\250[l"..., 16384) = 48
> select(13, [3 6 8 9 12], [10], NULL, NULL) = 1 (out [10])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(10, "\r", 1)                      = 1
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(12, "\r\n", 16384)                 = 2
> select(13, [3 6 8 9 12], [3], NULL, NULL) = 2 (in [12], out [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(12, "logout\r\n", 16384)           = 8
> write(3, "v\216`<\244\240\264\32D\331\240\212R\250-+\346\325\237b\255
> \351{{y\327D4(\250\371\313"..., 48) = 48
> select(13, [3 6 8 9 12], [3], NULL, NULL) = 1 (out [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(3, "\261\10\331\20fV\225\231\351=\2111\34\225G\366r\222+a\335\264
> \244\266\r\17\2424^\311\0027"..., 48) = 48
> select(13, [3 6 8 9 12], [], NULL, NULL) = 1 (in [12])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(12, 0x7fff72ac4d40, 16384)         = -1 EIO (Input/output error)
> close(12)                               = 0
> select(13, [3 6 8 9], [3], NULL, NULL)  = 1 (out [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> write(3, "\217\254\305\327\4\235N\266r\214\6h\341\256hg\362\227kNa\322
> \376\33\306\363i\233\243\260x\311", 32) = 32
> select(13, [3 6 8 9], [], NULL, NULL)   = 1 (in [3])
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> read(3, "", 16384)                      = 0
> rt_sigprocmask(SIG_BLOCK, [CHLD], ~[KILL ALRM STOP RTMIN RT_1], 8) = 0
> rt_sigprocmask(SIG_SETMASK, ~[KILL ALRM STOP RTMIN RT_1], NULL, 8) = 0
> close(10)                               = 0
> shutdown(8, 2 /* send and receive */)   = 0
> close(8)                                = 0
> close(8)                                = -1 EBADF (Bad file descriptor)
> close(8)                                = -1 EBADF (Bad file descriptor)
> shutdown(9, 2 /* send and receive */)   = 0
> close(9)                                = 0
> close(9)                                = -1 EBADF (Bad file descriptor)
> close(9)                                = -1 EBADF (Bad file descriptor)
> brk(0x7fc905223000)                     = 0x7fc905223000
> write(5, "\0\0\0\17\34", 5)             = 5
> write(5, "\0\0\0\n/dev/pts/1", 14)      = 14
> close(13)                               = 0
> shutdown(3, 2 /* send and receive */)   = 0
> close(3)                                = 0
> write(5, "\0\0\0\1=", 5)                = 5
> exit_group(0)                           = ?
> Process 8124 detached


Ken, two comments:

1. ltrace can sometimes be more useful than strace.  Not that it necessarily
   would be here.  Just saying because sometimes the library calls are
   more transparent than the system calls.

2. Perhaps you have something running in the background that's preventing
   the shell from exiting?

Pete

-- 
GPG Fingerprint: B9F1 6CF3 47C4 7CD8 D33E  70A9 A3B9 1945 67EA 951D
Last night I dreamt of 09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Facebook: http://facebook.com/coffeeAchiever

"The fundamental cause of trouble in the world today   p@dirac.org
is that the stupid are cocksure while the intelligent  http://www.dirac.org
are full of doubt"   ---   Bertrand Russell
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Sunset Systems
Who graciously hosts our website & mailing lists!