hibernate hangs, when firewire disk is plugged in

Bug #509302 reported by Rudolf Leitgeb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Binary package hint: pm-utils

I have a drobo, which is basically some smart disk array which can be attached via USB or via Firewire 800. However, when this device is plugged in through its firewire port, hibernate will hang forever and never poweres down my computer. It may be interesting to note that I can still switch between virtual consoles with Alt+F1-4 (so keyboard seems to work), but I can not even enter a user name at the consoles (characters never show up). If the device is connected through its USB port, hibernate works perfectly fine on my computer.

In case this has not been autosubmitted by the ubuntu-bug application:

I use a properly patched Ubuntu Karmic Koala for ia64 on an Intel Core 2 Quad system.
lspci outputs:
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 02)
00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 02)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 02)
00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 92)
00:1f.0 ISA bridge: Intel Corporation 82801IR (ICH9R) LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA AHCI Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
01:00.0 PCI bridge: Texas Instruments XIO2000(A)/XIO2200(A) PCI Express-to-PCI Bridge (rev 03)
02:02.0 FireWire (IEEE 1394): Texas Instruments TSB82AA2 IEEE-1394b Link Layer Controller (rev 01)
03:00.0 VGA compatible controller: nVidia Corporation G84 [GeForce 8600 GT] (rev a1)
04:00.0 SATA controller: JMicron Technology Corp. JMB362/JMB363 AHCI Controller (rev 02)
04:00.1 IDE interface: JMicron Technology Corp. JMB362/JMB363 AHCI Controller (rev 02)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10)
05:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet (rev 10)
05:02.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)

ProblemType: Bug
Architecture: amd64
Date: Mon Jan 18 20:28:28 2010
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: pm-utils 1.2.5-2ubuntu7
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=de_AT.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-server
SourcePackage: pm-utils
Uname: Linux 2.6.31-17-server x86_64

Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote :
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote :

In those cases where hibernate hangs indefinitely, I get the following entries in /var/log/messages:

Jan 19 23:47:36 w00t kernel: [15880.054108] ieee1394: sbp2: resp 0x1, sbp_status 0xff
Jan 19 23:47:37 w00t kernel: [15881.050417] ieee1394: sbp2: resp 0x1, sbp_status 0xff
Jan 19 23:47:37 w00t kernel: [15881.051365] ieee1394: sbp2: resp 0x1, sbp_status 0xff
Jan 19 23:47:37 w00t kernel: [15881.052244] ieee1394: sbp2: resp 0x1, sbp_status 0xff
Jan 19 23:47:37 w00t kernel: [15881.053181] ieee1394: sbp2: resp 0x1, sbp_status 0xff
Jan 19 23:47:37 w00t kernel: [15881.054071] ieee1394: sbp2: resp 0x1, sbp_status 0xff
Jan 19 23:47:49 w00t kernel: [15893.534572] ieee1394: sbp2: resp 0x1, sbp_status 0xff
Jan 19 23:47:49 w00t kernel: [15893.535283] ieee1394: sbp2: resp 0x1, sbp_status 0xff

These are the last messages and they appear in large quantities when I try to hibernate my computer. Needless to say these messages do not appear when the drobo is not plugged in through firewire and hibernate succeeds. The first message following the stream of these messages is:

