Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2020 16:47:20 +0100
From:      Michael Osipov <1983-01-06@gmx.net>
To:        Miroslav Lachman <000.fbsd@quip.cz>, freebsd-ports@freebsd.org
Subject:   Re: Cannot build qt5-webkit with debug
Message-ID:  <c5d41be9-f2a7-7451-b2e5-370587209571@gmx.net>
In-Reply-To: <1a72bb7d-8ded-afe4-6fa7-8c301d73839e@quip.cz>
References:  <f0a4e30f-8856-b4e6-dc9b-ad87ecf1a17a@quip.cz> <86c4b386-9298-fa0a-ccc1-ec6b1e65b788@quip.cz> <81e73790-6b69-8038-b087-9ff75c1cf9b5@gmx.net> <1a72bb7d-8ded-afe4-6fa7-8c301d73839e@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 2020-02-24 um 16:35 schrieb Miroslav Lachman:
> Michael Osipov wrote on 2020/02/24 16:00:
>> Am 2020-02-24 um 15:50 schrieb Miroslav Lachman:
>>> Miroslav Lachman wrote on 2020/02/24 12:48:
>=20
> [..]
>=20
>>> There are 2 core dumps
>>>
>>> -rw-------=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0 327M Feb 24 14:36 gdb=
=2Ecore
>>> -rw-------=C2=A0 1 root=C2=A0 wheel=C2=A0=C2=A0 4.9M Feb 24 14:36 pha=
ntomjs.core
>>>
>>> What more can I try?
>>> I am not a C / C++ skilled person. All these things are new to me.
>>
>> You can load the coredump into GDB and say "where" [1]. It will tell=20
>> you the last frame it executed before it crashed. Make sure that your =

>> objects contains debug symbols. This mostly helped me to get a grasp=20
>> of failures on FreeBSD and HP-UX.
>=20
> Thank you!
>=20
> I tried to debug gdb.core with this result
>=20
> (root@testjail) ~/# gdb /usr/bin/gdb gdb.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 yo=
u=20
> are
> welcome to change it and/or distribute copies of it under certain=20
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.=C2=A0 Type "show warranty" for=
 details.
> This GDB was configured as "amd64-marcel-freebsd"...
> Core was generated by 'gdb /usr/local/bin/phantomjs'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /lib/libm.so.5...Reading symbols from=20
> /usr/lib/debug//lib/libm.so.5.debug...done.
> done.
> Loaded symbols for /lib/libm.so.5
> Reading symbols from /lib/libncursesw.so.8...Reading symbols from=20
> /usr/lib/debug//lib/libncursesw.so.8.debug...done.
> done.
> Loaded symbols for /lib/libncursesw.so.8
> Reading symbols from /usr/lib/libgnuregex.so.5...Reading symbols from=20
> /usr/lib/debug//usr/lib/libgnuregex.so.5.debug...done.
> done.
> Loaded symbols for /usr/lib/libgnuregex.so.5
> Reading symbols from /lib/libc.so.7...Reading symbols from=20
> /usr/lib/debug//lib/libc.so.7.debug...done.
> done.
> Loaded symbols for /lib/libc.so.7
> Reading symbols from /usr/lib/libthread_db.so...Reading symbols from=20
> /usr/lib/debug//usr/lib/libthread_db.so.3.debug...done.
> done.
> Loaded symbols for /usr/lib/libthread_db.so
> Reading symbols from /libexec/ld-elf.so.1...Reading symbols from=20
> /usr/lib/debug//libexec/ld-elf.so.1.debug...done.
> done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0=C2=A0 0x0000000801327fd6 in memcpy () from /lib/libc.so.7
> (gdb) where
> #0=C2=A0 0x0000000801327fd6 in memcpy () from /lib/libc.so.7
> #1=C2=A0 0x00000008012fcfab in __fread (buf=3D0x8163f6704, size=3D1,=20
> count=3D2391484440, fp=3D0x80158a698)
>  =C2=A0=C2=A0=C2=A0 at /usr/src/lib/libc/stdio/fread.c:101
> #2=C2=A0 0x00000008012fceb3 in fread (buf=3D0x815d32940, size=3D1,=20
> count=3D2391484440, fp=3D0x80158a698)
>  =C2=A0=C2=A0=C2=A0 at /usr/src/lib/libc/stdio/fread.c:58
> #3=C2=A0 0x00000000005671c0 in cache_bread ()
> #4=C2=A0 0x000000000059d8f8 in bfd_bread ()
> #5=C2=A0 0x00000000005356c7 in dwarf2_read_section ()
> #6=C2=A0 0x0000000000535080 in dwarf2_build_psymtabs ()
> #7=C2=A0 0x00000000005297a2 in elf_symfile_read ()
> #8=C2=A0 0x00000000004d233a in syms_from_objfile ()
> #9=C2=A0 0x00000000004d267b in symbol_file_add_with_addrs_or_offsets ()=

