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

next in thread | previous in thread | raw e-mail | index | archive | help
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@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


When I tried to debug phantomjs.core it crashed again

(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 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)


Kind regards
Miroslav Lachman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1a72bb7d-8ded-afe4-6fa7-8c301d73839e>