sporadic CRASH on exit in QNetworkConfigurationManagerPrivate::pollEngines() on unixes (corrupt stack?)

• Feb 25, 2016 - 03:20
Type
Functional
Severity
S4 - Minor
Status
active
Project

Sorry I can't make the description more accurate. This has been occuring to me a fair number of times (but not every time) I close musescore on my ArchLinuxARMv7A C201, and I've caught it in QtCreator debug while running latest e666061, so I'm reporting it now. I close MScore normally and get a Segmentation Fault (Signal SIGSEGV) inside QNetworkConfigurationManagerPrivate::pollEngines() at the final line this dissasembler (sorry I need to insall Qt code on my machine!!):

0xb3fec708                   f0 4f 2d e9  push	{r4, r5, r6, r7, r8, r9, r10, r11, lr}
0xb3fec70c  <+0x0004>        10 80 90 e2  adds	r8, r0, #16
0xb3fec710  <+0x0008>        d4 d0 4d e2  sub	sp, sp, #212	; 0xd4
0xb3fec714  <+0x000c>        00 40 a0 e1  mov	r4, r0
0xb3fec718  <+0x0010>        02 00 00 0a  beq	0xb3fec728 <_ZN35QNetworkConfigurationManagerPrivate11pollEnginesEv+32>
0xb3fec71c  <+0x0014>        08 00 a0 e1  mov	r0, r8
0xb3fec720  <+0x0018>        01 80 88 e3  orr	r8, r8, #1
0xb3fec724  <+0x001c>        c8 46 fe eb  bl	0xb3f7e24c <_ZN6QMutex4lockEv@plt>
0xb3fec728  <+0x0020>        c0 30 8d e2  add	r3, sp, #192	; 0xc0
0xb3fec72c  <+0x0024>        14 10 84 e2  add	r1, r4, #20
0xb3fec730  <+0x0028>        5c 30 8d e5  str	r3, [sp, #92]	; 0x5c
0xb3fec734  <+0x002c>        03 00 a0 e1  mov	r0, r3
0xb3fec738  <+0x0030>        3c e4 ff eb  bl	0xb3fe5830
0xb3fec73c  <+0x0034>        c0 00 9d e5  ldr	r0, [sp, #192]	; 0xc0
0xb3fec740  <+0x0038>        01 20 a0 e3  mov	r2, #1
0xb3fec744  <+0x003c>        10 10 80 e2  add	r1, r0, #16
0xb3fec748  <+0x0040>        08 30 90 e5  ldr	r3, [r0, #8]
0xb3fec74c  <+0x0044>        0c 00 90 e5  ldr	r0, [r0, #12]
0xb3fec750  <+0x0048>        cc 20 8d e5  str	r2, [sp, #204]	; 0xcc
0xb3fec754  <+0x004c>        03 31 81 e0  add	r3, r1, r3, lsl #2
0xb3fec758  <+0x0050>        c4 30 8d e5  str	r3, [sp, #196]	; 0xc4
0xb3fec75c  <+0x0054>        00 11 81 e0  add	r1, r1, r0, lsl #2
0xb3fec760  <+0x0058>        c8 10 8d e5  str	r1, [sp, #200]	; 0xc8
0xb3fec764  <+0x005c>        01 00 53 e1  cmp	r3, r1
0xb3fec768  <+0x0060>        78 00 00 0a  beq	0xb3fec950 <_ZN35QNetworkConfigurationManagerPrivate11pollEnginesEv+584>
0xb3fec76c  <+0x0064>        00 00 93 e5  ldr	r0, [r3]
0xb3fec770  <+0x0068>        00 00 52 e3  cmp	r2, #0
0xb3fec774  <+0x006c>        7c 72 9f e5  ldr	r7, [pc, #636]	; 0xb3fec9f8 <_ZN35QNetworkConfigurationManagerPrivate11pollEnginesEv+752>
0xb3fec778  <+0x0070>        02 50 a0 e1  mov	r5, r2
0xb3fec77c  <+0x0074>        1c 60 84 e2  add	r6, r4, #28
0xb3fec780  <+0x0078>        07 70 8f e0  add	r7, pc, r7
0xb3fec784  <+0x007c>        64 00 8d e5  str	r0, [sp, #100]	; 0x64
0xb3fec788  <+0x0080>        6a 00 00 0a  beq	0xb3fec938 <_ZN35QNetworkConfigurationManagerPrivate11pollEnginesEv+560>
0xb3fec78c  <+0x0084>        00 30 90 e5  ldr	r3, [r0]
0xb3fec790  <+0x0088>        40 30 93 e5  ldr	r3, [r3, #64]	; 0x40

I should also note that on starting ./build.release/mscore/mscore, I get this following message that I suspect may be related directly to this error, because both QNetwork:

QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.

But I'm unable to reproduce a subsequent execution, so clearly this is a transient error.


Comments

I often see the QNetworkReplyImplPrivate error in the terminal, and recently I have been getting a seg fault on exit too. I haven't seen any problems inside MuseScore though; everything appears to work fine.

ok. Yes, I don't see any errors related to that while running musescore. But a crash on exit is still a crash and a potential source or indicator of bad things, so I'm going to keep my eye out. Which is why I've set priority to normal, not critical.

what distoro and cpu are you on?

See the QNetworkReplyImplPrivate::error at mscore start in console?

Or see the QNetworkConfigurationManagerPrivate::pollEngines() when quit mscore?

If this is same, then we can say is not just an ArchLinuxARMv7 issue, but a linux CPU-independent issue.

I have seen the crash on exit quite a few times before on my other linux, but I never bothered to investigate, nor have caught it in QtCreator.

The crash in QtNetwork... on exit. I see it maybe 10-20% of all rns nder the debugger. Perhaps in runs not under the debugger as well, but it isn't as obvious that it crashed. I als see all sorts of things printed to the console on startup, but I assume that's normal.

Title CRASH on exit in ArchLinuxARMv7 QNetworkConfigurationManagerPrivate::pollEngines() CRASH on linux exit in QNetworkConfigurationManagerPrivate::pollEngines()

OK. I'm changing title to reflect that this is a general linux issue.

Title CRASH on linux exit in QNetworkConfigurationManagerPrivate::pollEngines() sporadic CRASH on exit in QNetworkConfigurationManagerPrivate::pollEngines() on linuxes

Googling for QNetworkConfigurationManagerPrivate::pollEngines segfault reveals that a lot of other projects outside of MuseScore experience this same sporadic issue:

https://lists.debian.org/debian-qt-kde/2015/11/msg00221.html

Apparently something was fixed in Qt 5.4.2 https://codereview.qt-project.org/#/c/111893/ but I'm using 5.5.1 so apparently that didn't fix it completely, or it is a separate issue. Should I try contacting Qt?

regarding the QNetworkReplyImplPrivate::error on startup, I'm noticing on my x86-64 Win 8.1 machine running master that I'm also getting that:

Warning: QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once. (:0, )

I still have no idea whether these two errors are related in any way.

I believe the warning at startup is a problem with Qt Webkit. If you run mscore with -w to get no webview in the start center, it should disappear.
The crash I'm not sure but I do see it very very occasionally on Mac OSX in debug mode.

Title sporadic CRASH on exit in QNetworkConfigurationManagerPrivate::pollEngines() on linuxes sporadic CRASH on exit in QNetworkConfigurationManagerPrivate::pollEngines() on unixes

Thanks!

Has anyone experienced this crash on Windows?

Title sporadic CRASH on exit in QNetworkConfigurationManagerPrivate::pollEngines() on unixes sporadic CRASH on exit in QNetworkConfigurationManagerPrivate::pollEngines() on unixes (corrupt stack?)

I've experienced the crash on my i686 arch linux machine running official arch build of mscore 2.0.2. All I did was open mscore, edit preferences, close mscore, and then I see the telltale:

QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.

I've attached output of "gdb /usr/bin/mscore -coredump-" with "thread apply all bt" but I think the interesting bit is:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0xb36f39fe in QNetworkConfigurationManagerPrivate::pollEngines() () from /usr/lib/libQt5Network.so.5
[Current thread is 1 (Thread 0xa7b5cb40 (LWP 1107))]
(gdb) thread apply all bt

Thread 9 (Thread 0xaebaeb40 (LWP 1106)):
#0  0xb770ec11 in __kernel_vsyscall ()
#1  0xb2268cef in poll () from /usr/lib/libc.so.6
#2  0xb0ad6fcd in ?? () from /usr/lib/libxcb.so.1
#3  0xb0ad914b in xcb_wait_for_event () from /usr/lib/libxcb.so.1
#4  0xaed73f23 in ?? ()
#5  0x0b4acf78 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

I've added "(corrupt stack?)" to this bug title.

I've saved this coredump and backtrace (and will save future coredumps) to: https://efjz.in/index.php/s/DllKY9veK8m2FAP

EDIT: I'll try what lasonic says to diable webkit with "-w", and I'll see if I still get any crash on exit. I'm noting that I at least no longer see the "QNetworkReplyImplPrivate::error".

Running shoogle's latest nightly i686 AppImage (without encountering crash), I notice console output:

QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)
QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once.
QObject::connect: Cannot connect (null)::stateChanged(QNetworkSession::State) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged(QNetworkSession::State)

So maybe there is some issue connecting something. (I think those connect messages are referring to singals & slots...someone correct me if mistaken)

APPENDUM: note that the first "Cannot connect" error appears when start screen first displays, but at that point no "Mastering MuseScore" visual appears, untill a couple seconds later, at which point the rest of those console messages appear all at once.

In windows 8.1 x86-64 git master I do receive on startup:

Warning: QNetworkReplyImplPrivate::error: Internal problem, this method must only be called once. (:0, )

So clearly that issue is on all platforms...I'm going to try to fix that...