udev occasionally goes into infinite loop

Bug #926923 reported by Adam Conrad
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Andy Whitcroft

Bug Description

On a few of my machines, udev occasionally goes into strange infinite loops. This is a report of one such case (no idea if they're all related, as this one seems specific to this hardware). Attaching strace and udevadm log of looping pain.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: udev 175-0ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-10.17-powerpc 3.2.1
Uname: Linux 3.2.0-10-powerpc ppc
ApportVersion: 1.91-0ubuntu1
Architecture: powerpc
CustomUdevRuleFiles: 85-ifupdown.rules
Date: Sat Feb 4 16:06:17 2012
Lsusb: Error: command ['lsusb'] failed with exit code 1: unable to initialize libusb: -99
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: ramdisk_size=8192 root=/dev/sda7
SourcePackage: udev
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Adam Conrad (adconrad) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :

As recommended by vorlon, I tested both the following commands:

/lib/udev/scsi_id --export --whitelisted -d /dev/sdb
/lib/udev/ata_id --export /dev/sdb

Both of them trigger the event storm reported above, leading him to believe it's a kernel issue.

Revision history for this message
Steve Langasek (vorlon) wrote :

Since these are the standard udev helpers that are called for all block devices, and other people aren't reporting issues with change event storms when running them, I think this is very likely to be a bug in the kernel driver for this device rather than a bug in udev, yes. Reassigning to the kernel. Andy, do you think you can take a look at this?

affects: udev (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Andy Whitcroft (apw)
Revision history for this message
Adam Conrad (adconrad) wrote :

And before a bot nags me, I've tested this on a freshly-updated system with 3.2.0-12-powerpc, and the problem persists.

Revision history for this message
Adam Conrad (adconrad) wrote :

And linux-image-3.2.0-14-powerpc too. :P

Revision history for this message
Andy Whitcroft (apw) wrote :

So this is being triggered by a drive which takes removable media. It is hard to tell the exact event order due to the way they are processed these days. I would therefore first like to confirm that these events arn't being reciprically triggered by udev responses. Could you wrap up the two *_id commands so they delay before probing. So we can see if this is a kernel udev bounce, or if the kernel is spewing events. Also can you get an strace of a probe so i can see exactly what it does to your drive.

Revision history for this message
Adam Conrad (adconrad) wrote :

All the above info was provided at http://lucifer.0c3.net/~adconrad/apw/

Revision history for this message
Andy Whitcroft (apw) wrote :

Ok I have put some debug into the kernel and built you a test kernel. Could you install the kernel below and reproduce the issue. This hopefully will emit some clues into dmesg:

    http://people.canonical.com/~apw/lp926923-precise/

Revision history for this message
Adam Conrad (adconrad) wrote :

Oh, we caught up on IRC about this, but for completeness in the bug report, here's the dmesg from the debug kernel:

[ 174.426273] APW: isd_check_events: media no longer present -- device changed
[ 174.452796] APW: sd_check_events: m_n_p:: set_media_not_present: media was present -- device changed
[ 174.505514] APW: isd_check_events: media no longer present -- device changed
[ 174.531873] APW: sd_check_events: m_n_p:: set_media_not_present: media was present -- device changed
[...] repeat for every media change event in the storm [...]

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.