Bug 447946 - Kaffeine crashes when changing channels. Additional kioslave5 locks when kaffeine run with --lastchannel parameter.
Summary: Kaffeine crashes when changing channels. Additional kioslave5 locks when kaff...
Status: REPORTED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2022-01-04 19:58 UTC by faustian
Modified: 2024-01-04 00:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description faustian 2022-01-04 19:58:20 UTC
Application: kaffeine (2.0.18)

Qt Version: 5.15.2
Frameworks Version: 5.89.0
Operating System: Linux 5.15.12-200.fc35.x86_64 x86_64
Windowing System: X11
Distribution: "Fedora release 35 (Thirty Five)"
DrKonqi: 5.23.4 [KCrashBackend]

-- Information about the crash:
This happens since upgrade to Fedora 35, but strangely enough kaffeine and kernel versions were the same in F34 where everything was ok. 
This also happens only when kaffeine is opened with parameter --lastchannel.

Output of kaffeine opened in console:
04-01-22 19:57:45.472 [Warning ] QCommandLineParser: already having an option named "h"
04-01-22 19:57:45.472 [Warning ] QCommandLineParser: already having an option named "help-all"
04-01-22 19:57:45.472 [Warning ] QCommandLineParser: already having an option named "v"
04-01-22 19:57:45.803 [Info    ] kaffeine.dvb: Using built-in dvb device manager
04-01-22 19:57:46.179 [Info    ] kaffeine.dev: Found dvb device P14f188524254980c: Silicon Labs Si2168
04-01-22 19:57:47.321 [Warning ] kaffeine.cam: CAM: unknown recipient
[00007f54b8036ac0] main decoder error: buffer deadlock prevented
[00007f54b81200f0] main decoder error: buffer deadlock prevented
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_12
libva info: va_openDriver() returns 0
[00007f5470001e80] glconv_vaapi_x11 gl error: vaCreateSurfaces: attribute not supported
[00007f547c069860] main video output error: video output creation failed
[00007f54b8036ac0] main decoder error: failed to create video output
[00007f54b8036ac0] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library  495.46  Wed Oct 27 16:20:01 UTC 2021 for hardware decoding
04-01-22 19:57:55.225 [Critical] kaffeine.dev: Device or resource busy while opening /dev/dvb/adapter0/frontend0
04-01-22 19:57:55.225 [Warning ] kaffeine.dev: Cannot open frontend /dev/dvb/adapter0/frontend0

There is a popup with message:
Didn't find a device with valid settings or access permissions are wrong.

Please check the Configure Television window.

Closing this popup window and trying to play gives the reported crash.
Dmesg:
[Tue Jan  4 19:56:49 2022] si2157 4-0060: found a 'Silicon Labs Si2157-A30'
[Tue Jan  4 19:56:49 2022] si2157 4-0060: firmware version: 3.0.5
[Tue Jan  4 19:57:17 2022] si2157 4-0060: found a 'Silicon Labs Si2157-A30'
[Tue Jan  4 19:57:17 2022] si2157 4-0060: firmware version: 3.0.5
[Tue Jan  4 19:57:23 2022] si2157 4-0060: found a 'Silicon Labs Si2157-A30'
[Tue Jan  4 19:57:23 2022] si2157 4-0060: firmware version: 3.0.5
[Tue Jan  4 19:57:45 2022] si2157 4-0060: found a 'Silicon Labs Si2157-A30'
[Tue Jan  4 19:57:45 2022] si2157 4-0060: firmware version: 3.0.5
[Tue Jan  4 19:57:46 2022] si2157 4-0060: found a 'Silicon Labs Si2157-A30'
[Tue Jan  4 19:57:46 2022] si2157 4-0060: firmware version: 3.0.5
[Tue Jan  4 19:57:47 2022] dvb_ca_en50221: dvb_ca adapter 0: DVB CAM detected and initialised successfully <- last entry, nothing else before 04-01-22 19:57:55.225 [Critical] kaffeine.dev: Device or resource busy while opening /dev/dvb/adapter0/frontend0

