NetBSD Problem Report #3183

Received: (qmail-queue invoked from smtpd); 2 Feb 1997 17:52:14 -0000
Message-Id: <199702021748.MAA05880@anduin.eldar.org>
Date: Sun, 2 Feb 1997 12:48:19 -0500 (EST)
From: Brad Spencer <brad@anduin.eldar.org>
Reply-To: brad@anduin.eldar.org
To: gnats-bugs@gnats.netbsd.org
Subject: fatal kernel trap
X-Send-Pr-Version: 3.95

>Number:         3183
>Category:       port-alpha
>Synopsis:       fatal kernel trap
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 02 10:05:00 +0000 1997
>Closed-Date:    Thu Apr 10 01:51:42 +0000 1997
>Last-Modified:  Thu Apr 10 01:52:06 +0000 1997
>Originator:     Brad Spencer
>Release:        -current supped and compiled on 2/1/97
>Organization:
	Sitting at home
>Environment:

NetBSD valinor.eldar.org 1.2C NetBSD 1.2C (VALINOR) #1: Sun Feb  2 09:54:49 EST 1997     brad@valinor.eldar.org:/usr/src/sys/arch/alpha/compile/VALINOR alpha

>Description:

Wanted to get NCSA's http daemon compiled up for my Multia.  The
compile went fine, after compiling without optimization [which
appeared to cause the compiler and friends to go into a infinite
loop], but when the daemon is contacted the following panic occures:

fatal kernel trap:

    trap entry = 0x4 (unaligned access fault)
    a0         = 0xfffffe004a5f472c
    a1         = 0x2d
    a2         = 0x4
    pc         = 0xfffffc0000351ad4
    ra         = 0xfffffc00003507dc
    curproc    = 0xfffffe004a5eae00
        pid = 144, comm = httpd

panic: trap

The machine, in question, does not have a monitor, so it is unclear if
there was more information printed before the reboot.

A crash dump was made, but it was unclear how one might go about
debugging with it, as the alpha gdb does not appear to deal with the
idea of kernel debugging.

>How-To-Repeat:

Acquire NCSA's http daemon, version 1.4.2 [ya, I know this is probably
old], do a 'make netbsd' after making the target not compile with
optimzation.

>Fix:

Unknown...


>Release-Note:
>Audit-Trail:

From: "Chris G. Demetriou" <cgd@cs.cmu.edu>
To: brad@anduin.eldar.org
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org, 
    cgd@auchentoshan.pdl.cs.cmu.edu
Subject: Re: port-alpha/3183: fatal kernel trap 
Date: Sun, 02 Feb 1997 13:22:02 -0500

 > fatal kernel trap:
 > 
 >     trap entry = 0x4 (unaligned access fault)
 >     a0         = 0xfffffe004a5f472c
 >     a1         = 0x2d
 >     a2         = 0x4
 >     pc         = 0xfffffc0000351ad4
 >     ra         = 0xfffffc00003507dc
 >     curproc    = 0xfffffe004a5eae00
 >         pid = 144, comm = httpd
 > 
 > panic: trap

 "oh cool!"  I've not seen an unaligned access fault in the kernel for
 ... a long time.  8-S


 could you run gdb on the kernel binary with debugging symbols that
 corresponds to the kernel you're running?  (When your kernel was
 built, a 'netbsd.gdb' was built at the same time as your 'netbsd'.)

 In gdb, 'list *0xfffffc0000351ad4' and 'list *0xfffffc00003507dc', and
 reply to this message with the results.



 This is probably pretty repeatable, so you can probably cause the same
 result on a new kernel if you need to build one from scratch to get a
 'reasonable' (i.e. fitting your sources and kernel binary) netbsd.gdb.

 If you have to build a new kernel and make it crash (so you have an
 up-to-date netbsd.gdb), use the pc and ra values reported by the fatal
 trap in those 'list' commands.



 chris

From: "Chris G. Demetriou" <cgd@cs.cmu.edu>
To: brad@anduin.eldar.org
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org, 
    cgd@auchentoshan.pdl.cs.cmu.edu
