Kernel bugs out with packet writing on DVD RW, system remains unable to shutdown cleanly and needs power cycling

Bug #1953166 reported by Sergio Callegari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-meta-hwe-5.11 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,
trying to use packet writing on a DVD RW media with ubuntu 20.04 I see a kernel bug.

This is what I am doing:

1) Preparing a dvdrw with the udf filesystem with mkudffs --media-type=dvdrw --spartable=2 /dev/pktcdvd/pktcdvd0 after having erased it with growisofs -Z /dev/sr0=/dev/zero.

2) Mouting the filesystem

3) Trying to write some files on it

I see the writeback cache getting dirty and then staying dirty forever, while the kernel says

 ------------[ cut here ]------------
[ 1738.892880] kernel BUG at drivers/block/pktcdvd.c:2411!
[ 1738.892894] invalid opcode: 0000 [#1] SMP NOPTI
[ 1738.892902] CPU: 0 PID: 8493 Comm: kworker/u16:5 Tainted: G OE 5.11.0-41-generic #45~20.04.1-Ubuntu
[ 1738.892909] Hardware name: SCHENKER SCHENKER_SLIM14_SSL14L19/N141CU , BIOS 1.07.04RTR1 10/02/2019
[ 1738.892913] Workqueue: writeback wb_workfn (flush-252:0)
[ 1738.892927] RIP: 0010:pkt_submit_bio+0x39d/0x4b0 [pktcdvd]
[ 1738.892939] Code: 41 3b 45 40 7c 0b 41 83 7d 44 01 0f 84 cd 00 00 00 4c 89 ff c6 07 00 0f 1f 40 00 4c 89 e7 c6 07 00 0f 1f 40 00 e9 08 ff ff ff <0f> 0b 0f 0b 4c 89 c8 31 c9 e9 96 fe ff ff 48 c7 c2 e0 17 44 c1 be
[ 1738.892945] RSP: 0018:ffffb84c43bd3728 EFLAGS: 00010283
[ 1738.892950] RAX: 00000000000017a8 RBX: ffff97508f66f800 RCX: 00000000000017a7
[ 1738.892955] RDX: 0000000000001980 RSI: 00000000000017c0 RDI: 0000000000000040
[ 1738.892958] RBP: ffffb84c43bd37a0 R08: 0000000000000200 R09: ffffffffffffffc0
[ 1738.892962] R10: 0000000000001780 R11: 0000000000000000 R12: ffff974fd2412800
[ 1738.892966] R13: 00000000ffffffff R14: ffff97513f5f2800 R15: ffff9751584f9f50
[ 1738.892970] FS: 0000000000000000(0000) GS:ffff975330600000(0000) knlGS:0000000000000000
[ 1738.892975] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1738.892979] CR2: 00000000039f9000 CR3: 00000003dfe10005 CR4: 00000000003726f0
[ 1738.892984] Call Trace:
[ 1738.892987] ? ktime_get+0x3e/0xa0
[ 1738.892997] ? blk_queue_enter+0x18d/0x240
[ 1738.893005] ? submit_bio_checks+0x1d0/0x5d0
[ 1738.893011] ? mempool_alloc_slab+0x17/0x20
[ 1738.893017] ? mempool_alloc+0x64/0x180
[ 1738.893023] submit_bio_noacct+0x112/0x4f0
[ 1738.893030] submit_bio+0x51/0x1a0
[ 1738.893036] ? bio_add_page+0x3b/0x90
[ 1738.893045] __mpage_writepage+0x7fe/0x8f0
[ 1738.893052] ? find_get_pages_range_tag+0x26c/0x300
[ 1738.893057] ? __mod_memcg_lruvec_state+0x25/0xe0
[ 1738.893063] ? clear_page_dirty_for_io+0xdb/0x1b0
[ 1738.893071] write_cache_pages+0x190/0x430
[ 1738.893078] ? clean_buffers+0x70/0x70
[ 1738.893085] ? udf_block_map+0xf0/0xf0 [udf]
[ 1738.893099] mpage_writepages+0x77/0x100
[ 1738.893104] ? udf_block_map+0xf0/0xf0 [udf]
[ 1738.893114] ? udf_time_to_disk_stamp+0x52/0x140 [udf]
[ 1738.893129] udf_writepages+0x15/0x20 [udf]
[ 1738.893140] do_writepages+0x43/0xd0
[ 1738.893147] ? udf_update_inode+0x36f/0x830 [udf]
[ 1738.893158] __writeback_single_inode+0x44/0x2b0
[ 1738.893165] writeback_sb_inodes+0x22d/0x4c0
[ 1738.893173] __writeback_inodes_wb+0x56/0xf0
[ 1738.893179] wb_writeback+0x1ea/0x2a0
[ 1738.893186] wb_workfn+0x31b/0x490
[ 1738.893193] ? __update_idle_core+0x9b/0xb0
[ 1738.893201] process_one_work+0x220/0x3c0
[ 1738.893207] worker_thread+0x4d/0x3f0
[ 1738.893212] ? process_one_work+0x3c0/0x3c0
[ 1738.893217] kthread+0x12b/0x150
[ 1738.893224] ? set_kthread_struct+0x40/0x40
[ 1738.893231] ret_from_fork+0x1f/0x30
[ 1738.893242] Modules linked in: udf crc_itu_t pktcdvd usb_storage hid_generic hidp hid ccm vhost_vsock vmw_vsock_virtio_transport_common vhost vhost_iotlb vsock rfcomm cmac algif_hash algif_skcipher af_alg vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) bnep binfmt_misc snd_hda_codec_hdmi snd_sof_pci snd_sof_intel_hda_common snd_sof_intel_hda snd_hda_codec_realtek snd_sof_intel_byt snd_sof_intel_ipc snd_hda_codec_generic snd_sof snd_sof_xtensa_dsp snd_soc_hdac_hda snd_hda_ext_core snd_soc_acpi_intel_match snd_soc_acpi ledtrig_audio snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec snd_hda_core snd_hwdep soundwire_bus snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_pcm snd_seq_midi snd_seq_midi_event intel_rapl_msr mei_hdcp snd_rawmidi nls_iso8859_1 intel_rapl_common x86_pkg_temp_thermal intel_powerclamp iwlmvm coretemp snd_seq snd_seq_device uvcvideo kvm_intel mac80211 videobuf2_vmalloc btusb videobuf2_memops kvm btrtl btbcm
[ 1738.893354] videobuf2_v4l2 btintel libarc4 snd_timer videobuf2_common rapl intel_cstate bluetooth input_leds videodev snd joydev iwlwifi serio_raw mc efi_pstore cfg80211 intel_wmi_thunderbolt ecdh_generic ecc soundcore mei_me intel_pch_thermal mei intel_hid sparse_keymap acpi_pad mac_hid nf_log_ipv6 ip6t_REJECT nf_reject_ipv6 xt_hl ip6t_rt nf_log_ipv4 nf_log_common ipt_REJECT nf_reject_ipv4 xt_LOG xt_comment xt_recent xt_multiport xt_limit xt_addrtype xt_tcpudp xt_conntrack sch_fq_codel nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 msr ip6table_filter ip6_tables parport_pc ppdev iptable_filter lp bpfilter parport ip_tables x_tables autofs4 btrfs blake2b_generic xor raid6_pq libcrc32c i915 rtsx_pci_sdmmc i2c_algo_bit drm_kms_helper crct10dif_pclmul crc32_pclmul ghash_clmulni_intel syscopyarea sysfillrect sysimgblt aesni_intel fb_sys_fops cec rc_core crypto_simd cryptd glue_helper rtsx_pci drm i2c_i801 r8169 nvme xhci_pci ahci psmouse nvme_core thunderbolt i2c_smbus realtek libahci
[ 1738.893491] xhci_pci_renesas wmi video
[ 1738.893502] ---[ end trace e573976dd1a434bb ]---
[ 1739.697063] RIP: 0010:pkt_submit_bio+0x39d/0x4b0 [pktcdvd]
[ 1739.697073] Code: 41 3b 45 40 7c 0b 41 83 7d 44 01 0f 84 cd 00 00 00 4c 89 ff c6 07 00 0f 1f 40 00 4c 89 e7 c6 07 00 0f 1f 40 00 e9 08 ff ff ff <0f> 0b 0f 0b 4c 89 c8 31 c9 e9 96 fe ff ff 48 c7 c2 e0 17 44 c1 be
[ 1739.697075] RSP: 0018:ffffb84c43bd3728 EFLAGS: 00010283
[ 1739.697078] RAX: 00000000000017a8 RBX: ffff97508f66f800 RCX: 00000000000017a7
[ 1739.697079] RDX: 0000000000001980 RSI: 00000000000017c0 RDI: 0000000000000040
[ 1739.697080] RBP: ffffb84c43bd37a0 R08: 0000000000000200 R09: ffffffffffffffc0
[ 1739.697082] R10: 0000000000001780 R11: 0000000000000000 R12: ffff974fd2412800
[ 1739.697083] R13: 00000000ffffffff R14: ffff97513f5f2800 R15: ffff9751584f9f50
[ 1739.697084] FS: 0000000000000000(0000) GS:ffff975330600000(0000) knlGS:0000000000000000
[ 1739.697086] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1739.697087] CR2: 00000000039f9000 CR3: 0000000188e7e001 CR4: 00000000003726f0

At this point the system appears to be working, but it cannot do a clean shut down and must be power cycled.

There may be a (partial) responsibility from the filesystem created by the udftoos or the media (I have crossposted pali at https://github.com/pali/udftools via the bug tracker for an opinion). Still the kernel should definitely not bug out in this way.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-generic-hwe-20.04 5.11.0.41.45~20.04.19
ProcVersionSignature: Ubuntu 5.11.0-41.45~20.04.1-generic 5.11.22
Uname: Linux 5.11.0-41-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
Date: Fri Dec 3 15:01:00 2021
EcryptfsInUse: Yes
InstallationDate: Installed on 2020-02-16 (656 days ago)
InstallationMedia: Kubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: linux-meta-hwe-5.11
UpgradeStatus: Upgraded to focal on 2020-05-23 (559 days ago)

Revision history for this message
Sergio Callegari (callegar) wrote :
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.