Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Oct 2016 15:24:34 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Cc:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: stable/11 -r307797 on BPi-M3 (cortex-a7): xgcc's cc1 during lang/gcc6 build gets SIGSYS failures (/usr/ports -r424540)
Message-ID:  <2DC2BFC1-613E-4491-84A4-3EC505B10B9D@dsl-only.net>
In-Reply-To: <5340B95D-9B61-4D97-A28E-EB463C28C949@dsl-only.net>
References:  <5340B95D-9B61-4D97-A28E-EB463C28C949@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[A top post noting that user "ast" CSW's are involved and other details =
in the sequence leading up to the failure.]

Using "ktrace -i -t +fw" it looks like every repeat of the problem ends =
up with the following sort of sequence (a variation is shown later):

 34629 cc1      CALL  =
mmap(0,0x4000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xfff=
fffff,0x1c,0,0)
 34629 cc1      RET   mmap 568225792/0x21de7000
 34629 cc1      PFLT  0x21de7000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      PFLT  0x21de8000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      PFLT  0x21de9000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      PFLT  0x21dea000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      PFLT  0x229e8000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      PFLT  0x229e9000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      PFLT  0x229ea000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      CSW   stop user "ast"
 34629 cc1      CSW   resume user "ast"
 34629 cc1      PFLT  0x229eb000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      PFLT  0x229ec000 VM_PROT_WRITE
 34629 cc1      PRET  KERN_SUCCESS
 34629 cc1      CALL  [-17504]
 34629 cc1      RET   [-17504] -1 errno 78 Function not implemented
 34629 cc1      PSIG  SIGSYS SIG_DFL code=3DSI_KERNEL
 34629 cc1      NAMI  "cc1.core"
 34630 as       CSW   stop kernel "piperd"
 34630 as       Events dropped.
 34630 as       RET   read 0
 34630 as       CALL  close(0)
 34630 as       RET   close 0
. . .

I'll note that for the source this was compiling I used gdb truss with =
run -feH -o truss.log and it reported:

(gdb) print t->cs.number
$5 =3D 580828064

FYI: 580828064 =3D 0x229EBBA0

where the truss segmentation fault was at line 385 of the following =
(sc=3D=3DNULL in the context):

> 380		t->cs.name =3D sysdecode_syscallname(t->proc->abi->abi, =
t->cs.number);
> 381		if (t->cs.name =3D=3D NULL)
> (gdb)=20
> 382			fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d =
--\n",
> 383			    t->proc->abi->type, t->cs.number);
> 384=09
> 385		sc =3D get_syscall(t->cs.name, narg);
> 386		t->cs.nargs =3D sc->nargs;
> 387		assert(sc->nargs <=3D nitems(t->cs.s_args));
> 388=09
> 389		t->cs.sc =3D sc;

The 229E matched the upper part of local PFLT activity around the user =
"ast" CSW's, including just before the bad call.

But the details do vary some based on the source file being compiled. =
For example here the user "ast" CSW's are just before the mmap but are =
still just after the 0x229ea000 PFLT:

 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0xbfbf2000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x229e7000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x229e8000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x229e9000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x229ea000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      CSW   stop user "ast"
 34698 cc1      CSW   resume user "ast"
 34698 cc1      CALL  =
mmap(0,0x4000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xfff=
fffff,0,0,0)
 34698 cc1      RET   mmap 568225792/0x21de7000
 34698 cc1      PFLT  0x21de7000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x21de8000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x21de9000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x21dea000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      PFLT  0x229eb000 VM_PROT_WRITE
 34698 cc1      PRET  KERN_SUCCESS
 34698 cc1      CALL  [-25840]
 34698 cc1      RET   [-25840] -1 errno 78 Function not implemented
 34698 cc1      PSIG  SIGSYS SIG_DFL code=3DSI_KERNEL
 34698 cc1      NAMI  "cc1.core"
 34699 as       CSW   stop kernel "piperd"
 34699 as       Events dropped.
 34699 as       RET   read 0
 34699 as       CALL  close(0)
 34699 as       RET   close 0

-25840 in 2's complement is: 0xF...F9B10

Here doing the gdb truss instead reports:

(gdb) print t->cs.number
$1 =3D 580819728

and 580819728 =3D 0x229E9B10

and the 229E part matches several PFLT's in the area, including just =
before the bad call as well as just before the user "ast"s. Between them =
are some PFLT's that do not match.

I would guess that the 229E in t->cs.number in truss is from the PFLT =
just before the failing syscall in each case.

=3D=3D=3D
Mark Millard
markmi at dsl-only.net

On 2016-Oct-25, at 2:32 PM, Mark Millard <markmi at dsl-only.net> wrote:

> [I'll be submitting some of the below information to bugzilla.]
>=20
> While trying to build lang/gcc6 on a BPI-M3 (Cortex-A7, ALLWINNER) I =
got "xgcc: internal compiler error: Bad system call (program cc1)", =
which means a SIGSYS (signal 12) resulted.
>=20
> [I will note that I'v never seen this issue (so far) on the rpi2: This =
may be KERNCONF=3DALLWINNER specific. But I've not yet updated to =
-r307797 on the rpi2. The BPI-M3 context is new for me; the rpi2 I've =
been using for a long time.]
>=20
> This was under/on:
>=20
> root@bananapi-m3:/usr/ports # uname -apKU
> FreeBSD bananapi-m3 11.0-STABLE FreeBSD 11.0-STABLE #0 r307797M: Mon =
Oct 24 00:41:16 PDT 2016     =
markmi@FreeBSDx64:/usr/local/src/crochet/work/obj/arm.armv6/usr/src/sys/AL=
LWINNER  arm armv6 1100505 1100505
>=20
> [Note this was cross-built and then a matching svnlite co was done on =
the BPi-M3. So the source timestamps on the BPi-M3 are newer than the =
times from the cross build.]
>=20
> root@bananapi-m3:/usr/ports # svnlite info /usr/ports/ | grep "Re[lv]"
> Relative URL: ^/head
> Revision: 424540
> Last Changed Rev: 424540
>=20
> dmesg | tail shows:
>=20
> pid 29581 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 29613 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 29622 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 29651 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 29660 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 29798 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 30422 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 30426 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 30428 (cc1), uid 0: exited on signal 12 (core dumped)
> pid 30431 (cc1), uid 0: exited on signal 12 (core dumped)
>=20
> (All the lang/gcc6 prerequisites built okay on the BPi-M3.)
>=20
> Unfortunately direct execution of the cc1 command on the libgcc2.i =
from a use of -save-temps does not fail. For some reason the failure is =
only when xgcc causes the cc1 command execution.
>=20
> Also unfortunately truss gets a segmentation fault of its own trying =
the handle watching the SIGSYS related activity. (A truss bugzilla =
report has been made.) Thus the following tail of the truss output for =
leading up to the SIGSYS does not cover the SIGSYS related activity =
itself:
>=20
> =
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # tail truss.log
> 31183 100086: close(3)				 =3D 0 (0x0)
> 31183 100086: =
openat(AT_FDCWD,"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/lib=
gcc/longlong.h",O_NOCTTY,00) ERR#2 'No such file or directory'
> 31183 100086: openat(AT_FDCWD,"./longlong.h",O_NOCTTY,00) ERR#2 'No =
such file or directory'
> 31183 100086: openat(AT_FDCWD,"../.././gcc/longlong.h",O_NOCTTY,00) =
ERR#2 'No such file or directory'
> 31183 100086: =
openat(AT_FDCWD,"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/lib=
gcc/../gcc/longlong.h",O_NOCTTY,00) ERR#2 'No such file or directory'
> 31183 100086: =
openat(AT_FDCWD,"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/lib=
gcc/../include/longlong.h",O_NOCTTY,00) =3D 3 (0x3)
> 31183 100086: fstat(3,{ mode=3D-rw-r--r-- =
,inode=3D573594,size=3D61185,blksize=3D32768 }) =3D 0 (0x0)
> 31183 100086: read(3,"/* longlong.h -- definitions for"...,61185) =3D =
61185 (0xef01)
> 31183 100086: close(3)				 =3D 0 (0x0)
> 31183 100086: =
mmap(0x0,16384,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,16384,0x100000000=
)
>=20
> Via using gdb on truss [with truss running xgcc and xgcc in turn =
running its cc1 instance]:
>=20
> =
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # gdb truss
> . . . [the below is in enter_syscall] . . .
> 380		t->cs.name =3D sysdecode_syscallname(t->proc->abi->abi, =
t->cs.number);
> 381		if (t->cs.name =3D=3D NULL)
> (gdb)=20
> 382			fprintf(info->outfile, "-- UNKNOWN %s SYSCALL %d =
--\n",
> 383			    t->proc->abi->type, t->cs.number);
> 384=09
> 385		sc =3D get_syscall(t->cs.name, narg);
> 386		t->cs.nargs =3D sc->nargs;
> 387		assert(sc->nargs <=3D nitems(t->cs.s_args));
> 388=09
> 389		t->cs.sc =3D sc;
>=20
> (t->cs.name =3D=3D NULL after line 380). . .
>=20
> Looking at the two things that the fprintf on lines 382 and 383 would =
report:
>=20
> (gdb) print t->proc->abi->type
> $4 =3D 0x10166 "FreeBSD ELF32"
>=20
> (gdb) print t->cs.number
> $5 =3D 580828064
>=20
> FYI: 580828064 =3D 0x229EBBA0
>=20
> (sc =3D=3D NULL results from line 385 so sc->nargs on line 386 gets a =
SIGSEGV.)
>=20
> Just for completness:
>=20
> (gdb) print *t
> $2 =3D {entries =3D {le_next =3D 0x0, le_prev =3D 0x20617070}, proc =3D =
0x20617060, tid =3D 100150, in_syscall =3D 1, cs =3D {sc =3D 0x0, name =3D=
 0x0, number =3D 580828064, args =3D 0x2061b0c0, nargs =3D 0,=20
>   s_args =3D 0x2061b0ec}, before =3D {tv_sec =3D 1477418265, tv_nsec =3D=
 492342263}, after =3D {tv_sec =3D 1477418265, tv_nsec =3D 492496630}}
>=20
> (gdb) print sc
> $3 =3D (struct syscall *) 0x0
>=20
>=20
>=20
> Supporting details follow. . .
>=20
> The specific error reports are:
>=20
> xgcc: internal compiler error: Bad system call (program cc1)
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html>; for instructions.
> gmake[5]: *** [Makefile:467: _muldi3.o] Error 4
> gmake[5]: *** Waiting for unfinished jobs....
>=20
> xgcc: internal compiler error: Bad system call (program cc1)
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html>; for instructions.
> gmake[5]: *** [Makefile:467: _negdi2.o] Error 4
>=20
> xgcc: internal compiler error: Bad system call (program cc1)
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html>; for instructions.
> gmake[5]: *** [Makefile:467: _cmpdi2.o] Error 4
>=20
> xgcc: internal compiler error: Bad system call (program cc1)
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html>; for instructions.
> gmake[5]: *** [Makefile:467: _ucmpdi2.o] Error 4
>=20
> gmake[5]: Leaving directory =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-portbld-freebsd1=
1.0/libgcc'
> gmake[4]: *** [Makefile:14874: all-stage1-target-libgcc] Error 2
>=20
> The specific xgcc commands were:
>=20
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc=20
> =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep =
-DL_muldi3 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS
>=20
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc=20
> =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _negdi2.o -MT _negdi2.o -MD -MP -MF _negdi2.dep =
-DL_negdi2 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS
>=20
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc=20
> =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _cmpdi2.o -MT _cmpdi2.o -MD -MP -MF _cmpdi2.dep =
-DL_cmpdi2 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS
>=20
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc=20
> =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _ucmpdi2.o -MT _ucmpdi2.o -MD -MP -MF _ucmpdi2.dep =
-DL_ucmpdi2 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS
>=20
>=20
> Unfortunately gdb does not report much directly. . .
>=20
> root@bananapi-m3:/usr/ports # gdb =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/cc1 =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-portbld-freebsd11=
.0/libgcc/cc1.core
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 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 "armv6-marcel-freebsd"...
> Core was generated by =
`/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/cc1 -quiet -I =
. -I . -I'.
> Program terminated with signal 12, Bad system call.
> Reading symbols from /usr/local/lib/libmpc.so.3...done.
> Loaded symbols for /usr/local/lib/libmpc.so.3
> Reading symbols from /usr/local/lib/libmpfr.so.4...done.
> Loaded symbols for /usr/local/lib/libmpfr.so.4
> Reading symbols from /usr/local/lib/libgmp.so.10...done.
> Loaded symbols for /usr/local/lib/libgmp.so.10
> Reading symbols from /lib/libz.so.6...Reading symbols from =
/usr/lib/debug//lib/libz.so.6.debug...done.
> done.
> Loaded symbols for /lib/libz.so.6
> Reading symbols from /usr/lib/libc++.so.1...Reading symbols from =
/usr/lib/debug//usr/lib/libc++.so.1.debug...done.
> done.
> Loaded symbols for /usr/lib/libc++.so.1
> Reading symbols from /lib/libcxxrt.so.1...Reading symbols from =
/usr/lib/debug//lib/libcxxrt.so.1.debug...done.
> done.
> Loaded symbols for /lib/libcxxrt.so.1
> Reading symbols from /lib/libm.so.5...Reading symbols from =
/usr/lib/debug//lib/libm.so.5.debug...done.
> done.
> Loaded symbols for /lib/libm.so.5
> Reading symbols from /lib/libgcc_s.so.1...Reading symbols from =
/usr/lib/debug//lib/libgcc_s.so.1.debug...done.
> done.
> Loaded symbols for /lib/libgcc_s.so.1
> Reading symbols from /lib/libc.so.7...Reading symbols from =
/usr/lib/debug//lib/libc.so.7.debug...done.
> done.
> Loaded symbols for /lib/libc.so.7
> Reading symbols from /libexec/ld-elf.so.1...Reading symbols from =
/usr/lib/debug//libexec/ld-elf.so.1.debug...done.
> done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0  0xbfbf732c in ?? ()
> (gdb) bt
> #0  0xbfbf732c in ?? ()
> Cannot access memory at address 0x0
> (gdb) info reg
> r0             0x4e	78
> r1             0x0	0
> r2             0x17c8506	24937734
> r3             0x65	101
> r4             0xbfbf7488	-1077971832
> r5             0xbfbf7484	-1077971836
> r6             0xbfbf7488	-1077971832
> r7             0x229eab40	580823872
> r8             0x0	0
> r9             0xbfbfa23c	-1077960132
> r10            0xbfbf7484	-1077971836
> r11            0x0	0
> r12            0x17ef3b1	25097137
> sp             0xbfbf7180	-1077972608
> lr             0x65	101
> pc             0xbfbf732c	-1077972180
> fps            0x0	0
> cpsr           0xa0000010	-1610612720
>=20
>=20
> Using -v -save-temps on one of the failing xgcc command lines gives:
>=20
> =
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include    -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2  -O2 -pipe =
-mcpu=3Dcortex-a7  -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC    =
-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  =
-isystem ./include   -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector   -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork/usr/ports/l
> ang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
 -DHAVE_CC_TLS  -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep =
-DL_muldi3 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS -v -save-temps
> xgcc: warning: -pipe ignored because -save-temps specified
> Reading specs from =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/specs
> =
COLLECT_GCC=3D/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgc=
c
> Target: armv6-portbld-freebsd11.0
> Configured with: =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/configure =
--disable-multilib --with-build-config=3Dbootstrap-debug --disable-nls =
--enable-gnu-indirect-function --libdir=3D/usr/local/lib/gcc6 =
--libexecdir=3D/usr/local/libexec/gcc6 --program-suffix=3D6 =
--with-as=3D/usr/local/bin/as --with-gmp=3D/usr/local =
--with-gxx-include-dir=3D/usr/local/lib/gcc6/include/c++/ =
--with-ld=3D/usr/local/bin/ld --with-pkgversion=3D'FreeBSD Ports =
Collection' --with-system-zlib --disable-libgcj =
--enable-languages=3Dc,c++,objc,fortran --prefix=3D/usr/local =
--localstatedir=3D/var --mandir=3D/usr/local/man =
--infodir=3D/usr/local/info/gcc6 --build=3Darmv6-portbld-freebsd11.0
> Thread model: posix
> gcc version 6.2.0 (FreeBSD Ports Collection)=20
> COLLECT_GCC_OPTIONS=3D'-B' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/bin/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/lib/' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/include' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/sys-include' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-O2' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-fno-strict-aliasing' =
'-D' 'IN_GCC' '-Wextra' '-Wall' '-Wno-narrowing' '-Wwrite-strings' =
'-Wcast-qual' '-Wformat=3D0' '-Wstrict-prototypes' =
'-Wmissing-prototypes' '-Wold-style-definition' '-isystem' './include' =
'-pthread' '-g' '-D' 'IN_LIBGCC2' '-fbuilding-libgcc' =
'-fno-stack-protector' '-fPIC' '-pthread' '-fno-inline' =
'-fomit-frame-pointer' '-I' '.' '-I' '.' '-I' '../.././gcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/.' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6
> .2.0/libgcc/../gcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include' =
'-D' 'HAVE_CC_TLS' '-o' '_muldi3.o' '-MT' '_muldi3.o' '-MD' '-MP' '-MF' =
'_muldi3.dep' '-D' 'L_muldi3' '-c' '-fvisibility=3Dhidden' '-D' =
'HIDE_EXPORTS' '-v' '-save-temps' '-mtls-dialect=3Dgnu'
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/cc1 -E -quiet =
-v -I . -I . -I ../.././gcc -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc -I =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
-iprefix =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/arm=
v6-portbld-freebsd11.0/6.2.0/ -isystem =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include =
-isystem =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include-fixed =
-MD _muldi3.d -MF _muldi3.dep -MP -MT _muldi3.o -D LIBICONV_PLUG -D =
LIBICONV_PLUG -D IN_GCC -D IN_LIBGCC2 -D HAVE_CC_TLS -D L_muldi3 -D =
HIDE_EXPORTS -isystem /usr/local/armv6-portbld-freebsd11.0/include =
-isystem /usr/local/armv6-portbld-freebsd11.0/sys-include -isystem =
./include =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-mcp
> u=3Dcortex-a7 -mcpu=3Dcortex-a7 -mtls-dialect=3Dgnu -Wextra -Wall =
-Wno-narrowing -Wwrite-strings -Wcast-qual -Wformat=3D0 =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition =
-fno-strict-aliasing -fbuilding-libgcc -fno-stack-protector -fPIC =
-fno-inline -fomit-frame-pointer -fvisibility=3Dhidden -g -g -g =
-fworking-directory -O2 -O2 -O2 -fpch-preprocess -o libgcc2.i
> ignoring nonexistent directory =
"/usr/local/armv6-portbld-freebsd11.0/include"
> ignoring nonexistent directory =
"/usr/local/armv6-portbld-freebsd11.0/sys-include"
> ignoring nonexistent directory "./include"
> ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/ar=
mv6-portbld-freebsd11.0/6.2.0/include"
> ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/ar=
mv6-portbld-freebsd11.0/6.2.0/include-fixed"
> ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/ar=
mv6-portbld-freebsd11.0/6.2.0/../../../../../armv6-portbld-freebsd11.0/inc=
lude"
> ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/..=
/../../lib/gcc6/gcc/armv6-portbld-freebsd11.0/6.2.0/include"
> ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/..=
/../../lib/gcc6/gcc/armv6-portbld-freebsd11.0/6.2.0/include-fixed"
> ignoring nonexistent directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/gcc/../lib/gcc6/gcc/..=
/../../lib/gcc6/gcc/armv6-portbld-freebsd11.0/6.2.0/../../../../../armv6-p=
ortbld-freebsd11.0/include"
> ignoring duplicate directory "."
> ignoring duplicate directory =
"/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/."
> #include "..." search starts here:
> #include <...> search starts here:
> .
> ../.././gcc
> /usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc
> /usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc
> =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/include-fixed
> /usr/local/include
> /usr/include
> End of search list.
> COLLECT_GCC_OPTIONS=3D'-B' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/bin/' '-B' =
'/usr/local/armv6-portbld-freebsd11.0/lib/' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/include' '-isystem' =
'/usr/local/armv6-portbld-freebsd11.0/sys-include' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-O2' '-O2' '-pipe' =
'-mcpu=3Dcortex-a7' '-D' 'LIBICONV_PLUG' '-g' '-fno-strict-aliasing' =
'-D' 'IN_GCC' '-Wextra' '-Wall' '-Wno-narrowing' '-Wwrite-strings' =
'-Wcast-qual' '-Wformat=3D0' '-Wstrict-prototypes' =
'-Wmissing-prototypes' '-Wold-style-definition' '-isystem' './include' =
'-pthread' '-g' '-D' 'IN_LIBGCC2' '-fbuilding-libgcc' =
'-fno-stack-protector' '-fPIC' '-pthread' '-fno-inline' =
'-fomit-frame-pointer' '-I' '.' '-I' '.' '-I' '../.././gcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/.' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6
> .2.0/libgcc/../gcc' '-I' =
'/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include' =
'-D' 'HAVE_CC_TLS' '-o' '_muldi3.o' '-MT' '_muldi3.o' '-MD' '-MP' '-MF' =
'_muldi3.dep' '-D' 'L_muldi3' '-c' '-fvisibility=3Dhidden' '-D' =
'HIDE_EXPORTS' '-v' '-save-temps' '-mtls-dialect=3Dgnu'
> /usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/cc1 =
-fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c -mcpu=3Dcortex-a7 =
-mcpu=3Dcortex-a7 -mtls-dialect=3Dgnu -auxbase-strip _muldi3.o -g -g -g =
-O2 -O2 -O2 -Wextra -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual =
-Wformat=3D0 -Wstrict-prototypes -Wmissing-prototypes =
-Wold-style-definition -version -fno-strict-aliasing -fbuilding-libgcc =
-fno-stack-protector -fPIC -fno-inline -fomit-frame-pointer =
-fvisibility=3Dhidden -o libgcc2.s
> GNU C11 (FreeBSD Ports Collection) version 6.2.0 =
(armv6-portbld-freebsd11.0)
> 	compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 =
(tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, =
MPC version 1.0.3, isl version none
> GGC heuristics: --param ggc-min-expand=3D30 --param =
ggc-min-heapsize=3D4096
> GNU C11 (FreeBSD Ports Collection) version 6.2.0 =
(armv6-portbld-freebsd11.0)
> 	compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 =
(tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, =
MPC version 1.0.3, isl version none
> GGC heuristics: --param ggc-min-expand=3D30 --param =
ggc-min-heapsize=3D4096
> Compiler executable checksum: 8858bcab14af90339532fc36ec745f79
> xgcc: internal compiler error: Bad system call (program cc1)
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html>; for instructions.
>=20
> =
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # ls -lt | head
> total 12712
> -rw-------  1 root  wheel  12181504 Oct 25 16:57 cc1.core
> -rw-r--r--  1 root  wheel         0 Oct 25 16:57 libgcc2.s
> -rw-r--r--  1 root  wheel    108880 Oct 25 16:57 libgcc2.i
> -rw-r--r--  1 root  wheel      7636 Oct 25 16:57 _muldi3.dep
> -rw-r--r--  1 root  wheel       560 Oct 25 10:16 _ucmpdi2.o
> -rw-r--r--  1 root  wheel       560 Oct 25 10:16 _cmpdi2.o
> -rw-r--r--  1 root  wheel       560 Oct 25 10:16 _negdi2.o
> -rw-r--r--  1 root  wheel       560 Oct 25 10:16 _muldi3.o
> -rw-r--r--  1 root  wheel      1784 Oct 25 10:16 _dvmd_lnx_s.o
>=20
> Unfortunately direct execution of the reported cc1 command on the =
libgcc2.i in question does not fail.
>=20
> Attempting to run the xgcc command under truss got a segmentation =
fault in truss itself:
>=20
> =
root@bananapi-m3:/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/armv6-=
portbld-freebsd11.0/libgcc # truss -faeH -o truss.log =
/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/xgcc =
-B/usr/obj/portswork/usr/ports/lang/gcc6/work/.build/./gcc/ =
-B/usr/local/armv6-portbld-freebsd11.0/bin/ =
-B/usr/local/armv6-portbld-freebsd11.0/lib/ -isystem =
/usr/local/armv6-portbld-freebsd11.0/include -isystem =
/usr/local/armv6-portbld-freebsd11.0/sys-include -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -O2 -O2 -pipe =
-mcpu=3Dcortex-a7 -DLIBICONV_PLUG -g -fno-strict-aliasing -DIN_GCC -W =
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format =
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem =
./include -fPIC -pthread -fno-inline -fomit-frame-pointer -g =
-DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -pthread =
-fno-inline -fomit-frame-pointer -I. -I. -I../.././gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc =
-I/usr/obj/portswork
> /usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/. =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../gcc =
-I/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/../include =
-DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep =
-DL_muldi3 -c =
/usr/obj/portswork/usr/ports/lang/gcc6/work/gcc-6.2.0/libgcc/libgcc2.c =
-fvisibility=3Dhidden -DHIDE_EXPORTS
> Segmentation fault (core dumped)
>=20
> [There is a separate buzilla report about this truss failure.]
>=20
> =3D=3D=3D
> Mark Millard
> markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2DC2BFC1-613E-4491-84A4-3EC505B10B9D>