From owner-freebsd-emulation@FreeBSD.ORG Tue Jan 16 21:17:51 2007 Return-Path: X-Original-To: emulation@freebsd.org Delivered-To: freebsd-emulation@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 59D6616A53A for ; Tue, 16 Jan 2007 21:17:51 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.245]) by mx1.freebsd.org (Postfix) with ESMTP id 06CC413C469 for ; Tue, 16 Jan 2007 21:17:50 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so1135222ana for ; Tue, 16 Jan 2007 13:17:50 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=d6ORI9zeF61aKb0NRRaqEIJ3fnUH2flaF2MP7cZUV2BJmKxztxz+dIZsN+gqJcbldG1Mv7yF/hGI2ReB+rWB2CaifiAmnWzdUEWlVKGeditBd+Rs4XwiJN/pR8e80bhfPXD8aNUdvT6/2x25yy5wgDbKsK+Rz8jQkDkpZ8udIvo= Received: by 10.64.193.8 with SMTP id q8mr8610032qbf.1168982252694; Tue, 16 Jan 2007 13:17:32 -0800 (PST) Received: by 10.65.189.7 with HTTP; Tue, 16 Jan 2007 13:17:32 -0800 (PST) Message-ID: <790a9fff0701161317q74b28955jf61b6e9651168a36@mail.gmail.com> Date: Tue, 16 Jan 2007 15:17:32 -0600 From: "Scot Hetzel" To: "Divacky Roman" In-Reply-To: <20070116181839.GA80994@stud.fit.vutbr.cz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_55911_25200285.1168982252626" References: <790a9fff0701151314x6dd48ecbg90a54729813e84e@mail.gmail.com> <20070116080015.8dus0vamssso0sww@webmail.leidinger.net> <790a9fff0701161005t75222f2l439e8c0c1153ffd2@mail.gmail.com> <20070116181839.GA80994@stud.fit.vutbr.cz> Cc: emulation@freebsd.org, Alexander Leidinger Subject: Re: linuxolator: fatal trap 12 when compiling libX11 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jan 2007 21:17:51 -0000 ------=_Part_55911_25200285.1168982252626 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/16/07, Divacky Roman wrote: > On Tue, Jan 16, 2007 at 12:05:37PM -0600, Scot Hetzel wrote: > > On 1/16/07, Alexander Leidinger wrote: > > >Please compile with debug symbols ("makeoptions DEBUG=-g" in the > > >kernel config), generate a coredump and run kgdb on it. If you load > > >modules, you need to run "make gdbinit" in the kernel compile > > >directory (old style kernel compiling, not the make buildkernel one). > > >This will allow to run "kldsyms" in kgdb which loads the debug symbols > > >for the modules. A trace will show the line numbers then. > > > > > > > # uname -a > > FreeBSD hp010 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Jan 16 01:47:09 > > CST 2007 swhetzel@hp010:/usr/src/7x/sys-orig/amd64/compile/GENERIC.debug > > amd64 > > > > NOTE: GENERIC.debug is the same as the GENERIC config file, except I > > removed the debugging options from GENERIC, and placed them in > > GENERIC.debug. GENERIC.debug just includes GENERIC. > > > > # cd /usr/src/7x/sys-orig/amd64/compile/GENERIC.debug > > # kdb -n 0 kernel.debug > > > > Fatal trap 12: page fault while in kernel mode > > cpuid = 0; apic id = 00 > > fault virtual address = 0x0 > > fault code = supervisor read data, page not present > > instruction pointer = 0x8:0xffffffffa2cb3ce8 > > stack pointer = 0x10:0xffffffffa314e9d0 > > frame pointer = 0x10:0xffffffffa314ea50 > > code segment = base 0x0, limit 0xfffff, type 0x1b > > = DPL 0, pres 1, long 1, def32 0, gran 1 > > processor eflags = interrupt enabled, resume, IOPL = 0 > > current process = 23285 (bash) > > panic: from debugger > > cpuid = 0 > > Uptime: 22m17s > > Physical memory: 1008 MB > > Dumping 122 MB: 107 91 75 59 43 27 11 > > > > #0 doadump () at pcpu.h:172 > > 172 __asm __volatile("movq %%gs:0,%0" : "=r" (td)); > > (kgdb) kldsysms > > : > > (kgdb) list *0xffffffffa2cb3ce8 > > 0xffffffffa2cb3ce8 is in linux_proc_exit > > (/usr/src/7x/sys-orig/modules/linux/../../compat/linux/linux_emul.c:173). > > 168 child_clear_tid = em->child_clear_tid; > > 169 > > 170 EMUL_UNLOCK(&emul_lock); > > 171 > > 172 EMUL_SHARED_WLOCK(&emul_shared_lock); > > 173 LIST_REMOVE(em, threads); > > 174 > > 175 PROC_LOCK(p); > > 176 p->p_emuldata = NULL; > > 177 PROC_UNLOCK(p); > > (kgdb) backtrace > > #0 doadump () at pcpu.h:172 > > During symbol reading, Incomplete CFI data; unspecified registers at > > 0xffffffff80445bbc. > > #1 0xffffffff804464b9 in boot (howto=0x104) at > > ../../../kern/kern_shutdown.c:411 > > #2 0xffffffff80445f47 in panic (fmt=0xffffffff806a82a7 "from > > debugger") at ../../../kern/kern_shutdown.c:567 > > #3 0xffffffff801ac8c7 in db_panic (addr=0x0, have_addr=0x0, > > count=0x0, modif=0x0) at ../../../ddb/db_command.c:433 > > #4 0xffffffff801acd69 in db_command_loop () at > > ../../../ddb/db_command.c:401 > > #5 0xffffffff801aec73 in db_trap (type=0xa314e6d0, code=0x0) at > > ../../../ddb/db_main.c:222 > > #6 0xffffffff8046c428 in kdb_trap (type=0xc, code=0x0, > > tf=0xffffffffa314e920) at ../../../kern/subr_kdb.c:502 > > #7 0xffffffff80654f41 in trap_fatal (frame=0xffffffffa314e920, > > eva=0xffffff00279ee000) > > at ../../../amd64/amd64/trap.c:691 > > #8 0xffffffff80655313 in trap_pfault (frame=0xffffffffa314e920, > > usermode=0x0) at ../../../amd64/amd64/trap.c:614 > > #9 0xffffffff80655575 in trap (frame=0xffffffffa314e920) at > > ../../../amd64/amd64/trap.c:382 > > #10 0xffffffff8063d39e in calltrap () at > > ../../../amd64/amd64/exception.S:169 > > #11 0xffffffffa2cb3ce8 in linux_proc_exit (arg=0x4, p=0xffffff002670ba80) > > at /usr/src/7x/sys-orig/modules/linux/../../compat/linux/linux_emul.c:173 > > #12 0xffffffff8042a689 in exit1 (td=0xffffff00279ee000, rv=0x0) at > > ../../../kern/kern_exit.c:233 > > #13 0xffffffffa2cbe5a1 in linux_exit_group (td=0xffffff00279ee000, > > args=0xffffffffa314ebe0) > > at > > /usr/src/7x/sys-orig/modules/linux/../../compat/linux/linux_misc.c:1634 > > #14 0xffffffff8068e0a0 in ia32_syscall (frame=0xffffffffa314ec80) at > > ../../../amd64/ia32/ia32_syscall.c:187 > > #15 0xffffffff8063d780 in Xint0x80_syscall () at ia32_exception.S:65 > > #16 0x00000000281923e3 in ?? () > > Previous frame inner to this frame (corrupt stack?) > > (kgdb) frame 11 > > #11 0xffffffffa2cb3ce8 in linux_proc_exit (arg=0x4, p=0xffffff002670ba80) > > at /usr/src/7x/sys-orig/modules/linux/../../compat/linux/linux_emul.c:173 > > 173 LIST_REMOVE(em, threads); > > (kgdb) p *em > > $2 = { > > pid = 0x5af5, > > child_set_tid = 0x0, > > child_clear_tid = 0x0, > > shared = 0xffffff002ea8b8f0, > > pdeath_signal = 0x0, > > threads = { > > le_next = 0x0, > > le_prev = 0x0 > > } > > } > > I dont understand why it paniced. the threads LIST is empty > and LIST_REMOVE(something, empty_list) is perfectly legal. > > can someone shed some light to this? > > scot, can you please describe whats going on? I mean.. fbsd shell > forks-and-execs linux XYZ, XYZ execs ABC, something like that. > when you run with WITNESS/INVARIATNS does it spit any useful info? > The kernel does have WITNESS/INVARIANTS compiled in, but I'm not seeing anything useful from it. What I'm doing is: chroot /root/ports/gentoo-stage3 bash emerge libX11 It finally built, then I tried emerge azureus Then I got that same panic again, but on a different dependancy (libXi-1.0.1) Rebooted the system again, and libXi-1.0.1 built (emerge libXi). Then tried to build 2 dependacies, and it built recordproto, but paniced again on libXtst. The last message from the build on the screen at the time of the panic is: if /bin/sh ../libtool --mode=compile i386-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -mtune=i686 -pipe -MT XTest.lo -MD -MP -MF ".deps/XTest.Tpo" \ -c -o XTest.lo `test -f 'XTest.c' || echo './'`XTest.c; ; \ then mv -f ".deps/XTest.Tpo" ".deps/XTest.Plo"; \ else rm -f ".deps/XTest.Tpo"; exit 1; \ fi Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x0 fault code = supervisor read data, page not present instruction pointer = 0x8:0xffffffffa2cb3ce8 stack pointer = 0x10:0xffffffffa30cc9d0 frame pointer = 0x10:0xffffffffa30cca50 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 15514 (bash) (kgdb) list *0xffffffffa2cb3ce8 0xffffffffa2cb3ce8 is in linux_proc_exit (/usr/src/7x/sys-orig/modules/linux/../../compat/linux/linux_emul.c:173). 168 child_clear_tid = em->child_clear_tid; 169 170 EMUL_UNLOCK(&emul_lock); 171 172 EMUL_SHARED_WLOCK(&emul_shared_lock); 173 LIST_REMOVE(em, threads); 174 175 PROC_LOCK(p); 176 p->p_emuldata = NULL; 177 PROC_UNLOCK(p); (kgdb) p *em $1 = { pid = 0x3c9a, child_set_tid = 0x0, child_clear_tid = 0x0, shared = 0xffffff002f52c9a0, pdeath_signal = 0x0, threads = { le_next = 0x0, le_prev = 0x0 } } (kgdb) p threads No symbol "threads" in current context. (kgdb) p *threads No symbol "threads" in current context. (kgdb) p &threads No symbol "threads" in current context. (kgdb) Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slightly bruised. ------=_Part_55911_25200285.1168982252626 Content-Type: text/plain; name="GENERIC.debug" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="GENERIC.debug" X-Attachment-Id: f_ex0trvai IwojIEdFTkVSSUMgZGVidWdnaW5nIGtlcm5lbAojCiMgVG8gdXNlIHRoaXMga2VybmVsLCB5b3Ug bmVlZCB0byBhZGQgdGhlIGZvbGxvd2luZyB0bwojIHlvdXIgL2Jvb3QvbG9hZGVyLmNvbmYKIwoj IGtlcm5lbD1rZXJuZWxfZGVidWcKIwojICRGcmVlQlNEJAoKaW5jbHVkZSBHRU5FUklDCgppZGVu dAkJR0VORVJJQy1kZWJ1ZwoKbWFrZW9wdGlvbnMJREVCVUc9LWcJCSMgQnVpbGQga2VybmVsIHdp dGggZ2RiKDEpIGRlYnVnIHN5bWJvbHMKbWFrZW9wdGlvbnMJS09ESVI9L2Jvb3QvJHtLRVJORUx9 X2RlYnVnCgojIERlYnVnZ2luZyBmb3IgdXNlIGluIC1jdXJyZW50Cm9wdGlvbnMgCUtEQgkJCSMg RW5hYmxlIGtlcm5lbCBkZWJ1Z2dlciBzdXBwb3J0LgpvcHRpb25zIAlEREIJCQkjIFN1cHBvcnQg RERCLgpvcHRpb25zIAlHREIJCQkjIFN1cHBvcnQgcmVtb3RlIEdEQi4Kb3B0aW9ucyAJSU5WQVJJ QU5UUwkJIyBFbmFibGUgY2FsbHMgb2YgZXh0cmEgc2FuaXR5IGNoZWNraW5nCm9wdGlvbnMgCUlO VkFSSUFOVF9TVVBQT1JUCSMgRXh0cmEgc2FuaXR5IGNoZWNrcyBvZiBpbnRlcm5hbCBzdHJ1Y3R1 cmVzLCByZXF1aXJlZCBieSBJTlZBUklBTlRTCm9wdGlvbnMgCVdJVE5FU1MJCQkjIEVuYWJsZSBj aGVja3MgdG8gZGV0ZWN0IGRlYWRsb2NrcyBhbmQgY3ljbGVzCm9wdGlvbnMgCVdJVE5FU1NfU0tJ UFNQSU4JIyBEb24ndCBydW4gd2l0bmVzcyBvbiBzcGlubG9ja3MgZm9yIHNwZWVkCg== ------=_Part_55911_25200285.1168982252626--