> #10 0x00000000004d2479 in symbol_file_add ()
> #11 0x000000000048f9f4 in symbol_add_stub ()
> #12 0x00000000004ac696 in catcher ()
> #13 0x00000000004ac830 in catch_errors ()
> #14 0x000000000048f6c2 in solib_add ()
> #15 0x000000000052041b in handle_inferior_event ()
> #16 0x000000000051f588 in wait_for_inferior ()
> #17 0x000000000051f3c8 in proceed ()
> #18 0x00000000004acda9 in execute_command ()
> #19 0x0000000000466725 in command_handler ()
> #20 0x000000000046645a in command_line_handler ()
> #21 0x00000000005e4f0f in rl_callback_read_char ()
> #22 0x00000000004660c9 in rl_callback_read_char_wrapper ()
> #23 0x0000000000466f22 in gdb_do_one_event ()
> #24 0x00000000004ac696 in catcher ()
> #25 0x00000000004ac830 in catch_errors ()
> #26 0x00000000005537e9 in tui_command_loop ()
> #27 0x0000000000448609 in captured_command_loop ()
> #28 0x00000000004ac696 in catcher ()
> #29 0x00000000004ac830 in catch_errors ()
> #30 0x0000000000448446 in captured_main ()
> #31 0x00000000004ac696 in catcher ()
> #32 0x00000000004ac830 in catch_errors ()
> #33 0x0000000000447974 in gdb_main ()
> #34 0x0000000000447931 in main (argc=3D<value optimized out>, argv=3D<v=
alue=20
> optimized out>)
>  =C2=A0=C2=A0=C2=A0 at /usr/src/contrib/gdb/gdb/gdb.c:35
>=20

As far as I can see this is the result of the crash below.

> When I tried to debug phantomjs.core it crashed again
>=20
> (root@testjail) ~/# gdb /usr/local/bin/phantomjs phantomjs.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 yo=
u=20
> are
> welcome to change it and/or distribute copies of it under certain=20
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.=C2=A0 Type "show warranty" for=
 details.
> This GDB was configured as "amd64-marcel-freebsd"...(no debugging=20
> symbols found)...
> Core was generated by `/usr/local/bin/phantomjs /tmp/phantom.2.js'.
> Program terminated with signal 5, Trace/breakpoint trap.
> Reading symbols from /usr/lib/libdl.so.1...Reading symbols from=20
> /usr/lib/debug//usr/lib/libdl.so.1.debug...done.
> done.
> Loaded symbols for /usr/lib/libdl.so.1
> Reading symbols from /usr/local/lib/qt5/libQt5WebKitWidgets.so.5...done=
=2E
> Loaded symbols for /usr/local/lib/qt5/libQt5WebKitWidgets.so.5
> Reading symbols from /usr/local/lib/qt5/libQt5Widgets.so.5...done.
> Loaded symbols for /usr/local/lib/qt5/libQt5Widgets.so.5
> Reading symbols from /usr/local/lib/qt5/libQt5WebKit.so.5...Segmentatio=
n=20
> fault (core dumped)

 From my POV, something is fishy with the shared object=20
libQt5WebKit.so.5. Try objdump/readelf of similiar whether the thing can =

be read at all. I have the feeling that either the objects are invalid=20
somehow or the linker failed here.

You might have found a bug with LLVM infra. Try the latest version of=20
llvm-c++ and lld from ports. Which LLVM version do you use?
You might want also try g++ and GNU ld.

Michael

PS: I am not a C/C++ expect either, but have dealt with many crashes befo=
re.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c5d41be9-f2a7-7451-b2e5-370587209571>