Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Oct 2017 20:33:05 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: C++ in jemalloc
Message-ID:  <6B5AB934-1F8F-49F0-90F6-C4F9C48787E6@dsl-only.net>
In-Reply-To: <A4251FF5-7193-49D7-B083-DEF986D3A524@dsl-only.net>
References:  <BDC9F954-D0C5-4D7A-9CEA-D4FCA595B2FD@dsl-only.net> <CAHSQbTB76OJYGtwzRRFfThJB5mYOKHi_BC9Eefc7Mn1A0-6sWg@mail.gmail.com> <528ED3CD-8A4B-4F00-8728-7D231DB0811A@dsl-only.net> <20171007064249.GA73770@vlakno.cz> <A47AA10A-550B-4E12-97DE-440F892EE7FC@dsl-only.net> <EEE4D3F8-59C5-41C3-8E5D-148A1ECD45D3@dsl-only.net> <CA477B6C-9F32-4F54-A7BE-74B6137DDC1B@dsl-only.net> <FBA4BD2F-1074-4516-B368-9F39583B3200@dsl-only.net> <934C1C1A-1303-4A8C-9E80-4259E475220A@dsl-only.net> <20171007102151.GA84155@vlakno.cz> <A4251FF5-7193-49D7-B083-DEF986D3A524@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
It turns out that /usr/local/bin/gdb crashing=20
for the clang-built powerpc64 world is again
due to C++ exceptions being thrown, this time
in gdb80 itself.

This helps explain why for clang-based buildworld
experiments /usr/libexec/gdb is a better alternative
currently for the powerpc families.

Again the _Unwind_SetGR use in __gxx_personality_v0
fails:

# ls -lT /usr/local/bin/gdb*
lrwxr-xr-x  1 root  wheel         5 Sep 29 15:25:15 2017 =
/usr/local/bin/gdb -> gdb80
-r-xr-xr-x  1 root  wheel  97577168 Sep 29 15:25:15 2017 =
/usr/local/bin/gdb80
lrwxr-xr-x  1 root  wheel         5 Sep 29 15:25:15 2017 =
/usr/local/bin/gdbtui80 -> gdb80

# ldd /usr/local/bin/gdb80=20
/usr/local/bin/gdb80:
	libreadline.so.7 =3D> /usr/local/lib/libreadline.so.7 =
(0x50e80000)
	libncurses.so.8 =3D> /lib/libncurses.so.8 (0x50ef7000)
	libkvm.so.7 =3D> /lib/libkvm.so.7 (0x50f61000)
	libutil.so.9 =3D> /lib/libutil.so.9 (0x50f83000)
	libm.so.5 =3D> /lib/libm.so.5 (0x50fad000)
	libexpat.so.1 =3D> /usr/local/lib/libexpat.so.1 (0x50fe5000)
	liblzma.so.5 =3D> /usr/lib/liblzma.so.5 (0x5102a000)
	libc++.so.1 =3D> /usr/lib/libc++.so.1 (0x5105d000)
	libcxxrt.so.1 =3D> /lib/libcxxrt.so.1 (0x5118a000)
	libgcc_s.so.1 =3D> /lib/libgcc_s.so.1 (0x511b1000)
	libc.so.7 =3D> /lib/libc.so.7 (0x511d6000)
	libncursesw.so.8 =3D> /lib/libncursesw.so.8 (0x51528000)
	libelf.so.2 =3D> /lib/libelf.so.2 (0x515ac000)
	libthr.so.3 =3D> /lib/libthr.so.3 (0x515da000)

