Bug 217082

Summary: math/rkward-kde4 0.6.5_2 crashes on i386
Product: Ports & Packages Reporter: William Ouwehand <mail>
Component: Individual Port(s)Assignee: Thierry Thomas <thierry>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: kde, rene
Priority: --- Flags: thierry: maintainer-feedback+
Version: Latest   
Hardware: i386   
OS: Any   

Description William Ouwehand 2017-02-13 18:55:14 UTC
This only occurs on an i386 machine (core duo laptop), another amd64 machine runs rkward just fine (both on 11.0). 

The problem started at some point after upgrading from 10.3 (+RC), a month or so ago. So far rkward is the only (kde) program crashing.


# Steps to reproduce locally:

Install rkward 0.6.5_2 using pkg or ports
1. start rkward 
2. cancel recovery (if applicable)
3. from startup dialog select any option (start with an empty table, etc)
4. window closes


# Output

Terminal:
 KCrash: Application 'rkward' crashing...
 KCrash: Attempting to start /usr/local/lib/kde4/libexec/drkonqi from kdeinit
 KCrash: Connect sock_file=/home/###/.kde4/socket-###/kdeinit4__0

Gdb output is attached below (disclaimer: i'm a novice, but was curious. The output might help)


# Attempted fixes

- pkg-static upgrade -f
- reinstalled kde4 afterwards
- compiled rkward from ports (also WITH_DEBUG=yes)
Note dbus + hal are loaded at startup



--------------------



# uname -a:
FreeBSD ### 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29 03:40:55 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  i386


# gdb: In rkward "create a new table" was chosen.

Starting program: /usr/local/lib/kde4/libexec/rkward.frontend 
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libgcc_s.so.1]
[New LWP 100252]
[New Thread 2d414000 (LWP 100252/rkward.frontend)]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libgcc_s.so.1]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libgcc_s.so.1]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libgcc_s.so.1]
warning: Lowest section in /usr/local/lib/libicudata.so.58 is .hash at 000000b4
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libgcc_s.so.1]

(... repeat Dwarf Error x times ...)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 2d414000 (LWP 100252/rkward.frontend)]
0x2c3bfff3 in ?? () from /usr/local/lib/qt4/libQtWebKit.so.4

(gdb) backtrace
#0  0x2c3bfff3 in ?? () from /usr/local/lib/qt4/libQtWebKit.so.4
#1  0x00000033 in ?? ()
#2  0xbfa71800 in ?? ()
#3  0x41b592bf in ?? ()
#4  0x00000101 in ?? ()
#5  0xa843c000 in ?? ()
#6  0x00000033 in ?? ()
#7  0xbfa6c800 in ?? ()
#8  0xa843d0bf in ?? ()
#9  0xa843e833 in ?? ()
#10 0x00000033 in ?? ()
#11 0xb56adc00 in ?? ()
#12 0x0000072a in ?? ()
#13 0xa997f600 in ?? ()
#14 0xbfa6d033 in ?? ()
#15 0x7fa398bf in ?? ()
#16 0x3e621a12 in ?? ()
#17 0x7fcf002a in ?? ()
#18 0xffffc012 in ?? ()
#19 0x000000ff in ?? ()
#20 0xbfa4f800 in ?? ()
#21 0xbfa4f8bf in ?? ()
#22 0xffff80bf in ?? ()
#23 0x000000ff in ?? ()
#24 0x40c07c00 in ?? ()
#25 0x0000042d in ?? ()
#26 0x2d90e000 in ucurr_getKeywordValuesForLocale () from /usr/local/lib/libicuuc.so.58
#27 0x2b1c9f81 in qt_dump_set_accepts_editing () from /usr/local/lib/qt4/libQtWebKit.so.4
#28 0x2b1ca804 in qt_dump_set_accepts_editing () from /usr/local/lib/qt4/libQtWebKit.so.4
#29 0x2b56e032 in QWebPluginDatabase::qt_metacall () from /usr/local/lib/qt4/libQtWebKit.so.4
#30 0x2b555c86 in QWebPluginDatabase::qt_metacall () from /usr/local/lib/qt4/libQtWebKit.so.4
#31 0x2b555628 in QWebPluginDatabase::qt_metacall () from /usr/local/lib/qt4/libQtWebKit.so.4
#32 0x2b5553b4 in QWebPluginDatabase::qt_metacall () from /usr/local/lib/qt4/libQtWebKit.so.4
#33 0x2b555215 in QWebPluginDatabase::qt_metacall () from /usr/local/lib/qt4/libQtWebKit.so.4
#34 0x2b179224 in QWebFrame::load () from /usr/local/lib/qt4/libQtWebKit.so.4
#35 0x2b17893c in QWebFrame::load () from /usr/local/lib/qt4/libQtWebKit.so.4
#36 0x080ce13c in RKWebPage::load (this=0x32f3eba0, url=@0xbfbfd398)
    at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/windows/rkhtmlwindow.cpp:115
#37 0x080d0990 in RKHTMLWindow::openRKHPage (this=<value optimized out>, url=<value optimized out>)
    at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/windows/rkhtmlwindow.cpp:309
#38 0x080d4437 in RKHTMLWindow::handleRKWardURL (url=@0xbfbfd608, window=0xf307f62a)
    at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/windows/rkhtmlwindow.cpp:346
#39 0x080cdb19 in RKHTMLWindow::openURL (this=0x32b16500, url=@0xbfbfd608)
    at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/windows/rkhtmlwindow.cpp:357
#40 0x080adebe in RKWorkplace::openHelpWindow (this=<value optimized out>, url=<value optimized out>, only_once=<value optimized out>)
    at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/windows/rkworkplace.cpp:459
#41 0x080c3c80 in RKTopLevelWindowGUI::showRKWardHelp (this=<value optimized out>)
    at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/windows/rktoplevelwindowgui.cpp:186
#42 0x0807f545 in RKWardMainWindow::doPostInit () at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/rkward.cpp:262
#43 0x080833a3 in RKWardMainWindow::qt_static_metacall (_o=0x2d466ee0, _c=<value optimized out>, _id=17, _a=0xf307f62a) at rkward.moc:115
---Type <return> to continue, or q <return> to quit---
#44 0x29a9f95e in QMetaCallEvent::placeMetaCall () from /usr/local/lib/qt4/libQtCore.so.4
#45 0x29aa12a9 in QObject::event () from /usr/local/lib/qt4/libQtCore.so.4
#46 0x2a1c6d29 in QWidget::event () from /usr/local/lib/qt4/libQtGui.so.4
#47 0x2a6130f1 in QMainWindow::event () from /usr/local/lib/qt4/libQtGui.so.4
#48 0x2933b0d4 in KMainWindow::event () from /usr/local/lib/libkdeui.so.5
#49 0x29393eea in KXmlGuiWindow::event () from /usr/local/lib/libkdeui.so.5
#50 0x2a16d2af in QApplicationPrivate::notify_helper () from /usr/local/lib/qt4/libQtGui.so.4
#51 0x2a16e97b in QApplication::notify () from /usr/local/lib/qt4/libQtGui.so.4
#52 0x292328d3 in KApplication::notify () from /usr/local/lib/libkdeui.so.5
#53 0x29a8bf6c in QCoreApplication::notifyInternal () from /usr/local/lib/qt4/libQtCore.so.4
#54 0x29a8cc5c in QCoreApplicationPrivate::sendPostedEvents () from /usr/local/lib/qt4/libQtCore.so.4
#55 0x29a8c3e0 in QCoreApplication::sendPostedEvents () from /usr/local/lib/qt4/libQtCore.so.4
#56 0x29abe721 in QEventDispatcherGlib::QEventDispatcherGlib () from /usr/local/lib/qt4/libQtCore.so.4
#57 0x2c82fe67 in g_main_context_dispatch () from /usr/local/lib/libglib-2.0.so.0
#58 0x2c83021e in g_main_context_pending () from /usr/local/lib/libglib-2.0.so.0
#59 0x2c8302aa in g_main_context_iteration () from /usr/local/lib/libglib-2.0.so.0
#60 0x29abe1b9 in QEventDispatcherGlib::processEvents () from /usr/local/lib/qt4/libQtCore.so.4
#61 0x2a224a42 in QX11Info::isCompositingManagerRunning () from /usr/local/lib/qt4/libQtGui.so.4
#62 0x29a8912f in QEventLoop::exec () from /usr/local/lib/qt4/libQtCore.so.4
#63 0x29a8c5b7 in QCoreApplication::exec () from /usr/local/lib/qt4/libQtCore.so.4
#64 0x2a16e7f6 in QApplication::exec () from /usr/local/lib/qt4/libQtGui.so.4
#65 0x0808812f in main (argc=<value optimized out>, argv=<value optimized out>)
    at /usr/ports/math/rkward-kde4/work/rkward-0.6.5/rkward/main.cpp:211