Journalctl basically the same logs:
Jan 04 19:56:49 removed kernel: si2157 4-0060: found a 'Silicon Labs Si2157-A30'
Jan 04 19:56:49 removed kernel: si2157 4-0060: firmware version: 3.0.5
Jan 04 19:57:17 removed kernel: si2157 4-0060: found a 'Silicon Labs Si2157-A30'
Jan 04 19:57:17 removed kernel: si2157 4-0060: firmware version: 3.0.5
Jan 04 19:57:18 removed pipewire-pulse[17760]: mod.protocol-pulse: recv client:0x5616b25a5650 res -1: Połączenie zerwan>
Jan 04 19:57:18 removed pipewire-pulse[17760]: mod.protocol-pulse: server 0x5616b1bb18e0: client 0x5616b25a5650 [VLC me>
Jan 04 19:57:24 removed kernel: si2157 4-0060: found a 'Silicon Labs Si2157-A30'
Jan 04 19:57:24 removed kernel: si2157 4-0060: firmware version: 3.0.5
Jan 04 19:57:25 removed pipewire-pulse[17760]: mod.protocol-pulse: recv client:0x5616b2179610 res -1: Połączenie zerwan>
Jan 04 19:57:25 removed pipewire-pulse[17760]: mod.protocol-pulse: server 0x5616b1bb18e0: client 0x5616b2179610 [VLC me>
Jan 04 19:57:37 removed kwin_x11[15495]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 16602, resourc>
Jan 04 19:57:46 removed kernel: si2157 4-0060: found a 'Silicon Labs Si2157-A30'
Jan 04 19:57:46 removed kernel: si2157 4-0060: firmware version: 3.0.5
Jan 04 19:57:46 removed kernel: si2157 4-0060: found a 'Silicon Labs Si2157-A30'
Jan 04 19:57:46 removed kernel: si2157 4-0060: firmware version: 3.0.5
Jan 04 19:57:47 removed kernel: dvb_ca_en50221: dvb_ca adapter 0: DVB CAM detected and initialised successfully
Jan 04 19:58:23 removed plasmashell[15809]: file:///usr/lib64/qt5/qml/org/kde/plasma/components.3/ScrollView.qml:47:45:>

I have found some additional lsof lines when running with --lastchannel which are not present otherwise:
kioslave5 75190                           user removed  35u      CHR              212,0        0t0        719 /dev/dvb/adapter0/frontend0
kioslave5 75192                           user removed  35u      CHR              212,0        0t0        719 /dev/dvb/adapter0/frontend0

ps -ef |grep 75190
user removed     75190   14660  0 20:21 ?        00:00:00 /usr/libexec/kf5/kioslave5 /usr/lib64/qt5/plugins/kf5/kio/tags.so tags  local:/run/user/1000/kaffeineAzhhFS.1.slave-socket
ps -ef |grep 75192
user removed     75192   14660  0 20:21 ?        00:00:00 /usr/libexec/kf5/kioslave5 /usr/lib64/qt5/plugins/kf5/kio/kio_file.so file  local:/run/user/1000/kaffeineebSjaB.2.slave-socket

Those kioslave5 processes end after some time and kaffeine works normally then.

And this is the place where I cannot proceed any further, as I have no knowlegde about KIO.

The crash can be reproduced every time.

-- Backtrace:
Application: Kaffeine (kaffeine), signal: Segmentation fault
Content of s_kcrashErrorMessage: std::unique_ptr<char []> = {get() = <optimized out>}
[KCrash Handler]
#6  0x00007f5d126aad37 in operator==(QString const&, QString const&) (s1=<optimized out>, s2=...) at text/qstring.cpp:3432
#7  0x0000563d7988b753 in DvbManager::requestDevice(QString const&, DvbTransponder const&, DvbManager::RequestType) ()
#8  0x0000563d79883b33 in DvbLiveView::replay() ()
#9  0x00007f5d12812430 in doActivate<false>(QObject*, int, void**) (sender=0x563d79f85fa0, signal_index=5, argv=0x7fffdbcca3a0) at kernel/qobject.cpp:3898
#10 0x00007f5d12812430 in doActivate<false>(QObject*, int, void**) (sender=0x563d7a03a3c0, signal_index=4, argv=0x7fffdbcca4e0) at kernel/qobject.cpp:3898
#11 0x00007f5d1280d367 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (sender=sender@entry=0x563d7a03a3c0, m=m@entry=0x7f5d137dd260 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffdbcca4e0) at kernel/qobject.cpp:3946
#12 0x00007f5d132af916 in QAction::triggered(bool) (this=this@entry=0x563d7a03a3c0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#13 0x00007f5d132b262c in QAction::activate(QAction::ActionEvent) (this=0x563d7a03a3c0, event=<optimized out>) at kernel/qaction.cpp:1161
#14 0x00007f5d133ad5aa in QAbstractButtonPrivate::click() (this=0x563d7a028610) at widgets/qabstractbutton.cpp:398
#15 0x00007f5d133ad707 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) (this=0x563d7a048a50, e=0x7fffdbccaa60) at widgets/qabstractbutton.cpp:1044
#16 0x00007f5d134aa31e in QToolButton::mouseReleaseEvent(QMouseEvent*) (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:622
#17 0x00007f5d132f8e7e in QWidget::event(QEvent*) (this=0x563d7a048a50, event=0x7fffdbccaa60) at kernel/qwidget.cpp:9020
#18 0x00007f5d132b6443 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=this@entry=0x563d79d261c0, receiver=receiver@entry=0x563d7a048a50, e=e@entry=0x7fffdbccaa60) at kernel/qapplication.cpp:3632
#19 0x00007f5d132be074 in QApplication::notify(QObject*, QEvent*) (this=0x7fffdbcca7a0, receiver=0x563d7a048a50, e=0x7fffdbccaa60) at kernel/qapplication.cpp:3076
#20 0x00007f5d127de7d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x563d7a048a50, event=0x7fffdbccaa60) at kernel/qcoreapplication.cpp:1064
#21 0x00007f5d132bcb57 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (receiver=receiver@entry=0x563d7a048a50, event=event@entry=0x7fffdbccaa60, alienWidget=alienWidget@entry=0x563d7a048a50, nativeWidget=0x563d7a0d52e0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2614
#22 0x00007f5d13312450 in QWidgetWindow::handleMouseEvent(QMouseEvent*) (this=0x563d7a06e510, event=0x7fffdbccad10) at kernel/qwidgetwindow.cpp:683
#23 0x00007f5d133156e5 in QWidgetWindow::event(QEvent*) (this=0x563d7a06e510, event=0x7fffdbccad10) at kernel/qwidgetwindow.cpp:300
#24 0x00007f5d132b6443 in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x563d7a06e510, e=0x7fffdbccad10) at kernel/qapplication.cpp:3632
#25 0x00007f5d127de7d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x563d7a06e510, event=0x7fffdbccad10) at kernel/qcoreapplication.cpp:1064
#26 0x00007f5d12c32b98 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (e=0x563d7b1a6620) at kernel/qguiapplication.cpp:2275
#27 0x00007f5d12c12c9c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at kernel/qwindowsysteminterface.cpp:1169
#28 0x00007f5d00a7f11e in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#29 0x00007f5d10cad130 in g_main_dispatch (context=0x7f5cfc005000) at ../glib/gmain.c:3381
#30 g_main_context_dispatch (context=0x7f5cfc005000) at ../glib/gmain.c:4099
#31 0x00007f5d10d02208 in g_main_context_iterate.constprop.0 (context=context@entry=0x7f5cfc005000, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#32 0x00007f5d10caa933 in g_main_context_iteration (context=0x7f5cfc005000, may_block=1) at ../glib/gmain.c:4240
#33 0x00007f5d1282fbb8 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x563d79df5800, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#34 0x00007f5d127dd1e2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffdbccb0a0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#35 0x00007f5d127e5724 in QCoreApplication::exec() () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#36 0x0000563d7983be0a in main ()
[Inferior 1 (process 84637) detached]

Possible duplicates by query: bug 270117, bug 195195.

Reported using DrKonqi
Comment 1 Francesco 2024-01-04 00:51:27 UTC
I can confirm, this bug happens to me after upgrading Debian from 11 to 12. 
Kaffeine has the same version in both releases (2.0.18) 

When I start kaffeine with option --lastchannel or --tv N I can see two pids using the default dvb frontend (fuser /dev/dvb/adapter0/frontend0) kaffeine and, i think, baloo (/lib/x86_64-linux-gnu/libexec/kf5/kioslave5 /usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/tags.so tags ...)
After some times, when the KIO process has gone I can switch channel, but only if I haven't trying to switch before

kioslave5 process started also without preselecting a tv/dvb option, but if kaffeine starts without --lastchannel/--tv it is able to open dvb device and switch channel because kioslave5 do not access to the device