pty problems w/ Unixware

Tom Rudnick tom at avatar.itc.nrcs.usda.gov
Thu Feb 1 10:10:43 EST 2001


> 
> On Wed, 31 Jan 2001, Tom Rudnick wrote:
> 
> > Now, it hangs after establishing the interactive session. When
> > I kill it I get:
> > 
> > error: grantpt: Interrupted system call
> > error: session_pty_req: session 0 alloc failed
> > error: session_by_pid: unknown pid 27578
> > 
> > on the server side.
> 
> Can you strace or truss the server at this point?
> 

Here's debug output from sshd -d -d -d plus truss output from the
same point. After the client hangs, I send a kill -INT to it at
which point it closes the connection.

Hope this is illuminating...

I have the full truss output, but I think this is most relevant.


Accepted password for user52 from 192.168.29.7 port 4109 ssh2
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 32768 max 16384
debug1: open session
debug1: channel 0: new [server-session]
debug1: session_new: init
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: confirm session
debug2: callback start
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 channel 0 request pty-req reply 0
debug1: Received SIGCHLD.
error: grantpt: Interrupted system call
error: session_pty_req: session 0 alloc failed
debug2: callback done
debug2: callback start
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 channel 0 request shell reply 0

[truss ends here]

debug1: fd 12 setting O_NONBLOCK
debug1: fd 12 IS O_NONBLOCK
debug1: fd 14 setting O_NONBLOCK
debug2: callback done
debug1: tvp!=NULL kid 1 mili 100
debug1: session_by_pid: pid 3887
error: session_by_pid: unknown pid 3887
debug1: dump: used 1 session 0 80ea9a0 channel 0 pid 3889
debug1: dump: used 0 session 1 80eaa2c channel 0 pid 0
debug1: dump: used 0 session 2 80eaab8 channel 0 pid 0
debug1: dump: used 0 session 3 80eab44 channel 0 pid 0
debug1: dump: used 0 session 4 80eabd0 channel 0 pid 0
debug1: dump: used 0 session 5 80eac5c channel 0 pid 0
debug1: dump: used 0 session 6 80eace8 channel 0 pid 0
debug1: dump: used 0 session 7 80ead74 channel 0 pid 0
debug1: dump: used 0 session 8 80eae00 channel 0 pid 0
debug1: dump: used 0 session 9 80eae8c channel 0 pid 0
debug1: session_close_by_pid: no session for pid 0
debug2: channel 0: read 13 from efd 14
debug2: channel 0: read 42 from efd 14
debug2: channel 0: read 92 from efd 14
debug2: channel 0: read 36 from efd 14
Connection closed by remote host.
debug1: Calling cleanup 0x805b394(0x0)
debug1: Calling cleanup 0x806185c(0x0)
debug1: Calling cleanup 0x806699c(0x0)
debug1: writing PRNG seed to file //.ssh/prng_seed


--- output from truss starting at the same point. It appears that
lvlproc() (whatever that is) is failing and resulting in no pty
being allocated.


3794:	write(2, " A c c e p t e d   p a s".., 61)	= 61
3794:	write(6, "FF j 6 XDD839507 & cC1D0".., 36)	= 36
3794:	alarm(0)					= 0
3794:	write(2, " d e b u g 1 :   E n t e".., 47)	= 47
3794:	signal(SIGCLD, 0x0805323C)			= SIG_DFL
3794:	signal(SIGPIPE, SIG_IGN)			= SIG_DFL
3794:	write(2, " d e b u g 1 :   s e r v".., 32)	= 32
3794:	poll(0x08045530, 1, -1)				= 1
3794:	read(6, "CB !85AC T vC4D7FDD3 _1A".., 16384)	= 60
3794:	write(2, " d e b u g 1 :   s e r v".., 76)	= 76
3794:	write(2, "\n", 1)				= 1
3794:	write(2, " d e b u g 1 :   o p e n".., 21)	= 21
3794:	brk(0x08105060)					= 0
3794:	write(2, " d e b u g 1 :   c h a n".., 40)	= 40
3794:	write(2, " d e b u g 1 :   s e s s".., 26)	= 26
3794:	write(2, " d e b u g 1 :   s e s s".., 31)	= 31
3794:	write(2, " d e b u g 1 :   s e s s".., 32)	= 32
3794:	write(2, " d e b u g 1 :   s e s s".., 53)	= 53
3794:	write(2, " d e b u g 1 :   c o n f".., 24)	= 24
3794:	poll(0x08045530, 1, -1)				= 1
3794:	write(6, " A88F182   b kE5BB  AA U".., 52)	= 52
3794:	poll(0x08045530, 1, -1)				= 1
3794:	read(6, " u7FFBE4E4 b V {94D4FD94".., 16384)	= 120
3794:	write(2, " d e b u g 2 :   c a l l".., 23)	= 23
3794:	write(2, " d e b u g 1 :   s e s s".., 48)	= 48
3794:	write(2, " d e b u g 1 :   s e s s".., 78)	= 78
3794:	write(2, "\n", 1)				= 1
3794:	open("/dev/ptmx", 04002, 01001072224)		= 9
3794:	fork1()						= 3887
3887:		*** Expected fork SYSEXIT
3887:	fork1()		(returning as child ...)	= 3794
3887:	execve("/usr/lib/pt_chmod", 0x08047440, 0x08047CB0)  argc = 2
3887:	open("/usr/lib/ns.so.1", O_RDONLY, 01)		Err#2  ENOENT
3887:	brk(0x08302D84)					= 0
3887:	open("/etc/group", O_RDONLY, 0666)		= 10
3887:	ioctl(10, TCGETA, 0x080479BE)			Err#25 ENOTTY
3887:	fxstat(2, 10, 0x080479EC)			= 0
3887:	brk(0x08305D84)					= 0
3887:	read(10, " r o o t : : 0 : r o o t".., 8192)	= 324
3887:	close(10)					= 0
3887:	ioctl(9, I_STR, 0x08047A14)			= 0
3887:	fxstat(2, 9, 0x08047AAC)			= 0
3887:	access("/dev/pts/0", 0)				= 0
3887:	xstat(2, "/dev/pts/0", 0x08047A24)		= 0
3887:	xstat(2, "/dev/ptmx", 0x08047BD8)		= 0
3887:	fxstat(2, 9, 0x08047B50)			= 0
3887:	lvlproc(1, 0x08047C8C)				Err#65 ENOPKG
3887:	getuid()					= 0  [ 0 ]
3887:	chown("/dev/pts/0", 0, 7)			= 0
3887:	chmod("/dev/pts/0", 0620)			= 0
3887:	_exit(0)
3794:	    Received signal #18, SIGCLD, in waitsys() [caught]
3794:	      siginfo: SIGCLD CLD_EXITED pid=3887 uid=0 status=0x0000
3794:	waitsys(P_PID, 3887, 0x080473B8, WEXITED|WTRAPPED) Err#4  EINTR
3794:	write(2, " d e b u g 1 :   R e c e".., 26)	= 26
3794:	write(2, " e r r o r :   g r a n t".., 40)	= 40
3794:	write(2, " e r r o r :   s e s s i".., 47)	= 47
3794:	write(2, " d e b u g 2 :   c a l l".., 22)	= 22
3794:	write(2, " d e b u g 2 :   c a l l".., 23)	= 23
3794:	write(2, " d e b u g 1 :   s e s s".., 48)	= 48
3794:	write(2, " d e b u g 1 :   s e s s".., 76)	= 76
3794:	write(2, "\n", 1)				= 1
...

-- 
----------------/----------------------------------------------
Tom Rudnick     | USDA Natural Resources Conservation Service
Fort Collins,CO | tom at avatar.itc.nrcs.usda.gov  (970) 295-5427
** The 3rd Millennium starts Jan 1, 2001. see:               **
**   http://aa.usno.navy.mil/AA/faq/docs/millennium.html     **
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-





More information about the openssh-unix-dev mailing list