Subject: kern/12534: processes can hang at ttyout
To: None <gnats-bugs@gnats.netbsd.org>
From: Antti Kantee <pooka@iki.fi>
List: netbsd-bugs
Date: 04/03/2001 11:26:47
>Number: 12534
>Category: kern
>Synopsis: Processes can hang at exit-time on ttyout
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 03 01:27:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Antti Kantee
>Release: 1.5.1_ALPHA
>Organization:
>Environment:
System: NetBSD 1.5.1_ALPHA i386
>Description:
Under some conditions an exiting process can hang in the kernel:
zhora:1:~> ps axl
UID PID PPID CPU PRI NI VSZ RSS WCHAN STAT TT TIME COMMAND
26645 9966 1 0 4 0 200 532 ttyout IE p0- 0:00.01 (uisp)
I have figured out nothing that helps short of a reboot.
Inside the kernel the process traceback looks like this:
#0 mi_switch (p=0xf6740010) at ../../../../kern/kern_synch.c:834
#1 0xc0134cfe in ltsleep (ident=0xf637e164, priority=282,
wmesg=0xc028f263 "ttyout", timo=0, interlock=0x0)
at ../../../../kern/kern_synch.c:482
#2 0xc0144c66 in ttysleep (tp=0xf637e11c, chan=0xf637e164, pri=282,
wmesg=0xc028f263 "ttyout", timo=0) at ../../../../kern/tty.c:2121
#3 0xc0143633 in ttywait (tp=0xf637e11c) at ../../../../kern/tty.c:1085
#4 0xc014367a in ttywflush (tp=0xf637e11c) at ../../../../kern/tty.c:1102
#5 0xc01438d2 in ttylclose (tp=0xf637e11c, flag=3)
at ../../../../kern/tty.c:1223
#6 0xc0105ace in comclose (dev=2048, flag=3, mode=8192, p=0xf6740010)
at ../../../../dev/ic/com.c:905
#7 0xc01651a6 in spec_close (v=0xf71a4e4c)
at ../../../../miscfs/specfs/spec_vnops.c:653
#8 0xc0221ac1 in ufsspec_close (v=0xf71a4e4c)
at ../../../../ufs/ufs/ufs_vnops.c:1758
#9 0xc015c557 in vn_close (vp=0xf69fe948, flags=3, cred=0xc0dd7580,
p=0xf6740010) at ../../../../sys/vnode_if.h:171
#10 0xc015ce07 in vn_closefile (fp=0xf671fe74, p=0xf6740010)
at ../../../../kern/vfs_vnops.c:605
#11 0xc012b73a in closef (fp=0xf671fe74, p=0xf6740010)
at ../../../../kern/kern_descrip.c:1090
#12 0xc012b56d in fdfree (p=0xf6740010) at ../../../../kern/kern_descrip.c:965
---Type <return> to continue, or q <return> to quit---
#13 0xc012d1a2 in exit1 (p=0xf6740010, rv=2)
at ../../../../kern/kern_exit.c:185
#14 0xc01333bb in sigexit (p=0xf6740010, signum=2)
at ../../../../kern/kern_sig.c:1281
#15 0xc01331ba in postsig (signum=2) at ../../../../kern/kern_sig.c:1178
#16 0xc023a0f2 in syscall (frame={tf_es = 31, tf_ds = 31,
tf_edi = -1077946988, tf_esi = 1, tf_ebp = -1077957156,
tf_ebx = -1077957188, tf_edx = 3404, tf_ecx = 4, tf_eax = 4,
tf_trapno = 3, tf_err = 2, tf_eip = 1209026483, tf_cs = 23,
tf_eflags = 519, tf_esp = -1077957320, tf_ss = 31, tf_vm86_es = 0,
tf_vm86_ds = 0, tf_vm86_fs = 0, tf_vm86_gs = 0})
at ../../../../arch/i386/i386/trap.c:187
#17 0xc0100cab in syscall1 ()
Here's one from another process which seems to be suffering from the
same problem:
#0 mi_switch (p=0xf66a8980) at ../../../../kern/kern_synch.c:834
#1 0xc0134cfe in ltsleep (ident=0xf637e5d4, priority=282,
wmesg=0xc028f263 "ttyout", timo=0, interlock=0x0)
at ../../../../kern/kern_synch.c:482
#2 0xc0144c66 in ttysleep (tp=0xf637e58c, chan=0xf637e5d4, pri=282,
wmesg=0xc028f263 "ttyout", timo=0) at ../../../../kern/tty.c:2121
#3 0xc0143633 in ttywait (tp=0xf637e58c) at ../../../../kern/tty.c:1085
#4 0xc014367a in ttywflush (tp=0xf637e58c) at ../../../../kern/tty.c:1102
#5 0xc01438d2 in ttylclose (tp=0xf637e58c, flag=3)
at ../../../../kern/tty.c:1223
#6 0xc0144fa5 in ptsclose (dev=1282, flag=3, mode=8192, p=0xf66a8980)
at ../../../../kern/tty_pty.c:173
#7 0xc01651a6 in spec_close (v=0xf6dd7e4c)
at ../../../../miscfs/specfs/spec_vnops.c:653
#8 0xc0221ac1 in ufsspec_close (v=0xf6dd7e4c)
at ../../../../ufs/ufs/ufs_vnops.c:1758
#9 0xc015c557 in vn_close (vp=0xf6a52d0c, flags=3, cred=0xc0bb6f80,
p=0xf66a8980) at ../../../../sys/vnode_if.h:171
#10 0xc015ce07 in vn_closefile (fp=0xf671ff34, p=0xf66a8980)
at ../../../../kern/vfs_vnops.c:605
#11 0xc012b73a in closef (fp=0xf671ff34, p=0xf66a8980)
at ../../../../kern/kern_descrip.c:1090
#12 0xc012b56d in fdfree (p=0xf66a8980) at ../../../../kern/kern_descrip.c:965
---Type <return> to continue, or q <return> to quit---
#13 0xc012d1a2 in exit1 (p=0xf66a8980, rv=9)
at ../../../../kern/kern_exit.c:185
#14 0xc01333bb in sigexit (p=0xf66a8980, signum=9)
at ../../../../kern/kern_sig.c:1281
#15 0xc01331ba in postsig (signum=9) at ../../../../kern/kern_sig.c:1178
#16 0xc023a0f2 in syscall (frame={tf_es = 43, tf_ds = 43, tf_edi = 134736144,
tf_esi = 10, tf_ebp = -1077963604, tf_ebx = 10, tf_edx = 17,
tf_ecx = 135339784, tf_eax = 4, tf_trapno = 3, tf_err = 2,
tf_eip = 1209121465, tf_cs = 35, tf_eflags = 514, tf_esp = -1077963620,
tf_ss = 43, tf_vm86_es = 0, tf_vm86_ds = 0, tf_vm86_fs = 0,
tf_vm86_gs = 0}) at ../../../../arch/i386/i386/trap.c:187
#17 0xc0100cab in syscall1 ()
Especially notice frame #6!
>How-To-Repeat:
Not sure. Run eg. com port using processes until the problem shows up.
>Fix:
don't know
>Release-Note:
>Audit-Trail:
>Unformatted: