Bug 630420

Summary: shutdown will hang if cx88* modules are loaded
Product: [Fedora] Fedora Reporter: Christian Jann <christian.jann>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED CANTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 17CC: anton, dougsland, gansalmon, itamar, jonathan, kernel-maint, lpoetter, madhu.chinakonda, metherid, mschmidt, notting, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-24 07:45:15 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
screenshot from shutdown
none
kubuntu_shutdown, other output but maybe the same bug
none
yum_update_log
none
F17 shutdown screen none

Description Christian Jann 2010-09-05 09:48:08 EDT
Created attachment 443154 [details]
screenshot from shutdown

Description of problem:

F14 will hang during shutdown if I don't:
sudo rmmod  cx88_alsa cx8800  cx88_dvb cx24116 cx22702  cx8802 cx88xx cx88_vp3054_i2c
before shutdown.

These cx88* belong to my WinTV-HVR 4000 TV-card which works fine with Kaffeine, I've only copied the firmware file to /lib/firmware/.

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

uname -r: 2.6.35.4-12.fc14.x86_64
initscripts 9.17-2.fc14
systemd 8-3.fc14
systemd-sysvinit 8-3.fc14
systemd-units 8-3.fc14


How reproducible:

every shutdown

Steps to Reproduce:
1./sbin/shutdown 
  
Actual results:

A lot of text will scroll down if I press ESC during shutdown, after a while it will stop but the pc will not power off and I have to press the power button some seconds, I have attached a photo of that.

Some lines out of it:

cx88[0]: irq vid [0xffffffff] y_risci1* u_risci1* v_risci1* ...
<4>cx88[0] iq5: 0xffffffff [INVALID sol eol irq2 irq1 23 22 21 20 19 18 cnt1 cnt0 resync 14 13 12  count=4095 ]
...

Expected results:

The pc will power off.

Additional info:

Now I have updated to:
Sep 05 12:58:18 Updated: systemd-units-9-3.fc14.x86_64
Sep 05 12:58:20 Updated: systemd-9-3.fc14.x86_64
Sep 05 12:58:21 Updated: systemd-sysvinit-9-3.fc14.x86_64
Sep 05 12:58:25 Updated: initscripts-9.18-1.fc14.x86_64

The rmmod workaround does not longer work, now with or without I don't get the output like in the photo.
Normal shutdown with KDE does not work.
Crtl+F2, login as root and running /sbin/shutdown does not work, the pc keeps on, with a curser in the left upper corner.

If I can give you more info, please tell me what you need, as a workaround I have now downgraded these packages.

sudo yum downgrade systemd-units systemd systemd-sysvinit initscripts

Maybe it's also a kernel bug but unloading these modules has worked with the old version of systemd and adding a simple rmmod line to an shutdown script should be simpler than searching a kernel bug.

lspci:
##############
04:07.0 Multimedia video controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder (rev 05)
04:07.1 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [Audio Port] (rev 05)
04:07.2 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [MPEG Port] (rev 05)
04:07.4 Multimedia controller: Conexant Systems, Inc. CX23880/1/2/3 PCI Video and Audio Decoder [IR Port] (rev 05)

dmesg |grep cx
##############
cx88/2: cx2388x MPEG-TS Driver Manager version 0.0.8 loaded
cx88/0: cx2388x v4l2 driver version 0.0.8 loaded
cx88[0]: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68,autodetected], frontend(s): 2
cx88[0]: TV tuner type 63, Radio tuner type -1
cx2388x alsa driver version 0.0.8 loaded
cx88[0]: i2c init: enabling analog demod on HVR1300/3000/4000 tuner
tuner 3-0043: chip found @ 0x86 (cx88[0])
tuner 3-0061: chip found @ 0xc2 (cx88[0])
cx88[0]: hauppauge eeprom: model=69009
input: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:14.4/0000:04:07.2/rc/rc0/input5
rc0: cx88 IR (Hauppauge WinTV-HVR400 as /devices/pci0000:00/0000:00:14.4/0000:04:07.2/rc/rc0
cx88[0]/2: cx2388x 8802 Driver Manager
cx88-mpeg driver manager 0000:04:07.2: PCI INT A -> GSI 21 (level, low) -> IRQ 21
cx88[0]/2: found at 0000:04:07.2, rev: 5, irq: 21, latency: 32, mmio: 0xfb000000
cx8800 0000:04:07.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
cx88[0]/0: found at 0000:04:07.0, rev: 5, irq: 21, latency: 32, mmio: 0xf9000000
wm8775 3-001b: chip found @ 0x36 (cx88[0])
cx88[0]/0: registered device video0 [v4l2]
cx88[0]/0: registered device vbi0
cx88[0]/0: registered device radio0
cx88_audio 0000:04:07.1: PCI INT A -> GSI 21 (level, low) -> IRQ 21
cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
cx88/2: cx2388x dvb driver version 0.0.8 loaded
cx88/2: registering cx8802 driver, type: dvb access: shared
cx88[0]/2: subsystem: 0070:6902, board: Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [card=68]
cx88[0]/2: cx2388x based DVB/ATSC card
cx8802_alloc_frontends() allocating 2 frontend(s)
DVB: registering new adapter (cx88[0])
cx24116_firmware_ondemand: Waiting for firmware upload (dvb-fe-cx24116.fw)...
cx24116_firmware_ondemand: Waiting for firmware upload(2)...
cx24116_load_firmware: FW version 1.20.79.0
cx24116_firmware_ondemand: Firmware upload complete
Comment 1 Lennart Poettering 2010-09-05 19:46:56 EDT
I am not really sure why kernel modules are unloaded on system shutdown. But anyway, this looks like a kernel problem to me, judging by the screenshot you posted. Reasssigning.
Comment 2 Christian Jann 2010-09-06 07:02:32 EDT
OK, I've seen these cx88 error messages on the screen and than I've thought if these modules aren't loaded than they can't cause problems during shutdown, which has worked fine with the old version of systemd. I've also forgotten to say that reboot works with these modules loaded, only shutdown fails. With the help of Google I've found this http://video4linux-list.1448896.n2.nabble.com/cx88-IRQ-loop-runaway-td1563570.html which has a similar error output. I've also moved my TV-card to another pci slot with no success.
Comment 3 Christian Jann 2010-09-12 04:15:50 EDT
Now I have tested it with several 64bit Live CD's:

F13 Live CD: hang on shutdown
F13 installed on usb hdd without updates: hang
Kubuntu Lucid Live CD:  hang: cx88[0]/1:  irq loop detected, disabling interrupts, screenshot attached
OpenSuse 11.3 Live KDE: hang
sidux kernel 2.6.30, starting X fails (HD 4850) + hang during shutdown

But I haven't tried unloading the modules.

updated bios: nothing changed

Google finds a lot with “cx88[0]/1:  irq loop detected, disabling interrupts” but I haven't found a working solution.

I will add a comment if I stop testing updates or if it works again.
Comment 4 Christian Jann 2010-09-12 04:42:34 EDT
Created attachment 446725 [details]
kubuntu_shutdown, other output but maybe the same bug
Comment 5 Christian Jann 2010-09-17 05:45:33 EDT
Created attachment 447962 [details]
yum_update_log

Works again!

Today I've got a lot of updates and the shutdown works again (only if I unload these modules, but I can live with that). I've added the rmmod line to /etc/rc.d/rc0.d/S00killall and everything is fine now.
Comment 6 Christian Jann 2011-03-12 16:52:59 EST
This bug is still present in F15 Alpha 2.6.38-0.rc8.git0.1.fc15.x86_64.

I've played a little bit with systemd:

sudo vim /lib/systemd/system/fix_shutdown.service
[Unit]
Description=Fix Shutdown, don't hang!
DefaultDependencies=no
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/etc/systemd/scripts/fix_shutdown
[Install]
WantedBy=shutdown.target

sudo vim /etc/systemd/scripts/fix_shutdown
#!/bin/sh
killall pulseaudio
rmmod cx8800 cx88_dvb cx24116 cx22702 cx8802 cx88_vp3054_i2c cx88_alsa cx88xx
exit 0

[chris@cosmos ~]$ sudo systemctl enable fix_shutdown.service

It seems I have to kill pulseaudio to be able to rmmod  cx88_alsa else I get an “ERROR: Module cx88_alsa is in use”, I'm open for better ideas.
Comment 7 Diego Viola 2011-06-05 04:42:30 EDT
This sounds like the same problem we have here,

https://bugzilla.kernel.org/show_bug.cgi?id=33872

please notify your problem on the kernel bug tracker, there are some Intel engineers there that could solve this problem.
Comment 8 Josh Boyer 2011-08-24 15:17:58 EDT
Is this still happening in the latest f15 2.6.40 kernel?
Comment 9 Christian Jann 2011-08-25 05:06:27 EDT
Yes it is still happening.

$ sudo systemctl disable fix_shutdown.service
$ uname -r
2.6.40.3-0.fc15.x86_64

And on shutdown the entire display is full of:
[ 229.760576] cx88[0]/1: IRQ loop detected, disabling interrupts

The first and only live CD where it doesn't happen was Gentoo Linux 11.2 with kernel 3.0.0-gentoo-r1.

Fedora-16-Alpha.TC1-x86_64-DVD.iso which I'm using on my new notebook does also hang.
Comment 10 Josh Boyer 2011-08-25 07:43:22 EDT
Let's move it to a current version and fixup the subject a bit.
Comment 11 Dave Jones 2012-03-22 13:01:59 EDT
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.
Comment 12 Dave Jones 2012-03-22 13:05:24 EDT
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.
Comment 13 Dave Jones 2012-03-22 13:16:18 EDT
[mass update]
kernel-3.3.0-4.fc16 has been pushed to the Fedora 16 stable repository.
Please retest with this update.
Comment 14 Christian Jann 2012-03-22 16:00:46 EDT
I will test it as soon as I can find a live CD with kernel 3.3 under http://dl.fedoraproject.org/pub/alt/nightly-composes/, at the moment I'm still using F15 on that PC.
Comment 15 Christian Jann 2012-03-27 14:38:50 EDT
Created attachment 573151 [details]
F17 shutdown screen

The bug is still there, verified with Fedora-17-Beta-x86_64-Live-KDE.iso.

uname -r: 3.0-1.fc17.x86_64

The shutdown does not finish and my shutdown screen is full of:
[ 250.091915] cx88[1]/1: IRQ loop detected, disabling interrupts

Meanwhile I have two TV-cards WinTV-HVR 4000 and WinTV Nova-HD-S2 and with the shutdown fix both are working well.

My time is really limited at the moment but I will try to debug it further anytime.

Greetings

chris
Comment 16 Dave Jones 2012-10-23 11:28:37 EDT
# Mass update to all open bugs.

Kernel 3.6.2-1.fc16 has just been pushed to updates.
This update is a significant rebase from the previous version.

Please retest with this kernel, and let us know if your problem has been fixed.

In the event that you have upgraded to a newer release and the bug you reported
is still present, please change the version field to the newest release you have
encountered the issue with.  Before doing so, please ensure you are testing the
latest kernel update in that release and attach any new and relevant information
you may have gathered.

If you are not the original bug reporter and you still experience this bug,
please file a new report, as it is possible that you may be seeing a
different problem. 
(Please don't clone this bug, a fresh bug referencing this bug in the comment is sufficient).
Comment 17 Christian Jann 2012-10-24 07:45:15 EDT
The problem is still there, as soon as I disable the fix_shutdown.service the system will not shutdown properly.

[chris@linuxbox ~]$ uname -r
3.6.2-4.fc17.x86_64
[chris@linuxbox ~]$ sudo systemctl disable fix_shutdown.service
[sudo] password for chris:
rm '/etc/systemd/system/shutdown.target.wants/fix_shutdown.service'
[chris@linuxbox ~]$ cat /lib/systemd/system/fix_shutdown.service
[Unit]
Description=Fix Shutdown, dont hang!
DefaultDependencies=no
Before=shutdown.target

[Service]
Type=oneshot
ExecStart=/etc/systemd/scripts/fix_shutdown
[Install]
WantedBy=shutdown.target

[chris@linuxbox ~]$ cat /etc/systemd/scripts/fix_shutdown
#!/bin/sh
#killall pulseaudio
#killall kaffeine
#sleep 1
rmmod cx8800 cx88_dvb cx24116 cx22702 cx8802 cx88_vp3054_i2c cx88_alsa cx88xx
#sleep 1
#rmmod -f cx8800 cx88_dvb cx24116 cx22702 cx8802 cx88_vp3054_i2c cx88_alsa cx88xx
exit 0
[chris@linuxbox ~]$ cat /etc/modprobe.d/blacklist.conf |grep cx88
blacklist cx88_alsa
[chris@linuxbox ~]$

These "cx88[1]/1: IRQ loop detected, disabling interrupts" messages have disappeared.
I can only see the default shutdown messages e.g. "Unmounted /oldroot. Powering off." but then the system hangs.

The bug can be closed, I'm happy as long as my fix works.