Cannot build qt5-webkit with debug

Michael Osipov 1983-01-06 at gmx.net
Mon Feb 24 15:47:27 UTC 2020


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:
> 
> [..]
> 
>>> There are 2 core dumps
>>>
>>> -rw-------  1 root  wheel   327M Feb 24 14:36 gdb.core
>>> -rw-------  1 root  wheel   4.9M Feb 24 14:36 phantomjs.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 
>> 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 
>> of failures on FreeBSD and HP-UX.
> 
> Thank you!
> 
> I tried to debug gdb.core with this result
> 
> (root at 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 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 "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 
> /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 
> /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 
> /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 
> /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 
> /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 
> /usr/lib/debug//libexec/ld-elf.so.1.debug...done.
> done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0  0x0000000801327fd6 in memcpy () from /lib/libc.so.7
> (gdb) where
> #0  0x0000000801327fd6 in memcpy () from /lib/libc.so.7
> #1  0x00000008012fcfab in __fread (buf=0x8163f6704, size=1, 
> count=2391484440, fp=0x80158a698)
>      at /usr/src/lib/libc/stdio/fread.c:101
> #2  0x00000008012fceb3 in fread (buf=0x815d32940, size=1, 
> count=2391484440, fp=0x80158a698)
>      at /usr/src/lib/libc/stdio/fread.c:58
> #3  0x00000000005671c0 in cache_bread ()
> #4  0x000000000059d8f8 in bfd_bread ()
> #5  0x00000000005356c7 in dwarf2_read_section ()
> #6  0x0000000000535080 in dwarf2_build_psymtabs ()
> #7  0x00000000005297a2 in elf_symfile_read ()
> #8  0x00000000004d233a in syms_from_objfile ()
> #9  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=<value optimized out>, argv=<value 
> optimized out>)
>      at /usr/src/contrib/gdb/gdb/gdb.c:35
> 

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

> When I tried to debug phantomjs.core it crashed again
> 
> (root at 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 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 "amd64-marcel-freebsd"...(no debugging 
> 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 
> /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.
> 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...Segmentation 
> fault (core dumped)

 From my POV, something is fishy with the shared object 
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 
somehow or the linker failed here.

You might have found a bug with LLVM infra. Try the latest version of 
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 before.



More information about the freebsd-ports mailing list