You are not logged in.

#1 2023-03-10 18:28:36

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

kernel bug 6.2.3 in testing

I was testing kernel 6.2.3 and came across a regression that may impact others.    The problem I am about to describe did not occur with the kernel 6.2.2 as the current arch kernel in the repos.

With kerne. 6.2.3 if I simply plug in a usb external drive, mount it and umount it, then the journal has the following kernel Oops lines:

Mar 10 16:34:14 incus udisksd[713]: Successfully sent SCSI command START STOP UNIT to /dev/sda
Mar 10 16:34:14 incus plasmashell[948]: file:///usr/lib/qt/qml/org/kde/plasma/extras/ExpandableListItem.qml:291: TypeError: Cannot read property 'enabled' of null
Mar 10 16:34:14 incus kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Mar 10 16:34:14 incus kernel: sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
Mar 10 16:34:14 incus kernel: BUG: kernel NULL pointer dereference, address: 0000000000000028
Mar 10 16:34:14 incus kernel: #PF: supervisor read access in kernel mode
Mar 10 16:34:14 incus kernel: #PF: error_code(0x0000) - not-present page
Mar 10 16:34:14 incus kernel: PGD 0 P4D 0 
Mar 10 16:34:14 incus kernel: Oops: 0000 [#1] PREEMPT SMP NOPTI
Mar 10 16:34:14 incus kernel: CPU: 9 PID: 1745 Comm: pool-udisksd Tainted: G                T  6.2.3-1-stable #7
Mar 10 16:34:14 incus kernel: Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X300M-STX, BIOS P1.70 07/01/2021
Mar 10 16:34:14 incus kernel: RIP: 0010:blk_throtl_update_limit_valid+0x1f/0x110
Mar 10 16:34:14 incus kernel: Code: 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 41 54 49 89 fc 55 53 e8 ff ce b9 ff 49 8b 44 24 78 31 ff 48 8b 80 60 01 00 00 <48> 8b 70 28 e8 08 f5 be ff 48 89 c3 48 85 c0 0f 85 87 00 00 00 e9
Mar 10 16:34:14 incus kernel: RSP: 0018:ffffb6c18374ba30 EFLAGS: 00010046
Mar 10 16:34:14 incus kernel: RAX: 0000000000000000 RBX: ffff93bde807d000 RCX: 0000000000000000
Mar 10 16:34:14 incus kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Mar 10 16:34:14 incus kernel: RBP: ffffffff9332f648 R08: 0000000000000000 R09: 0000000000000000
Mar 10 16:34:14 incus kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff93bdc5372c00
Mar 10 16:34:14 incus kernel: R13: ffff93be3bf13da0 R14: ffff93be3bf13f08 R15: ffff93be3bf13e18
Mar 10 16:34:14 incus kernel: FS:  00007ff5889d86c0(0000) GS:ffff93c07e040000(0000) knlGS:0000000000000000
Mar 10 16:34:14 incus kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 10 16:34:14 incus kernel: CR2: 0000000000000028 CR3: 0000000118b52000 CR4: 0000000000350ee0
Mar 10 16:34:14 incus kernel: Call Trace:
Mar 10 16:34:14 incus kernel:  <TASK>
Mar 10 16:34:14 incus kernel:  throtl_pd_offline+0x40/0x70
Mar 10 16:34:14 incus kernel:  blkcg_deactivate_policy+0xae/0x140
Mar 10 16:34:14 incus kernel:  blk_throtl_exit+0x45/0x80
Mar 10 16:34:14 incus kernel:  disk_release+0x4a/0xf0
Mar 10 16:34:14 incus kernel:  device_release+0x37/0x90
Mar 10 16:34:14 incus kernel:  kobject_put+0x9a/0x1d0
Mar 10 16:34:14 incus kernel:  sd_remove+0x43/0x50
Mar 10 16:34:14 incus kernel:  device_release_driver_internal+0x1be/0x240
Mar 10 16:34:14 incus kernel:  bus_remove_device+0xdc/0x150
Mar 10 16:34:14 incus kernel:  device_del+0x195/0x420
Mar 10 16:34:14 incus kernel:  ? __pfx_ata_tdev_match+0x10/0x10
Mar 10 16:34:14 incus kernel:  ? attribute_container_device_trigger+0x7f/0x100
Mar 10 16:34:14 incus kernel:  __scsi_remove_device+0x12a/0x190
Mar 10 16:34:14 incus kernel:  scsi_forget_host+0x59/0x60
Mar 10 16:34:14 incus kernel:  scsi_remove_host+0x76/0x150
Mar 10 16:34:14 incus kernel:  uas_disconnect+0x90/0xb0 [uas]
Mar 10 16:34:14 incus kernel:  usb_unbind_interface+0x93/0x280
Mar 10 16:34:14 incus kernel:  ? up_write+0x36/0x70
Mar 10 16:34:14 incus kernel:  device_release_driver_internal+0x1be/0x240
Mar 10 16:34:14 incus kernel:  bus_remove_device+0xdc/0x150
Mar 10 16:34:14 incus kernel:  device_del+0x195/0x420
Mar 10 16:34:14 incus kernel:  ? kobject_put+0xac/0x1d0
Mar 10 16:34:14 incus kernel:  usb_disable_device+0xbb/0x1e0
Mar 10 16:34:14 incus kernel:  usb_set_configuration+0x84/0x9a0
Mar 10 16:34:14 incus kernel:  ? kernfs_fop_write_iter+0x18c/0x210
Mar 10 16:34:14 incus kernel:  remove_store+0x5c/0x90
Mar 10 16:34:14 incus kernel:  kernfs_fop_write_iter+0x12e/0x210
Mar 10 16:34:14 incus kernel:  vfs_write+0x269/0x430
Mar 10 16:34:14 incus kernel:  ksys_write+0x75/0x100
Mar 10 16:34:14 incus kernel:  do_syscall_64+0x5f/0x90
Mar 10 16:34:14 incus kernel:  entry_SYSCALL_64_after_hwframe+0x72/0xdc
Mar 10 16:34:14 incus kernel: RIP: 0033:0x7ff589c2ca0f
Mar 10 16:34:14 incus kernel: Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 19 b6 f8 ff 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 6c b6 f8 ff 48
Mar 10 16:34:14 incus kernel: RSP: 002b:00007ff5889d75a0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
Mar 10 16:34:14 incus kernel: RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007ff589c2ca0f
Mar 10 16:34:14 incus kernel: RDX: 0000000000000001 RSI: 00007ff57c017da0 RDI: 0000000000000010
Mar 10 16:34:14 incus kernel: RBP: 00007ff57c017da0 R08: 0000000000000000 R09: 00007ff57c003e00
Mar 10 16:34:14 incus kernel: R10: 00007ff57c018e00 R11: 0000000000000293 R12: 0000000000000001
Mar 10 16:34:14 incus kernel: R13: 00007ff57c003e00 R14: 0000000000000001 R15: 00007ff589d0ab20
Mar 10 16:34:14 incus kernel:  </TASK>
Mar 10 16:34:14 incus kernel: Modules linked in: uas usb_storage snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cfg80211 rfkill nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables libcrc32c nfnetlink amdgpu iommu_v2 drm_buddy gpu_sched snd_hda_codec_realtek drm_ttm_helper snd_hda_codec_generic ttm ledtrig_audio snd_hda_codec_hdmi drm_display_helper snd_hda_intel cec intel_rapl_msr intel_rapl_common snd_intel_dspcfg rc_core snd_intel_sdw_acpi edac_mce_amd snd_hda_codec drm_kms_helper r8169 snd_hda_core realtek kvm_amd agpgart mdio_devres snd_hwdep nls_iso8859_1 snd_pcm nls_cp437 of_mdio i2c_algo_bit syscopyarea vfat mousedev kvm snd_timer fixed_phy fat fwnode_mdio irqbypass sysfillrect rapl wmi_bmof i2c_piix4 onboard_usb_hub pcspkr snd k10temp sysimgblt libphy soundcore tpm_crb input_leds tpm_tis led_class tpm_tis_core acpi_cpufreq evdev mac_hid drm fuse loop dm_mod tpm ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 usbhid
Mar 10 16:34:14 incus kernel:  crct10dif_pclmul crc32_pclmul crc32c_intel video polyval_clmulni polyval_generic ghash_clmulni_intel xhci_pci sha512_ssse3 xhci_pci_renesas aesni_intel crypto_simd xhci_hcd ccp cryptd rng_core sp5100_tco wmi pkcs8_key_parser sg crypto_user
Mar 10 16:34:14 incus kernel: CR2: 0000000000000028
Mar 10 16:34:14 incus kernel: ---[ end trace 0000000000000000 ]---
Mar 10 16:34:14 incus kernel: RIP: 0010:blk_throtl_update_limit_valid+0x1f/0x110
Mar 10 16:34:14 incus kernel: Code: 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 41 54 49 89 fc 55 53 e8 ff ce b9 ff 49 8b 44 24 78 31 ff 48 8b 80 60 01 00 00 <48> 8b 70 28 e8 08 f5 be ff 48 89 c3 48 85 c0 0f 85 87 00 00 00 e9
Mar 10 16:34:14 incus kernel: RSP: 0018:ffffb6c18374ba30 EFLAGS: 00010046
Mar 10 16:34:14 incus kernel: RAX: 0000000000000000 RBX: ffff93bde807d000 RCX: 0000000000000000
Mar 10 16:34:14 incus kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Mar 10 16:34:14 incus kernel: RBP: ffffffff9332f648 R08: 0000000000000000 R09: 0000000000000000
Mar 10 16:34:14 incus kernel: R10: 0000000000000000 R11: 0000000000000000 R12: ffff93bdc5372c00
Mar 10 16:34:14 incus kernel: R13: ffff93be3bf13da0 R14: ffff93be3bf13f08 R15: ffff93be3bf13e18
Mar 10 16:34:14 incus kernel: FS:  00007ff5889d86c0(0000) GS:ffff93c07e040000(0000) knlGS:0000000000000000
Mar 10 16:34:14 incus kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 10 16:34:14 incus kernel: CR2: 0000000000000028 CR3: 0000000118b52000 CR4: 0000000000350ee0
Mar 10 16:34:14 incus kernel: note: pool-udisksd[1745] exited with irqs disabled
Mar 10 16:34:14 incus kernel: note: pool-udisksd[1745] exited with preempt_count 2

This occurred on three different machines, and looks like it is a regression with kernel 6.2.3 - though I have not seen a bug report yet.  I thought it was worth posting in case it bites any other arch user. Also once the Oops had happened then the machines hang on shutdown and need to be force powered down with the power button.


Mike C

Offline

#2 2023-03-10 19:38:05

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: kernel bug 6.2.3 in testing

Please try the kernel linked from https://bugs.archlinux.org/task/77811#comment216110

Offline

#3 2023-03-10 20:02:46

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: kernel bug 6.2.3 in testing

Reported at kernel bugzilla https://bugs.archlinux.org/task/77811


Mike C

Offline

#4 2023-03-10 20:10:59

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: kernel bug 6.2.3 in testing

loqs: I just tested your kernel as per the link from the arch bugs 77811 and my system still Oopses on umount of the usb drive. So that is not the solution for me.


Mike C

Offline

#5 2023-03-10 20:44:49

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: kernel bug 6.2.3 in testing

I just tested 6.2.3 built reverting commit

bfe46d2efe46c5c952f982e2ca94fe2ec5e58e2a

and the kernel Oops no longer occurs for me - so that resolves the issue I reported.

I have also tested a second build with two commits reverted as below, and this also
gives no Oops following usb umount.

So reverting both

bfe46d2efe46c5c952f982e2ca94fe2ec5e58e2a
57a425badc05c2e87e9f25713e5c3c0298e4202c

Has resolved the issue for me. I have added to the kernel bugzilla report.


Mike C

Offline

#6 2023-03-10 20:45:35

loqs
Member
Registered: 2014-03-06
Posts: 17,192

Re: kernel bug 6.2.3 in testing

You might want to add the author of https://git.kernel.org/pub/scm/linux/ke … 119bba39b9 to the upstream bug report
Edit:
I see upstream is already aware https://lore.kernel.org/all/ad021e89-c0 … kernel.dk/

Last edited by loqs (2023-03-10 20:55:12)

Offline

#7 2023-03-11 11:14:49

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: kernel bug 6.2.3 in testing

Greg K-H reverted the bad commits upstream after the discussion about this on LKML, and released 6.2.4 which fixes the issues for me.  Presumably 6.2.4 will get built for arch [testing] and should hopefully fix any related issues that others saw with 6.2.3.


Mike C

Offline

#8 2023-03-11 12:01:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: kernel bug 6.2.3 in testing

mcloaked wrote:

Presumably 6.2.4 will get built for arch [testing] and should hopefully fix any related issues that others saw with 6.2.3.

Upstream 6.2.4 is just 6.2.3 with the two commits reverted which is currently 6.2.3.arch2-1.  A bit confusing big_smile

https://github.com/archlinux/linux/comm … f6f9f62783

Last edited by graysky (2023-03-11 12:30:25)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2023-03-11 12:26:55

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,783
Website

Re: kernel bug 6.2.3 in testing

Mod note: moving to testing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Online

#10 2023-03-11 15:22:47

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,222

Re: kernel bug 6.2.3 in testing

6.2.5 is out too!


Mike C

Offline

Board footer

Powered by FluxBB