Subject: Re: port-alpha/3183: fatal kernel trap 
Date: Sun, 02 Feb 1997 13:27:53 -0500

 > "oh cool!"  I've not seen an unaligned access fault in the kernel for
 > ... a long time.  8-S
 >
 > [ ... ]

 Alternately, if the bug is as repeatable as i think it is, it should
 be easily triggered by you sending me the mosaic binary, and me
 running it on one of my systems.

 If you'd like to do that, send me e-mail privately, and i'll tell you
 where to put a copy of the binary.


 cgd

From: Brad Spencer <brad@anduin.eldar.org>
To: cgd@cs.cmu.edu
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org,
        cgd@auchentoshan.pdl.cs.cmu.edu
Subject: Re: port-alpha/3183: fatal kernel trap
Date: Sun, 2 Feb 1997 13:33:17 -0500 (EST)

    > fatal kernel trap:
    > 
    >     trap entry = 0x4 (unaligned access fault)
    >     a0         = 0xfffffe004a5f472c
    >     a1         = 0x2d
    >     a2         = 0x4
    >     pc         = 0xfffffc0000351ad4
    >     ra         = 0xfffffc00003507dc
    >     curproc    = 0xfffffe004a5eae00
    >         pid = 144, comm = httpd
    > 
    > panic: trap

    "oh cool!"  I've not seen an unaligned access fault in the kernel for
    ... a long time.  8-S


    could you run gdb on the kernel binary with debugging symbols that
    corresponds to the kernel you're running?  (When your kernel was
    built, a 'netbsd.gdb' was built at the same time as your 'netbsd'.)

 Yes, not a problem.....

    In gdb, 'list *0xfffffc0000351ad4' and 'list *0xfffffc00003507dc', and
    reply to this message with the results.

 (gdb) list *0xfffffc0000351ad4
 0xfffffc0000351ad4 is in unp_internalize (../../../../kern/uipc_usrreq.c:682).
 677             }
 678             rp = (struct file **)(cm + 1);
 679             for (i = 0; i < oldfds; i++) {
 680                     fp = fdp->fd_ofiles[*(int *)rp];
 681                     *rp++ = fp;
 682                     fp->f_count++;
 683                     fp->f_msgcount++;
 684                     unp_rights++;
 685             }
 686             return (0);

 (gdb) list *0xfffffc00003507dc
 0xfffffc00003507dc is in uipc_usrreq (../../../../kern/uipc_usrreq.c:219).
 214                             panic("uipc 2");
 215                     }
 216                     break;
 217
 218             case PRU_SEND:
 219                     if (control && (error = unp_internalize(control, p)))
 220                             break;
 221                     switch (so->so_type) {
 222
 223                     case SOCK_DGRAM: {


 Hopefully, that is helpful...

    This is probably pretty repeatable, so you can probably cause the same
    result on a new kernel if you need to build one from scratch to get a
    'reasonable' (i.e. fitting your sources and kernel binary) netbsd.gdb.

 It is completely repeatable...

    If you have to build a new kernel and make it crash (so you have an
    up-to-date netbsd.gdb), use the pc and ra values reported by the fatal
    trap in those 'list' commands.

 I actually found the panic on a system build over a month ago, so the
 first thing I did was sup and build a new system.  Of course, the same
 thing happened.

    chris



 Brad Spencer - brad@anduin.eldar.org   http://anduin.eldar.org

From: "Chris G. Demetriou" <cgd@cs.cmu.edu>
To: Brad Spencer <brad@anduin.eldar.org>
Cc: cgd@cs.cmu.edu, gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-alpha/3183: fatal kernel trap 
Date: Sun, 02 Feb 1997 13:52:15 -0500

 > [ ... ]
 > 
 > Hopefully, that is helpful...

 Yup.

 A long time ago, when i was working in my office rather than the lab
 that i typically work in now, i wrote on my white board that i thought
 that passing file descriptors over local-domain sockets might be
 buggy.

 "whee!  I guess i was right!"


 This won't be a trivial fix, unfortunately.  hopefully i'll kill it
 today, though.



 cgd
State-Changed-From-To: open->feedback 
State-Changed-By: cgd 
State-Changed-When: Sun Feb 2 12:44:00 PST 1997 
State-Changed-Why:  
a patch which appears to fix the problem has been sent to the user 
but needs code review before it can be checked into the master sources. 
State-Changed-From-To: feedback->closed 
State-Changed-By: cgd 
State-Changed-When: Wed Apr 9 18:51:42 PDT 1997 
State-Changed-Why:  
aforementioned patch has been checked in. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.