Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault in LTO build #2790

Closed
cgzones opened this issue Jan 3, 2021 · 15 comments
Closed

Segmentation fault in LTO build #2790

cgzones opened this issue Jan 3, 2021 · 15 comments

Comments

@cgzones
Copy link
Contributor

cgzones commented Jan 3, 2021

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Expected behaviour

functional program

Actual behaviour

Segmentation fault

Steps to reproduce

  1. build with -flto
  2. run nextcloud --version

Client configuration

Client version: 3.1.1

Operating system: Debian sid

OS language: en

Qt version used by client package (Linux only, see also Settings dialog): 5.15.2

Client package (From Nextcloud or distro) (Linux only): adopted Debian package

Installation path of client: /usr/bin/nextcloud

Logs

gdb stacktrace:

Starting program: /usr/bin/nextcloud --version
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdf728700 (LWP 343396)]

Thread 1 "nextcloud" received signal SIGSEGV, Segmentation fault.
doActivate<false> (sender=0x0, signal_index=9, argv=argv@entry=0x7fffffffbf10) at kernel/qobject.cpp:3768
3768    kernel/qobject.cpp: No such file or directory.
(gdb) bt full
#0  doActivate<false> (sender=0x0, signal_index=9, argv=argv@entry=0x7fffffffbf10) at kernel/qobject.cpp:3768
        sp = <optimized out>
        signal_spy_set = <optimized out>
        empty_argv = {0x0}
        senderDeleted = <optimized out>
#1  0x00007fffebba1860 in QMetaObject::activate (sender=<optimized out>, m=m@entry=0x7fffeca9a0a0 <QGuiApplication::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffffffbf10) at kernel/qobject.cpp:3946
        signal_index = <optimized out>
#2  0x00007fffec521522 in QGuiApplication::screenAdded (this=<optimized out>, _t1=<optimized out>, _t1@entry=0x555555961950) at .moc/moc_qguiapplication.cpp:389
        _a = {0x0, 0x7fffffffbf08}
#3  0x00007fffec50746c in QWindowSystemInterface::handleScreenAdded (ps=ps@entry=0x55555588fd10, isPrimary=<optimized out>) at kernel/qwindowsysteminterface.cpp:826
        screen = 0x555555961950
#4  0x00007fffdfc86e00 in QXcbConnection::initializeScreens (this=this@entry=0x55555586e640) at qxcbconnection_screens.cpp:413
        screen = 0x55555588fd10
        __for_range = @0x55555586e930: {<QListSpecialMethods<QXcbScreen*>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, 
                begin = 0, end = 0, array = {0x0}}, d = 0x5555558a1140}, d = 0x5555558a1140}}
        __for_begin = {i = <optimized out>}
        __for_end = {i = <optimized out>}
        it = {data = 0x555555878034, rem = 0, index = 12192}
        xcbScreenNumber = <optimized out>
        primaryScreen = 0x55555588fd10
#5  0x00007fffdfc62390 in QXcbConnection::QXcbConnection (this=0x55555586e640, nativeInterface=<optimized out>, canGrabServer=<optimized out>, defaultVisualId=<optimized out>, displayName=<optimized out>) at qxcbconnection.cpp:103
        focusInDelay = <optimized out>
        focusInDelay = <optimized out>
#6  0x00007fffdfc65113 in QXcbIntegration::QXcbIntegration (this=0x55555586e520, parameters=..., argc=@0x7fffffffdb7c: 2, argv=<optimized out>) at qxcbintegration.cpp:197
        displayName = <optimized out>
        noGrabArg = <optimized out>
        doGrabArg = <optimized out>
        underDebugger = <optimized out>
        conn = 0x0
        numParameters = 0
        canNotGrabEnv = false
        displayName = <optimized out>
        noGrabArg = <optimized out>
        doGrabArg = <optimized out>
        underDebugger = <optimized out>
        numParameters = <optimized out>
        conn = <optimized out>
        j = <optimized out>
        i = <optimized out>
        arg = {d = <optimized out>}
        ok = <optimized out>
        i = <optimized out>
        display = {static null = {<No data fields>}, d = <optimized out>}
        qt_category_enabled = <optimized out>
        qt_category_enabled = <optimized out>
#7  0x00007ffff7fc446f in QXcbIntegrationPlugin::create (this=<optimized out>, system=..., argv=0x7fffffffddd8, argc=@0x7fffffffdb7c: 2, parameters=...) at qxcbmain.cpp:56
        xcbIntegration = <optimized out>
#8  QXcbIntegrationPlugin::create (this=<optimized out>, system=..., parameters=..., argc=@0x7fffffffdb7c: 2, argv=0x7fffffffddd8) at qxcbmain.cpp:53
        xcbIntegration = <optimized out>