# /usr/libexec/gdb /usr/local/bin/gdb80 /var/crash/gdb80.14502.core=20
. . .
Core was generated by `/usr/local/bin/gdb =
/usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/s'.
Program terminated with signal 11, Segmentation fault.
. . .
(gdb) bt
#0  0x00000000511b5c20 in _Unwind_SetGR (context=3D<value optimized =
out>, index=3D<value optimized out>, val=3D1374378080) at =
unwind-dw2-fde.h:162
#1  0x000000005119f194 in __gxx_personality_v0 (version=3D<value =
optimized out>, actions=3D<value optimized out>, exceptionClass=3D<value =
optimized out>, exceptionObject=3D0x51eb5860,=20
    context=3D0xffffffffffffb420) at =
/usr/src/contrib/libcxxrt/exception.cc:1203
#2  0x00000000511b6a60 in _Unwind_RaiseException_Phase2 (exc=3D0x51eb5860,=
 context=3D0xffffffffffffb420) at unwind.inc:66
#3  0x00000000511b6548 in _Unwind_RaiseException (exc=3D<value optimized =
out>) at unwind.inc:135
#4  0x000000005119e4f4 in __cxa_throw (thrown_exception=3D<value =
optimized out>, tinfo=3D<value optimized out>, dest=3D<value optimized =
out>) at /usr/src/contrib/libcxxrt/exception.cc:774
#5  0x00000000102be040 in throw_exception () at common-exceptions.c:303
#6  0x00000000102be1dc in throw_it (reason=3D1374378080, =
error=3D4294947872, fmt=3D<value optimized out>, ap=3D<value optimized =
out>) at common-exceptions.c:373
#7  0x00000000102be0a4 in throw_verror (error=3D<value optimized out>, =
fmt=3D<value optimized out>, ap=3D<value optimized out>) at =
common-exceptions.c:379
#8  0x00000000102be258 in throw_error (error=3DGDB_NO_ERROR, fmt=3D0x18 =
<Address 0x18 out of bounds>) at common-exceptions.c:394
#9  0x0000000010279bf8 in call_site_for_pc (gdbarch=3D<value optimized =
out>, pc=3D<value optimized out>) at block.c:241
#10 0x00000000102e93e0 in call_site_find_chain (gdbarch=3D<value =
optimized out>, caller_pc=3D<value optimized out>, callee_pc=3D<value =
optimized out>) at dwarf2loc.c:1057
#11 0x00000000102e4800 in dwarf2_tailcall_sniffer_first =
(this_frame=3D0x51eb5808, tailcall_cachep=3D0x51eb5860, =
entry_cfa_sp_offsetp=3D0xffffffffffffb420) at =
dwarf2-frame-tailcall.c:387
#12 0x00000000102e32b8 in =
._ZL26dwarf2_frame_prev_registerP10frame_infoPPvi () at =
__split_buffer:311
#13 0x0000000010340464 in frame_unwind_register_value (frame=3D<value =
optimized out>, regnum=3D<value optimized out>) at frame.c:1200
#14 0x0000000010340148 in frame_register_unwind (frame=3D0x0, =
regnum=3D<value optimized out>, optimizedp=3D0x51eb5860, =
unavailablep=3D0x51eb5808, lvalp=3D0x514077a0, addrp=3D0x51eb5808, =
realnump=3D0x6,=20
    bufferp=3D0xffffffffffffb420 "") at frame.c:1102
#15 0x0000000010341ddc in get_prev_frame_always_1 =
(this_frame=3D0xffffffffffffb420) at frame.c:1840
#16 0x000000001033e878 in get_prev_frame_always =
(this_frame=3D0xffffffffffffb420) at frame.c:2092
#17 0x000000001033e110 in get_prev_frame (this_frame=3D0xffffffffffffb420)=
 at frame.c:2345
#18 0x0000000010419464 in backtrace_command (arg=3D<value optimized =
out>, from_tty=3D1374378080) at stack.c:1830
#19 0x00000000101e3654 in do_cfunc (c=3D<value optimized out>, args=3D0x0,=
 from_tty=3D24) at cli/cli-decode.c:106
#20 0x00000000101e67b0 in cmd_func (cmd=3D0x0, args=3D0x18 <Address 0x18 =
out of bounds>, from_tty=3D<value optimized out>) at =
cli/cli-decode.c:1896
#21 0x000000001046497c in execute_command (p=3D<value optimized out>, =
from_tty=3D1374377992) at top.c:674
#22 0x000000001032e398 in command_handler (command=3D0xffffffffffffb420 =
"") at event-top.c:590
#23 0x000000001032e788 in command_line_handler (rl=3D<value optimized =
out>) at event-top.c:780
#24 0x000000001032dc54 in gdb_rl_callback_handler (rl=3D<value optimized =
out>) at event-top.c:213
#25 0x0000000050ec5950 in rl_callback_read_char () at ../callback.c:283
#26 0x000000001032f560 in gdb_rl_callback_read_char_wrapper_noexcept () =
at event-top.c:175
#27 0x000000001032d84c in gdb_rl_callback_read_char_wrapper =
(client_data=3D<value optimized out>) at event-top.c:192
#28 0x000000001032e14c in stdin_event_handler (error=3D<value optimized =
out>, client_data=3D0xffffffffffffb420) at event-top.c:518
#29 0x000000001032d690 in handle_file_event =
(file_ptr=3D0xffffffffffffb420, ready_mask=3D1374378080) at =
event-loop.c:733
#30 0x000000001032c830 in gdb_wait_for_event (block=3D<value optimized =
out>) at common-exceptions.h:220
#31 0x000000001032c2c4 in gdb_do_one_event () at event-loop.c:347
#32 0x000000001032c940 in start_event_loop () at event-loop.c:371
#33 0x00000000103a674c in captured_command_loop (data=3D<value optimized =
out>) at main.c:325
#34 0x000000001032fd50 in catch_errors (func=3D<value optimized out>, =
func_args=3D0x6, errstring=3D0xffffffffffffb420 "", mask=3D1374377992) =
at exceptions.c:236
#35 0x00000000103a61b4 in gdb_main (args=3D<value optimized out>) at =
main.c:1150
#36 0x000000001000bc38 in main (argc=3D<value optimized out>, =
argv=3D0xffffffffffffb420) at gdb.c:38
#37 0x000000001000b938 in _start (argc=3D1374377992, argv=3D0x51eb5860, =
env=3D0xffffffffffffb420, obj=3D<value optimized out>, cleanup=3D<value =
optimized out>, ps_strings=3D<value optimized out>)
    at /usr/src/lib/csu/powerpc64/crt1.c:94
#38 0x0000000050e49b70 in .text () at =
/usr/src/libexec/rtld-elf/powerpc64/rtld_start.S:104
Current language:  auto; currently minimal

=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?6B5AB934-1F8F-49F0-90F6-C4F9C48787E6>