crash of 32-bit powerpc -r347549 kernel built via system-clang-8, an earlier problem: Process (pid 1) got signal 11

Mark Millard via freebsd-ppc <[email protected]>
Newsgroups gmane.os.freebsd.devel.ppc
Message-ID <[email protected]>
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 <= 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;          /* == 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)]) {
                
                case (intptr_t)SIG_DFL:
                        /*
                         * Don't take default actions on system processes.
                         */
                        if (p->p_pid <= 1) {
#ifdef DIAGNOSTIC
                                //if (p->p_pid==1 && sig==11) 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==1 && sig==11) kdb_enter(NULL, "p_pid 1 got sig 11"); // HACK!!!
#endif
                                break;          /* == 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=0xd032
            r1=0xffffde90 cr=0x20000000 xer=0 ctr=0 sr=0x40000000 frame=0xd6b7ca48
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.)

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

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.