Strange segfault
-
I'm facing a strange segfault in our production environment which cannot be reproduced on the development machine. I have implemented backtrace and signal 11 handler to see what is happening, but it gives more questions then answers. It is a QTcpServer backend, and the segfault happens in QIODevice::channelBytesWritten in Qt internals, several seconds(!!!) after the last networking activity. No disconnects were detected, none of my code is in a scope, just system calls and Qt internals. Here is the trace
24.03.2023 03:25:43.915 2 CRITICAL 140690302428736 Ooops: signal 11 - Segmentation fault 24.03.2023 03:25:43.915 2 CRITICAL 140690302428736 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [1] /lib64/libpthread.so.0(+0x13a20) [0x7ff50ca12a20] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [2] /lib64/libQt5Core.so.5(+0x2d9ebf) [0x7ff50cd80ebf] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [3] /lib64/libQt5Core.so.5(_ZN9QIODevice19channelBytesWrittenEix+0x51) [0x7ff50cc9d231] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [4] /lib64/libQt5Network.so.5(+0x10294c) [0x7ff50d1c194c] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [5] /lib64/libQt5Network.so.5(+0x111f9f) [0x7ff50d1d0f9f] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [6] /lib64/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x10b) [0x7ff50cd4d7bb] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [7] /lib64/libQt5Core.so.5(+0x2f863f) [0x7ff50cd9f63f] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [8] /lib64/libglib-2.0.so.0(g_main_context_dispatch+0x19f) [0x7ff50bb704cf] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [9] /lib64/libglib-2.0.so.0(+0xa94f8) [0x7ff50bbc44f8] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [10] /lib64/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7ff50bb6dc03] 24.03.2023 03:25:43.916 2 CRITICAL 140690302428736 [11] /lib64/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x68) [0x7ff50cd9ebb8] 24.03.2023 03:25:43.917 2 CRITICAL 140690302428736 [12] /lib64/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x132) [0x7ff50cd4c1e2] 24.03.2023 03:25:43.917 2 CRITICAL 140690302428736 [13] /lib64/libQt5Core.so.5(_ZN7QThread4execEv+0xaa) [0x7ff50cb8f2ca] 24.03.2023 03:25:43.917 2 CRITICAL 140690302428736 [14] /lib64/libQt5Core.so.5(+0xe94c6) [0x7ff50cb904c6] 24.03.2023 03:25:43.917 2 CRITICAL 140690302428736 [15] /lib64/libpthread.so.0(+0x92a5) [0x7ff50ca082a5] 24.03.2023 03:25:43.917 2 CRITICAL 140690302428736 [16] /lib64/libc.so.6(clone+0x43) [0x7ff50c5b0323] 24.03.2023 03:25:43.917 2 CRITICAL 140690302428736 24.03.2023 03:25:43.917 2 CRITICAL 140690302428736 Happy debugging!
The names are not de-mangled correctly, but still readable.
Any idea? -
I had this happening in the past, was the result of a too old Qt Version and a to new Windows version.
Updating the Qt Libs to the latest available fixed that
-
@Alexey-Volkov I had the issue with 5.15.9 on windows 11, needed to upgrade to 5.15.13...
the last precompiled 5.15.2 is super old :D, I would consider upgrading or at least recompiling yourself with the latest OS sdks
-
@Alexey-Volkov tough, the latest official one is 5.15.13 but that is for commercial users only, the open source variant is delayed by a significant amount of time.
The latest one I found is 5.15.6
https://lists.qt-project.org/pipermail/development/2022-September/042937.htmlmaybe 5.15.7 is also released, not sure.
Open source Qt6 is always up to date with the commercial one
-
@Alexey-Volkov said in Strange segfault:
any chance to get patch for this issue? I would apply it to my build
not sure, don't think, so, it will be released, but its time gated
which OpenSSL is used in Qt6?
I think OpenSSL3 v6.2.0