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

New oskit-mach debugging log - failed assertion 'port->ip_srights > 0'



Ok, I improved my debugging report. This time,
I just loaded the debugger and hit "c" to let it
run. It always crashed in oskit-mach/ipc/ipc_port.c
at line 1126 in function ipc_port_release_send().

Through the use of breakpoints, I found that it
fails the *third* time it runs through this function,
when it attempts to execute:

   1126         assert(port->ip_srights > 0);

Here is the script I recorded with display/i $pc,
bt full, and info reg. Forgot to do the x/40i sorry.

- Doug

<snip>

Script started on Sun Mar 10 21:21:45 2002
<1>(mirage)[/usr/src/gnu/oskit-mach.build]
# i686-linux-gdb GNU gdb 5.0
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=hppa1.1-unknown-linux-gnu --target=i686-linux".
(gdb) file kernel
Reading symbols from kernel...done.
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x0013dd50 in main (argc=172448, argv=0x0) at ../hurd-20020103/oskit-mach/oskit/x86/main.c:90
90	}
(gdb) b ../hurd-20020103/oskit-mach/ipc/ipc_port.c:ipc_port_release_send
Breakpoint 1 at 0x10a7da: file ../hurd-20020103/oskit-mach/ipc/ipc_port.c, line 1113.
(gdb) c
Continuing.
Welcome to GNUmach 1.2.91-OSKit!


module 0: /hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed ${root} $(task-create) $(task-resume) module 1: /lib/ld.so.1 /hurd/exec $(exec-task=task-create) 2 multiboot modules Breakpoint 1, ipc_port_release_send (port=0xc0d2604) at ../hurd-20020103/oskit-mach/ipc/ipc_port.c:1113
1113		ipc_port_t nsrequest = IP_NULL;
(gdb) c
Continuing.

Breakpoint 1, ipc_port_release_send (port=0xc0d25a8) at ../hurd-20020103/oskit-mach/ipc/ipc_port.c:1113
1113		ipc_port_t nsrequest = IP_NULL;
(gdb) c
Continuing.

