Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Mar 2002 18:18:48 -0500 (EST)
From:      Robert Watson <rwatson@freebsd.org>
To:        David Wolfskill <david@catwhisker.org>
Cc:        current@freebsd.org
Subject:   Re: Keyboard (quasi-)lockup running script
Message-ID:  <Pine.NEB.3.96L.1020308181553.91006A-100000@fledge.watson.org>
In-Reply-To: <200203082202.g28M2cS30276@bunrab.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help

I can reproduce this on a 5.0-CURRENT from yesterday, although I do appear
to be able to break into the serial debugger.  I get the following:

db> ps
  pid   proc     addr    uid  ppid  pgrp  flag  stat wmesg   wchan   cmd
 1955 c9737600 c9779000    0  1954  1955 0006002  3  ttywai c1bd8074 csh
 1954 c9736700 c97bb000    0  1951  1954 0004002  3  pgrpsess c03d801c script
 1951 c9736d00 c9773000    0  1872  1951 2004002  3   pause c9773000 csh
 1872 c9737f00 c975e000    0     1  1872 0004102  3    wait c9737f00 login

db> trace 1954
mi_switch(c03d8000,c03d801c,c0383380,c97beb08,c023d2f0) at mi_switch+0x17c
cv_wait(c03d801c,c040dac0,c9736700,c18be400,0) at cv_wait+0x1b7
_sx_slock(c03d8000,c0383380,78a,0,c982ec00) at _sx_slock+0x5c
ttwrite(c18be400,c97bec90,7f0001,c040b9c0,c97bebf8) at ttwrite+0xa4
siowrite(c040b9c0,c97bec90,7f0001,c040b9c0,4) at siowrite+0x78
spec_write(c97bec24,c97bec38,c027b637,c97bec24,4) at spec_write+0x5d
spec_vnoperate(c97bec24,4,c97bed20,0,1) at spec_vnoperate+0x15
vn_write(c1bd11c0,c97bec90,c1b1c600,0,c9736800) at vn_write+0x1a3
dofilewrite(c9736800,c1bd11c0,1,bfbff790,4) at dofilewrite+0xb6
write(c9736800,c97bed20,0,4,11) at write+0x51
syscall(2f,2f,2f,11,4) at syscall+0x21f
syscall_with_err_pushed() at syscall_with_err_pushed+0x1b
--- syscall (4, FreeBSD ELF, write), eip = 0x280c3fd7, esp = 0xbfbff2cc,
ebp = 0xbfbffc18 ---

So it looks like the process is writing to its tty, and a lock is
attempting to be grabbed on the session group.  Unfortunately, 'show
locks' now seems to be broken for me, perhaps I don't have WITNESS
compiled in...?  I'll try to track it down further.

Robert N M Watson             FreeBSD Core Team, TrustedBSD Project
robert@fledge.watson.org      NAI Labs, Safeport Network Services

On Fri, 8 Mar 2002, David Wolfskill wrote:

> Is anyone else seeing this?
> 
> Running -CURRENT (been tracking it daily for a while, now), I find that
> if I run script(1), things basically run as expected... until I try to
> close script's stdin (normally, by entering EOT (^D)).
> 
> At that point, I can use the mouse (if I'm in an environment where that
> makes sense); I can switch among the ttyvNs (up to a point), but nothing
> indicates that any (other) characters are being read -- I can't use
> Ctl+Alt+Esc to break into the debugger; can't Ctl+Alt+Del to reboot --
> it's power-cycle time (unless I remembered[*] that this was going to
> happen, and set up an "at" task to reboot at some auspicious time in the
> (near) future.
> 
> I first noticed this a few days ago, in conjunction with my normal build
> sequence:  I would fire up screen(1), within that "screen" session, fire
> up script(1), do the "make buildworld" & friends; after the mergemaster,
> I'd exit script(1), then reboot.
> 
> Except that (starting a few days ago -- between Sunday - Tuesday, I
> think) I would hit ^D on the script session, and fail to get a shell
> prompt back.  I could still type on xterms displayed on my laptop (the
> machine I was upgrading at the time) that were actually running on other
> machines (and get expected/useful responses back, too).  And as
> alluded to above, setting up an "at" task ahead of time appears to
> work OK.
> 
> I had thought that there might be some correlation bewteen this and some
> whines (warning messages) I was seeing from sudo(8), since I needed to
> have a different sudo executable for -CURRENT than I do for -STABLE.
> So, this afternoon, I removed sudo & re-built it (under today's
> -CURRENT).
> 
> But then I discovered that the behavior (quasi-lockup) occurs even if I
> use script(1) as a "normal" user -- no use of sudo at all.
> 
> This would seem to be A Bad Thing.
> 
> Here's my recent CVSup history:
> freebeast(4.5-S)[4] tail /var/log/cvsup-history.log
> CVSup begin from cvsup14.freebsd.org at Mon Mar  4 03:47:03 PST 2002
> CVSup ended from cvsup14.freebsd.org at Mon Mar  4 03:53:29 PST 2002
> CVSup begin from cvsup14.freebsd.org at Tue Mar  5 03:47:07 PST 2002
> CVSup ended from cvsup14.freebsd.org at Tue Mar  5 03:54:20 PST 2002
> CVSup begin from cvsup14.freebsd.org at Wed Mar  6 03:47:02 PST 2002
> CVSup ended from cvsup14.freebsd.org at Wed Mar  6 03:53:38 PST 2002
> CVSup begin from cvsup14.freebsd.org at Thu Mar  7 03:47:02 PST 2002
> CVSup ended from cvsup14.freebsd.org at Thu Mar  7 03:53:22 PST 2002
> CVSup begin from cvsup14.freebsd.org at Fri Mar  8 03:47:03 PST 2002
> CVSup ended from cvsup14.freebsd.org at Fri Mar  8 03:53:39 PST 2002
> 
> And the laptop is presently running:
> g1-6(5.0-C)[1] uname -a
> FreeBSD g1-6.catwhisker.org 5.0-CURRENT FreeBSD 5.0-CURRENT #93: Fri Mar  8 08:17:09 PST 2002     root@g1-7.catwhisker.org:/common/S3/obj/usr/src/sys/LAPTOP_30W  i386
> g1-6(5.0-C)[2] 
> 
> 
> If some kind soul would care to loan me a clue, I'll be happy to
> hunt for causes and such.  I can provide kernel configs, dmesg
> output, and the like on a Web page, if that would be useful -- but
> what I'm asking for at this point is hints for narrowing the scope
> down somewhat from "the entire known universe".  (OK; that was
> melodramatic.  Sorry.)
> 
> * "It's a poor sort of memory that only works backaards," the Queen
> remarked. -- Lewis Carroll; _Through the Looking-Glass_ ("Wool and
> Water")
> 
> Thanks,
> david
> -- 
> David H. Wolfskill				david@catwhisker.org
> I believe it would be irresponsible (and thus, unethical) for me to advise,
> recommend, or support the use of any product that is or depends on any
> Microsoft product for any purpose other than personal amusement.
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1020308181553.91006A-100000>