WARNING: at /build/buildd/linux-2.6.31/fs/sysfs/dir.c:487 sysfs_add_one+0x98/0x100()

Bug #526774 reported by pirx67
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

After working around https://bugs.launchpad.net/ubuntu/+source/udftools/+bug/512142 with a patch I've noticed the following behaviour. Some informational output texts are attached as pktcdvd_info.zip. The "before_*.txt" and "after_*.txt" files are the logged output of the following commands:

find /sys | grep pktcdvd
find /dev | grep pktcdvd
/usr/local/bin/pktcdvd -s

The pktcdvd tool was compiled with the mentioned patch applied. The attached file "messages.log" is a cutout of /var/log/messages with some comments in it (marked with ###).

Inserted a DVD-RAM disk in my DVD writer /dev/sr0 (-> before_add.txt). After mapping a pktcdvd device using "pktsetup dvdram /dev/sr0" (-> after_add.txt) the DVD writer's tray can only be opened for a short time (~ one or two seconds). After this time the tray is automatically loaded again. A disk change is impossible. If the eject button is depressed at the right moment the tray is not loaded again but in the message log "ata2: soft resetting link" shows up. Then it is loaded again.

At this point a DVD RAM disk can be mounted on the /dev/pktcdvd/dvdram device and works normally. Then unmounted the DVD RAM disk (-> after_umount.txt). A diff between "after_add.txt" and "after_umount.txt" shows no differences in the sysfs tree with pktcdvd.

Then the pktcdvd device is unmapped again with "pktsetup -d dvdram" (->after_unmap.txt). A diff shows the following stuff left over in sysfs:

root@hal2006:~# diff before_add.txt after_unmap.txt
6a7,12
> /sys/devices/virtual/pktcdvd
> /sys/devices/virtual/pktcdvd/pktcdvd0
> /sys/devices/virtual/pktcdvd/pktcdvd0/uevent
> /sys/devices/virtual/pktcdvd/pktcdvd0/subsystem
> /sys/devices/virtual/pktcdvd/pktcdvd0/power
> /sys/devices/virtual/pktcdvd/pktcdvd0/power/wakeup
11a18
> /sys/class/pktcdvd/pktcdvd0

Then I tried to map the device again with "pktsetup dvdram /dev/sr0" (-> after_readd.txt). That leads to the kernel trace (see message.log) with the message "sysfs: cannot create duplicate filename '/devices/virtual/pktcdvd/pktcdvd0'". The reason seems to be that the unmap didn't remove all that should be removed.

The second map (readd) seems only to be partly successful. Some entries in the sysfs are now missing. But the drive's tray is again semi-locked.

root@hal2006:~# diff after_add.txt after_readd.txt
51,61d50
< /sys/devices/virtual/pktcdvd/pktcdvd0/stat
< /sys/devices/virtual/pktcdvd/pktcdvd0/stat/reset
< /sys/devices/virtual/pktcdvd/pktcdvd0/stat/packets_started
< /sys/devices/virtual/pktcdvd/pktcdvd0/stat/packets_finished
< /sys/devices/virtual/pktcdvd/pktcdvd0/stat/kb_written
< /sys/devices/virtual/pktcdvd/pktcdvd0/stat/kb_read
< /sys/devices/virtual/pktcdvd/pktcdvd0/stat/kb_read_gather
< /sys/devices/virtual/pktcdvd/pktcdvd0/write_queue
< /sys/devices/virtual/pktcdvd/pktcdvd0/write_queue/size
< /sys/devices/virtual/pktcdvd/pktcdvd0/write_queue/congestion_off
< /sys/devices/virtual/pktcdvd/pktcdvd0/write_queue/congestion_on

Didn't test writing the disk but unmapped the drive again and created "after_umount2.txt"

Bug impact:

Mapping a pktcdvd device make it impossible to insert another disk. Repeated mapping and unmapping of the pktcdvd device leads to kernel trace and sysfs corruption.

ProblemType: Bug
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: nimda 2030 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'CK8S'/'NVidia CK8S with ALC850 at irq 23'
   Mixer name : 'Realtek ALC850 rev 0'
   Components : 'AC97a:414c4790'
   Controls : 42
   Simple ctrls : 27
Date: Wed Feb 24 00:44:31 2010
DistroRelease: Ubuntu 9.10
HibernationDevice: RESUME=UUID=3350850d-d76c-4513-b2b6-e45f2ee64c63
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.

 eth1 no wireless extensions.
Lsusb:
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 002: ID 046d:c03d Logitech, Inc. M-BT96a Pilot Optical Mouse
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 002: ID 05e3:070e Genesys Logic, Inc. X-PRO CR20xA USB 2.0 Internal Card Reader
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Package: linux-image-2.6.31-19-generic 2.6.31-19.56
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.31-19-generic root=UUID=a9dd6181-0b82-4f51-9fa4-b89a8da83291 ro quiet
ProcEnviron:
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
RelatedPackageVersions:
 linux-backports-modules-2.6.31-19-generic N/A
 linux-firmware 1.25
RfKill:

SourcePackage: linux
Uname: Linux 2.6.31-19-generic i686
dmi.bios.date: 03/23/2006
dmi.bios.vendor: Phoenix Technologies, LTD
dmi.bios.version: 6.00 PG
dmi.board.name: MS-7025
dmi.chassis.type: 3
dmi.modalias: dmi:bvnPhoenixTechnologies,LTD:bvr6.00PG:bd03/23/2006:svn:pn:pvr:rvn:rnMS-7025:rvr:cvn:ct3:cvr:

Revision history for this message
pirx67 (pirx67) wrote :
tags: added: karmic
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi pirx67,

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? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

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

apport-collect -p linux 526774

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . 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.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
pirx67 (pirx67) wrote :

Hi Jeremy,

the kernel logs that I mentioned in the bug report can be found in the pktcdvd_info.zip archive with the name "messages.log".

I did here a quick test with the Lucid Lynx Release Candidate (kernel: "2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686"). At least the problem with the DVD writer's tray that can't be opened is still present.

Maybe there will be some time for a more complete test on the weekend.

Perhaps it would be a good idea to stop building the pktcdvd module into the kernel. I think it makes no sense to build a non functioning module into the kernel. Also the turnaround times for any debugging steps would then be smaller.

Regards

Revision history for this message
Sergio Callegari (callegar) wrote :

I confirm that the bug is present on karmic.
When I update to lucid I will test there too.

Revision history for this message
Sergio Callegari (callegar) wrote :

I finally managed testing on Lucid:

1) After pktsetup the cd/dvd writer door remains locked (can be opened only for a fraction of a second)

