Bug 461365

Summary: VPN dialog crashes on connection to GlobalProtect
Product: [Plasma] plasmashell Reporter: Loren Burkholder <loren>
Component: Networking in generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: nicolas.fella
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Backtrace

Description Loren Burkholder 2022-11-03 15:24:43 UTC
Created attachment 153439 [details]
Backtrace

SUMMARY
When I try to connect to a GlobalProtect VPN, the VPN connection window crashes after I click the connection button (to connect to the VPN, not to log in)

STEPS TO REPRODUCE
1. Add a GlobalProtect VPN connection to your networks.
2. Begin the connection procedure.
3. Click the connection button next to the VPN host and observe the crash.

OBSERVED RESULT
There was a crash.

EXPECTED RESULT
The VPN should have connected.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  openSUSE Tumbleweed 
(available in About System)
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
This was done with a fresh Tumbleweed install. On a machine that had a connection to the VPN created some time ago, the connection works fine.

There is an attached backtrace.
Comment 1 Loren Burkholder 2022-11-03 15:34:45 UTC
I should also point out that I am being presented with an invalid certificate error, which I am accepting anyway. That could potentially factor into the situation.
Comment 2 Nicolas Fella 2022-11-03 16:26:08 UTC
Application: kded5 (kded5), signal: Segmentation fault

[KCrash Handler]
#4  0x00007fcda52f6357 in std::__atomic_base<QMutexData*>::compare_exchange_strong(QMutexData*&, QMutexData*, std::memory_order, std::memory_order) (__m2=std::memory_order_acquire, __m1=std::memory_order_acquire, __p2=0x1, __p1=<synthetic pointer>: <optimized out>, this=this@entry=0x55ddadc973b0 <QListData::shared_null>) at /usr/include/c++/12/bits/atomic_base.h:876
#5  std::atomic<QMutexData*>::compare_exchange_strong(QMutexData*&, QMutexData*, std::memory_order, std::memory_order) (__m2=std::memory_order_acquire, __m1=std::memory_order_acquire, __p2=0x1, __p1=<synthetic pointer>: <optimized out>, this=this@entry=0x55ddadc973b0 <QListData::shared_null>) at /usr/include/c++/12/atomic:625
#6  QAtomicOps<QMutexData*>::testAndSetAcquire<QMutexData*>(std::atomic<QMutexData*>&, QMutexData*, QMutexData*, QMutexData**) (currentValue=<synthetic pointer>, newValue=0x1, expectedValue=0x0, _q_value=std::atomic<QMutexData *> = { 0xffffffff }) at ../../include/QtCore/../../src/corelib/thread/qatomic_cxx11.h:308
#7  QBasicAtomicPointer<QMutexData>::testAndSetAcquire(QMutexData*, QMutexData*, QMutexData*&) (currentValue=<synthetic pointer>: <optimized out>, newValue=0x1, expectedValue=0x0, this=this@entry=0x55ddadc973b0 <QListData::shared_null>) at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:273
#8  QBasicMutex::fastTryLock(QMutexData*&) (current=<synthetic pointer>: <optimized out>, this=this@entry=0x55ddadc973b0 <QListData::shared_null>) at thread/qmutex.h:109
#9  QMutex::lock() (this=this@entry=0x55ddadc973b0 <QListData::shared_null>) at thread/qmutex.cpp:232
#10 0x00007fcda54de034 in std::unique_lock<QMutex>::lock() (this=<synthetic pointer>) at /usr/include/c++/12/bits/unique_lock.h:131
#11 std::unique_lock<QMutex>::unique_lock(QMutex&) (__m=..., this=<synthetic pointer>) at /usr/include/c++/12/bits/unique_lock.h:69
#12 (anonymous namespace)::qt_unique_lock<QMutex> (mutex=...) at ../../include/QtCore/5.15.6/QtCore/private/../../../../../src/corelib/thread/qlocking_p.h:106
#13 QCoreApplicationPrivate::lockThreadPostEventList(QObject*) (object=<optimized out>) at kernel/qcoreapplication.cpp:1500
#14 0x00007fcda54df619 in QCoreApplication::postEvent(QObject*, QEvent*, int) (receiver=0x55ddae224540, event=0x55ddae5c74a0, priority=0) at kernel/qcoreapplication.cpp:1546
#15 0x00007fcda55056c1 in QObject::deleteLater() (this=<optimized out>) at kernel/qobject.cpp:2336
#16 0x00007fcd5c0eceef in OpenconnectAuthWidget::validatePeerCert(QString const&, QString const&, QString const&, bool*) (this=<optimized out>, fingerprint=..., peerCert=..., reason=..., accepted=0x7fcd4f7fd7af) at /usr/src/debug/plasma-nm-5.26.2/vpn/openconnect/openconnectauth.cpp:679
#17 0x00007fcda55079d0 in QObject::event(QEvent*) (this=0x55ddae572690, e=0x7fcd2c230aa0) at kernel/qobject.cpp:1347
#18 0x00007fcda63a53fe in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x55ddae572690, e=0x7fcd2c230aa0) at kernel/qapplication.cpp:3637
#19 0x00007fcda54dc178 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x55ddae572690, event=0x7fcd2c230aa0) at kernel/qcoreapplication.cpp:1064
#20 0x00007fcda54df111 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (receiver=0x0, event_type=0, data=0x55ddadf9a470) at kernel/qcoreapplication.cpp:1821
#21 0x00007fcda5534003 in postEventSourceDispatch(GSource*, GSourceFunc, gpointer) (s=0x55ddadffa7f0) at kernel/qeventdispatcher_glib.cpp:277
#22 0x00007fcda406da90 in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#23 0x00007fcda406de48 in  () at /lib64/libglib-2.0.so.0
#24 0x00007fcda406dedc in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#25 0x00007fcda5533806 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55ddadffba70, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007fcda54dabeb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fff2ac61140, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#27 0x00007fcda54e2d56 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#28 0x000055ddadc8c8f6 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/kded-5.99.0-1.1.x86_64/src/kded.cpp:770
[Inferior 1 (process 6142) detached]
Comment 3 Nicolas Fella 2022-11-07 23:06:00 UTC
(In reply to Loren Burkholder from comment #1)
> I should also point out that I am being presented with an invalid
> certificate error, which I am accepting anyway. That could potentially
> factor into the situation.

yes, that's quite likely related. See

#16 0x00007fcd5c0eceef in OpenconnectAuthWidget::validatePeerCert(QString const&, QString const&, QString const&, bool*) (this=<optimized out>, fingerprint=..., peerCert=..., reason=..., accepted=0x7fcd4f7fd7af) at /usr/src/debug/plasma-nm-5.26.2/vpn/openconnect/openconnectauth.cpp:679
Comment 4 Nicolas Fella 2022-12-13 13:51:36 UTC
Git commit 857c28f045dc0b3416175c710751cc903bf6a050 by Nicolas Fella.
Committed on 13/12/2022 at 13:43.
Pushed by nicolasfella into branch 'master'.

[openconnect] Fix crash in certificate error dialog

We create a dialog, put a widget in it, then exec that dialog, auto-delete it, then crash when deleting that widget

Instead of manually deleting the widget parent it to the dialog so that it gets deleted automatically

M  +5    -5    vpn/openconnect/openconnectauth.cpp

https://invent.kde.org/plasma/plasma-nm/commit/857c28f045dc0b3416175c710751cc903bf6a050
Comment 5 Ben Cooksley 2024-12-23 18:23:38 UTC
Bulk transfer as requested in T17796