Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 2019 19:24:55 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   crash of 32-bit powerpc -r347549 kernel built via system-clang-8, an earlier problem: Process (pid 1) got signal 11
Message-ID:  <7B6A6973-AB76-4DDF-8729-F6CC08CFD87C@yahoo.com>

next in thread | raw e-mail | index | archive | help
I earlier tried making a debug kernel build via system-clang-8, as
reported in a different thread.

Well, I tried with debug with DIAGNOSTICS and got an earlier
problem:

Process (pid 1) got signal 11

from sys/kern/kern_sig.c 's code that looks like:

static int
issignal(struct thread *td)
. . .
                case (intptr_t)SIG_DFL:
                        /*
                         * Don't take default actions on system =
processes.
                         */
                        if (p->p_pid <=3D 1) {
#ifdef DIAGNOSTIC
                                /*
                                 * Are you sure you want to ignore =
SIGSEGV
                                 * in init? XXX
                                 */
                                printf("Process (pid %lu) got signal =
%d\n",
                                        (u_long)p->p_pid, sig);
#endif
                                break;          /* =3D=3D ignore */
                        }


So I changed the code to do a kdb_enter:

static int
issignal(struct thread *td)
. . .
                switch =
((intptr_t)p->p_sigacts->ps_sigact[_SIG_IDX(sig)]) {
               =20
                case (intptr_t)SIG_DFL:
                        /*
                         * Don't take default actions on system =
processes.
                         */
                        if (p->p_pid <=3D 1) {
#ifdef DIAGNOSTIC
                                //if (p->p_pid=3D=3D1 && sig=3D=3D11) =
break; // HACK!!!
                                /*
                                 * Are you sure you want to ignore =
SIGSEGV
                                 * in init? XXX
                                 */
                                printf("Process (pid %lu) got signal =
%d\n",
                                        (u_long)p->p_pid, sig);
                                if (p->p_pid=3D=3D1 && sig=3D=3D11) =
kdb_enter(NULL, "p_pid 1 got sig 11"); // HACK!!!
#endif
                                break;          /* =3D=3D ignore */
                        }

Testing with this reported (for example):

KDB: enter p_pid 1 got signal 11
[ thread pid 1 tid 100002 ]
Stopped at kdb_enter+0x74: addi r3,r0,0x0
db> bt
Tracing pid 1 tid 100002 td 0x1506ae0
0xd6b7c950: at cursig+0x55c
0xd6b7ca10: at ast+0x508
0xd6b7ca40: user DSI read trap @ 0x1c000020 by 0x1812f74: srr1=3D0xd032
            r1=3D0xffffde90 cr=3D0x20000000 xer=3D0 ctr=3D0 =
sr=3D0x40000000 frame=3D0xd6b7ca48
db>

Another example "trap @" was 0xfa5005af (still by 0x1812f74 and with the =
rest
matching). (The 0xfa5005af "trap @" value looks like a potentially =
deliberate
pattern that might indicate something.)

These happen before the panic reported previously reported.

This happens for both usefdt mode and not using the mode, but
only for clang-based (not gcc 4.2.1 based).

It may be that the usefdt mode status controls which "trap @" figure
shows up.

The following lines displayed just before the "got signal"
line:

Trying to mount root from ufs:/dev/ufs/FBSDG4rootfs [rw,noatime]...
Launching APs: 1 3 2
WARNING: WITNESS option enabled, . . .
WARNING: DIAGNOSTIC option enabled, . . .

(Sometimes some of the text is interlaced/garbled but this
gives an idea of when in the sequence the signals start.)

(Note: The test machine is a 2-socket/2-core-each PowerMac G5,
used via 32-bit FreeBSD here.)

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7B6A6973-AB76-4DDF-8729-F6CC08CFD87C>