Jan 20 00:00:03 w00t kernel: imklog 4.2.0, log source = /var/run/rsyslog/kmsg started.
Jan 20 00:00:03 w00t rsyslogd: [origin software="rsyslogd" swVersion="4.2.0" x-pid="1177" x-info="http://www.rsyslog.com"] (re)start
Jan 20 00:00:03 w00t rsyslogd: rsyslogd's groupid changed to 103
Jan 20 00:00:03 w00t rsyslogd: rsyslogd's userid changed to 102
Jan 20 00:00:03 w00t kernel: [ 0.000000] Initializing cgroup subsys cpuset
Jan 20 00:00:03 w00t kernel: [ 0.000000] Initializing cgroup subsys cpu
Jan 20 00:00:03 w00t kernel: [ 0.000000] Linux version 2.6.31-17-server (buildd@crested) (gcc version 4.4.1 (Ub

which appears to be start of the typical reboot sequence (after I forced it through holding down the power button).

I hope this helps pinning down the problem ...

Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote :

I also discovered that after unmounting the disk and rmmod-ing sbp2 hibernate works fine! So could this be a bug in the sbp2 module, hence a kernel bug?

Revision history for this message
Chow Loong Jin (hyperair) wrote :

This is a kernel bug -- faulty driver sbp2.

affects: pm-utils (Ubuntu) → linux (Ubuntu)
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote :

The driver sbp2 may be the culprit, yet I created a work around for my problem. In /usr/lib/pm-utils/sleep.d I added a file which does the following when hibernate state is entered:

- find all partitions on fire wire disks
- terminate all processes accessing these partitions
- unmount these partition

The file is called "65FirewireDisks" and looks like this (without the ====== markers, of course):
=========================================================================================
#!/bin/sh

unmount_fwdisks()
{
        DEVICELIST=`hwinfo --disk |grep -A 3 -e 'Driver Modules:.*sbp2' |grep 'Device File:' |awk '{print $3}' |sort |uniq`
        for DEVICE in $DEVICELIST ; do
                PARTITIONS=`mount |grep $DEVICE | awk '{print $1}'|sort|uniq`
                for FS in $PARTITIONS ; do
                        fuser -m -k $FS
                        umount $FS
                done
        done
        return 0
}

mount_fwdisks()
{
        return 0
}

case "$1" in
        hibernate|suspend)
                unmount_fwdisks
                ;;
        thaw|resume)
                mount_fwdisks
                ;;
        *) exit $NA
                ;;
esac
========================================================================================

After creating this file and making it executable, I had to create one more file which tells the system to
unload the sbp2 module before attempting to hibernate. For this I created the file named
01suspend_modules in the directory /etc/pm/config.d with the following content:
========================================================================================
SUSPEND_MODULES=sbp2
========================================================================================

Done. My system goes into hibernate state now, the only problem is that I can not leave processes alive
which actually access files on the fire wire disk while I enter hibernate. Needless to say it is not a good
idea to use this fix if essential system services access the fire wire disks!

I hope this work around helps some folks with the same problem.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Rudolf,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 509302

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kernel-hibernate
tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : Re: [Bug 509302] Re: hibernate hangs, when firewire disk is plugged in

> This bug was reported a while ago and there hasn't been any activity in it recently.
> We were wondering if this is still an issue?

I have found and posted a work around for this issue therefore I had no
pressing need to pursue this issue for now. Since I run a RAID 0
configuration on my computer (or for whatever other reason), every crash
means a _manual_ file system check :( so I tried to avoid running too
many experiments (hate to lose my data).

> Can you try with the latest development release of Ubuntu? ISO CD images
> are available from http://cdimage.ubuntu.com/releases/.

I just started a download and will try to find a way to run this beta
before the final 10.04 release is due. If this can be tried by just
running the distro off the CDROM, I should be able to do this quickly.

> If it remains an issue, could you run the following command from a Terminal
> (Applications->Accessories->Terminal). It will automatically gather and
> attach updated debug information to this report.
>
> apport-collect -p linux 509302

Sounds easy.

> Also, if you could test the latest upstream kernel available that would be
> great. It will allow additional upstream developers to examine the issue.
> Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested
> the upstream kernel, please remove the 'needs-upstream-testing' tag. This
> can be done by clicking on the yellow pencil icon next to the tag located
> at the bottom of the bug description and deleting the 'needs-upstream-testing'
> text. Please let us know your results.

Am I correct that this would require a full install of Ubuntu 10.04 RC
on my computer ?

Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : apport-collect data

Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: rudi 2539 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfdff4000 irq 22'
   Mixer name : 'Realtek ALC888'
   Components : 'HDA:10ec0888,147b0000,00100001'
   Controls : 40
   Simple ctrls : 22
Card1.Amixer.info:
 Card hw:1 'default'/'C-Media INC. USB Sound Device at usb-0000:00:1a.0-2, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB0d8c:0103'
   Controls : 3
   Simple ctrls : 2
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=6035697d-05e6-4222-ad12-6979d084ab48
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.

 eth1 no wireless extensions.
MachineType: . .
NonfreeKernelModules: nvidia
Package: linux (not installed)
ProcCmdLine: root=UUID=e99e4277-98e6-46f1-a4db-199d7c596227 ro quiet splash crashkernel=384M-2G:64M,2G-:128M
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, no user)
 LANG=de_AT.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-20.58-server