2) Packed writing seems not to work anyway (I have duly followed the instructions in the udftools readme and they do not succeed). Specifically, on a dvd-rw (minus rw):
- the initial dvd+rw-format on the physical device works
- the growisofs on the physical device already gives an error at the very end (at times after trying to write past 100%)
- the mkudffs on the packet writing device always fails (and for different reasons: fs is read only or cannot find block device)

So, I would suggest removing entirely the packet writing driver from the ubuntu kernel, since it is broken anyway, as indicated by pirx67. Having it built into the kernel makes it hard to try patched versions.

Also, please report upstream that later kernels have regressions on packet writing, so that probably also upstream should consider updating the driver or removing it completely from mainline kernel.

Revision history for this message
Sergio Callegari (callegar) wrote :

Some more testing

Things seem to (partially) work on some harware. I have tested with a detachable usb dvd writer, with some positive result (see the following). However things are completely broken with some other hardware (again see the following).

PARTIAL success story

With a usb LG dvd writer, things work, but with tons of quirks with DVD-RW media

Instructions from the udftools package say

1) format the media
dvd+rw-format -force /dev/sr0
OK

2) grow an empty session
growisofs -Z /dev/sr0=/dev/zero
NOT OK
you need to stop growisofs before end, otherwise it overburns the medium and errors out.

3) Format the packet device in UDF format.
mkudffs --utf8 --spartable=2 --media-type=dvdrw /dev/pktcdvd/0
Assuming that you have set up the packet writing device with pktsetup 0 /dev/sr0 or via the config file of udftools
NOT OK
you need to use /dev/pktcdvd/pktcdvd0 for this to succeed.
Similarly, if you had done pktsetup pktdisk /dev/sr0, you would need to use /dev/pktcdvd/pktcdvd0 and not /dev/pktcdvd/pktdisk as expected.
This seems to me as a significant bug. However it is not clear to me what difference should exist between the named packet device and /dev/pktcdvd/pktcdvd0

FULL FAILURE HISTORY

With an LG DVD RAM GH22NP20, nothing works at all.

You just get tons of

end_request: I/O error, dev sr0, sector 13721801512
[11336.826259] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[11336.826266] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current]
[11336.826274] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[11336.826283] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 0c 78 84 ca 00 00 01 00
[11336.826298] end_request: I/O error, dev sr0, sector 13721801512

or

pktcdvd: detected zero packet size!

in the kernel messages.

Please propagate upstream.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu release http://www.ubuntu.com/getubuntu/download . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
jhthayer (jhthayer) wrote :

While this may not be a bug of overwhelming importance, perusal of the forums shows that a respectable number of people try using this software, particularly those coming over from Windows, and the ignoring of the matter does little to prevent people from going away disgusted. Since some did try to provide the necessary logs, and were ignored it hardly encourages participation.

Changed in linux (Ubuntu):
status: Expired → New
Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
penalvch (penalvch) wrote :

pirx67, thank you for reporting this and helping make Ubuntu better. Karmic reached EOL on April 30, 2011.
Please see this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We were wondering if this is still an issue in a supported release? If so, can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

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

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

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . 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.

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'.

Please let us know your results. Thanks in advance.

summary: - kernel trace and misbehaviour when mapping pktcdvd devices
+ WARNING: at /build/buildd/linux-2.6.31/fs/sysfs/dir.c:487
+ sysfs_add_one+0x98/0x100()
Changed in linux (Ubuntu):
status: Confirmed → 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.