bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB testsuite vs. /hurd/term


From: Thomas Schwinge
Subject: GDB testsuite vs. /hurd/term
Date: Sun, 27 Mar 2011 00:45:11 +0100
User-agent: Notmuch/0.5-77-g335dd52 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

Hallo!

The GDB testsuite uses the expect program to control a GDB process
(testee).  These are connected via a pseudo terminal, by /hurd/term.
Sooner or later, some action (of expect, of GDB, of ...) confuses the
term server that much, that it apparently gets into some inconsistent
internal state.  The symptom is that expect is no longer able to send
commands to the GDB process (and / or vice versa), and thus every test
will time out.  If I kill the testsuite (and thus the pseudo terminal is
free again), another subsequent user of it will block, too.  (For
example, running a shell on it won't make it to the prompt.)

I got a backtrace, see below.  Typically, new term processes that I've
seen have five threads, this one here has six, but there are also
long-running functional processes with more than ten threads, so that
shouldn't be worrying.

In this wedged state, two threads are waiting for condition signalling in
two (different) select routines; nothing else.  I had a look at the two
select routines, and didn't immediatelly spot anything wrong with them.
But of course, using condition variables, the logic is spread all-over...

I will try to figure out if it's one deterministic action in the GDB
testsuite that triggers this behavior.  But then, I guess whatever expect
/ GDB are doing, this shouldn't make the terminal go into an irregular
state.

How would you continue to debug this?


    Thread 6 (Thread 685.17):
    #0  0x01081f4c in mach_msg_trap () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/eglibc-2.11.2/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2
    No locals.
    #1  0x01082749 in __mach_msg (msg=0x129bcf8, option=2, send_size=0, 
rcv_size=24, rcv_name=53, timeout=0, notify=0) at msg.c:110
            ret = <value optimized out>
    #2  0x0104dcff in cproc_block () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cprocs.c:638
            msg = {msgh_bits = 4352, msgh_size = 24, msgh_remote_port = 0, 
msgh_local_port = 53, msgh_seqno = 17915, msgh_id = 134863832}
            waiter = <value optimized out>
            new = <value optimized out>
            p = 0x809dbc8
    #3  0x0104f57c in hurd_condition_wait (m=0x805aa64) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cancel-cond.c:86
            cancel = <value optimized out>
            __PRETTY_FUNCTION__ = "hurd_condition_wait"
            c = 0x805a954
    #4  0x08053b29 in pty_io_select (cred=0x80cece0, reply=49, type=0x129bf2c) 
at /home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./term/ptyio.c:493
            avail = 0
    #5  0x0103ebc1 in _Xio_select (InHeadP=0x129bf10, OutHeadP=0x129df20) at 
ioServer.c:893
            io_object = 0x35
    #6  0x0103dc5f in trivfs_io_server (InHeadP=0x1, OutHeadP=0x10004005) at 
ioServer.c:2005
            routine = 0x35
    #7  0x01037eac in trivfs_demuxer (inp=0x129bf10, outp=0x129df20) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libtrivfs/demuxer.c:33
    No locals.
    #8  0x0805347e in demuxer (inp=0x129bf10, outp=0x129df20) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./term/main.c:69
    No locals.
    #9  0x01054173 in internal_demuxer (inp=0x129bf10, outheadp=0x129df20) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:101
            err = <value optimized out>
            status = <value optimized out>
            pi = 0x80cece0
            link = {thread = 40, next = 0x0, prevp = 0x80cecfc, notifies = 
0x805d598, interrupted_next = 0x0}
            __PRETTY_FUNCTION__ = "internal_demuxer"
            lock = <error reading variable lock (Cannot access memory at 
address 0x1d)>
            nreqthreads = <error reading variable nreqthreads (Cannot access 
memory at address 0x19)>
            totalthreads = <error reading variable totalthreads (Cannot access 
memory at address 0x15)>
            bucket = <error reading variable bucket (Cannot access memory at 
address 0x11)>
            demuxer = <error reading variable demuxer (Cannot access memory at 
address 0xd)>
    #10 0x01082e16 in __mach_msg_server_timeout (demux=0x124fd1c, 
max_size=8192, rcv_name=16, option=2048, timeout=0) at msgserver.c:109
            request = 0x129bf10
            reply = 0x129df20
            mr = 268451845
            __PRETTY_FUNCTION__ = "__mach_msg_server_timeout"
    #11 0x01053ec0 in thread_function (master=0) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:136
            timeout = 0
            err = <value optimized out>
            hook = 0
            global_timeout = 0
            thread_timeout = 0
            bucket = 0x805b3b0
            lock = 0
            totalthreads = 5
            nreqthreads = 3
    #12 0x0104f068 in cthread_body (self=0x809dbc8) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cthreads.c:300
            t = 0x809dc28
    #13 0x00000000 in ?? ()
    No symbol table info available.
    
    Thread 5 (Thread 685.16):
    #0  0x01081f4c in mach_msg_trap () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/eglibc-2.11.2/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2
    No locals.
    #1  0x01082749 in __mach_msg (msg=0x128bf10, option=2051, send_size=32, 
