Recurring kernel panic with khidp after resume from S3 on a MacBook3,1 with a connected bluetooth keyboard

Bug #1155731 reported by JC
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
High
Unassigned

Bug Description

After resume from GUI-triggered suspend, I consistently get kernel panics a couple of seconds after resume. Fresh Log in window from GDM shows, then after a couple of moments the panic occurs.
This is on a MacBook3,1 while connected to an Apple Wireless Keyboard, which I guess might be one of the more frequent combinations.
This is my first report, sorry for any missing information.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: linux-image-3.8.0-12-generic 3.8.0-12.21
ProcVersionSignature: Ubuntu 3.8.0-12.21-generic 3.8.2
Uname: Linux 3.8.0-12-generic i686
NonfreeKernelModules: wl
ApportVersion: 2.9.1-0ubuntu1
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: jc 1604 F.... pulseaudio
Date: Fri Mar 15 19:09:59 2013
HibernationDevice: RESUME=UUID=f21194eb-47da-4f68-87b1-c7c08f340af0
InstallationDate: Installed on 2013-03-13 (1 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Alpha i386 (20130313)
MachineType: Apple Inc. MacBook3,1
MarkForUpload: True
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.8.0-12-generic root=/dev/mapper/ubuntu-root ro quiet splash allow-discards root_trim=yes vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.8.0-12-generic N/A
 linux-backports-modules-3.8.0-12-generic N/A
 linux-firmware 1.104
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/05/08
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MB31.88Z.008E.B02.0803051832
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: Mac-F22788C8
dmi.board.vendor: Apple Inc.
dmi.board.version: PVT
dmi.chassis.asset.tag: Asset Tag#
dmi.chassis.type: 2
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F22788C8
dmi.modalias: dmi:bvnAppleInc.:bvrMB31.88Z.008E.B02.0803051832:bd03/05/08:svnAppleInc.:pnMacBook3,1:pvr1.0:rvnAppleInc.:rnMac-F22788C8:rvrPVT:cvnAppleInc.:ct2:cvrMac-F22788C8:
dmi.product.name: MacBook3,1
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.

Revision history for this message
JC (joostw) wrote :
Revision history for this message
JC (joostw) wrote :

This is the log of the last panic from one system start to the final panic with suspend/resume in between.

Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote : Re: Recurring kernel panic with khidp after resume from S3

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.9 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.9-rc2-raring/

Changed in linux (Ubuntu):
importance: Undecided → Medium
importance: Medium → High
tags: added: kernel-da-key
Revision history for this message
JC (joostw) wrote :

Right after resume:

Mar 15 18:23:32 DeepWhite kernel: [ 219.591269] sysfs: cannot create duplicate filename '/class/bluetooth/hci0:46'

This (hci0:46) is the bluetooth keyboard device on the MacBook.
Maybe this would need to get removed/disconnected etc. right before suspend, so that no collision happens after resume?

summary: - Recurring kernel panic with khidp after resume from S3
+ Recurring kernel panic with khidp after resume from S3 on a MacBook3,1
+ with a connected bluetooth keyboard
description: updated
Revision history for this message
JC (joostw) wrote : Re: Recurring kernel panic with khidp after resume from S3 on a MacBook3,1 with a connected bluetooth keyboard kernel-fixed-upstream

Works with mainline kernel 3.9rc2, treid 5 suspends/resumes in a row without a problem. As a positive side effect, the bluetooth keyboard works after resume as well, which it doesn't with the ubuntu kernel.

summary: Recurring kernel panic with khidp after resume from S3 on a MacBook3,1
- with a connected bluetooth keyboard
+ with a connected bluetooth keyboard kernel-fixed-upstream
JC (joostw)
tags: added: kernel-fixed-upstream
Revision history for this message
JC (joostw) wrote :

Ok, tried again with mainline kernel 3.8.0.-030800, which works flawlessly as well (as 3.9rc2). So the kernel panic seems to stem from the differences/patches in between mainline and ubuntu-raring kernel 3.8.0.
Again, the official kernel gives a reliable panic every time I come back from suspend the moment the bluetooth keyboard reconnects.

Revision history for this message
JC (joostw) wrote :

Still happening with 3.8.0-13-generic ...

JC (joostw)
summary: Recurring kernel panic with khidp after resume from S3 on a MacBook3,1
- with a connected bluetooth keyboard kernel-fixed-upstream
+ with a connected bluetooth keyboard
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you confirm this does not happen with the latest upstream 3.8 stable kernel:
http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.8.3-raring/

If the bug does not exist in 3.8.3, then we can bisect and see which Ubuntu SAUCE patch may have introduced this.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: performing-bisect
Revision history for this message
JC (joostw) wrote :

Yes, can confirm that

3.8.3-030803-generic
gives no crash and enables the bluetooth keyboard over multiple suspend cycles

and that

linux-image-3.8.0-13-generic
(which came in as an update today) crashes on resume as well as previous ubuntu kernels.

Thanks for looking into this!

Revision history for this message
JC (joostw) wrote :

Ubuntu kernel still crashing the system with todays update to 3.8.4 base.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

To start the bisect, we need to know the last good kernel and the first bad kernel. Is the 3.8.0-12.21 kernel the first kernel to exhibit this bug? Does this not happen with 3.8.0-11.20?

Revision history for this message
JC (joostw) wrote :

This is a fresh install of 13.04, which had this problem from the very beginning. If I remember correctly (and I'm quite positive that I do), this worked correctly in 12.10.
There probably is some way for you to oversee the bluetooth/device related patches and the releases with significant changes pointing in this direction? I'm willing to install a handful of kernels to try, but I have to admit I can not go and install each and every kernel...

Can you point me to the Ubuntu patch set which is applied to the mailine kernel?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you test the 3.8.0-11.20 to see if it exhibits this bug? It can be downloaded from:
https://launchpad.net/ubuntu/+source/linux/3.8.0-11.20/+build/4346872

You would need to install the linux-image and linux-image-extra packages.

Revision history for this message
JC (joostw) wrote :

Just did a run with the aforementioned kernel 3.8.0-11.20 (though I am on i386, but it was the same release).
The resulting Oops (ca. 1-2s after resume) is attached.
This time I came to X on my internal LVDS (the external monitor stuck in text mode displaying the oops), and could still type with the internal keyboard (bluetooth keyboard did nothing).

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

So it sounds like 3.8.0-11.20 has this bug as well.

Can you next test the v3.8.9-10.19 build? We are trying to identify last good kernel and the first bad kernel.

https://launchpad.net/ubuntu/+source/linux/3.8.0-10.19/+build/4343790

Revision history for this message
JC (joostw) wrote :

Preliminary results with v3.8.9-10.19:

Resume without kernel panic, but no reconnection to bluetooth keyboard. Internal keyboard / external display etc. all work.
Attached kern.log has some info as well, which differs from previous logs.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

That is good news. So it sounds like this bug was introduced in the 3.8.0-11.20 kernel. I'll looks at the changelog. If nothing sticks out, I'll kick off a bisect between 3.8.0-10.19 and 3.8.0-11.20

tags: added: ticket-spin-lock
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I started a kernel bisect between3.8.0-10.19 and 3.8.0-11.20 . The kernel bisect will require testing of about 7-10 test kernels.

I built the first test kernel, up to the following commit:
59188446b40179e6865606229c3726d11e905799

The test kernel can be downloaded from:
http://people.canonical.com/~jsalisbury/lp1155731

Can you test that kernel and report back if it has the bug or not. I will build the next test kernel based on your test results.

One thing to note, you will need to install both the linux-image and linux-image-extra .deb packages.

Thanks in advance

Revision history for this message
JC (joostw) wrote :

Crash/oops on first resume while reconeccting the keyboard with your 3.8.0-11.20 ...
Thanks,
J

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built the next test kernel, up to the following commit:
fe6288e7e4d32cd184d264267bebdabc9a9c99c2

The test kernel can be downloaded from:
http://people.canonical.com/~jsalisbury/lp1155731

Can you test that kernel and report back if it has the bug or not. I will build the next test kernel based on your test results.

Thanks in advance

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.