Bug 1770512

Summary: kdiff3 Segmentation fault (core dumped)
Product: [Fedora] Fedora Reporter: Satish Balay <balay>
Component: qt5-qtwaylandAssignee: Vasiliy Glazov <vascom2>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 32CC: jgrulich, jreznik, kde-sig, lkundrak, ndbecker2, pierluigi.fiorini, rdieter, than, vascom2
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-24 18:50:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
valgrind log
none
kdiff3 valgrind log (with debug symbols installed) none

Description Satish Balay 2019-11-10 05:29:59 UTC
Description of problem:

kdiff3 segfaults on use.

Version-Release number of selected component (if applicable):

kdiff3-1.8.1-2.fc31.x86_64

How reproducible:

Always

Steps to Reproduce:
1. kdiff3 file1 file2
2. menu 'file' -> 'quit'

Actual results:


$ kdiff3 file1 file2
QSocketNotifier: Can only be used with threads started with QThread
qt.qpa.wayland: Non-toplevel surfaces can't request window states
Segmentation fault (core dumped)

Expected results:

No SEGV

Additional info:


$ gdb kdiff3
Reading symbols from kdiff3...
Reading symbols from .gnu_debugdata for /usr/bin/kdiff3...
(No debugging symbols found in .gnu_debugdata for /usr/bin/kdiff3)
Missing separate debuginfos, use: dnf debuginfo-install kdiff3-1.8.1-2.fc31.x86_64
(gdb) run file1 file2
Starting program: /usr/bin/kdiff3 file1 file2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe5b0e700 (LWP 15915)]
QSocketNotifier: Can only be used with threads started with QThread
[New Thread 0x7fffdf8b1700 (LWP 15917)]
[New Thread 0x7fffdf0b0700 (LWP 15918)]
[New Thread 0x7fffde8af700 (LWP 15919)]
[New Thread 0x7fffde0ae700 (LWP 15920)]
[New Thread 0x7fffcf2ed700 (LWP 15921)]
[New Thread 0x7fffcde14700 (LWP 15922)]
[New Thread 0x7fffcd613700 (LWP 15923)]
qt.qpa.wayland: Non-toplevel surfaces can't request window states

Thread 1 "kdiff3" received signal SIGSEGV, Segmentation fault.
0x00007ffff627321e in malloc () from /lib64/libc.so.6
(gdb) where
#0  0x00007ffff627321e in malloc () from /lib64/libc.so.6
#1  0x00007ffff65a1059 in operator new(unsigned long) () from /lib64/libstdc++.so.6
#2  0x00007ffff697d108 in QObject::deleteLater() () from /lib64/libQt5Core.so.5
#3  0x00007fffdd77c698 in Adwaita::BaseDataMap<QObject, Adwaita::WidgetStateData>::unregisterWidget(QObject const*) () from /usr/lib64/qt5/plugins/styles/adwaita.so
#4  0x00007fffdd77636c in Adwaita::WidgetStateEngine::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.0] ()
   from /usr/lib64/qt5/plugins/styles/adwaita.so
#5  0x00007ffff697edfb in QMetaObject::activate(QObject*, int, int, void**) () from /lib64/libQt5Core.so.5
#6  0x00007ffff697f583 in QObject::destroyed(QObject*) () from /lib64/libQt5Core.so.5
#7  0x00007ffff72f6cf3 in QWidget::~QWidget() () from /lib64/libQt5Widgets.so.5
#8  0x00007ffff7313f41 in QDesktopScreenWidget::~QDesktopScreenWidget() () from /lib64/libQt5Widgets.so.5
#9  0x00007ffff7314556 in QDesktopWidgetPrivate::~QDesktopWidgetPrivate() () from /lib64/libQt5Widgets.so.5
#10 0x00007ffff6986d47 in QObject::~QObject() () from /lib64/libQt5Core.so.5
#11 0x00007ffff72f6dde in QWidget::~QWidget() () from /lib64/libQt5Widgets.so.5
#12 0x00007ffff731263d in QDesktopWidget::~QDesktopWidget() () from /lib64/libQt5Widgets.so.5
#13 0x00007ffff72b92f0 in QApplication::~QApplication() () from /lib64/libQt5Widgets.so.5
#14 0x000055555558bdad in main ()
(gdb)

Comment 1 Satish Balay 2019-11-10 05:34:00 UTC
Note: This issue came up when kdiff3 using via 'git mergetool'. i.e after merge is done 'save' and 'quit' crashes kdiff3 - and git aborts

Work-around [for git mergetool usage] is:
- do merge in kdiff3
- [do not save]
- quit
- now a dialog box prompts to 'save and quit' - so click this dialog box.

[no crash]

Comment 2 Vasiliy Glazov 2019-11-12 12:39:42 UTC
I can't reproduce.

Comment 3 Fedora Update System 2020-01-11 01:25:02 UTC
kdiff3-1.8.1-3.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-556f176eea

Comment 4 Fedora Update System 2020-01-11 01:38:52 UTC
kdiff3-1.8.1-3.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-e6b9098b5c

Comment 5 Fedora Update System 2020-01-11 01:48:44 UTC
kdiff3-1.8.1-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c4dc94aa2d

Comment 6 Fedora Update System 2020-01-15 00:50:11 UTC
kdiff3-1.8.1-4.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-15d00d4dab

Comment 7 Fedora Update System 2020-01-15 01:08:36 UTC
kdiff3-1.8.1-4.el8 has been pushed to the Fedora EPEL 8 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2020-be568a097a

Comment 8 Satish Balay 2020-01-15 17:20:05 UTC
I'm still seeing this issue with kdiff3-1.8.1-4.fc31


$ rpm -q kdiff3
kdiff3-1.8.1-4.fc31.x86_64
balay@sb /home/balay
$ kdiff3 .bashrc .bashrc 
QSocketNotifier: Can only be used with threads started with QThread
Segmentation fault (core dumped)
balay@sb /home/balay
$ 

This machine went through fedora version updates via dnf. Another machine [with a fresh f31 install] does not give this problem [even with kdiff3-1.8.1-2.fc31]. Also I don't get the 'QSocketNotifier: Can only be used with threads started with QThread' message on this box.

Comment 9 Vasiliy Glazov 2020-01-15 18:24:37 UTC
So update to f31.
And let's wait 1.8.2. It will be soon.

Comment 10 Satish Balay 2020-01-16 16:05:32 UTC
Created attachment 1652823 [details]
valgrind log

> So update to f31.

Not sure I understand. This breakage is on F31

I'm attaching valgrind log - hoping its useful.

$ valgrind -q --tool=memcheck  --num-callers=30 --track-origins=yes --log-file=kdiff3-val.log kdiff3 .bashrc .bash_profile 

And here are the packages referred in this log.

glibc-2.30-8.fc31.x86_64
kdiff3-1.8.1-4.fc31.x86_64
qgnomeplatform-0.6.0-2.fc31.x86_64
qt5-qtbase-5.13.2-1.fc31.x86_64
qt5-qtbase-gui-5.13.2-1.fc31.x86_64
qt5-qtwayland-5.13.2-2.fc31.x86_64

Comment 11 Satish Balay 2020-01-16 16:17:03 UTC
Additional note: I just tried logging into gnome/xorg instead of default gnome/wayland - and there is no error.

On switching back to  gnome/wayland - I get this error.

Comment 12 Fedora Update System 2020-01-16 19:50:57 UTC
kdiff3-1.8.1-4.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-fca310369e

Comment 13 Vasiliy Glazov 2020-01-17 06:31:32 UTC
I use KDE with xorg.

Please look at this ticket https://bugs.kde.org/show_bug.cgi?id=407745
And if it is not your problem - create new one.

Comment 14 Satish Balay 2020-01-17 14:08:34 UTC
Filed at https://bugs.kde.org/show_bug.cgi?id=416380

Comment 15 Satish Balay 2020-01-18 15:39:54 UTC
Switched this report to qt5-qtwayland as the issue is likely from qt5-qtwayland

$ gdb kdiff3
GNU gdb (GDB) Fedora 8.3.50.20190824-26.fc31
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from kdiff3...
Reading symbols from /usr/lib/debug/usr/bin/kdiff3-1.8.1-4.fc31.x86_64.debug...
(gdb) r .bashrc .bash_profile 
Starting program: /usr/bin/kdiff3 .bashrc .bash_profile
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.30-8.fc31.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe5a92700 (LWP 132839)]
QSocketNotifier: Can only be used with threads started with QThread
[New Thread 0x7fffdf79d700 (LWP 132841)]
[New Thread 0x7fffdef9c700 (LWP 132842)]
[New Thread 0x7fffde79b700 (LWP 132843)]
[New Thread 0x7fffddf9a700 (LWP 132844)]
[New Thread 0x7fffceae8700 (LWP 132845)]
[New Thread 0x7fffcce2c700 (LWP 132846)]
[New Thread 0x7fffc3767700 (LWP 132847)]

Thread 1 "kdiff3" received signal SIGSEGV, Segmentation fault.
0x00007ffff624d26e in malloc () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install GConf2-3.2.6-27.fc31.x86_64 at-spi2-atk-2.34.1-1.fc31.x86_64 at-spi2-core-2.34.0-1.fc31.x86_64 atk-2.34.1-1.fc31.x86_64 bzip2-libs-1.0.8-1.fc31.x86_64 cairo-1.16.0-6.fc31.x86_64 cairo-gobject-1.16.0-6.fc31.x86_64 dbus-glib-0.110-6.fc31.x86_64 dbus-libs-1.12.16-3.fc31.x86_64 dconf-0.34.0-1.fc31.x86_64 expat-2.2.8-1.fc31.x86_64 fontconfig-2.13.92-3.fc31.x86_64 freetype-2.10.0-3.fc31.x86_64 fribidi-1.0.5-5.fc31.x86_64 gdk-pixbuf2-2.40.0-1.fc31.x86_64 glib2-2.62.4-1.fc31.x86_64 graphite2-1.3.13-1.fc31.x86_64 gtk3-3.24.13-1.fc31.x86_64 harfbuzz-2.6.1-2.fc31.x86_64 kf5-attica-5.64.0-1.fc31.x86_64 kf5-karchive-5.64.0-1.fc31.x86_64 kf5-kauth-5.64.0-1.fc31.x86_64 kf5-kcodecs-5.64.0-1.fc31.x86_64 kf5-kcompletion-5.64.0-1.fc31.x86_64 kf5-kconfig-core-5.64.0-1.fc31.x86_64 kf5-kconfig-gui-5.64.0-1.fc31.x86_64 kf5-kconfigwidgets-5.64.0-1.fc31.x86_64 kf5-kcoreaddons-5.64.0-1.fc31.x86_64 kf5-kcrash-5.64.0-1.fc31.x86_64 kf5-kdbusaddons-5.64.0-1.fc31.x86_64 kf5-kglobalaccel-libs-5.64.0-1.fc31.x86_64 kf5-kguiaddons-5.64.0-1.fc31.x86_64 kf5-ki18n-5.64.0-1.fc31.x86_64 kf5-kiconthemes-5.64.0-1.fc31.x86_64 kf5-kio-core-libs-5.64.0-1.fc31.x86_64 kf5-kio-widgets-libs-5.64.0-1.fc31.x86_64 kf5-kjobwidgets-5.64.0-1.fc31.x86_64 kf5-kparts-5.64.0-1.fc31.x86_64 kf5-kservice-5.64.0-1.fc31.x86_64 kf5-ktextwidgets-5.64.0-1.fc31.x86_64 kf5-kwidgetsaddons-5.64.0-1.fc31.x86_64 kf5-kwindowsystem-5.64.0-1.fc31.x86_64 kf5-kxmlgui-5.64.0-2.fc31.x86_64 kf5-sonnet-core-5.64.0-1.fc31.x86_64 kf5-sonnet-ui-5.64.0-1.fc31.x86_64 libX11-1.6.9-2.fc31.x86_64 libX11-xcb-1.6.9-2.fc31.x86_64 libXau-1.0.9-2.fc31.x86_64 libXcomposite-0.4.4-17.fc31.x86_64 libXcursor-1.1.15-6.fc31.x86_64 libXdamage-1.1.4-17.fc31.x86_64 libXext-1.3.4-2.fc31.x86_64 libXfixes-5.0.3-10.fc31.x86_64 libXi-1.7.10-2.fc31.x86_64 libXinerama-1.1.4-4.fc31.x86_64 libacl-2.2.53-4.fc31.x86_64 libattr-2.4.48-7.fc31.x86_64 libblkid-2.34-4.fc31.x86_64 libdatrie-0.2.9-10.fc31.x86_64 libepoxy-1.5.3-4.fc31.x86_64 libgcrypt-1.8.5-1.fc31.x86_64 libglvnd-1.1.1-5.fc31.x86_64 libglvnd-glx-1.1.1-5.fc31.x86_64 libgpg-error-1.36-2.fc31.x86_64 libicu-63.2-3.fc31.x86_64 libpciaccess-0.15-2.fc31.x86_64 libpng-1.6.37-2.fc31.x86_64 libselinux-2.9-5.fc31.x86_64 libstdc++-9.2.1-1.fc31.x86_64 libthai-0.1.28-3.fc31.x86_64 libwayland-client-1.17.0-2.fc31.x86_64 libwayland-cursor-1.17.0-2.fc31.x86_64 libwayland-egl-1.17.0-2.fc31.x86_64 libxcb-1.13.1-3.fc31.x86_64 libxkbcommon-0.9.1-3.fc31.x86_64 libxshmfence-1.3-5.fc31.x86_64 lz4-libs-1.9.1-1.fc31.x86_64 mesa-dri-drivers-19.2.8-1.fc31.x86_64 mesa-libglapi-19.2.8-1.fc31.x86_64 openssl-libs-1.1.1d-2.fc31.x86_64 pcre-8.43-2.fc31.1.x86_64 qt5-qtspeech-5.13.2-1.fc31.x86_64 qt5-qtsvg-5.13.2-1.fc31.x86_64 qt5-qtx11extras-5.13.2-1.fc31.x86_64 systemd-libs-243.5-1.fc31.x86_64 xcb-util-keysyms-0.4.0-11.fc31.x86_64 xz-libs-5.2.4-6.fc31.x86_64
(gdb) where
#0  0x00007ffff624d26e in malloc () from /lib64/libc.so.6
#1  0x00007ffff657b059 in operator new(unsigned long) () from /lib64/libstdc++.so.6
#2  0x00007ffff6962cb8 in QObject::deleteLater (this=0x555555f1d560) at kernel/qobject.cpp:2199
#3  0x00007fffdd5cd6b8 in Adwaita::BaseDataMap<QObject, Adwaita::WidgetStateData>::unregisterWidget (this=this@entry=0x5555557de548, key=<optimized out>, 
    key@entry=0x5555557f72c0) at /usr/include/c++/9/bits/atomic_base.h:413
