Bug 364222 - kaffeine-2.0.3 failed to idle channel 6 - stalled system needed Sysrq reisub reboot
Summary: kaffeine-2.0.3 failed to idle channel 6 - stalled system needed Sysrq reisub ...
Status: RESOLVED NOT A BUG
Alias: None
Product: kaffeine
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.0.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-11 18:56 UTC by Ralph
Modified: 2016-06-16 01:33 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 Ralph 2016-06-11 18:56:33 UTC
When watching TV using my old siano terrestrial usb2 stick
2009y Mac mini  intel coreDuo
Gentoo ~amd64 (unstable)
xfce4 desktop
linux-4.5.7  |or|  linux-4.6.2
----
I self made the Gentoo ebuild kaffeine-2.0.3 from kaffeine git, 
deleting a special idle patch of Gentoo, which I thought 
was upstreamed to version kaffeine-2.0.3

My system stalled, needed Sysrq reisub - reboot
After reboot systemclt tells:
---
Jun 11 19:13:10 maci.odd dbus-daemon[1063]: Activating service name='org.kde.kcookiejar5'
Jun 11 19:13:10 maci.odd kded5[22150]: kf5.kded: No X-KDE-DBus-ServiceName found in "/usr/lib64/qt5/plugins/kf5/kded/proxyscout.so"
Jun 11 19:13:10 maci.odd dbus-daemon[1063]: Successfully activated service 'org.kde.kcookiejar5'
Jun 11 19:14:29 maci.odd kernel: usb 1-1: DVB: adapter 0 frontend 0 frequency 0 out of range (44250000..867250000)
Jun 11 19:17:20 maci.odd kernel: usb 1-1: DVB: adapter 0 frontend 0 frequency 0 out of range (44250000..867250000)
Jun 11 19:20:01 maci.odd CROND[22204]: (root) CMD ([ ! -x /etc/cron.hourly/0anacron ] && { test -x /usr/sbin/run-crons && /usr/sbin/run-crons ; })
Jun 11 19:25:40 maci.odd kernel: nouveau 0000:02:00.0: kaffeine[22234]: failed to idle channel 6 [kaffeine[22234]]
Jun 11 19:25:55 maci.odd kernel: nouveau 0000:02:00.0: kaffeine[22234]: failed to idle channel 6 [kaffeine[22234]]
Jun 11 19:25:56 maci.odd kernel: nouveau 0000:02:00.0: msppp: intr 00000040
Jun 11 19:25:56 maci.odd kernel: nouveau 0000:02:00.0: fb: trapped read at 0000000000 on channel 6 [0f799000 kaffeine[22234]] engine 08 [PMSPPP] client 06 [PMSPPP] subclient 07 [] reason 0000000f [DMAOBJ_LIMIT]
----


Reproducible: Always

Steps to Reproduce:
Happens after watching terrestrial Tv a view minutes 

Actual Results:  
stalled system
Comment 1 Ralph 2016-06-11 23:36:41 UTC
I now compiled kaffeine with debug USE flag and I get,
when changing channel, a thousends of
---
[00007f4d84007848] vdpau_display vout display error: presentation queue display failure: An invalid handle value was provided. Either the handle does not exist at all, or refers to an object of an incorrect type.
[00007f4d84007848] vdpau_display vout display error: presentation queue display failure: An invalid handle value was provided. Either the handle does not exist at all, or refers to an object of an incorrect type.
[00007f4d84007848] vdpau_display vout display error: presentation queue display failure: An invalid handle value was provided. Either the handle does not exist at all, or refers to an object of an incorrect type.
12-06-16 01:30:53.649 [System  ] tune to: "T 674000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE"
----
After three channel changes kaffeine bailes out now instead of freezing the system.
A workaround is to press STOP and PLAY often.
Comment 2 Mauro Carvalho Chehab 2016-06-13 23:33:06 UTC
Freezing the system sounds a symptom or either a Kernel bug or some invalid instruction sent to the GPU. What video drivers are you using? Do you have some Kernel logs? Those can be seen using the dmesg command.
Comment 3 lev.cohan 2016-06-14 06:43:30 UTC
I experienced something similar a few minutes ago.
Stopping playback or changing the channel after a few channel changes resulted in temporary system freeze:

dmesg shows:
Jun 14 08:29:37 Q6600 kernel: NVRM: GPU at PCI:0000:01:00
Jun 14 08:29:37 Q6600 kernel: NVRM: Xid (PCI:0000:01:00): 31, Ch 00000021, engmask 00008100, intr 10000000
Jun 14 08:29:39 Q6600 kernel: NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context
Jun 14 08:29:41 Q6600 kernel: NVRM: os_schedule: Attempted to yield the CPU while in atomic or interrupt context
Comment 4 Mauro Carvalho Chehab 2016-06-14 09:50:01 UTC
(In reply to lev.cohan from comment #3)
> I experienced something similar a few minutes ago.
> Stopping playback or changing the channel after a few channel changes
> resulted in temporary system freeze:
> 
> dmesg shows:
> Jun 14 08:29:37 Q6600 kernel: NVRM: GPU at PCI:0000:01:00
> Jun 14 08:29:37 Q6600 kernel: NVRM: Xid (PCI:0000:01:00): 31, Ch 00000021,
> engmask 00008100, intr 10000000
> Jun 14 08:29:39 Q6600 kernel: NVRM: os_schedule: Attempted to yield the CPU
> while in atomic or interrupt context
> Jun 14 08:29:41 Q6600 kernel: NVRM: os_schedule: Attempted to yield the CPU
> while in atomic or interrupt context

That sounds a bug with the Nvidia proprietary driver. There's not much open source developers can do to fix it, as the driver is closed source, and it is known to cause random troubles by the Kernel maintainers.  What the above says is that the Nvidia proprietary driver is sleeping to wait for some data in a part of the Kernel code that it is not allowed to. Only Nvidia can fix it.

You may either use the open source driver or pass some extra parameters to libVLC to use a different video output driver. Kaffeine version 2.0.3 has an option to pass such parameters, as described on its README. It was originally conceived to be a workaround for some common problems found with using via X11/VNC, but you could use it as well to force the usage of a different video driver:

---

Remote Access and Kaffeine
==========================

Accessing Kaffeine remotely via X11/ssh/vnc can be a problem, as Qt5 will,
by default, use hardware acceleration and DRI3.

There is a known bug, present on Fedora 23/24, and likely on other distros,
at mesa-libGL/dri-drivers that cause it to wait forever when it is started
from a X11 section. Such bug causes Kaffeine windows to not open:

* <https://bugzilla.redhat.com/show_bug.cgi?id=1174257>

A workaround is to start Kaffeine with:

	LIBGL_DRI3_DISABLE=1 kaffeine

Another solution is to use a vnc server.

Still, libVLC will try to use hardware acceleration on the machine with
Kaffeine, with obviously with won't work via the X11 protocol. For such
scenarios, you may try to change the arguments passed to libVLC via the
"Settings" -->  "Configure Kaffeine" -->  "libVLC", changing the libVLC
arguments to:
	--no-video-title-show -V xcb_glx
or:

	--no-video-title-show -V xcb_xv

and re-start Kaffeine.

---

As this is a Kernel bug, and we can't do much to fix,  I'm closing this bug.
Comment 5 Ralph 2016-06-16 00:26:27 UTC
As this is an issue related to hardware acceleration
and I am remembering to have had a similar issue years age:

Now, I refrain from using USE flag vdpau
and am recompiling all of that packages having vdpau
This may be equivalent to  LIBGL_DRI3_DISABLE=1
Comment 6 Mauro Carvalho Chehab 2016-06-16 01:33:58 UTC
(In reply to Ralph from comment #5)
> As this is an issue related to hardware acceleration
> and I am remembering to have had a similar issue years age:
> 
> Now, I refrain from using USE flag vdpau
> and am recompiling all of that packages having vdpau
> This may be equivalent to  LIBGL_DRI3_DISABLE=1

Yeah, vdpau is something that from time to time is broken, depending on the hardware. I had to remove the Mesa vdpau on some Intel machines with newer chipsets where it weren't working properly until the vdpau weren't updated.

VLC used to have a command line argument to disable it on version 1.0.x (or 1.1.x), but it seems it has gone on newer versions.