[Bug 883748] [NEW] Suspend/resume corrupts external data storage devices

2011-10-30 Thread Steve
Public bug reported:

Ubuntu will permit suspend/resume (have not tried hibernate) without
attempting to unmount any external USB storage devices, even though
processes may still have open files on these devices. After the system
is resumed, the USB storage devices may not be present, due to not
having been re-enumerated yet. This can and DOES result in data
corruption on the filesystem on the external device, as evidenced by
errors in dmesg and having to do journal replays. I am not sure that the
dmesg here will have the whole story (due to dmesg -c having been run as
part of another bug report) but the parts that may not be there
basically boil down to reiserfs being very unhappy that the block device
was yanked out from under it.

As a policy decision, it is WRONG to allow suspend to take place unless
externally-attached USB block devices are still mounted. The system
needs to attempt to unmount everything in /media prior to suspending,
and needs to FAIL TO SUSPEND (throwing an error) if all devices cannot
be unmounted due to some of the mount points being in use.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-12-generic 3.0.0-12.20
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
ArecordDevices:
  List of CAPTURE Hardware Devices 
 card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
   Subdevices: 2/2
   Subdevice #0: subdevice #0
   Subdevice #1: subdevice #1
AudioDevicesInUse:
 USERPID ACCESS COMMAND
 /dev/snd/controlC0:  steve 24738 F pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfe22 irq 49'
   Mixer name   : 'Analog Devices AD1984'
   Components   : 'HDA:11d41984,17aa20bb,00100400'
   Controls  : 32
   Simple ctrls  : 20
Card29.Amixer.info:
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw 
7KHT24WW-1.08'
   Mixer name   : 'ThinkPad EC 7KHT24WW-1.08'
   Components   : ''
   Controls  : 1
   Simple ctrls  : 1
Card29.Amixer.values:
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [on]
Date: Sat Oct 29 23:43:31 2011
GvfsMonitorLog: Monitoring events. Press Ctrl+C to quit.
HibernationDevice: RESUME=UUID=31923f5c-ed0d-4c47-92e3-5ee28dfeafe4
HotplugNewDevices:
 
HotplugNewMounts:
 
InstallationMedia: Ubuntu 10.10 Maverick Meerkat - Release amd64 (20101007)
MachineType: LENOVO 646067U
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.0.0-12-generic 
root=UUID=d4fbb1dd-1060-4e10-b8b8-f7d06ae50146 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-12-generic N/A
 linux-backports-modules-3.0.0-12-generic  N/A
 linux-firmware1.60
SourcePackage: linux
Symptom: storage
UdevMonitorLog:
 monitor will print the received events for:
 UDEV - the event which udev sends out after rule processing
UdisksMonitorLog: Monitoring activity from the disks daemon. Press Ctrl+C to 
cancel.
UpgradeStatus: Upgraded to oneiric on 2011-10-17 (13 days ago)
dmi.bios.date: 03/18/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 7LETC9WW (2.29 )
dmi.board.name: 646067U
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: 
dmi:bvnLENOVO:bvr7LETC9WW(2.29):bd03/18/2011:svnLENOVO:pn646067U:pvrThinkPadT61p:rvnLENOVO:rn646067U:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 646067U
dmi.product.version: ThinkPad T61p
dmi.sys.vendor: LENOVO

** Affects: ubuntu
 Importance: Undecided
 Status: New


** Tags: amd64 apport-bug oneiric

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/883748

Title:
  Suspend/resume corrupts external data storage devices

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/883748/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 883748] [NEW] Suspend/resume corrupts external data storage devices

2011-10-30 Thread Ming Lei
On Sun, Oct 30, 2011 at 4:04 PM, Launchpad Bug Tracker
883...@bugs.launchpad.net wrote:
 You have been subscribed to a public bug:

 Ubuntu will permit suspend/resume (have not tried hibernate) without
 attempting to unmount any external USB storage devices, even though
 processes may still have open files on these devices. After the system
 is resumed, the USB storage devices may not be present, due to not
 having been re-enumerated yet. This can and DOES result in data
 corruption on the filesystem on the external device, as evidenced by
 errors in dmesg and having to do journal replays. I am not sure that the

How can you conclude that the case may result in data corruption on
filesystem on the external device?

In fact, before system suspend, 'sync' has been called to sync all the data
for all the filesystems.

thanks,
--
Ming Lei

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/883748

Title:
  Suspend/resume corrupts external data storage devices

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/883748/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs