[Bug 1141883] New: pinentry-qt crashes with QtCurve
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883 Bug ID: 1141883 Summary: pinentry-qt crashes with QtCurve Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: x86-64 OS: openSUSE Factory Status: NEW Severity: Normal Priority: P5 - None Component: KDE Workspace (Plasma) Assignee: opensuse-kde-bugs@opensuse.org Reporter: opensuse@trummer.xyz QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 810756 --> http://bugzilla.opensuse.org/attachment.cgi?id=810756&action=edit pinentry backtrace I upgraded from Tumbleweed 20190708 to 20190713 and now pinentry-qt (displayed right after login to unlock KWallet) crashes. The crash happens right after hitting Enter. The crash does not happen after switching away from QtCurve to the Breeze application style. Backtrace attached. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c1
Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c2
--- Comment #2 from Maximilian Trummer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c3
--- Comment #3 from Maximilian Trummer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
Maximilian Trummer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c4
Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c5
--- Comment #5 from Wolfgang Bauer
So maybe it's caused by the switch to LTO. I'll try to build it without, but that's just a guess. Indeed, that does fix the crash here.
Can you please try the new pinentry-qt5 package as well? https://download.opensuse.org/repositories/home:/wolfi323:/boo1141883/openSU... (same repo as before) You can switch back qtcurve-qt5 to the standard Tumbleweed version. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c6
--- Comment #6 from Maximilian Trummer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c7
--- Comment #7 from Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c8
Martin Liška
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c9
--- Comment #9 from Wolfgang Bauer
Can you please provide me more information how to reproduce it. Install qtcurve-qt5, and configure it as application style in Plasma's settings. Then run pinentry-qt, and enter "BYE". It should crash.
If you are not using Plasma, I suppose you could use qt5ct to configure the style, but I haven't tried that. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c10
--- Comment #10 from Martin Liška
(In reply to Martin Liška from comment #8)
Can you please provide me more information how to reproduce it. Install qtcurve-qt5, and configure it as application style in Plasma's settings. Then run pinentry-qt, and enter "BYE". It should crash.
If you are not using Plasma, I suppose you could use qt5ct to configure the style, but I haven't tried that.
Yes, I don't use. Can you please help me where to set it up in qt5ct? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c11
--- Comment #11 from Wolfgang Bauer
Yes, I don't use. Can you please help me where to set it up in qt5ct? I never used it either, as I use Plasma.
AFAIK, it should be used as platform plugin by Qt5 applications automatically when you install it (after logging out/in). Then you should be able to configure the appearance of Qt5 applications with the included tool "qt5ct". The crash occurs with the QtCurve style at least. I don't know whether it is actually reproducible with qt5ct though, or only with the Plasma platform plugin. (I may try that later, I actually don't even use Tumbleweed) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c12
--- Comment #12 from Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c13
--- Comment #13 from Martin Liška
Ok, I was able to reproduce the crash in IceWM like this: - install qtcurve-qt5 and qt5ct - run qt5ct, set Style to "QtCurve" (on the Appearance tab that should be open on start) and click OK - logout/login to "activate" qt5ct (or run "export QT_QPA_PLATFORMTHEME='qt5ct'" manually) - run pinentry-qt and enter "BYE"
Should work like this on any other desktop as well, because the "export QT_QPA_PLATFORMTHEME='qt5ct'" should force Qt5 to use qt5ct regardless of the desktop session.
Great, now I can reproduce it in a VM. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c14
Martin Liška
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c15
--- Comment #15 from Fabian Vogt
Fabian: Any guess what can be broken based on the back-trace?
I made a patch: https://phabricator.kde.org/D22719 I don't know why it only breaks with LTO though. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c16
--- Comment #16 from Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c17
Fabian Vogt
(In reply to Martin Liška from comment #14)
Fabian: Any guess what can be broken based on the back-trace?
I made a patch: https://phabricator.kde.org/D22719
I don't know why it only breaks with LTO though.
While the patch is correct (it's possible to have argc == 0), I think the root cause for pinentry-qt is something else though. As during QApplication construction, argc = 1 and stored inside QCoreApplicationPrivate, it shouldn't suddenly change to 0 during teardown. I'll have a closer look tomorrow. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c18
--- Comment #18 from Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c19
Fabian Vogt
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c20
--- Comment #20 from Martin Liška
Created attachment 811546 [details] 0001-qt-Fix-use-of-dangling-pointer.patch
Ok, root cause found. pinentry's qt/main.cpp has a dangling pointer.
Patch attached, please send to upstream and apply downstream.
Nice catch Fabian! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c21
--- Comment #21 from Pedro Monreal Gonzalez
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c22
Andre Heinecke
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c23
--- Comment #23 from Fabian Vogt
Created attachment 811595 [details] 0001-qt-Fix-use-of-dangling-pointer.patch
Hi,
Thank you very much for your work analyzing this and providing a patch. Good catch.
Due to:
Note: argc and argv might be changed as Qt removes command line arguments that it recognizes.
I've changed the patch a bit so that it still uses a copy of argc but that variable is now in the main scope, because we do not want Qt to remove options that it recognizes. E.g. Display. before we do our own option parsing in pinentry_parse_opts. That was the reason behind the "i = argc".
Patch applied as rev. 0e2e53c8987d6f236aaef515eb005e8e86397fbc
LGTM, thanks! -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c24
--- Comment #24 from Pedro Monreal Gonzalez
Created attachment 811595 [details] 0001-qt-Fix-use-of-dangling-pointer.patch
Patch applied as rev. 0e2e53c8987d6f236aaef515eb005e8e86397fbc
Thanks Andre! I have just built the package [0] and I'll test it now. [0] https://download.opensuse.org/repositories/home:/pmonrealgonzalez:/branches:... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c25
--- Comment #25 from Wolfgang Bauer
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c26
--- Comment #26 from Pedro Monreal Gonzalez
I just tried the upstream commit and can confirm that the crash is gone.
Yes, tests fine here also. Just for reference, here is the upstream commit: https://git.gnupg.org/cgi-bin/gitweb.cgi?p=pinentry.git;a=commit;h=0e2e53c89... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c27
--- Comment #27 from Pedro Monreal Gonzalez
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883
http://bugzilla.opensuse.org/show_bug.cgi?id=1141883#c34
Tomáš Chvátal
participants (1)
-
bugzilla_noreply@novell.com