You are not logged in.

#1 2024-04-10 12:23:19

FireCulex
Member
Registered: 2024-04-10
Posts: 1

BUG: ata_scsi_dev_rescan - power related

Just did a fresh Arch install today and have only added tlp and NetworkManager

When plugging the power adapter back in or fdisk -l or mounting /dev/sda1 I get this -

Apr 10 11:56:27 Titan kernel: BUG: workqueue leaked lock or atomic: kworker/6:1/0x7fffffff/115
                                   last function: ata_scsi_dev_rescan
Apr 10 11:56:27 Titan kernel: CPU: 6 PID: 115 Comm: kworker/6:1 Not tainted 6.8.4-arch1-1 #1 7ea0d8fced45b5f098eb034690645970f116c34c
Apr 10 11:56:27 Titan kernel: Hardware name: ASUSTeK COMPUTER INC. X510UAR/X510UAR, BIOS X510UAR.308 03/13/2018
Apr 10 11:56:27 Titan kernel: Workqueue: events ata_scsi_dev_rescan
Apr 10 11:56:27 Titan kernel: Call Trace:
Apr 10 11:56:27 Titan kernel:  <TASK>
Apr 10 11:56:27 Titan kernel:  dump_stack_lvl+0x47/0x60
Apr 10 11:56:27 Titan kernel:  process_one_work+0x33b/0x350
Apr 10 11:56:27 Titan kernel:  worker_thread+0x30f/0x450
Apr 10 11:56:27 Titan kernel:  ? __pfx_worker_thread+0x10/0x10
Apr 10 11:56:27 Titan kernel:  kthread+0xe5/0x120
Apr 10 11:56:27 Titan kernel:  ? __pfx_kthread+0x10/0x10
Apr 10 11:56:27 Titan kernel:  ret_from_fork+0x31/0x50
Apr 10 11:56:27 Titan kernel:  ? __pfx_kthread+0x10/0x10
Apr 10 11:56:27 Titan kernel:  ret_from_fork_asm+0x1b/0x30
Apr 10 11:56:27 Titan kernel:  </TASK>
Apr 10 11:56:27 Titan kernel: BUG: scheduling while atomic: kworker/6:1/115/0x00000000
Apr 10 11:56:27 Titan kernel: Modules linked in: btusb uvcvideo btrtl videobuf2_vmalloc btintel uvc btbcm videobuf2_memops btmtk videobuf2_v4l2 vi>
Apr 10 11:56:27 Titan kernel:  spi_pxa2xx_platform snd_hwdep 8250_dw iTCO_wdt crypto_simd intel_rapl_common dw_dmac intel_pmc_bxt asus_nb_wmi vfat>
Apr 10 11:56:27 Titan kernel:  serio wmi
Apr 10 11:56:27 Titan kernel: CPU: 6 PID: 115 Comm: kworker/6:1 Not tainted 6.8.4-arch1-1 #1 7ea0d8fced45b5f098eb034690645970f116c34c
Apr 10 11:56:27 Titan kernel: Hardware name: ASUSTeK COMPUTER INC. X510UAR/X510UAR, BIOS X510UAR.308 03/13/2018
Apr 10 11:56:27 Titan kernel: Workqueue:  0x0 (events)
Apr 10 11:56:27 Titan kernel: Call Trace:
Apr 10 11:56:27 Titan kernel:  <TASK>
Apr 10 11:56:27 Titan kernel:  dump_stack_lvl+0x47/0x60
Apr 10 11:56:27 Titan kernel:  __schedule_bug+0x56/0x70
Apr 10 11:56:27 Titan kernel:  __schedule+0x10f0/0x1520
Apr 10 11:56:27 Titan kernel:  ? ret_from_fork_asm+0x1b/0x30
Apr 10 11:56:27 Titan kernel:  ? dump_stack_lvl+0x4c/0x60
Apr 10 11:56:27 Titan kernel:  schedule+0x32/0xd0
Apr 10 11:56:27 Titan kernel:  worker_thread+0x1b6/0x450
Apr 10 11:56:27 Titan kernel:  ? __pfx_worker_thread+0x10/0x10
Apr 10 11:56:27 Titan kernel:  kthread+0xe5/0x120
Apr 10 11:56:27 Titan kernel:  ? __pfx_kthread+0x10/0x10
Apr 10 11:56:27 Titan kernel:  ret_from_fork+0x31/0x50
Apr 10 11:56:27 Titan kernel:  ? __pfx_kthread+0x10/0x10
Apr 10 11:56:27 Titan kernel:  ret_from_fork_asm+0x1b/0x30
Apr 10 11:56:27 Titan kernel:  </TASK>
Apr 10 11:56:27 Titan kernel: ata1.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
Apr 10 11:56:27 Titan kernel: ata1.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
Apr 10 11:56:27 Titan kernel: ata1.00: configured for UDMA/100
Apr 10 11:56:27 Titan kernel: BUG: workqueue leaked lock or atomic: kworker/6:1/0x7fffffff/115
                                   last function: ata_scsi_dev_rescan
