Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Strange segfault
Qt 6.11 is out! See what's new in the release blog

Strange segfault

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 2 Posters 841 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Alexey Volkov
    wrote on last edited by
    #1

    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?

    J.HilkJ 1 Reply Last reply
    0
    • A Alexey Volkov

      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?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Alexey-Volkov

      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


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      A 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        @Alexey-Volkov

        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

        A Offline
        A Offline
        Alexey Volkov
        wrote on last edited by
        #3

        @J-Hilk Thank you for response!
        It is Qt 5.15.2 in Fedora34 container, is it really too old?

        J.HilkJ 1 Reply Last reply
        0
        • A Alexey Volkov

          @J-Hilk Thank you for response!
          It is Qt 5.15.2 in Fedora34 container, is it really too old?

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @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


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          A 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @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

            A Offline
            A Offline
            Alexey Volkov
            wrote on last edited by
            #5

            @J-Hilk wow, thank you for giving me a hope! :)
            I will recompile it. Which is the last stable version of 5.15?

            J.HilkJ 1 Reply Last reply
            0
            • A Alexey Volkov

              @J-Hilk wow, thank you for giving me a hope! :)
              I will recompile it. Which is the last stable version of 5.15?

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @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.html

              maybe 5.15.7 is also released, not sure.

              Open source Qt6 is always up to date with the commercial one


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              A 2 Replies Last reply
              0
              • J.HilkJ J.Hilk

                @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.html

                maybe 5.15.7 is also released, not sure.

                Open source Qt6 is always up to date with the commercial one

                A Offline
                A Offline
                Alexey Volkov
                wrote on last edited by
                #7

                @J-Hilk any chance to get patch for this issue? I would apply it to my build

                J.HilkJ 1 Reply Last reply
                0
                • J.HilkJ J.Hilk

                  @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.html

                  maybe 5.15.7 is also released, not sure.

                  Open source Qt6 is always up to date with the commercial one

                  A Offline
                  A Offline
                  Alexey Volkov
                  wrote on last edited by
                  #8

                  @J-Hilk
                  which OpenSSL is used in Qt6?

                  1 Reply Last reply
                  0
                  • A Alexey Volkov

                    @J-Hilk any chance to get patch for this issue? I would apply it to my build

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #9

                    @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


                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved