• Bug#1107479: util-linux: blkid hangs forever after inserting a DVD-RAM

    From Ben Hutchings@1:229/2 to All on Thu Jul 3 01:20:01 2025
    XPost: linux.debian.bugs.dist
    From: benh@debian.org

    On Sun, 2025-06-29 at 12:26 +0200, Uwe Kleine-König wrote:
    Hello Roland,

    On Sun, Jun 29, 2025 at 11:46:00AM +0200, Roland Sommer wrote:
    [correcting CC recipients]

    Huh, how did I manage that (rhetorical question)? Thanks

    Ahh, now that makes sense. pktsetup calls `/sbin/modprobe pktcdvd` explicitly, the blacklist entry doesn't help for that. Without the
    kernel module renamed, does the 2nd DVD-RAM result in the blocking behaviour?

    Yes.

    OK, that makes sense. So udev does in this order:

    - auto-load the module (which is suppressed with the backlist entry)
    - call blkid (which blocks if the module is loaded)
    - call pktsetup (which loads the module even in presence of the
    blacklist entry).
    [...]

    I tested with a CD-RW, and the behaviour was slightly different:

    - Nothing automtically created a pktcdvd device, so blkid initially
    worked with a CD-RW inserted and the pktcdvd modules loaded.
    - After running pktsetup to create the block device /dev/pktcdvd/0,
    blkid and any other program attempting to open that device hung.

    My conslusion is that pktcdvd is eqaully broken for CD-RWs.

    Ben.

    --
    Ben Hutchings - Debian developer, member of kernel, installer and LTS
    teams

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAmhlu+QACgkQ57/I7JWG EQmdDxAAxClLvO+E6qzWX746m4KYoYekREscmqWHjN9h+5Qk4AU4XOao/DcpTwFe MFW6nIlmr+Yhzbnw4HDTYUMI8Okz8OHWr8wYPpDfPYiCOncX14NhBmM4orn7Css+ +Di0U8uIHsbI86gOwt05Bv1+0ZcS5tbCyUaaapdtg47HsfFzCGFpkXDjMiDebuT5 Tvg6BoeeW4vqvPuxWPB7J7WRrbI9m6TDe0w4Cjv7j1WdZyMLGRFVMwbjBdATMTr7 j4iArWgJVeZ7N0a4Jw6v1TQJe5eneQIdGNsgDAtIp9N3ETDWN9zZWsVHxAy9pkRz g3OAnuxKvZ05tArADHHdW9yh37U1QBlUEEsUfnNbTDETsOUt4OpGNSf1sRiuCV1J d0+IxvAmzkkhUlthKQ8OtTwHlyUl5heM9AQ2ZtAh6TyR/5iVk9RgHXpkdw9eQ5WB LRpNqz998MazUTTfw7pXfVjYjMvItEsQPD+jPMwn2p7A9wxDe1JfrF2FjPRTGhqw EqKaWhSpylc2gCXSh5cCfU3c7AluPK4nq41iYmqHHaER2G/apLU1hqBOL1AOKz+W 4o4VBj+d7lbvtnGbNp4gBS5ZGdSUmAk1al+chs86RDBD5lRpXlZ2pWamhhxd9Avi Jic9wDwWM7loC1zzNdxVjTVwbxskxW+ZxiD7Q+LbaTVv0Z8kyJA=
    =R8ni
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229
  • From Salvatore Bonaccorso@1:229/2 to Chris Hofstaedtler on Mon Jun 9 09:40:02 2025
    XPost: linux.debian.bugs.dist
    From: carnil@debian.org

    Control: tags -1 + moreinfo

    Hi Roland,

    On Sun, Jun 08, 2025 at 01:24:55PM +0200, Chris Hofstaedtler wrote:
    Control: reassign -1 src:linux

    On Sun, Jun 08, 2025 at 08:59:22AM +0200, Roland Sommer wrote:
    blkid works all the time as expected but hangs forever after inserting any DVD-
    RAM in the drive. dmesg then reports every approx. 120s (up to 10 times):

    [ 363.635218] INFO: task blkid:2224 blocked for more than 120 seconds.
    [ 363.635232] Tainted: P OE 6.1.0-37-amd64 #1 Debian 6.1.140-1
    [ 363.635235] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
    message.
    [ 363.635238] task:blkid state:D stack:0 pid:2224 ppid:2216 flags:0x00004002
    [ 363.635245] Call Trace:
    [ 363.635247] <TASK>
    [ 363.635252] __schedule+0x34d/0x9e0
    [ 363.635266] schedule+0x5a/0xd0
    [ 363.635271] schedule_preempt_disabled+0x11/0x20
    [ 363.635276] __mutex_lock.constprop.0+0x399/0x700
    [ 363.635283] pkt_ioctl+0x42/0x120 [pktcdvd]
    [ 363.635294] pkt_ioctl+0xce/0x120 [pktcdvd]
    [ 363.635302] ? do_syscall_64+0x61/0xb0
    [ 363.635308] ? do_filp_open+0xaf/0x160
    [ 363.635313] blkdev_ioctl+0x133/0x270

    Looks like pktcdvd isn't returning to userspace. Reassigning to the
    kernel, as blkid won't be able to do anything about that. Might also
    be a hardware issue if it works elsewhere?

    Please provide as well as full boot log up to when triggering the
    issue so we can see more context.

    Regards,
    Salvatore

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Christoph Hellwig@1:229/2 to Jens Axboe on Thu Jul 3 12:20:01 2025
    XPost: linux.debian.bugs.dist
    From: hch@infradead.org

    On Wed, Jul 02, 2025 at 05:13:45PM -0600, Jens Axboe wrote:
    My conslusion is that pktcdvd is eqaully broken for CD-RWs.

    Not surprising. Maybe we should take another stab at killing it
    from the kernel.

    Yes, please. I don't mind having this support, but it needs an
    active maintainer. And even if it was actively maintained it'd
    probably do better by being integrated into sr and the generic
    cdrom layer than this stacked design.

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Andy Shevchenko@1:229/2 to Jens Axboe on Tue Jul 8 13:50:01 2025
    XPost: linux.debian.bugs.dist
    From: andriy.shevchenko@intel.com

    On Wed, Jul 02, 2025 at 05:13:45PM -0600, Jens Axboe wrote:
    On 7/2/25 5:08 PM, Ben Hutchings wrote:
    On Sun, 2025-06-29 at 12:26 +0200, Uwe Kleine-König wrote:
    On Sun, Jun 29, 2025 at 11:46:00AM +0200, Roland Sommer wrote:

    Huh, how did I manage that (rhetorical question)? Thanks

    Ahh, now that makes sense. pktsetup calls `/sbin/modprobe pktcdvd`
    explicitly, the blacklist entry doesn't help for that. Without the
    kernel module renamed, does the 2nd DVD-RAM result in the blocking
    behaviour?

    Yes.

    OK, that makes sense. So udev does in this order:

    - auto-load the module (which is suppressed with the backlist entry)
    - call blkid (which blocks if the module is loaded)
    - call pktsetup (which loads the module even in presence of the
    blacklist entry).
    [...]

    I tested with a CD-RW, and the behaviour was slightly different:

    - Nothing automtically created a pktcdvd device, so blkid initially
    worked with a CD-RW inserted and the pktcdvd modules loaded.
    - After running pktsetup to create the block device /dev/pktcdvd/0,
    blkid and any other program attempting to open that device hung.

    My conslusion is that pktcdvd is eqaully broken for CD-RWs.

    Not surprising. Maybe we should take another stab at killing it
    from the kernel.

    In the commit 4b83e99ee709 ("Revert "pktcdvd: remove driver."") you wrote
    that we would wait for better user space solution is developed. Any news there?

    Just asking (I'm in favour to kill the old fart) as you haven't mentioned that in a new attempt.

    --
    With Best Regards,
    Andy Shevchenko

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)