Breakpoint 1, ipc_port_release_send (port=0xc0d28d4) at ../hurd-20020103/oskit-mach/ipc/ipc_port.c:1113
1113		ipc_port_t nsrequest = IP_NULL;
(gdb) display/i $pc
1: x/i $eip  0x10a7da <ipc_port_release_send+6>:	movl   $0x0,0xfffffffc(%ebp)
(gdb) ni
1116		assert(IP_VALID(port));
1: x/i $eip  0x10a7e1 <ipc_port_release_send+13>:	cmpl   $0x0,0x8(%ebp)
(gdb) 0x0010a7e5 1116 assert(IP_VALID(port));
1: x/i $eip  0x10a7e5 <ipc_port_release_send+17>:	je     0x10a7f0 <ipc_port_release_send+28>
(gdb) 0x0010a7e7 1116 assert(IP_VALID(port));
1: x/i $eip  0x10a7e7 <ipc_port_release_send+19>:	cmpl   $0xffffffff,0x8(%ebp)
(gdb) 0x0010a7eb 1116 assert(IP_VALID(port));
1: x/i $eip  0x10a7eb <ipc_port_release_send+23>:	je     0x10a7f0 <ipc_port_release_send+28>
(gdb) 0x0010a7ed 1116 assert(IP_VALID(port));
1: x/i $eip  0x10a7ed <ipc_port_release_send+25>:	jmp    0x10a807 <ipc_port_release_send+51>
(gdb) 1119 ip_release(port);
1: x/i $eip  0x10a807 <ipc_port_release_send+51>:	mov    0x8(%ebp),%eax
(gdb) 0x0010a80a 1119 ip_release(port);
1: x/i $eip  0x10a80a <ipc_port_release_send+54>:	decl   (%eax)
(gdb) 0x0010a80c 1119 ip_release(port);
1: x/i $eip  0x10a80c <ipc_port_release_send+56>:	jmp    0x10a812 <ipc_port_release_send+62>
(gdb) 1121 if (!ip_active(port)) {
1: x/i $eip  0x10a812 <ipc_port_release_send+62>:	mov    0x8(%ebp),%eax
(gdb) 0x0010a815 1121 if (!ip_active(port)) {
1: x/i $eip  0x10a815 <ipc_port_release_send+65>:	cmpl   $0x0,0x4(%eax)
(gdb) 0x0010a819 1121 if (!ip_active(port)) {
1: x/i $eip  0x10a819 <ipc_port_release_send+69>:	jl     0x10a864 <ipc_port_release_send+144>
(gdb) 1126 assert(port->ip_srights > 0);
1: x/i $eip  0x10a864 <ipc_port_release_send+144>:	mov    0x8(%ebp),%eax
(gdb) 0x0010a867 1126 assert(port->ip_srights > 0);
1: x/i $eip  0x10a867 <ipc_port_release_send+147>:	cmpl   $0x0,0x24(%eax)
(gdb) 0x0010a86b 1126 assert(port->ip_srights > 0);
1: x/i $eip  0x10a86b <ipc_port_release_send+151>:	jne    0x10a884 <ipc_port_release_send+176>
(gdb) 0x0010a86d 1126 assert(port->ip_srights > 0);
1: x/i $eip  0x10a86d <ipc_port_release_send+153>:	add    $0xfffffff8,%esp
(gdb) 0x0010a870 1126 assert(port->ip_srights > 0);
1: x/i $eip  0x10a870 <ipc_port_release_send+156>:	push   $0x466
(gdb) 0x0010a875 1126 assert(port->ip_srights > 0);
1: x/i $eip  0x10a875 <ipc_port_release_send+161>:	push   $0x1b11c0
(gdb) 0x0010a87a 1126 assert(port->ip_srights > 0);
1: x/i $eip  0x10a87a <ipc_port_release_send+166>:	call   0x1ab010 <panic>
(gdb) l
1121		if (!ip_active(port)) {
1122			ip_check_unlock(port);
1123			return;
1124		}
1125	
1126		assert(port->ip_srights > 0);
1127	
1128		if (--port->ip_srights == 0) {
1129			nsrequest = port->ip_nsrequest;
1130			if (nsrequest != IP_NULL) {
(gdb) info reg
eax            0xc0d28d4	202189012
ecx            0x80000000	-2147483648
edx            0xc0d28d4	202189012
ebx            0xc0d2720	202188576
esp            0xd6d7570	0xd6d7570
ebp            0xd6d7598	0xd6d7598
esi            0xc0d2a67	202189415
edi            0xc0d06f8	202180344
eip            0x10a87a	0x10a87a
eflags         0x10307	66311
cs             0x10	16
ss             0x18	24
ds             0xd6d0018	225247256
es             0xd6d0018	225247256
fs             0xd6d0000	225247232
gs             0xd6d0000	225247232
fctrl          0x0	0
fstat          0x0	0
ftag           0x0	0
fiseg          0x0	0
fioff          0x0	0
foseg          0x0	0
fooff          0x0	0
fop            0x0	0
xmm0           0x00000000000000000000000000000000
xmm1           0x00000000000000000000000000000000
xmm2           0x00000000000000000000000000000000
xmm3           0x00000000000000000000000000000000
xmm4           0x00000000000000000000000000000000
xmm5           0x00000000000000000000000000000000
xmm6           0x00000000000000000000000000000000
xmm7           0x00000000000000000000000000000000
mxcsr          0x0	0
(gdb) bt full
#0  0x0010a87a in ipc_port_release_send (port=0xc0d28d4) at ../hurd-20020103/oskit-mach/ipc/ipc_port.c:1126
	nsrequest = 0x0
	mscount = 202188136
#1  0x0011cded in ipc_task_terminate (task=0xc0d2720) at ../hurd-20020103/oskit-mach/kern/ipc_tt.c:188
	kport = 0xc0d28d4
	i = 0
#2  0x00123bd1 in task_terminate (task=0xc0d2720) at ../hurd-20020103/oskit-mach/kern/task.c:426
	task = 0xc0d2720
	thread = 0xc0d2a67
	cur_thread = 0xc0d06f8
	list = (queue_head_t *) 0xc0d2738
	cur_task = 0xc0d04c8
	s = 0
#3  0x0011921c in boot_script_free_task (task=0xc0d2720, aborting=1) at ../hurd-20020103/oskit-mach/kern/bootstrap.c:815
No locals.
#4  0x001280b6 in free_cmd (cmd=0xc0d26b0, aborting=1) at ../hurd-20020103/oskit-mach/kern/boot_script.c:109
No locals.
#5  0x001281a2 in cleanup (aborting=1) at ../hurd-20020103/oskit-mach/kern/boot_script.c:131
	i = 1
#6  0x00129020 in boot_script_exec () at ../hurd-20020103/oskit-mach/kern/boot_script.c:632
	argv = (char **) 0xc0d29a0
	cmdline = 0xc0d29e0 ""
	i = 0
	argc = 7
	cmdline_alloc = 230
	cmdline_index = 141
	error = 5
	arg_index = 6
	cmd = (struct cmd *) 0xc0d058c
	cmd_index = 0
#7  0x001185b5 in bootstrap_create () at ../hurd-20020103/oskit-mach/kern/bootstrap.c:239
	i = 2
	losers = 0
	maxlen = 213
	bmods = (struct multiboot_module *) 0x1f6e0
	compat = 0
#8  0x00122afa in start_kernel_threads () at ../hurd-20020103/oskit-mach/kern/startup.c:246
	i = 1
#9  0x00121976 in thread_continue (old_thread=0x0) at ../hurd-20020103/oskit-mach/kern/sched_prim.c:850
	old_thread = 0x0
	continuation = 0x122a04 <start_kernel_threads>
(gdb) ni  l 1126
1121		if (!ip_active(port)) {
1122			ip_check_unlock(port);
1123			return;
1124		}
1125	
1126		assert(port->ip_srights > 0);
1127	
1128		if (--port->ip_srights == 0) {
1129			nsrequest = port->ip_nsrequest;
1130			if (nsrequest != IP_NULL) {
(gdb) ni
../hurd-20020103/oskit-mach/ipc/ipc_port.c:1126: failed assertion `port->ip_srights > 0'
Backtrace: fp=d6d7538
001ab03b 0010a87f 0011cded 00123bd1 0011921c 001280b6 001281a2 00129020
001185b5 00122afa 00121976
_Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n) y
(gdb) quit
<2>(mirage)[/usr/src/gnu/oskit-mach.build]
# Script done on Sun Mar 10 21:29:04 2002





Reply to: