NULL pointer dereference at 0000000000000039 (sysfs_create_dir+0x35) when resuming after suspend

Bug #837379 reported by Amit Rana
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

I installed ubuntu 11.04 from cd on dell x64 xps L702X and the upgraded to 11.10 using upgrade-manager -d
Now when I suspend and then try to restart it crashes and shows a black screen with some logs. I have to restart after that.

Please let me know what other logs I should attach

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: linux-image-3.0.0-9-generic 3.0.0-9.14
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC665 Analog [ALC665 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: amit 2093 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf3c00000 irq 55'
   Mixer name : 'Intel CougarPoint HDMI'
   Components : 'HDA:10ec0665,102804b8,00100003 HDA:80862805,80860101,00100000'
   Controls : 27
   Simple ctrls : 13
Date: Tue Aug 30 18:37:48 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
MachineType: Dell Inc. Dell System XPS L702X
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.0.0-9-generic root=UUID=15e9167d-7089-4aee-8b48-e15f6bfad633 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.0.0-9-generic N/A
 linux-backports-modules-3.0.0-9-generic N/A
 linux-firmware 1.60
SourcePackage: linux
StagingDrivers: mei
UpgradeStatus: Upgraded to oneiric on 2011-08-27 (3 days ago)
dmi.bios.date: 06/01/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A11
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: 0XN71K
dmi.board.vendor: Dell Inc.
dmi.board.version: FAB1
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnDellInc.:bvrA11:bd06/01/2011:svnDellInc.:pnDellSystemXPSL702X:pvr:rvnDellInc.:rn0XN71K:rvrFAB1:cvnDellInc.:ct8:cvr0.1:
dmi.product.name: Dell System XPS L702X
dmi.sys.vendor: Dell Inc.

Revision history for this message
Amit Rana (amit-rana) wrote :
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Seth Forshee (sforshee) wrote :

Amit: Please take a picture of your screen when this happens and attach it to the bug. Thanks!

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Amit Rana (amit-rana) wrote :

I am attaching the picture. This time I did see the desktop but before I could reach it crashed. All the earlier times it never showed the desktop.

Pls let me know if attached picture is readable and kindly ignore myself in the background, tried some innovative ways to remove it but no success :)

Changed in linux (Ubuntu):
status: Incomplete → New
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.0.0-11.17)

Thank you for taking the time to file a bug report on this issue.

 However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

 We have noted that there is a newer version of the development kernel currently in the release pocket than the one you tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

 If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

 Thank you for your help.

tags: added: kernel-request-3.0.0-9.14
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Amit Rana (amit-rana) wrote : Re: ubuntu 11.10 crashes when trying to wake up after suspend

I tried with 3.0.0.11-18 and this time system didn't crash but it didnt wake up either. Just showed a black screen and had to again hard reboot.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Seth Forshee (sforshee) wrote :

The crash is triggered by something in the bluetooth code, which didn't change at all beteen 3.0.0-9.15 and 3.0.0-11.18, so it's unlikely the problem really went away. Maybe the crash dump just isn't getting shown on the screen for some reason. All the same, you could test whether or not your machine is really alive by trying to interact with it via networking (ssh into it or something like that).

I made a test build with all the changes from the relevant section of the bluetooth code since the 3.0 kernel for you to try. Please test to see whether or not the problem is fixed in this kernel.

http://people.canonical.com/~sforshee/lp837379/linux-3.0.0-11.18~lp837379v201109161343/

Is your bluetooth adapter internal or external? If it's external you should try suspend/resume with it unplugged to see if that helps. Otherwise try running 'sudo modprobe -r btusb' before suspending and see what happens. Thanks!

Changed in linux (Ubuntu):
assignee: nobody → Seth Forshee (sforshee)
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Amit Rana (amit-rana) wrote :

I tried the test kernel that you gave. It crashed, I am attaching the the screen dump.

I will try other test cases later. I have internal bluetooth and I use it for mouse (touchpad doesnt work, have raised separate bug) so the problem is if i disable bluetooth before suspend I cant use mouse. I will find out shell command to suspend and try this.

By the way if it helps suspend/wake up works perfect with 2.6.38-11 kernel.

Revision history for this message
Amit Rana (amit-rana) wrote :
Revision history for this message
Amit Rana (amit-rana) wrote :

I installed 3.0.0.11-18 and ran 'sudo modprobe -r btusb' after this (as I could not use mouse or touch pad) I ran 'sudo pm-suspend'. It suspended nicely and woke up nicely.

Anything else I need to test?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Danny (lesarde) wrote :

The some problem with ubuntu 11.10 final release.

lsb_release -a:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric

uname -a:
Linux Danny-laptop 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
Danny (lesarde) wrote :

I find an easy way to re-product this bug:
1. Attach an external bluetooth adapter.
    bt-adapter -l:
    Available adapters:
    Accel-OB2 (00:1F:81:00:02:50)
2. Connect a bluetooth mouse (maybe other devices have the same problem) with the adapter
    bt-device -l:
    Added devices:
    VGP-BMS33 (00:02:76:1F:23:76)
3. Disconnect the bluetooth mouse using "bt-device -d VGP-BMS33".
4. Reconnect the bluetooth mouse with the adapter(It will auto-connect again after I execute step 3.).
5. Repeat "step 3-4" several times, the system will crash to console with some Tainted info.

I use an external bluetooth adapter.

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

I've been looking at this some more today. I'm about to leave on vacation, so for now I'm describing what I've found and unassigning myself in case someone else wants to pick it up while I'm out.

As far as I can tell right now, there seems to be a race between adding and deleting bluetooth HID devices. There is no serialization. Removal is done on the hidp_session task (via hidp_del_connection), and adding is done on whatever thread calls hidp_add_connection. If the device is being torn down when hidp_del_connection runs, hidp_setup_hid may find find the device that's being torn down and assume that it's legitimate to use. Later when setting up sysfs paths the oops happens because the sysfs_dirent in that device's kobject has already been freed.

I'm not sure exactly why this race exists, i.e. why a connection for the same device is getting crated and torn down at the same time. Some comments I've seen indicate that a disconnection could be happening due to the device being unresponsive for a period. It's not implausible to think that the device is powered of or forcibly disconnected during suspend, causing such a timeout in communication with the device, and that this ends up overlapping device reconnection during resume.

I'm not entirely sure that the above analysis is correct, but it's the best explanation I've come up with so far.

Changed in linux (Ubuntu):
assignee: Seth Forshee (sforshee) → nobody
summary: - ubuntu 11.10 crashes when trying to wake up after suspend
+ NULL pointer dereference at 0000000000000039 (sysfs_create_dir+0x35)
+ when resuming after suspend
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.0.0-12.20)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.0.0-12.20
Revision history for this message
Danny (lesarde) wrote :

In fact, I don't know how to upgrade my kernel to version 3.0.0-12.20, I just install the package from https://launchpad.net/ubuntu/+source/linux/3.0.0-12.20/+build/2829179/+files/linux-image-3.0.0-12-generic_3.0.0-12.20_amd64.deb.

The package info:
Package: linux-image-3.0.0-12-generic
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 148744
Maintainer: Ubuntu Kernel Team <email address hidden>
Architecture: amd64
Source: linux
Version: 3.0.0-12.20
Provides: fuse-module, ivtv-modules, kvm-api-4, linux-image, linux-image-3.0, ndiswrapper-modules-1.9, redhat-cluster-modules
Depends: initramfs-tools (>= 0.36ubuntu6), coreutils | fileutils (>= 4.0), module-init-tools (>= 3.3-pre11-4ubuntu3), wireless-crda
Pre-Depends: dpkg (>= 1.10.24)
Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub | lilo (>= 19.1)
Suggests: fdutils, linux-doc-3.0.0 | linux-source-3.0.0, linux-tools
Conflicts: hotplug (<< 0.0.20040105-1)

Then I perform this testing:
1. Attach an external bluetooth adapter.
    bt-adapter -l:
    Available adapters:
    Accel-OB2 (00:1F:81:00:02:50)
2. Connect a bluetooth mouse (maybe other devices have the same problem) with the adapter
    bt-device -l:
    Added devices:
    VGP-BMS33 (00:02:76:1F:23:76)
3. Disconnect the bluetooth mouse using "bt-device -d VGP-BMS33".
4. Reconnect the bluetooth mouse with the adapter(It will auto-connect again after I execute step 3.).
5. Repeat "step 3-4" several times, the system will crash to console with some Tainted info.

Test result: the system will crash to console with some Tainted info.

Please notice that the bluetooth mouse will auto connect the adapter if it has been disconnected.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the release candidate kernel versus the daily build. 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.

Revision history for this message
Danny (lesarde) wrote :

I can't perform the testing with the kernelmainlinebuilds, because the bluetooth adapter doesn't work at all.

I downloaded the package from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.1-rc9-oneiric/linux-image-3.1.0-0301rc9-generic_3.1.0-0301rc9.201110050905_amd64.deb .

more info:

uname -a
Linux Danny-laptop 3.1.0-0301rc9-generic #201110050905 SMP Wed Oct 5 09:15:03 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

lsusb
Bus 006 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

Anything else I should do?

Revision history for this message
Danny (lesarde) wrote :

Sorry for my mistake not testing the last builds, I will test the version from http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/linux-image-3.1.0-999-generic_3.1.0-999.201110171146_amd64.deb again.

Just a while.

Revision history for this message
Danny (lesarde) wrote :

The bluetooth adapter doesn't work for http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/linux-image-3.1.0-999-generic_3.1.0-999.201110171146_amd64.deb.

uname -a
Linux Danny-laptop 3.1.0-999-generic #201110171146 SMP Mon Oct 17 11:50:29 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

dmesg(after detach the adapter and attach it again)
[ 329.000141] usb 3-1: USB disconnect, device number 2
[ 335.916061] usb 6-2: new full speed USB device number 7 using uhci_hcd
[ 337.100047] Bluetooth: hci0 command tx timeout
[ 337.160680] CE: hpet increased min_delta_ns to 20113 nsec
[ 338.100033] Bluetooth: hci0 command tx timeout
[ 339.100037] Bluetooth: hci0 command tx timeout
[ 340.100053] Bluetooth: hci0 command tx timeout
[ 341.100055] Bluetooth: hci0 command tx timeout
[ 342.100064] Bluetooth: hci0 command tx timeout
[ 343.100053] Bluetooth: hci0 command tx timeout
[ 344.100040] Bluetooth: hci0 command tx timeout
[ 345.100031] Bluetooth: hci0 command tx timeout

command "bt-adapter -l" was blocked, no result return.

What should I do next?

Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Avik Topchyan (topchyan) wrote :

Until this fixed how to disable this behavior?

Revision history for this message
Danny (lesarde) wrote :

Nobody handles this bug, so I have bought a LOGITECH mouse M325(just cost 20$) instead of the bluetooth mouse. Maybe it is the best choice.

Revision history for this message
penalvch (penalvch) wrote :

Amit Rana, 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? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

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

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available (not the daily folder, but the one all the way at the bottom) following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.12

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

tags: added: bios-outdated-a19 bot-stop-nagging needs-upstream-testing
removed: kernel-request-3.0.0-12.20 kernel-request-3.0.0-9.14
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
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.