#9  0x00007fffec5258cc in init_platform (argv=<optimized out>, argc=@0x7fffffffdb7c: 2, platformThemeName=..., platformPluginPath=..., pluginNamesWithArguments=...) at kernel/qguiapplication.cpp:1223
        arguments = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, 
                  begin = 0, end = 0, array = {0x0}}, d = 0x5555558603e0}, d = 0x5555558603e0}}, <No data fields>}
        name = {static null = {<No data fields>}, d = 0x555555860a30}
        argumentsKey = {static null = {<No data fields>}, d = 0x555555865ea0}
        pluginArgument = @0x555555861fe0: {static null = {<No data fields>}, d = 0x555555860a30}
        __for_range = @0x7fffffffc290: {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, 
                        static is_always_lock_free = true}}}, alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x555555861fd0}, d = 0x555555861fd0}}, <No data fields>}
        __for_begin = {i = <optimized out>}
        __for_end = {i = <optimized out>}
        plugins = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, 
                  begin = 0, end = 0, array = {0x0}}, d = 0x555555861fd0}, d = 0x555555861fd0}}, <No data fields>}
        platformArguments = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, 
                  alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x555555805150 <QListData::shared_null>}, d = 0x555555805150 <QListData::shared_null>}}, <No data fields>}
        availablePlugins = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, 
                  alloc = 0, begin = 0, end = 0, array = {0x0}}, d = 0x555555863c80}, d = 0x555555863c80}}, <No data fields>}
        themeNames = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, 
                  begin = 0, end = 0, array = {0x0}}, d = 0x555555865ea0}, d = 0x555555865ea0}}, <No data fields>}
        plugins = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, 
                  begin = 0, end = 0, array = {0x0}}, d = <optimized out>}, d = <optimized out>}}, <No data fields>}
        platformArguments = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, 
                  alloc = 0, begin = 0, end = 0, array = {0x0}}, d = <optimized out>}, d = <optimized out>}}, <No data fields>}
        availablePlugins = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, 
                  alloc = 0, begin = 0, end = 0, array = {0x0}}, d = <optimized out>}, d = <optimized out>}}, <No data fields>}
        themeNames = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, 
                  begin = 0, end = 0, array = {0x0}}, d = <optimized out>}, d = <optimized out>}}, <No data fields>}
        pluginArgument = <optimized out>
        __for_range = <optimized out>
        __for_begin = {i = <optimized out>}
        __for_end = {i = <optimized out>}
        arguments = {<QList<QString>> = {<QListSpecialMethods<QString>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, 
                  begin = 0, end = 0, array = {0x0}}, d = <optimized out>}, d = <optimized out>}}, <No data fields>}
        name = {static null = {<No data fields>}, d = <optimized out>}
        argumentsKey = {static null = {<No data fields>}, d = <optimized out>}
        qt_category_enabled = <optimized out>
        qt_category_enabled = <optimized out>
        fatalMessage = {static null = {<No data fields>}, d = <optimized out>}
        themeName = <optimized out>
        __for_range = <optimized out>
        __for_begin = {i = <optimized out>}
        __for_end = {i = <optimized out>}
        themeName = <optimized out>
        __for_range = <optimized out>
        __for_begin = {i = <optimized out>}
        __for_end = {i = <optimized out>}
        nativeInterface = <optimized out>
        argument = <optimized out>
        __for_range = <optimized out>
        __for_begin = {i = <optimized out>}
        __for_end = {i = <optimized out>}
        equalsPos = <optimized out>
        name = {d = <optimized out>}
        value = {d = {data = {c = <optimized out>, uc = <optimized out>, s = <optimized out>, sc = <optimized out>, us = <optimized out>, i = <optimized out>, u = <optimized out>, l = <optimized out>, ul = <optimized out>, b = <optimized out>, d = <optimized out>, 
              f = <optimized out>, real = <optimized out>, ll = <optimized out>, ull = <optimized out>, o = <optimized out>, ptr = <optimized out>, shared = <optimized out>}, type = <optimized out>, is_shared = <optimized out>, is_null = <optimized out>}}
#10 QGuiApplicationPrivate::createPlatformIntegration (this=0x555555862210) at kernel/qguiapplication.cpp:1481
        platformPluginPath = {static null = {<No data fields>}, d = 0x555555805d60 <QArrayData::shared_null>}
        platformName = {d = 0x555555860f30}
        sessionType = {d = 0x5555558616d0}
        platformNameEnv = {d = 0x7fffebc57960}
        platformThemeName = {static null = {<No data fields>}, d = 0x555555805d60 <QArrayData::shared_null>}
        icon = {static null = {<No data fields>}, d = 0x555555805d60 <QArrayData::shared_null>}
        j = <optimized out>
#11 0x00007fffec526d20 in QGuiApplicationPrivate::createEventDispatcher (this=<optimized out>) at kernel/qguiapplication.cpp:1498
No locals.
#12 0x00007fffebb789b6 in QCoreApplicationPrivate::init (this=this@entry=0x555555862210) at kernel/qcoreapplication.cpp:834
        q = <optimized out>
        appPaths = 0x0
        manualPaths = 0x0
        thisThreadData = <optimized out>
#13 0x00007fffec529c6f in QGuiApplicationPrivate::init (this=0x555555862210) at kernel/qguiapplication.cpp:1527
        loadTestability = <optimized out>
        pluginList = {<QListSpecialMethods<QByteArray>> = {<No data fields>}, {p = {static shared_null = {ref = {atomic = {_q_value = {<std::__atomic_base<int>> = {static _S_alignment = 4, _M_i = -1}, static is_always_lock_free = true}}}, alloc = 0, begin = 0, 
                end = 0, array = {0x0}}, d = 0x0}, d = 0x0}}
        session_id = {static null = {<No data fields>}, d = 0x0}
        session_key = {static null = {<No data fields>}, d = 0x0}
        s = {static null = {<No data fields>}, d = 0x0}
        j = <optimized out>
        envPlugins = {d = 0x0}
        q = <optimized out>
#14 0x00007fffefe3fef9 in QApplicationPrivate::init() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
No symbol table info available.
#15 0x000055555570aff7 in SharedTools::QtSingleApplication::QtSingleApplication (this=<optimized out>, appId=..., argc=<optimized out>, argv=<optimized out>, this=<optimized out>, appId=..., argc=<optimized out>, argv=<optimized out>)
    at ./src/3rdparty/qtsingleapplication/qtsingleapplication.cpp:56