RelatedPackageVersions:
 linux-backports-modules-2.6.31-20-server N/A
 linux-firmware 1.26
RfKill:

Uname: Linux 2.6.31-20-server x86_64
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin netdev plugdev sambashare scanner video
WpaSupplicantLog:

XsessionErrors:
 (gnome-settings-daemon:2548): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (gnome-settings-daemon:2548): GLib-CRITICAL **: g_propagate_error: assertion `src != NULL' failed
 (polkit-gnome-authentication-agent-1:2663): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (nautilus:2648): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferences_is_initialized ()' failed
 (firefox:2789): GLib-WARNING **: g_set_prgname() called multiple times
dmi.bios.date: 05/26/2008
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: 6.00 PG
dmi.board.name: IP35 Pro(Intel P35-ICH9R)
dmi.board.vendor: http://www.abit.com.tw/
dmi.board.version: 1.0
dmi.chassis.type: 3
dmi.chassis.vendor: System Enclosure Manufacter
dmi.chassis.version: OEM
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvr6.00PG:bd05/26/2008:svn.:pn.:pvrSystemVersion:rvnhttp//www.abit.com.tw/:rnIP35Pro(IntelP35-ICH9R):rvr1.0:cvnSystemEnclosureManufacter:ct3:cvrOEM:
dmi.product.name: .
dmi.product.version: System Version
dmi.sys.vendor: .

Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : AlsaDevices.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : AplayDevices.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : ArecordDevices.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : BootDmesg.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : Card0.Amixer.values.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : Card0.Codecs.codec.0.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : Card1.Amixer.values.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : CurrentDmesg.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : Lspci.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : Lsusb.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : PciMultimedia.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : ProcCpuinfo.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : ProcInterrupts.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : ProcModules.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : UdevDb.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : UdevLog.txt
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote : WifiSyslog.gz
Changed in linux (Ubuntu):
status: Incomplete → New
tags: added: apport-collected
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote :

I can confirm now that the problem persists with the newest release candidate kernels distributed through http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D

I tried version v2.6.34-rc2-karmic/ and saw the exact same behavior that I saw with previous kernels (I disabled my /usr/lib/pm-utils/sleep.d hack that I posted previously for the test). My conclusion is that this problem is not fixed yet. Given that this kernel is the same as the one eventually going into lucid lynx, I suggest that the problem will also show up there.

As requested, I ran apport-collect -p linux 509302, the results should have been uploaded already.

tags: removed: apport-collected needs-upstream-testing
Revision history for this message
Rudolf Leitgeb (rudolf-leitgeb) wrote :

This bug still persists in Ubuntu 10.10, fully patched. Kernel is 2.6.35-22-server #34-Ubuntu SMP Sun Oct 10 10:54:55 UTC 2010 x86_64 GNU/Linux

In order to make hibernate work with Maverick Meerkat and the drobo, I had to add even more stuff to my changes. The 65FirewireDisks is still necessary and to my best knowledge still doesn't come with stock Ubuntu. The file /etc/pm/config.d/01suspend_modules needs more modules now to be removed before the computer is hibernated. It needs to contain the following line:

SUSPEND_MODULES="sbp2 firewire_sbp2 firewire_ohci firewire_core"

Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
tags: added: b73a1py79
Revision history for this message
Brad Figg (brad-figg) wrote : Unsupported series, setting status to "Won't Fix".

This bug was filed against a series that is no longer supported and so is being marked as Won't Fix. If this issue still exists in a supported series, please file a new bug.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.