Author Topic: BitSharesX segfaulting in deleteOwnedPtr deep in the bowels of Qt  (Read 1445 times)

0 Members and 1 Guest are viewing this topic.

Offline theoretical


I'm using DACs Unlimited (DAC Sun Limited?).  Running on a fairly recent installation of Lubuntu 14.04.1 LTS on AMD64 under a dedicated user account.  The program segfaults every time with the same backtrace.

Things I've tried:

- Build single-threaded (no make -j4)
- Run single-CPU (taskset -c 0)
- Rebuild multiple times with make clean
- Remove "~/Bitshares X" directory
- git fsck on module and all submodules is OK
- Tried with latest mater / 673ff9327c9d0b3b4c7dfd9de7622a8663eee2ff
- Tried with 0.3.1 / 3448f7c8b64dbb578eef8eed5e3a6e32ed03e558

- I'm building with this command:

sh -c 'export PATH=$PATH:$(pwd)/programs/web_wallet/node_modules/.bin ; make clean && cmake -DINCLUDE_QT_WALLET=ON . && make buildweb && make BitSharesX'

Two non-standard things:  Letting the package install lineman locally, the script is in PATH due to above line.  I also symlinked /usr/bin/nodejs to programs/web_wallet/node_modules/.bin/node because the build process has at least one program that has a shebang that tries to execute "node".

This looks like a QT problem, a memory corruption problem, or maybe a compiler problem.  I'm using a stock libraries and compiler from Ubuntu LTS release, and I'm not sure why nobody else is encountering segfaults.

It ran fine in a Virtualbox VM with the exact same Ubuntu release.

GDB backtrace and list of installed qt libraries attached.  I see I have both qt4 and qt5 libraries, I'll check later if it's somehow trying to use both (which could certainly lead to problems).