#4  0x00007fffdd5c738c in Adwaita::WidgetStateEngine::unregisterWidget (object=0x5555557f72c0, this=0x5555557de4d0)
    at /usr/src/debug/adwaita-qt-1.1.1-2.fc31.x86_64/x86_64-redhat-linux-gnu-qt5/style/adwaita-qt5_autogen/4NBMFDNHZT/../../../../style/animations/adwaitawidgetstateengine.h:137
#5  Adwaita::WidgetStateEngine::unregisterWidget (object=0x5555557f72c0, this=0x5555557de4d0)
    at /usr/src/debug/adwaita-qt-1.1.1-2.fc31.x86_64/x86_64-redhat-linux-gnu-qt5/style/adwaita-qt5_autogen/4NBMFDNHZT/../../../../style/animations/adwaitawidgetstateengine.h:131
#6  Adwaita::WidgetStateEngine::qt_static_metacall (_o=0x5555557de4d0, _a=0x7fffffffde20, _id=<optimized out>, _c=<optimized out>)
    at /usr/src/debug/adwaita-qt-1.1.1-2.fc31.x86_64/x86_64-redhat-linux-gnu-qt5/style/adwaita-qt5_autogen/4NBMFDNHZT/moc_adwaitawidgetstateengine.cpp:73