Apr 10 11:56:27 Titan kernel: CPU: 6 PID: 115 Comm: kworker/6:1 Tainted: G        W          6.8.4-arch1-1 #1 7ea0d8fced45b5f098eb034690645970f116>
Apr 10 11:56:27 Titan kernel: Hardware name: ASUSTeK COMPUTER INC. X510UAR/X510UAR, BIOS X510UAR.308 03/13/2018
Apr 10 11:56:27 Titan kernel: Workqueue: events ata_scsi_dev_rescan
Apr 10 11:56:27 Titan kernel: ata1.00: Entering active power mode

It will go on like this for thousands of lines potentially locking up the machine.

This happens at the end -

[  968.199598] sd 0:0:0:0: [sda] Starting disk
[  968.200159] sd 0:0:0:0: [sda] Starting disk
[  986.763572] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  986.764369] sd 0:0:0:0: [sda] Stopping disk

It's some power related issue. If I leave the laptop plugged in, reboot, theres no BUG.

Last edited by FireCulex (2024-04-10 12:35:05)

Offline

#2 2024-04-10 14:43:53

seth
Member
Registered: 2012-09-03
Posts: 51,655

Re: BUG: ata_scsi_dev_rescan - power related

Disable TLP, probably https://wiki.archlinux.org/title/Power_ … Management or https://wiki.archlinux.org/title/Power_ … Management related.
You'll have to adjust that in TLP, in case.

Offline

#3 2024-04-15 00:03:23

cal
Member
Registered: 2014-07-02
Posts: 3

Re: BUG: ata_scsi_dev_rescan - power related

I've had the same issue.  The last kernel that didn't exhibit this problem for me was linux-6.8.2.arch2-1-x86_64.

Disabling TLP had no effect.

Offline

#4 2024-04-15 07:03:56

seth
Member
Registered: 2012-09-03
Posts: 51,655

Re: BUG: ata_scsi_dev_rescan - power related

Do the cirmcumstances match the OP ("When plugging the power adapter back in or fdisk -l or mounting /dev/sda1 …  If I leave the laptop plugged in, reboot, theres no BUG)
Did you also try to disable ASPM and ALPM?

Was 6.8.3 affected?
Do you have comparative system journals?
The LTS kernel (still) works? ("To rule out HW decay, though had" the same issue suggest you *are* working around it?)

Offline

#5 2024-04-16 05:27:29

cal
Member
Registered: 2014-07-02
Posts: 3

Re: BUG: ata_scsi_dev_rescan - power related

Yes, the circumstances are identical.  Though, I will mention, at least for me, it doesn't happen every time I plug in the adapter or run `fdisk -l`.  But those are the triggers for the error.  If memory serves, the `fdisk` command hasn't caused any crashes; plugging in the adapter has caused crashes, but again, not every time.

I could not figure out a way to disable ASPM.  I tried kernel parameters and manually writing to the appropriate sysfs file.  Neither worked.  However, with TLP and ALPM disabled, the issue persisted.

I started noticing this problem after I upgraded from linux-6.8.2.arch2-1-x86_64.  I tested the following kernels, all of which were exhibiting the same problem.
- linux-6.8.3.arch1-1-x86_64
- linux-6.8.4.arch1-1-x86_64
- linux-6.8.5.arch1-1-x86_64

When I went back to linux-6.8.2.arch2-1-x86_64, the problem seemed to go away.  However, I'm now starting to think that was a fluke.  As you suggested, I tried testing the LTS kernel and was able to trigger the error.  So I'm beginning to wonder if one of my drives is going bad.

Anyway, thanks for the suggestions.  I'm going to keep testing and I'll follow up if I find anything conclusive.

Offline

#6 2024-04-16 06:42:19

seth
Member
Registered: 2012-09-03
Posts: 51,655

Re: BUG: ata_scsi_dev_rescan - power related

I could not figure out a way to disable ASPM

Adding "pcie_aspm=off" to the https://wiki.archlinux.org/title/Kernel_parameters will disable ASPM globally

Unless either of you is also https://forum.manjaro.org/t/kernel-6-6- … can/159542 this is probably not your HW, https://lkml.org/lkml/2024/4/4/1184 but lkml.org is in the 500's right now so I can't tell whether that's plausible, but from the manjaro thread this regression would have been backported into the LTS kernels as well and 6.6.24 should fine?

Offline

#7 2024-04-16 08:41:58

jonwilts
Member
Registered: 2024-04-16
Posts: 1

Re: BUG: ata_scsi_dev_rescan - power related

Just to add: I'm getting the same error. Been on battery power for the last 3 hours and during that period I've had this occur 73 times. Doesn't freeze my laptop, just filling up the logs.

Linux air 6.8.5-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 11 Apr 2024 01:47:18 +0000 x86_64 GNU/Linux

Error first occurred after updating to this kernel.

Typical error looks like:

Apr 16 04:31:22 air kernel: sd 0:0:0:0: [sda] Synchronizing SCSI cache
Apr 16 04:31:22 air kernel: sd 0:0:0:0: [sda] Stopping disk
Apr 16 04:31:26 air kernel: ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
Apr 16 04:31:26 air kernel: ata1.00: unexpected _GTF length (8)
Apr 16 04:31:26 air kernel: BUG: workqueue leaked lock or atomic: kworker/0:2/0x7fffffff/45601
                                 last function: ata_scsi_dev_rescan
Apr 16 04:31:26 air kernel: CPU: 0 PID: 45601 Comm: kworker/0:2 Tainted: P     U  W  OE      6.8.5-zen1-1-zen #1 207c9ae3bb639ae0704879862d22fec509d25e0e
Apr 16 04:31:26 air kernel: Hardware name: Apple Inc. MacBookAir7,2/Mac-937CB26E2E02BB01, BIOS 476.0.0.0.0 09/06/2022
Apr 16 04:31:26 air kernel: Workqueue: events ata_scsi_dev_rescan
Apr 16 04:31:26 air kernel: Call Trace:
Apr 16 04:31:26 air kernel:  <TASK>
Apr 16 04:31:26 air kernel:  dump_stack_lvl+0x47/0x60
Apr 16 04:31:26 air kernel:  process_one_work+0x307/0x340
Apr 16 04:31:26 air kernel:  worker_thread+0x301/0x490
Apr 16 04:31:26 air kernel:  ? __pfx_worker_thread+0x10/0x10
Apr 16 04:31:26 air kernel:  kthread+0xe8/0x120
Apr 16 04:31:26 air kernel:  ? __pfx_kthread+0x10/0x10
Apr 16 04:31:26 air kernel:  ret_from_fork+0x34/0x50
Apr 16 04:31:26 air kernel:  ? __pfx_kthread+0x10/0x10
Apr 16 04:31:26 air kernel:  ret_from_fork_asm+0x1b/0x30
Apr 16 04:31:26 air kernel:  </TASK>
Apr 16 04:31:26 air kernel: BUG: scheduling while atomic: kworker/0:2/45601/0x00000000
Apr 16 04:31:26 air kernel: Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device ip6t_REJECT nf_reject_ipv6 ipt_REJECT nf_reject_ipv4 x>
Apr 16 04:31:26 air kernel:  intel_cstate cfg80211 mei_hdcp mei_pxp iTCO_vendor_support spi_intel applesmc snd_hda_codec intel_uncore thunderbolt snd_hda_cor>
Apr 16 04:31:26 air kernel: CPU: 0 PID: 45601 Comm: kworker/0:2 Tainted: P     U  W  OE      6.8.5-zen1-1-zen #1 207c9ae3bb639ae0704879862d22fec509d25e0e
Apr 16 04:31:26 air kernel: Hardware name: Apple Inc. MacBookAir7,2/Mac-937CB26E2E02BB01, BIOS 476.0.0.0.0 09/06/2022
Apr 16 04:31:26 air kernel: Workqueue:  0x0 (events)
Apr 16 04:31:26 air kernel: Call Trace:
Apr 16 04:31:26 air kernel:  <TASK>
Apr 16 04:31:26 air kernel:  dump_stack_lvl+0x47/0x60
Apr 16 04:31:26 air kernel:  __schedule_bug+0x56/0x70
Apr 16 04:31:26 air kernel:  __schedule+0x1479/0x19a0
Apr 16 04:31:26 air kernel:  ? dump_stack_lvl+0x57/0x60
Apr 16 04:31:26 air kernel:  ? dump_stack_lvl+0x4c/0x60
Apr 16 04:31:26 air kernel:  schedule+0x32/0xd0
Apr 16 04:31:26 air kernel:  worker_thread+0x1a4/0x490
Apr 16 04:31:26 air kernel:  ? __pfx_worker_thread+0x10/0x10
Apr 16 04:31:26 air kernel:  kthread+0xe8/0x120
Apr 16 04:31:26 air kernel:  ? __pfx_kthread+0x10/0x10
Apr 16 04:31:26 air kernel:  ret_from_fork+0x34/0x50
Apr 16 04:31:26 air kernel:  ? __pfx_kthread+0x10/0x10
Apr 16 04:31:26 air kernel:  ret_from_fork_asm+0x1b/0x30
Apr 16 04:31:26 air kernel:  </TASK>
Apr 16 04:31:26 air kernel: ata1.00: unexpected _GTF length (8)
Apr 16 04:31:26 air kernel: ata1.00: configured for UDMA/133
Apr 16 04:31:26 air kernel: sd 0:0:0:0: [sda] Starting disk
Apr 16 04:31:26 air kernel: sd 0:0:0:0: [sda] Starting disk
Apr 16 04:31:26 air kernel: sd 0:0:0:0: [sda] Starting disk

ok

Offline

#8 2024-04-20 02:26:36

cal
Member
Registered: 2014-07-02
Posts: 3

Re: BUG: ata_scsi_dev_rescan - power related

Just to follow up with some anecdotal evidence... I reinstalled linux-6.8.2.arch2-1-x86_64 and have been running on it for the past four days without any of these errors.

It seems the problem was introduced in linux-6.8.3.arch1-1-x86_64 and back-ported to the LTS kernel.

Offline

Board footer

Powered by FluxBB