Code: [Select]
GNU gdb (Ubuntu 7.7-0ubuntu3.1) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from programs/qt_wallet/BitSharesX...done.
(gdb) run
Starting program: /home/cc/btsx/src/bitsharesx/programs/qt_wallet/BitSharesX
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe5403700 (LWP 9569)]
Could not start new instance listener. Attempting to remove defunct listener... Success.
Listening for new instances on /tmp/BitShares X
[New Thread 0x7fffdb81e700 (LWP 9571)]
[New Thread 0x7fff9128b700 (LWP 9572)]
[New Thread 0x7fff8bbef700 (LWP 9573)]
[New Thread 0x7fff888ac700 (LWP 9574)]
512227ms th_a       ClientWrapper.cpp:74          initialize           ] config: {
  "rpc": {
    "enable": false,
    "rpc_user": "randomuser",
    "rpc_password": "c070351f5aff5565b8961324e274a8b2711eaf9046f6fbb040b0353b4b24677c",
    "rpc_endpoint": "127.0.0.1:0",
    "httpd_endpoint": "127.0.0.1:0",
    "htdocs": "./htdocs"
  },
  "default_peers": [
    "178.62.50.61:1776",
    "178.62.50.61:1777",
    "178.62.50.61:1778",
    "80.240.133.79:1776",
    "80.240.133.79:1777",
    "5.101.106.138:1777",
    "5.101.106.138:1778",
    "128.199.137.122:1776",
    "128.199.137.122:1777",
    "95.85.33.16:8764",
    "180.153.142.120:1777",
    "84.238.140.192:42577"
  ],
  "ignore_console": false,
  "logging": {
    "includes": [],
    "appenders": [{
        "name": "stderr",
        "type": "console",
        "args": {
          "stream": "std_error",
          "level_colors": [{
              "level": "debug",
              "color": "green"
            },{
              "level": "warn",
              "color": "brown"
            },{
              "level": "error",
              "color": "red"
            }
          ]
        },
        "enabled": true
      },{
        "name": "stdout",
        "type": "console",
        "args": {
          "stream": "std_out",
          "level_colors": [{
              "level": "debug",
              "color": "green"
            },{
              "level": "warn",
              "color": "brown"
            },{
              "level": "error",
              "color": "red"
            }
          ]
        },
        "enabled": true
      }
    ],
    "loggers": [{
        "name": "default",
        "parent": null,
        "level": "debug",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "stderr"
        ]
      }
    ]
  },
  "delegate_server": "0.0.0.0:0",
  "default_delegate_peers": [
    "178.62.50.61:9988"
  ]
}
Loading config from: /home/cc/btsx/BitShares X/config.json
Initializing genesis state from built-in genesis file
Please be patient, this could take a few minutes.
Re-indexing database... [/]
Successfully re-indexed 0 blocks in 0 seconds.
[New Thread 0x7fff83984700 (LWP 9575)]
[New Thread 0x7fff82cc9700 (LWP 9576)]
[New Thread 0x7fff82486700 (LWP 9577)]
[New Thread 0x7fff81c85700 (LWP 9578)]
[New Thread 0x7fff8142d700 (LWP 9579)]
[New Thread 0x7fff80a2b700 (LWP 9580)]
[New Thread 0x7fff67c94700 (LWP 9581)]
[New Thread 0x7fff67493700 (LWP 9582)]
[New Thread 0x7fff66c92700 (LWP 9583)]
[New Thread 0x7fff66491700 (LWP 9584)]
[New Thread 0x7fff6567b700 (LWP 9585)]
[New Thread 0x7fff64e7a700 (LWP 9586)]
[New Thread 0x7fff4bfff700 (LWP 9587)]
[New Thread 0x7fff4945e700 (LWP 9588)]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5db14d5 in deleteOwnedPtr<WebCore::QNetworkReplyWrapper> (ptr=0xe000100000000) at ../WTF/wtf/OwnPtrCommon.h:60
60 ../WTF/wtf/OwnPtrCommon.h: No such file or directory.
(gdb) bt
#0  0x00007ffff5db14d5 in deleteOwnedPtr<WebCore::QNetworkReplyWrapper> (ptr=0xe000100000000) at ../WTF/wtf/OwnPtrCommon.h:60
#1  clear (this=0x1e11340) at ../WTF/wtf/OwnPtr.h:119
#2  operator= (this=0x1e11340) at ../WTF/wtf/OwnPtr.h:81
#3  WebCore::QNetworkReplyHandler::finish (this=0x1e11330) at platform/network/qt/QNetworkReplyHandler.cpp:519
#4  0x00007ffff5daf280 in WebCore::QNetworkReplyHandlerCallQueue::flush (this=this@entry=0x1e11368)
    at platform/network/qt/QNetworkReplyHandler.cpp:249
#5  0x00007ffff5dafe91 in flush (this=0x1e11368) at platform/network/qt/QNetworkReplyHandler.cpp:243
#6  WebCore::QNetworkReplyHandlerCallQueue::push (this=0x1e11368,
    method=(void (WebCore::QNetworkReplyHandler::*)(WebCore::QNetworkReplyHandler * const)) 0x7ffff5db1350 <WebCore::QNetworkReplyHandler::finish()>) at platform/network/qt/QNetworkReplyHandler.cpp:215
#7  0x00007ffff5db079b in WebCore::QNetworkReplyWrapper::didReceiveFinished (this=0x1e11f30) at platform/network/qt/QNetworkReplyHandler.cpp:408
#8  0x00007ffff3f212a6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff4a025e4 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#10 0x00007ffff4a7ef59 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Network.so.5
#11 0x00007ffff3f2222e in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#12 0x00007ffff76ebc8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff76f0e56 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff3ef9c2d in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff3efbe07 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff3f46cd3 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff219de04 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff219e048 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007ffff219e0ec in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007ffff3f4698c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff3ef896b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff3eff0e1 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x000000000059fddb in main (argc=1, argv=<optimized out>) at /home/cc/btsx/src/bitsharesx/programs/qt_wallet/main.cpp:230
(gdb) quit
A debugging session is active.

Inferior 1 [process 9562] will be killed.

Quit anyway? (y or n)

Code: [Select]
# output of dpkg -l | grep libqt

ii  libqt4-declarative:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 Declarative module
ii  libqt4-network:amd64                        4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 network module
ii  libqt4-opengl:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 OpenGL module
ii  libqt4-script:amd64                         4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 script module
ii  libqt4-sql:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 SQL module
ii  libqt4-sql-mysql:amd64                      4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 MySQL database driver
ii  libqt4-sql-sqlite:amd64                     4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 SQLite 3 database driver
ii  libqt4-xml:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 XML module
ii  libqt4-xmlpatterns:amd64                    4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 XML patterns module
ii  libqt53d5:amd64                             5.0~git20130731-0ubuntu5               amd64        Qt 3D module
ii  libqt5clucene5:amd64                        5.2.1-8build1                          amd64        Qt 5 CLucene module
ii  libqt5concurrent5:amd64                     5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 concurrent module
ii  libqt5core5a:amd64                          5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 core module
ii  libqt5dbus5:amd64                           5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 D-Bus module
ii  libqt5designer5:amd64                       5.2.1-8build1                          amd64        Qt 5 designer module
ii  libqt5designercomponents5:amd64             5.2.1-8build1                          amd64        Qt 5 Designer components module
ii  libqt5gui5:amd64                            5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 GUI module
ii  libqt5help5:amd64                           5.2.1-8build1                          amd64        Qt 5 help module
ii  libqt5location5:amd64                       5.2.1-1ubuntu2                         amd64        Qt Location module
ii  libqt5location5-plugins:amd64               5.2.1-1ubuntu2                         amd64        Qt Location module - geolocation plugins
ii  libqt5network5:amd64                        5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 network module
ii  libqt5opengl5:amd64                         5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 OpenGL module
ii  libqt5opengl5-dev:amd64                     5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 OpenGL library development files
ii  libqt5positioning5:amd64                    5.2.1-1ubuntu2                         amd64        Qt Positioning module
ii  libqt5positioning5-plugins:amd64            5.2.1-1ubuntu2                         amd64        Qt Positioning module - position plugins
ii  libqt5printsupport5:amd64                   5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 print support module
ii  libqt5qml5:amd64                            5.2.1-3ubuntu15.1                      amd64        Qt 5 QML module
ii  libqt5quick5:amd64                          5.2.1-3ubuntu15.1                      amd64        Qt 5 Quick library
ii  libqt5quickparticles5:amd64                 5.2.1-3ubuntu15.1                      amd64        Qt 5 Quick particules module
ii  libqt5quicktest5:amd64                      5.2.1-3ubuntu15.1                      amd64        Qt 5 Quick Test library
ii  libqt5sensors5:amd64                        5.2.1+dfsg-2ubuntu2                    amd64        Qt Sensors module
ii  libqt5sensors5-dev                          5.2.1+dfsg-2ubuntu2                    amd64        Qt 5 Sensors development files
ii  libqt5sql5:amd64                            5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 SQL module
ii  libqt5sql5-sqlite:amd64                     5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 SQLite 3 database driver
ii  libqt5test5:amd64                           5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 test module
ii  libqt5webkit5:amd64                         5.1.1-1ubuntu8                         amd64        Web content engine library for Qt
ii  libqt5webkit5-dbg:amd64                     5.1.1-1ubuntu8                         amd64        Web content engine library for Qt - debugging symbols
ii  libqt5webkit5-dev                           5.1.1-1ubuntu8                         amd64        Web content engine library for Qt - development files
ii  libqt5widgets5:amd64                        5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 widgets module
ii  libqt5xml5:amd64                            5.2.1+dfsg-1ubuntu14.2                 amd64        Qt 5 XML module
ii  libqtcore4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 core module
ii  libqtdbus4:amd64                            4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 D-Bus module library
ii  libqtgui4:amd64                             4:4.8.5+git192-g085f851+dfsg-2ubuntu4  amd64        Qt 4 GUI module
BTS- theoretical / PTS- PZxpdC8RqWsdU3pVJeobZY7JFKVPfNpy5z / BTC- 1NfGejohzoVGffAD1CnCRgo9vApjCU2viY / the delegate formerly known as drltc / Nothing said on these forums is intended to be legally binding / All opinions are my own unless otherwise noted / Take action due to my posts at your own risk