rcv_size=8192, rcv_name=16, timeout=0, notify=0) at msg.c:110
            ret = <value optimized out>
    #2  0x01082e79 in __mach_msg_server_timeout (demux=0x124fd1c, 
max_size=8192, rcv_name=16, option=2048, timeout=0) at msgserver.c:151
            request = 0x128df20
            reply = 0x128bf10
            mr = <value optimized out>
            __PRETTY_FUNCTION__ = "__mach_msg_server_timeout"
    #3  0x01053ec0 in thread_function (master=0) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:136
            timeout = 0
            err = <value optimized out>
            hook = 0
            global_timeout = 0
            thread_timeout = 0
            bucket = 0x805b3b0
            lock = 0
            totalthreads = 5
            nreqthreads = 3
    #4  0x0104f068 in cthread_body (self=0x805d868) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cthreads.c:300
            t = 0x805d7f0
    #5  0x00000000 in ?? ()
    No symbol table info available.
    
    Thread 4 (Thread 685.15):
    #0  0x01081f4c in mach_msg_trap () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/eglibc-2.11.2/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2
    No locals.
    #1  0x01082749 in __mach_msg (msg=0x127bce8, option=2, send_size=0, 
rcv_size=24, rcv_name=42, timeout=0, notify=0) at msg.c:110
            ret = <value optimized out>
    #2  0x0104dcff in cproc_block () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cprocs.c:638
            msg = {msgh_bits = 38, msgh_size = 72, msgh_remote_port = 1, 
msgh_local_port = 36, msgh_seqno = 21, msgh_id = 19381536}
            waiter = <value optimized out>
            new = <value optimized out>
            p = 0x805c960
    #3  0x0104f57c in hurd_condition_wait (m=0x805aa64) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cancel-cond.c:86
            cancel = <value optimized out>
            __PRETTY_FUNCTION__ = "hurd_condition_wait"
            c = 0x805aa38
    #4  0x08051069 in trivfs_S_io_select (cred=0x80ce728, reply=38, 
reply_type=17, type=0x127bf2c) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./term/users.c:2034
            available = 0
    #5  0x0103ebc1 in _Xio_select (InHeadP=0x127bf10, OutHeadP=0x127df20) at 
ioServer.c:893
            io_object = 0x2a
    #6  0x0103dc5f in trivfs_io_server (InHeadP=0x1, OutHeadP=0x10004005) at 
ioServer.c:2005
            routine = 0x2a
    #7  0x01037eac in trivfs_demuxer (inp=0x127bf10, outp=0x127df20) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libtrivfs/demuxer.c:33
    No locals.
    #8  0x0805347e in demuxer (inp=0x127bf10, outp=0x127df20) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./term/main.c:69
    No locals.
    #9  0x01054173 in internal_demuxer (inp=0x127bf10, outheadp=0x127df20) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:101
            err = <value optimized out>
            status = <value optimized out>
            pi = 0x80ce728
            link = {thread = 43, next = 0x0, prevp = 0x80ce744, notifies = 
0x805d1f8, interrupted_next = 0x0}
            __PRETTY_FUNCTION__ = "internal_demuxer"
            lock = <error reading variable lock (Cannot access memory at 
address 0x1d)>
            nreqthreads = <error reading variable nreqthreads (Cannot access 
memory at address 0x19)>
            totalthreads = <error reading variable totalthreads (Cannot access 
memory at address 0x15)>
            bucket = <error reading variable bucket (Cannot access memory at 
address 0x11)>
            demuxer = <error reading variable demuxer (Cannot access memory at 
address 0xd)>
    #10 0x01082e16 in __mach_msg_server_timeout (demux=0x124fd1c, 
max_size=8192, rcv_name=16, option=2048, timeout=0) at msgserver.c:109
            request = 0x127bf10
            reply = 0x127df20
            mr = 268451845
            __PRETTY_FUNCTION__ = "__mach_msg_server_timeout"
    #11 0x01053ec0 in thread_function (master=0) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:136
            timeout = 0
            err = <value optimized out>
            hook = 0
            global_timeout = 0
            thread_timeout = 0
            bucket = 0x805b3b0
            lock = 0
            totalthreads = 5
            nreqthreads = 3
    #12 0x0104f068 in cthread_body (self=0x805c960) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cthreads.c:300
            t = 0x805c8e8
    #13 0x00000000 in ?? ()
    No symbol table info available.
    
    Thread 3 (Thread 685.14):
    #0  0x01081f4c in mach_msg_trap () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/eglibc-2.11.2/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2
    No locals.
    #1  0x01082749 in __mach_msg (msg=0x126df20, option=2051, send_size=32, 