No locals.
#16 0x0000555555633fbc in OCC::Application::Application (this=<optimized out>, argc=<optimized out>, argv=<optimized out>, this=<optimized out>, argc=<optimized out>, argv=<optimized out>) at ./src/gui/application.cpp:116
No locals.
#17 0x00005555556020c3 in main (argc=<optimized out>, argv=0x7fffffffddd8) at ./src/gui/main.cpp:80
        app = {<SharedTools::QtSingleApplication> = {<QApplication> = {<No data fields>}, static staticMetaObject = {d = {superdata = {direct = 0x7ffff0332fa0 <QApplication::staticMetaObject>}, 
                stringdata = 0x55555571c180 <_ZL51qt_meta_stringdata_SharedTools__QtSingleApplication.lto_priv.0>, data = 0x555555712e60 <_ZL45qt_meta_data_SharedTools__QtSingleApplication.lto_priv.0>, static_metacall = 0x5555556091a0
     <SharedTools::QtSingleApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, firstPeer = 5, instances = 0x1, pidPeer = 0x28, actWin = 0xfffffffffffffeb0, appId = {static null = {<No data fields>}, 
              d = 0x5555558601d0}, block = 128}, static staticMetaObject = {d = {superdata = {direct = 0x55555580d560 <SharedTools::QtSingleApplication::staticMetaObject>}, stringdata = 0x55555571ae80 <_ZL35qt_meta_stringdata_OCC__Application.lto_priv.0>, 
              data = 0x555555712ca0 <_ZL29qt_meta_data_OCC__Application.lto_priv.0>, static_metacall = 0x55555560a810 <OCC::Application::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, _gui = {wp = {d = 0x3, 
              value = 0x5555557bbac0 <_ZL16qt_resource_data.lto_priv.0>}}, _theme = 0x7fffffffddf0, _helpOnly = 40, _versionOnly = 104, _startedAt = {t1 = 3, t2 = 93824994763936}, _showLogWindow = false, _logFile = {static null = {<No data fields>}, d = 0x33}, 
          _logDir = {static null = {<No data fields>}, d = 0x8}, _logExpire = -344274368, _logFlush = 255, _logDebug = 127, _userTriggeredConnect = false, _debugMode = false, _backgroundMode = 8, _proxy = {<QObject> = {
              _vptr.QObject = 0x7fffeb7aca40 <std::ios_base::Init::~Init()>, static staticMetaObject = {d = {superdata = {direct = 0x0}, stringdata = 0x7fffebd39dc0 <qt_meta_stringdata_QObject>, data = 0x7fffebd39ca0 <qt_meta_data_QObject>, 
                  static_metacall = 0x7fffebba6c90 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x555555815008}, static staticQtMetaObject = {d = {superdata = {direct = 0x0}, 
                  stringdata = 0x7fffebd3cd60 <qt_meta_stringdata_Qt>, data = 0x7fffebd39ee0 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = {
                  direct = 0x555555804e00 <QObject::staticMetaObject>}, stringdata = 0x7ffff7e8c6c0 <qt_meta_stringdata_OCC__ClientProxy>, data = 0x7ffff7e850a0 <qt_meta_data_OCC__ClientProxy>, static_metacall = 0x7ffff7dcea10
     <OCC::ClientProxy::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}, _networkConfigurationManager = <incomplete type>, _checkConnectionTimer = {<QObject> = {_vptr.QObject = 0x2, static staticMetaObject = {
                d = {superdata = {direct = 0x0}, stringdata = 0x7fffebd39dc0 <qt_meta_stringdata_QObject>, data = 0x7fffebd39ca0 <qt_meta_data_QObject>, static_metacall = 0x7fffebba6c90 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, 
                  relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x2}, static staticQtMetaObject = {d = {superdata = {direct = 0x0}, stringdata = 0x7fffebd3cd60 <qt_meta_stringdata_Qt>, data = 0x7fffebd39ee0 <qt_meta_data_Qt>, static_metacall = 0x0, 
                  relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = {direct = 0x7fffebdfd100}, stringdata = 0x7fffebd493e0 <qt_meta_stringdata_QTimer>, data = 0x7fffebd49300 <qt_meta_data_QTimer>, 
                static_metacall = 0x7fffebbac810 <QTimer::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, id = -8744, inter = 32767, del = -8720, single = 1, nulltimer = 1, type = 3}, _folderManager = {
            d = 0x55555570cca5 <__libc_csu_init+69>}}
        __PRETTY_FUNCTION__ = {<optimized out> <repeats 22 times>}

Probably related to https://gitlab.com/wireshark/wireshark/-/issues/17040

@er-vin er-vin added the bug label Jan 4, 2021
@er-vin er-vin added this to the Desktop 3.2 milestone Jan 4, 2021
@Toorero
Copy link

Toorero commented Jan 21, 2021

I can confirm this is an issue on Ubuntu 20.04 as well (apt package and AppImage) though I don't have any idea how to obtain this log with gdb.

I also experience the same thing with the Telegram desktop client but haven't found a corresponding issue yet.

@Toorero
Copy link

Toorero commented Jan 28, 2021

Is there still no fix or even a workaround in sight? 😞

@er-vin er-vin modified the milestones: Desktop 3.2, Desktop 3.3 Feb 2, 2021
@github-actions
Copy link

github-actions bot commented Mar 3, 2021

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@github-actions github-actions bot added the stale label Mar 3, 2021
@Toorero
Copy link

Toorero commented Mar 6, 2021

The bug still exists on my Ubuntu 20.04 LTS installation, so I don't see a reason to close it.

@github-actions github-actions bot removed the stale label Mar 7, 2021
@Toorero
Copy link

Toorero commented Mar 29, 2021

Issue seems to be resolved on my Ubuntu instance.

@cgzones
Copy link
Contributor Author

cgzones commented Mar 30, 2021

Still occurring with 3.1.3 on Debian sid.

@Toorero
Copy link

Toorero commented Apr 1, 2021

Ok I tried the packaged version that comes with Ubuntu 20.04 and that version seemed to work till I ran the AppImage or 3.2.0rc3 (which on its own runs smooth). If I try to go back to the packaged version the version start and is doing is thing for 20s or so and afterwards displays the segmentation fault (core dumped) again. It's getting even more confusing by now....

@FlexW
Copy link

FlexW commented Apr 1, 2021

@Toorero That is because the sync database of 3.2.0-rc3 and 3.1.3 are incompatible. In general it is not supported to downgrade. To recover from that you need to delete the sync database while the client is not running. The sync database are the files beginning with ._sync* in your sync folder. The client will generate a new sync database on restart.

@Toorero
Copy link

Toorero commented Apr 1, 2021

Ah ok so then the bug is fixed (at least for me) and the testing just destroyed the sync-base. I can live with that.

@cgzones
Copy link
Contributor Author

cgzones commented Apr 14, 2021

Still present with 3.2.0 on Debian sid.

Sadly the test-suite passes now with 3.2.0, cause the version test does not fail anymore on a nextcloud --version segault.

@github-actions
Copy link

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@github-actions github-actions bot added the stale label May 12, 2021
@github-actions
Copy link

This bug report is getting automatically closed due to no answer since the issue has been staled. Thank you!

@cgzones
Copy link
Contributor Author

cgzones commented Nov 10, 2022

Still an issue with 3.6.1 on Debian sid.

@kostadinsh
Copy link

Still an issue with 3.9.1

@khumarahn
Copy link

Still an issue with 3.12.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants