Summary: | Crash in __strstr_sse2 after QSGRenderContext::initialize(QOpenGLContext*) | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Christian <alexandruch_91> |
Component: | generic-crash | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED UPSTREAM | ||
Severity: | crash | CC: | 13555.werths, a.nolting, adrien1975, alex03, alex, apirogov, arne.henningsen, aroth, bhush94, bvermeul, caleb, carlsonj, cpigat242, davidsboogs, davispuh, devilbur, drdrnewman, Drezil1985, evaristo.torres, f1r31c3r, fthiagogv, giacof, gwenael.gilles, hackfleischkiechla, iarspider, jon_p_griffiths, kde, kde, kerrylange, lubos, maceli, mah1995.1415, maldun.finsterschreck, mborgnia, michaelcpinson, mike, nkukard, notmart, paul.couaillier, plasma-bugs, quazgar, rafalh85, rdieter, renan.t.inacio, thomas2967, wawalkenhorst |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.3.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=354972 https://bugs.kde.org/show_bug.cgi?id=360464 https://bugs.kde.org/show_bug.cgi?id=354277 |
||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Sample hacky patch
glxinfo of K420 which crashes New crash information added by DrKonqi |
Description
Christian
2015-06-07 05:26:20 UTC
*** Bug 349271 has been marked as a duplicate of this bug. *** *** Bug 349483 has been marked as a duplicate of this bug. *** this may depend from graphics drivers Thread 2 (Thread 0x7fed63fff700 (LWP 2702)): [KCrash Handler] #5 0x00000030272a7e3d in __strstr_sse2_unaligned () from /lib64/libc.so.6 #6 0x00000030c6d46f5a in QSGRenderContext::initialize(QOpenGLContext*) () from /lib64/libQt5Quick.so.5 #7 0x00000030c6d69d09 in QSGRenderThread::run() () from /lib64/libQt5Quick.so.5 #8 0x000000303b49fede in QThreadPrivate::start(void*) () from /lib64/libQt5Core.so.5 #9 0x0000003027607555 in start_thread () from /lib64/libpthread.so.0 #10 0x0000003027301f3d in clone () from /lib64/libc.so.6 Got same crash, but for ksplashqml, using Qt 5.5 and plasma-workspace from git master branch. ksplashqml[2023]: Loading stage "initial" 345 kernel: QSGRenderThread[2036]: segfault at 0 ip 00007f83d26c8c6e sp 00007f83acb54c50 error 4 in libc-2.21.so[7f83d2646000+199000] systemd-coredump[2037]: Process 2023 (ksplashqml) of user 1000 dumped core. #0 0x00007f83d26c8c6e in __strstr_sse2 () from /usr/lib/libc.so.6 #1 0x00007f83d444852a in QSGRenderContext::initialize(QOpenGLContext*) () from /usr/lib/libQt5Quick.so.5 #2 0x00007f83d446be69 in ?? () from /usr/lib/libQt5Quick.so.5 #3 0x00007f83d2e30a9e in ?? () from /usr/lib/libQt5Core.so.5 #4 0x00007f83d178d354 in start_thread () from /usr/lib/libpthread.so.0 #5 0x00007f83d272dbfd in clone () from /usr/lib/libc.so.6 It's Qt bug, strstr is called with null pointer, look at http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/scenegraph/qsgcontext.cpp?h=5.5#n658 const char *vendor = (const char *) funcs->glGetString(GL_VENDOR); if (strstr(vendor, "nouveau")) funcs->glGetString() returns null pointer for some reason (Xorg/GPU driver failed or something), but anyway Qt should just abort and quit. (In reply to Dāvis from comment #4) > Got same crash, but for ksplashqml, using Qt 5.5 and plasma-workspace from > git master branch. > > ksplashqml[2023]: Loading stage "initial" 345 > kernel: QSGRenderThread[2036]: segfault at 0 ip 00007f83d26c8c6e sp > 00007f83acb54c50 error 4 in libc-2.21.so[7f83d2646000+199000] > systemd-coredump[2037]: Process 2023 (ksplashqml) of user 1000 dumped core. > > #0 0x00007f83d26c8c6e in __strstr_sse2 () from /usr/lib/libc.so.6 > #1 0x00007f83d444852a in QSGRenderContext::initialize(QOpenGLContext*) () > from /usr/lib/libQt5Quick.so.5 > #2 0x00007f83d446be69 in ?? () from /usr/lib/libQt5Quick.so.5 > #3 0x00007f83d2e30a9e in ?? () from /usr/lib/libQt5Core.so.5 > #4 0x00007f83d178d354 in start_thread () from /usr/lib/libpthread.so.0 > #5 0x00007f83d272dbfd in clone () from /usr/lib/libc.so.6 > > It's Qt bug, strstr is called with null pointer, look at > > http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/scenegraph/ > qsgcontext.cpp?h=5.5#n658 > > const char *vendor = (const char *) funcs->glGetString(GL_VENDOR); > if (strstr(vendor, "nouveau")) > > funcs->glGetString() returns null pointer for some reason (Xorg/GPU driver > failed or something), but anyway Qt should just abort and quit. there's for plasmashell same too #0 0x00007f1a54ca1528 in raise () from /usr/lib/libc.so.6 #1 0x00007f1a5b5ba066 in KCrash::defaultCrashHandler (sig=11) at /mnt/Dati2/Pirmkods/AUR/kcrash-git/src/kcrash/src/kcrash.cpp:409 #2 <signal handler called> #3 0x00007f1a54cf0c6e in __strstr_sse2 () from /usr/lib/libc.so.6 #4 0x00007f1a5941852a in QSGRenderContext::initialize(QOpenGLContext*) () from /usr/lib/libQt5Quick.so.5 #5 0x00007f1a5943be69 in ?? () from /usr/lib/libQt5Quick.so.5 #6 0x00007f1a55458a9e in ?? () from /usr/lib/libQt5Core.so.5 #7 0x00007f1a54545354 in start_thread () from /usr/lib/libpthread.so.0 #8 0x00007f1a54d55bfd in clone () from /usr/lib/libc.so.6 On Sun, Aug 9, 2015 at 6:50 PM, Dāvis <davispuh@gmail.com> wrote: > there's for plasmashell same too > > #0 0x00007f1a54ca1528 in raise () from /usr/lib/libc.so.6 > #1 0x00007f1a5b5ba066 in KCrash::defaultCrashHandler (sig=11) at > /mnt/Dati2/Pirmkods/AUR/kcrash-git/src/kcrash/src/kcrash.cpp:409 > #2 <signal handler called> > #3 0x00007f1a54cf0c6e in __strstr_sse2 () from /usr/lib/libc.so.6 > #4 0x00007f1a5941852a in QSGRenderContext::initialize(QOpenGLContext*) () from > /usr/lib/libQt5Quick.so.5 > #5 0x00007f1a5943be69 in ?? () from /usr/lib/libQt5Quick.so.5 > #6 0x00007f1a55458a9e in ?? () from /usr/lib/libQt5Core.so.5 > #7 0x00007f1a54545354 in start_thread () from /usr/lib/libpthread.so.0 > #8 0x00007f1a54d55bfd in clone () from /usr/lib/libc.so.6 Which CPU you do have? I *think* it is due to TSX bug... check if microcode needs update (In reply to Bhushan Shah from comment #6) > On Sun, Aug 9, 2015 at 6:50 PM, Dāvis <davispuh@gmail.com> wrote: > > there's for plasmashell same too > > > > #0 0x00007f1a54ca1528 in raise () from /usr/lib/libc.so.6 > > #1 0x00007f1a5b5ba066 in KCrash::defaultCrashHandler (sig=11) at > > /mnt/Dati2/Pirmkods/AUR/kcrash-git/src/kcrash/src/kcrash.cpp:409 > > #2 <signal handler called> > > #3 0x00007f1a54cf0c6e in __strstr_sse2 () from /usr/lib/libc.so.6 > > #4 0x00007f1a5941852a in QSGRenderContext::initialize(QOpenGLContext*) () from > > /usr/lib/libQt5Quick.so.5 > > #5 0x00007f1a5943be69 in ?? () from /usr/lib/libQt5Quick.so.5 > > #6 0x00007f1a55458a9e in ?? () from /usr/lib/libQt5Core.so.5 > > #7 0x00007f1a54545354 in start_thread () from /usr/lib/libpthread.so.0 > > #8 0x00007f1a54d55bfd in clone () from /usr/lib/libc.so.6 > > Which CPU you do have? I *think* it is due to TSX bug... check if > microcode needs update I very doubt that, because it crashes in __strstr_sse2 on => 0x00007f1a54cf0c6e <+14>: movzx eax,BYTE PTR [rdi] $rdi is probably 0 anyway I've AMD FX(tm)-6100 Six-Core Processor Linux 4.1.4 kernel: microcode: CPU0: patch_level=0x06000629 kernel: microcode: CPU1: patch_level=0x06000629 kernel: microcode: CPU2: patch_level=0x06000629 kernel: microcode: CPU3: patch_level=0x06000629 kernel: microcode: CPU4: patch_level=0x06000629 kernel: microcode: CPU5: patch_level=0x06000629 kernel: microcode: Microcode Update Driver: v2.00 *** Bug 351265 has been marked as a duplicate of this bug. *** *** Bug 352107 has been marked as a duplicate of this bug. *** *** Bug 352474 has been marked as a duplicate of this bug. *** Also happening here, Fedora 64bit, Qt 5.5. I can confirm that funcs->glGetString(GL_VENDOR) returns null and so strstr() crashes. This seems to occur reliably after kwin has already crashed, which is currently happening on every login on my desktop machine. Can't we just check the returned string for null before doing the string compare rather than crashing? Created attachment 94768 [details]
Sample hacky patch
marking confirmed (i think we have enough dups to justify that) *** Bug 353486 has been marked as a duplicate of this bug. *** *** Bug 353429 has been marked as a duplicate of this bug. *** @Jon patch looks sensible. Can you try and get it into Qt? Email me if you need help doing that. Does that actually solve the problem? or just cause it to break later on? > Does that actually solve the problem? or just cause it to break later on? I'm unable to test it at present, unfortunately, I'm not setup to build/rebuild from source here in the immediate future. I did manage to attach gdb and called glGetError at the crash point, since glGetString had failed it should return an error code. it returned GL_NO_ERROR which is a) not helpful for diagnosing further and b) a (non-KDE/Qt) bug in and of itself AFAICS. However this makes it clear that these functions can fail, and that checking the GL error code before dereferencing is not enough to prevent it crashing - it must check the pointer as the patch does. So I think the patch or something very like it is the only thing the code can do, short of changing it and its callers to return/handle error codes. > Can you try and get it into Qt? Email me if you need help doing that. I'm unable to sync the git repos and submit through gerrit right now. Is there a mailing list to submit a patch to, or can someone from KDE adopt it? I happily disclaim all copyright interest as there is no creative element to the patch whatsoever. *** Bug 354154 has been marked as a duplicate of this bug. *** *** Bug 354305 has been marked as a duplicate of this bug. *** The patch didn't work for me. Geforce 660 GTX - crashes Geforce 750 - no crash Quadro K420 - crashes With the patch, sometimes after a few minutes I see the bottom bar. Sometimes not, sometimes no bar. Sometimes the KDE menu has garbled text on it, but the text on the bar is ok. I tried to change to Xrender to no avail. Using the proprietary nvidia module doesn't make a difference. The nouveau module does however log that the GPU hung once for me. I attached my glxinfo output. Created attachment 95192 [details]
glxinfo of K420 which crashes
*** Bug 354990 has been marked as a duplicate of this bug. *** *** Bug 355272 has been marked as a duplicate of this bug. *** Created attachment 95509 [details]
New crash information added by DrKonqi
plasmashell (5.4.3) using Qt 5.5.0
- What I was doing when the application crashed:
Plasma crashes regulary if popup windows are opened.
Especially in Anki and Firefox
-- Backtrace (Reduced):
#5 0x00007f517bfef4fd in __strstr_sse2_unaligned () at /lib64/libc.so.6
#6 0x00007f5181b3196a in QSGRenderContext::initialize(QOpenGLContext*) () at /lib64/libQt5Quick.so.5
#7 0x00007f5181b552b9 in QSGRenderThread::run() () at /lib64/libQt5Quick.so.5
#8 0x00007f517cc4a54e in QThreadPrivate::start(void*) () at /lib64/libQt5Core.so.5
#9 0x00007f517ac58555 in start_thread () at /lib64/libpthread.so.0
*** Bug 357182 has been marked as a duplicate of this bug. *** *** Bug 356907 has been marked as a duplicate of this bug. *** (In reply to David Edmundson from comment #18) > *** Bug 354154 has been marked as a duplicate of this bug. *** Aaa the kde crash trace from DrKonqi. This is the crash i sort of fixed by doing the following while logged in as the user account that it crashed with: rm -rf ~/.cache rm -rf ~/.config/kwinrc kbuildsycoca5 My problems is I cannot even login :( (In reply to Nigel Kukard from comment #29) > My problems is I cannot even login :( Drop your runlevel and login to a virtual terminal or if you can switch VT using Ctl+Alt+F1 and login to your user account that way. I presume you can't login because the sddm crashes and wont load up. If i am wrong just ignore me lol. I submit a patch to Qt https://codereview.qt-project.org/144745 and with this patch it now crashes inside NVIDIA library so it seems to be GPU driver bug but not sure exactly how it's caused. Just a sidenote, kubuntu-ci works fine for me *** Bug 357719 has been marked as a duplicate of this bug. *** I get the same crash with the same backtrace, mostly on login. I am using the nvidia binary driver for my X. *** Bug 358297 has been marked as a duplicate of this bug. *** *** Bug 358883 has been marked as a duplicate of this bug. *** I don't know if it's helpful but I had seen some strange behavior of applications (and the whole plasmashell) after unlocking the screen while the screen was switched of by power management. It looks like that sometimes the whole opengl buffer/memory/context is corrupt for the shell or only for one or two applications that are still open. For instance this morning was konsole open together with firefox, yast and dolphin. The screen were locked and background light seems to switched of for both internal screen at my laptop as well for the via DisplayPort/Thunderbold port connected external Samsung display. I moved the mouse and the xserver seems to be restarted 2 times while trying to wake up for the internal and then the external screen. While this happened the internal screens shows a bit earlier content and I noticed again the same flickering for plasma and for a very short period of time I could see content from the desktop even while the screen was in locked mode and I had not entered any password at this time (due to another issue which klockscreen functionality, which randomly routes the focus of the password textbox while the xserver is waking up). And the app window of konsole was at this already damaged as it showed, formed in triangles, parts of the desktop background instead the bash content. And this application were also damage after I entered my password and the desktop were unlocked again. I needed to close konsole and restarting it to use it again. And there is a similarity to the bug 344783 - https://bugs.kde.org/show_bug.cgi?id=344783 - which I opened after I moved to plasma5 last year. In this bug I had the feeling, that the issue handled in this bug only happened while the external screen was attached and I was at this point on kernel 4.2. The issue disappeared on 4.3 and now, after I updated a couple of days before to kernel 4.4.0-2, the issue appears again but not with these great effects. Regards Alex *** Bug 359070 has been marked as a duplicate of this bug. *** *** Bug 361302 has been marked as a duplicate of this bug. *** *** Bug 360573 has been marked as a duplicate of this bug. *** *** Bug 361553 has been marked as a duplicate of this bug. *** *** Bug 362543 has been marked as a duplicate of this bug. *** *** Bug 363386 has been marked as a duplicate of this bug. *** *** Bug 363035 has been marked as a duplicate of this bug. *** *** Bug 362742 has been marked as a duplicate of this bug. *** *** Bug 363884 has been marked as a duplicate of this bug. *** *** Bug 364203 has been marked as a duplicate of this bug. *** I can confirm this while using a GTX 1080 and propriatary nvidia-drivers. hth. *** Bug 364380 has been marked as a duplicate of this bug. *** The same on openSUSE 42.1 since may/june 2016. 1) PC with Nvidia 367.27 driver, GPU: GTX 680 (every time in random time while playing in ETS2 or ATS). 2) Laptop with Nvidia 8600 GS with Legacy Nvidia driver. Application: plasmashell (5.5.5) Qt Version: 5.5.1 Operating System: Linux 4.1.26-21-default x86_64 Distribution: "openSUSE Leap 42.1 (x86_64)" The crash can be reproduced every time. *** Bug 366041 has been marked as a duplicate of this bug. *** *** Bug 368408 has been marked as a duplicate of this bug. *** *** Bug 368457 has been marked as a duplicate of this bug. *** *** Bug 366837 has been marked as a duplicate of this bug. *** *** Bug 372448 has been marked as a duplicate of this bug. *** *** Bug 373339 has been marked as a duplicate of this bug. *** There doesn't seem to be any new reports after Qt >= 5.6.0. I'm marking htis as closed, if you still see this error with this version of Qt or newer please reopen *** Bug 377461 has been marked as a duplicate of this bug. *** |