rcv_size=8192, rcv_name=16, timeout=0, notify=0) at msg.c:110
            ret = <value optimized out>
    #2  0x01082e79 in __mach_msg_server_timeout (demux=0x124fd1c, 
max_size=8192, rcv_name=16, option=2048, timeout=0) at msgserver.c:151
            request = 0x126bf10
            reply = 0x126df20
            mr = <value optimized out>
            __PRETTY_FUNCTION__ = "__mach_msg_server_timeout"
    #3  0x01053ec0 in thread_function (master=0) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:136
            timeout = 0
            err = <value optimized out>
            hook = 0
            global_timeout = 0
            thread_timeout = 0
            bucket = 0x805b3b0
            lock = 0
            totalthreads = 5
            nreqthreads = 3
    #4  0x0104f068 in cthread_body (self=0x805bdf0) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cthreads.c:300
            t = 0x805bd78
    #5  0x00000000 in ?? ()
    No symbol table info available.
    
    Thread 2 (Thread 685.13):
    #0  0x01081f4c in mach_msg_trap () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/eglibc-2.11.2/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2
    No locals.
    #1  0x01082749 in __mach_msg (msg=0x125df20, option=3, send_size=32, 
rcv_size=4096, rcv_name=12, timeout=0, notify=0) at msg.c:110
            ret = <value optimized out>
    #2  0x01082e79 in __mach_msg_server_timeout (demux=0x1093980 
<msgport_server>, max_size=4096, rcv_name=12, option=0, timeout=0) at 
msgserver.c:151
            request = 0x125ef30
            reply = 0x125df20
            mr = <value optimized out>
            __PRETTY_FUNCTION__ = "__mach_msg_server_timeout"
    #3  0x01082f4b in __mach_msg_server (demux=0x1093980 <msgport_server>, 
max_size=4096, rcv_name=12) at msgserver.c:196
    No locals.
    #4  0x0109394f in _hurd_msgport_receive () at msgportdemux.c:68
    No locals.
    #5  0x0104f068 in cthread_body (self=0x805ac08) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libthreads/cthreads.c:300
            t = 0x805ab90
    #6  0x00000000 in ?? ()
    No symbol table info available.
    
    Thread 1 (Thread 685.12):
    #0  0x01081f4c in mach_msg_trap () at 
/home/buildd/build/chroot-sid/home/buildd/byhand/eglibc-2.11.2/build-tree/hurd-i386-libc/mach/mach_msg_trap.S:2
    No locals.
    #1  0x01082749 in __mach_msg (msg=0x124dc70, option=2051, send_size=32, 
rcv_size=8192, rcv_name=16, timeout=0, notify=0) at msg.c:110
            ret = <value optimized out>
    #2  0x01082e79 in __mach_msg_server_timeout (demux=0x124fd1c, 
max_size=8192, rcv_name=16, option=2048, timeout=0) at msgserver.c:151
            request = 0x124bc60
            reply = 0x124dc70
            mr = <value optimized out>
            __PRETTY_FUNCTION__ = "__mach_msg_server_timeout"
    #3  0x01053ec0 in thread_function (master=1) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:136
            timeout = 0
            err = <value optimized out>
            hook = 0
            global_timeout = 0
            thread_timeout = 0
            bucket = 0x805b3b0
            lock = 0
            totalthreads = 5
            nreqthreads = 3
    #4  0x01053fd7 in ports_manage_port_operations_multithread 
(bucket=0x805b3b0, demuxer=0x8053460 <demuxer>, hook=0) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./libports/manage-multithread.c:164
            lock = 0
            global_timeout = 0
            thread_timeout = 0
            nreqthreads = 3
            totalthreads = 5
    #5  0x08053195 in main (argc=4, argv=0x124fea4) at 
/home/buildd/build/chroot-sid/home/buildd/byhand/hurd/./term/main.c:450
            ourclass = 0x805b4c8
            ourcntlclass = <value optimized out>
            peerclass = 0x805b468
            peercntlclass = 0x805b3e8
            ourcntl = 0x805a9cc
            peercntl = 0x805a9c8
            bootstrap = 8
            right = <value optimized out>
            st = {st_fstype = 23, st_fsid = 3, st_ino = 82008, st_gen = 
1267456677, st_rdev = 0, st_mode = 6324662, st_nlink = 1, st_uid = 0, st_gid = 
0, st_size = 0, st_atim = {tv_sec = 1267456243, tv_nsec = 0}, st_mtim = {tv_sec 
= 1267456243, tv_nsec = 0}, st_ctim = {
                tv_sec = 1267456243, tv_nsec = 0}, st_blksize = 8192, st_blocks 
= 8, st_author = 0, st_flags = 0, st_spare = {16, 136697488, 136480672, 352, 
16, 136697504, 136250200, 368}}
            err = <value optimized out>
            openmode = 134592216


Grüße,
 Thomas

Attachment: pgpluUz9SOIRp.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]