Toshiba NB505: Failure to resume from hibernate

Bug #810020 reported by Seth Forshee
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Seth Forshee
Oneiric
Fix Released
Medium
Seth Forshee

Bug Description

After hibernation, rather than restoring to the state of the machine when it was hibernated the machine hangs for a while and then proceeds as if freshly booted. According to dmesg the hibernation image is found, but freezing tasks times out.

[ 2.595282] PM: Looking for hibernation image.
[ 2.793668] PM: Image signature found, resuming
[ 2.795148] PM: Marking nosave pages: 000000000009d000 - 0000000000100000
[ 2.795162] PM: Basic memory bitmaps created
[ 2.795168] PM: Preparing processes for restore.
[ 2.795173] Freezing user space processes ... (elapsed 0.01 seconds) done.
[ 2.810121] Freezing remaining freezable tasks ...
[ 2.936956] usb 1-4: USB disconnect, device number 2
[ 22.830106]
[ 22.830123] Freezing of tasks failed after 20.01 seconds (1 tasks refusing to freeze, wq_busy=0):
[ 22.830157] khubd D 0000000000000001 0 20 2 0x00800000
[ 22.830173] ffff88003c259a20 0000000000000046 ffffffff8183f119 ffff88003c2599e6
[ 22.830185] ffff88003c259fd8 ffff88003c259fd8 ffff88003c259fd8 0000000000012a40
[ 22.830198] ffff88003c378000 ffff88003cacc4d0 00000000000003f4 7fffffffffffffff
[ 22.830211] Call Trace:
[ 22.830231] [<ffffffff815ed985>] schedule_timeout+0x2a5/0x320
[ 22.830244] [<ffffffff815ef21e>] ? _raw_spin_lock+0xe/0x20
[ 22.830254] [<ffffffff8114f018>] ? add_partial+0x58/0x90
[ 22.830262] [<ffffffff815ef21e>] ? _raw_spin_lock+0xe/0x20
[ 22.830270] [<ffffffff815ed3ef>] wait_for_common+0xdf/0x180
[ 22.830279] [<ffffffff81056f20>] ? try_to_wake_up+0x200/0x200
[ 22.830287] [<ffffffff815ed56d>] wait_for_completion+0x1d/0x20
[ 22.830301] [<ffffffffa0031765>] quiesce_and_remove_host+0x65/0xc0 [usb_storage]
[ 22.830312] [<ffffffffa00317e2>] usb_stor_disconnect+0x22/0x40 [usb_storage]
[ 22.830322] [<ffffffff8144a7e2>] usb_unbind_interface+0x52/0x180
[ 22.830331] [<ffffffff813c406c>] __device_release_driver+0x7c/0xe0
[ 22.830339] [<ffffffff813c40fc>] device_release_driver+0x2c/0x40
[ 22.830346] [<ffffffff813c3ba8>] bus_remove_device+0x78/0xb0
[ 22.830355] [<ffffffff813c118d>] device_del+0x12d/0x1b0
[ 22.830363] [<ffffffff8144851f>] usb_disable_device+0xaf/0x1d0
[ 22.830371] [<ffffffff81441320>] usb_disconnect+0xa0/0x140
[ 22.830379] [<ffffffff81442120>] hub_port_connect_change+0xa0/0x6e0
[ 22.830387] [<ffffffff81447a37>] ? usb_control_msg+0xf7/0x120
[ 22.830395] [<ffffffff81442c14>] hub_events+0x4b4/0x610
[ 22.830403] [<ffffffff81442da5>] hub_thread+0x35/0x180
[ 22.830412] [<ffffffff810815f0>] ? add_wait_queue+0x60/0x60
[ 22.830419] [<ffffffff81442d70>] ? hub_events+0x610/0x610
[ 22.830427] [<ffffffff81080b4c>] kthread+0x8c/0xa0
[ 22.830435] [<ffffffff815f8724>] kernel_thread_helper+0x4/0x10
[ 22.830444] [<ffffffff81080ac0>] ? flush_kthread_worker+0xa0/0xa0
[ 22.830451] [<ffffffff815f8720>] ? gs_change+0x13/0x13

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-5-generic 3.0.0-5.6
ProcVersionSignature: Ubuntu 3.0.0-5.6-generic 3.0.0-rc7
Uname: Linux 3.0.0-5-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC259 Analog [ALC259 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC259 Analog [ALC259 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: sforshee 1288 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf0300000 irq 46'
   Mixer name : 'Realtek ALC259'
   Components : 'HDA:10ec0269,1179fdc6,00100100'
   Controls : 12
   Simple ctrls : 8
Date: Wed Jul 13 12:16:54 2011
HibernationDevice: RESUME=UUID=a5d41a34-3cd4-41dd-8c37-a7be23fc2a61
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64 (20110705.1)
MachineType: TOSHIBA TOSHIBA NB505
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-5-generic root=UUID=6b995074-bc48-4ff7-9e58-5bbe256cddac ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-5-generic N/A
 linux-backports-modules-3.0.0-5-generic N/A
 linux-firmware 1.56
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/02/2011
dmi.bios.vendor: TOSHIBA
dmi.bios.version: V1.90
dmi.board.name: PBU00
dmi.board.vendor: TOSHIBA
dmi.board.version: 1.00
dmi.chassis.asset.tag: *
dmi.chassis.type: 10
dmi.chassis.vendor: TOSHIBA
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnTOSHIBA:bvrV1.90:bd06/02/2011:svnTOSHIBA:pnTOSHIBANB505:pvrPLL50U-01R00C:rvnTOSHIBA:rnPBU00:rvr1.00:cvnTOSHIBA:ct10:cvrN/A:
dmi.product.name: TOSHIBA NB505
dmi.product.version: PLL50U-01R00C
dmi.sys.vendor: TOSHIBA

Revision history for this message
Seth Forshee (sforshee) wrote :
Changed in linux (Ubuntu):
assignee: nobody → Seth Forshee (sforshee)
importance: Undecided → Medium
status: New → Confirmed
Seth Forshee (sforshee)
Changed in linux (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Seth Forshee (sforshee) wrote :

The problem is that usb_storage is still scanning on the built-in SD card slot when tasks are frozen prior to restoring the hibernation image. The task that's doing the scanning is frozen, but khubd is processing a disconnect for the card reader that causes it to try and wait on the frozen task. Thus waiting for khubd to freeze times out, and as a result restoration of the hibernation image is aborted.

The attached patch makes the scanning task non-freezable. This has fixed the issue in light testing. I'm going to put it through a couple hundred S4 iterations now to further verify the fix.

Revision history for this message
Seth Forshee (sforshee) wrote :

The previous patch had potential problems because the scanning task could perform operations that aren't allowed during suspend/hibernation. Attaching a new patch that forces the scan thread to complete when the freezer kicks in without freezing to avoid hanging up any other threads. This patch has been submitted upstream and acked, and I am currently waiting for it to be merged.

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Oneiric):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.9 KiB)

This bug was fixed in the package linux - 3.0.0-10.16

---------------
linux (3.0.0-10.16) oneiric; urgency=low

  [ Andy Whitcroft ]

  * Revert "ubuntu: compcache -- follow changes to bd_claim/bd_release"
    - LP: #832694
  * Revert "ubuntu: compcache -- version 0.5.3"
    - LP: #832694
  * [Config] dropping compcache configuration options

  [ David Henningsson ]

  * SAUCE: ALSA: HDA: hdmi: Emit pcm device index for jack input devices

  [ Kees Cook ]

  * [Config] enable and enforce SECCOMP_FILTER on x86

  [ Leann Ogasawara ]

  * [Config] Update CONFIG_EFI_VARS enforcer check
  * [Config] Enable CONFIG_ECHO=m on powerpc
  * [Config] Enable CONFIG_ET131X=m on powerpc
  * [Config] Set CONFIG_FB_MATROX=m
  * [Config] Enable CONFIG_FB_UDL=m on powerpc
  * [Config] Set CONFIG_FB_VIRTUAL=n
  * [Config] Enable CONFIG_FB_VGA16=m on powerpc
  * [Config] Enable CONFIG_GPIO_MAX732X=m on arm
  * [Config] Enable CONFIG_GPIO_PCF857X=m on arm
  * [Config] Set CONFIG_HOTPLUG_PCI_FAKE=m
  * [Config] Enable CONFIG_HOTPLUG_PCI=y on powerpc
  * [Config] Enable CONFIG_HOTPLUG_PCI_CPCI=y on powerpc
  * [Config] Enable CONFIG_HP_ILO=m on powerpc-smp
  * [Config] Enable CONFIG_I2C_PASEMI=m on powerpc
  * [Config] Enable CONFIG_IBM_BSR=m on powerpc
  * [Config] Enable CONFIG_IBMVETH=m on powerpc
  * [Config] Enable CONFIG_IDE_PHISON=m on powerpc
  * [Config] Enable CONFIG_IGB=m on powerpc
  * [Config] Enable CONFIG_IIO=m on powerpc
  * [Config] Enable CONFIG_INFINIBAND_NES=m
  * [Config] Enable CONFIG_IPMI_HANDLER=m on arm
  * [Config] Enable CONFIG_IWL3945=m on powerpc
  * [Config] Disable CONFIG_KVM_BOOK3S_64
  * [Config] Enable CONFIG_LAPBETHER=m on arm
  * [Config] Enable CONFIG_LEDS_GPIO=m on powerpc
  * [Config] Enable CONFIG_LEDS_CLEVO_MAIL=m all arch's
  * [Config] Enable CONFIG_LEDS_PCA9532=m on powerpc
  * [Config] Enable CONFIG_LEDS_PCA955X=m on powerpc
  * [Config] Enable CONFIG_LEDS_TRIGGER_DEFAULT_ON=m on powerpc
  * [Config] Set CONFIG_LEDS_TRIGGER_HEARTBEAT=m on arm and powerpc
  * [Config] Set CONFIG_LEDS_TRIGGER_TIMER=m on powerpc
  * [Config] Enable CONFIG_LINE6_USB=m on arm and powerpc
  * [Config] Enable CONFIG_MEMSTICK=m on arm
  * [Config] Enable CONFIG_MTD_AFS_PARTS=m on arm
  * [Config] Enable CONFIG_MTD_ALAUDA=m on arm
  * [Config] Enable CONFIG_MTD_AR7_PARTS=m on arm
  * [Config] Enable CONFIG_MTD_ARM_INTEGRATOR=m on arm
  * [Config] Enable CONFIG_MOXA_SMARTIO=m on powerpc
  * [Config] Enable CONFIG_MTD_DATAFLASH=m on arm
  * [Config] Enable CONFIG_MTD_GPIO_ADDR=m on arm
  * [Config] Enable CONFIG_MTD_IMPA7=m on arm
  * [Config] Enable CONFIG_MTD_NAND_GPIO=m on arm
  * [Config] Enable CONFIG_MTD_NAND_NANDSIM=m on arm
  * [Config] Enable CONFIG_MTD_NAND_PASEMI=m on powerpc
  * [Config] Enable CONFIG_MTD_NAND_PLATFORM=m on arm
  * [Config] Enable CONFIG_MTD_NAND_TMIO=m on arm
  * [Config] Enable CONFIG_MTD_SST25L=m on arm
  * [Config] Enable CONFIG_NET_CLS_CGROUP=y on arm
  * [Config] Enable CONFIG_NET_CLS_FLOW=m on arm
  * [Config] Enable CONFIG_NET_CLS_U32=m on arm
  * [Config] Enable CONFIG_NET_DCCPPROBE=m on arm
  * [Config] Enable CONFIG_NET_SCH_INGRESS=m on arm
  * [Config] Enable CONFIG_NET_TCPPROBE=m on arm
  * [Config] Enable...

Read more...

Changed in linux (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
Vladimir Kooznetsov (xiiinon) wrote :

I confirm this for HP Pavilion dv5 1164er

Revision history for this message
Seth Forshee (sforshee) wrote :

Vladimir: Does it fail in exactly the same way (same messages in dmesg as in the description with identical backtrace)? Is it fixed in oneiric?

If the answer to either of these is "no," you probably have a different problem and should open a new bug report by running 'ubuntu-bug linux' in a terminal.

Revision history for this message
Vladimir Kooznetsov (xiiinon) wrote :

I'm sorry, I seem to have confused the subjects... I did like you told me and filed a new bug. Thank you.

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.