(gdb) c
Continuing.
[New Thread 30e4c000 (LWP 100587/rkward.frontend)]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libgcc_s.so.1]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/local/lib/gcc49/libgcc_s.so.1]
KCrash: Application 'rkward' crashing...
KCrash: Attempting to start /usr/local/lib/kde4/libexec/drkonqi from kdeinit
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2017-02-13 20:59:09 UTC
The error message is about a version mismatch. On november 20th, gcc was upgraded from 4.8.5 to 4.9.4. Is it possible that some dependencies were built with 4.8.5 and not yet upgraded?
Comment 2 William Ouwehand 2017-02-15 17:11:36 UTC
(In reply to Thierry Thomas from comment #1)

Thanks for your quick reply. 
How can I check this for these packages? I am familiar with ldd, pkg info -d

Removing *all* packages, and reinstalling showed no improvement.
- pkg delete -af
- cleaned out /var/cache/pkg
- switched make.conf from libre to openssl (not pkg, but just to be sure)
- reinstalled rkward-kde4 + xorg, etc.

Note that the version was downgraded to 0.6.5_1 from _2. 

KCrash: Application 'rkward' crashing...
KCrash: Attempting to start  from kdeinit
KCrash: Connect sock_file=/home/###/.kde4/socket-nike/kdeinit4__0
KCrash: Attempting to start  directly
KCrash failed to exec(), errno = 2
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2017-02-16 18:58:32 UTC
I've never seen this message myself, but there is an interesting entry in Stack Overflow:

http://stackoverflow.com/questions/11671009/dwarf-error-wrong-version-in-compilation-unit-header-is-4-should-be-2

Could it apply to your case?
I.e. do not use gdb from base, but gdb712 (from port or pkg devel/gdb )
Comment 4 William Ouwehand 2017-02-23 14:40:13 UTC
After having compiled www/qt4-webkit 4.8.7_1 from ports, with the WITH_DEBUG flag set, rkward 0.6.5 again ran properly, opening a workspace. However, when compiled without this flag, rkward (either portrevision 1 or 2) crashes as described. This seems somewhat odd (implausible?).

Any compilations were preceded by 'make deinstall' and 'make clean'. No options were changed intentionally.

Originally I wanted to provide a more complete gdb backtrace, by recompiling qt4-webkit as such. In this way I came upon this. 


ps. Thanks for the stackoverflow suggestion, gdb712 indeed solved that error message.
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2017-03-01 20:13:40 UTC
Sorry, I have no idea...

Adding kde@FreeBSD.org (maintainer of www/qt4-webkit) to the Cc: list: have you already encountered such a problem?
Comment 6 Tobias Kortkamp freebsd_committer freebsd_triage 2018-11-16 10:21:09 UTC
rkward-kde4 has been renamed to rkward-kde and no longer builds against
Qt 4/KDE 4.  Does the problem still persist with the current rkward-kde?
Comment 7 William Ouwehand 2018-11-29 09:15:31 UTC
Rkward starts, R console works OK, but it crashes after confirming certain menu dialogs such as "summary statistics", reporting a "Trace/BPT trap (core dumped)".

Note this could be a VM issue, as testing was done using Virtualbox (32bit 11.2-RELEASE), as my old laptop has been 'retired' (but can be fixed).

A minor issue are missing arrows in the add/remove boxes of the summary statistics dialog (font issue?). 

# Tested 
- rkward 0.7.0.b_1 with R 3.5.1_1
- Vbox file: FreeBSD-11.2-RELEASE-i386.vhd - uname: (...) r335510 jun 22
- Virtualbox 5.2.22 (newest) on Windows 10Pro, v 1803
- X11 wm: tested default x + i3

# Setup
pkg install xorg rkward-kde
service dbus onestart
adduser (+ login as newuser)
startx
rkward (in console)

Test console plotting in rkward: plot(rnorm(50,1))
Comment 8 William Ouwehand 2018-11-29 10:00:07 UTC
(In reply to William Ouwehand from comment #7)

...on a skylake 64-bit 11.2-RELEASE the above mentioned crash does not occur.
Note I mostly use vim + Nvim-R nowadays.
Comment 9 Rene Ladan freebsd_committer freebsd_triage 2018-12-31 17:11:18 UTC
Expired port removed.