#7  0x00007ffff696498b in QMetaObject::activate (sender=0x5555557f72c0, signalOffset=<optimized out>, local_signal_index=<optimized out>, 
    argv=<optimized out>) at kernel/qobject.cpp:3809
#8  0x00007ffff6965113 in QObject::destroyed (this=this@entry=0x5555557f72c0, _t1=<optimized out>, _t1@entry=0x5555557f72c0) at .moc/moc_qobject.cpp:219
#9  0x00007ffff72eb653 in QWidget::~QWidget (this=0x5555557f72c0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1662
#10 0x00007ffff7308ae1 in QDesktopScreenWidget::~QDesktopScreenWidget (this=0x5555557f72c0, __in_chrg=<optimized out>)
    at ../../include/QtCore/../../src/corelib/tools/qsharedpointer_impl.h:167
#11 QDesktopScreenWidget::~QDesktopScreenWidget (this=0x5555557f72c0, __in_chrg=<optimized out>) at kernel/qdesktopwidget_p.h:63
#12 0x00007ffff73090f6 in qDeleteAll<QList<QDesktopScreenWidget*>::const_iterator> (end=..., begin=...)
    at ../../include/QtCore/../../src/corelib/tools/qalgorithms.h:319
#13 qDeleteAll<QList<QDesktopScreenWidget*> > (c=...) at ../../include/QtCore/../../src/corelib/tools/qalgorithms.h:328
#14 QDesktopWidgetPrivate::~QDesktopWidgetPrivate (this=0x5555557178a0, __in_chrg=<optimized out>) at kernel/qdesktopwidget_p.h:85
#15 QDesktopWidgetPrivate::~QDesktopWidgetPrivate (this=0x5555557178a0, __in_chrg=<optimized out>) at kernel/qdesktopwidget_p.h:85
#16 0x00007ffff696c857 in QScopedPointerDeleter<QObjectData>::cleanup (pointer=<optimized out>)
    at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:52
#17 QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::~QScopedPointer (this=0x555555d72378, __in_chrg=<optimized out>)
    at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:107
#18 QObject::~QObject (this=<optimized out>, __in_chrg=<optimized out>) at kernel/qobject.cpp:891
#19 0x00007ffff72eb73e in QWidget::~QWidget (this=0x555555d72370, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1718
#20 0x00007ffff73071dd in QDesktopWidget::~QDesktopWidget (this=0x555555d72370, __in_chrg=<optimized out>) at kernel/qdesktopwidget.cpp:217
#21 0x00007ffff72ad2d0 in QApplication::~QApplication() () at kernel/qapplication.cpp:802
#22 0x000055555558bdad in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kdiff3-1.8.1-4.fc31.x86_64/src/main.cpp:178
(gdb)

Comment 16 Satish Balay 2020-01-18 15:41:21 UTC
Created attachment 1653402 [details]
kdiff3 valgrind log (with debug symbols installed)

Comment 17 Satish Balay 2020-01-18 15:53:13 UTC
The error goes away with:

$ QT_QPA_PLATFORM=xcb kdiff3 .bashrc .bash_profile


Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1787003

Comment 18 Fedora Update System 2020-01-24 18:50:49 UTC
kdiff3-1.8.1-4.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2020-01-25 06:34:25 UTC
kdiff3-1.8.1-4.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2020-01-30 23:30:10 UTC
kdiff3-1.8.1-4.el8 has been pushed to the Fedora EPEL 8 stable repository. If problems still persist, please make note of it in this bug report.