Bug 990955 - ath9k_htc - BUG: scheduling while atomic: swapper/0/0/0x10000300
ath9k_htc - BUG: scheduling while atomic: swapper/0/0/0x10000300
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Stanislaw Gruszka
Fedora Extras Quality Assurance
abrt_hash:54071e29e8d7cb1eb3b75d74ed2...
:
: 966249 1005534 (view as bug list)
Depends On:
Blocks: 1058716
  Show dependency treegraph
 
Reported: 2013-08-01 05:31 EDT by Osvaldo Marques Junior
Modified: 2014-03-26 10:29 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1058716 (view as bug list)
Environment:
Last Closed: 2014-03-26 10:29:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: dmesg (73.22 KB, text/plain)
2013-08-01 05:32 EDT, Osvaldo Marques Junior
no flags Details
kernel stack trace from journalctl (513.71 KB, text/x-log)
2014-01-26 18:02 EST, Christian Stadelmann
no flags Details

  None (edit)
Description Osvaldo Marques Junior 2013-08-01 05:31:26 EDT
Additional info:
reporter:       libreport-2.1.5
BUG: scheduling while atomic: swapper/0/0/0x10000300
Modules linked in: bnep bluetooth nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_nat nf_nat_ipv6 ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat nf_nat_ipv4 nf_nat iptable_mangle nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_filter ebtables ip6table_filter ip6_tables arc4 ath9k_htc snd_hda_codec_via ath9k_common ath9k_hw ath snd_hda_intel snd_hda_codec acpi_cpufreq snd_hwdep mperf snd_seq snd_seq_device snd_pcm mac80211 kvm_amd cfg80211 kvm snd_page_alloc rfkill ppdev k10temp snd_timer snd soundcore edac_core edac_mce_amd forcedeth i2c_nforce2 microcode parport_pc parport binfmt_misc uinput nouveau mxm_wmi wmi video i2c_algo_bit drm_kms_helper ttm ata_generic drm i2c_core pata_acpi sata_nv pata_amd
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.3-300.fc19.x86_64 #1
Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./N68-S3 FX, BIOS P1.20 06/04/2012
 ffff88012fc141c0 ffff88012fc03b30 ffffffff81643216 ffff88012fc03b40
 ffffffff8163f5f7 ffff88012fc03ba0 ffffffff8164783b ffffffff81c01fd8
 00000000000141c0 ffffffff81c01fd8 00000000000141c0 ffffffff81c13440
Call Trace:
 <IRQ>  [<ffffffff81643216>] dump_stack+0x19/0x1b
 [<ffffffff8163f5f7>] __schedule_bug+0x4d/0x5b
 [<ffffffff8164783b>] __schedule+0x73b/0x740
 [<ffffffff8108e1e6>] __cond_resched+0x26/0x30
 [<ffffffff81647c2a>] _cond_resched+0x3a/0x50
 [<ffffffff81646312>] mutex_lock+0x12/0x30
 [<ffffffffa04b8d4c>] ath9k_htc_sta_rc_update+0x3c/0xb0 [ath9k_htc]
 [<ffffffff81077e6b>] ? __queue_work+0x12b/0x310
 [<ffffffff81460b43>] ? __usb_unanchor_urb+0x23/0x70
 [<ffffffffa0381c6a>] rate_control_rate_update+0x10a/0x14e [mac80211]
 [<ffffffffa034effb>] ieee80211_rx_handlers+0x1c5b/0x20c0 [mac80211]
 [<ffffffff8116e2f7>] ? dma_pool_free+0xa7/0xd0
 [<ffffffff8108e0c5>] ? check_preempt_curr+0x75/0xa0
 [<ffffffffa034f8b4>] ieee80211_prepare_and_rx_handle+0x454/0xa80 [mac80211]
 [<ffffffffa03501cd>] ieee80211_rx+0x2ed/0x850 [mac80211]
 [<ffffffffa04b77dd>] ath9k_rx_tasklet+0x36d/0x610 [ath9k_htc]
 [<ffffffff810647ee>] tasklet_action+0x6e/0x110
 [<ffffffff81064987>] __do_softirq+0xf7/0x240
 [<ffffffff81064c65>] irq_exit+0xb5/0xc0
 [<ffffffff816534d6>] do_IRQ+0x56/0xc0
 [<ffffffff8164952d>] common_interrupt+0x6d/0x6d
 <EOI>  [<ffffffff810b468b>] ? tick_nohz_idle_exit+0x13b/0x1a0
 [<ffffffff810b46b5>] ? tick_nohz_idle_exit+0x165/0x1a0
 [<ffffffff810aa525>] cpu_startup_entry+0x235/0x280
 [<ffffffff8162d3c7>] rest_init+0x77/0x80
 [<ffffffff81d0bedc>] start_kernel+0x40a/0x416
 [<ffffffff81d0b8db>] ? repair_env_string+0x5c/0x5c
 [<ffffffff81d0b120>] ? early_idt_handlers+0x120/0x120
 [<ffffffff81d0b5da>] x86_64_start_reservations+0x2a/0x2c
 [<ffffffff81d0b6cf>] x86_64_start_kernel+0xf3/0x100
Comment 1 Osvaldo Marques Junior 2013-08-01 05:32:20 EDT
Created attachment 781501 [details]
File: dmesg
Comment 2 Stanislaw Gruszka 2013-08-02 05:37:54 EDT
rate_control_rate_update() -> drv_sta_rc_update() is called on atomic context on few places in mac80211, whereas drivers (ath9k_htc, wl18xx) that implement ->sta_rc_update callback use mutexes on that callback. Not sure how and where (on mac80211 or drivers) this issue should be fixed. Maybe add workqueue to perform ->sta_rc_update on process context ? Cc Sujith and Johannes ...
Comment 3 Johannes Berg 2013-08-02 06:27:02 EDT
Driver bug - it has always been documented that sta_rc_update must be atomic - from the original commit:

+ * @sta_rc_update: Notifies the driver of changes to the bitrates that can be
+ *     used to transmit to the station. The changes are advertised with bits
+ *     from &enum ieee80211_rate_control_changed and the values are reflected
+ *     in the station data. This callback should only be used when the driver
+ *     uses hardware rate control (%IEEE80211_HW_HAS_RATE_CONTROL) since
+ *     otherwise the rate control algorithm is notified directly.
+ *     Must be atomic.


I don't think adding a workqueue is a good idea because that would significantly delay the calls in many situations.
Comment 4 Josh Boyer 2013-09-09 08:57:59 EDT
*** Bug 966249 has been marked as a duplicate of this bug. ***
Comment 5 Josh Boyer 2013-09-09 08:58:08 EDT
*** Bug 1005534 has been marked as a duplicate of this bug. ***
Comment 6 Josh Boyer 2013-09-18 16:25:13 EDT
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 19 kernel bugs.

Fedora 19 has now been rebased to 3.11.1-200.fc19.  Please test this kernel update and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.
Comment 7 Stanislaw Gruszka 2013-09-18 17:09:52 EDT
This apparently is not fixed.
Comment 8 Andrew Walker 2013-09-19 05:20:25 EDT
Confirmed - Bug still exists in latest kernel 3.11.1-200.fc19.i686

Sheesh! What a joke... after yum update now GDM woouldn't come up. Luckily the driver obliged by oops'ing while I was staring at the console screen.

[  318.978925] BUG: scheduling while atomic: swapper/1/0/0x10000300
[  318.979896] Modules linked in: 8021q fcoe garp libfcoe stp mrp libfc llc scsi_transport_fc scsi_tgt nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6table_nat nf_nat_ipv6 ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 iptable_nat nf_nat_ipv4 nf_nat iptable_mangle nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ebtable_filter ebtables ip6table_filter ip6_tables vboxpci(OF) vboxnetadp(OF) vboxnetflt(OF) vboxdrv(OF) hwmon_vid snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_hwdep arc4 snd_seq ath9k_htc snd_seq_device snd_pcm ath9k_common ath9k_hw snd_page_alloc powernow_k8 ath snd_timer snd soundcore kvm_amd ppdev mac80211 cfg80211 rfkill nv_tco kvm serio_raw parport_pc parport forcedeth i2c_nforce2 i2c_core asus_atk0110 mperf xfs libcrc32c uinput binfmt_misc
[  319.107611]  ata_generic pata_acpi sata_nv pata_amd ecryptfs encrypted_keys trusted tpm tpm_bios
[  319.130707] CPU: 1 PID: 0 Comm: swapper/1 Tainted: GF        C O 3.11.1-200.fc19.i686 #1
[  319.140884] Hardware name: System manufacturer System Product Name/M2N-E, BIOS ASUS M2N-E ACPI BIOS Revision 1701 10/30/2008
[  319.151034]  00000000 00000000 f50c7b90 c0978fa9 00000001 f50c7ba8 c097633e c0b0c8f4
[  319.161209]  f50a2dec 00000000 10000300 f50c7c24 c097d5b0 f50c7bf0 c046fe8b f73cf940
[  319.171268]  c0d0a940 00000000 85aac367 c0d0a940 f73cf940 f50a2bc0 0000014d 00000000
[  319.181260] Call Trace:
[  319.191039]  [<c0978fa9>] dump_stack+0x41/0x52
[  319.200821]  [<c097633e>] __schedule_bug+0x52/0x60
[  319.210583]  [<c097d5b0>] __schedule+0x6e0/0x6f0
[  319.220269]  [<c046fe8b>] ? update_rq_clock.part.78+0x1b/0x2a0
[  319.230015]  [<c0470fa5>] ? check_preempt_curr+0x65/0x90
[  319.239763]  [<c0470fe8>] ? ttwu_do_wakeup+0x18/0x100
[  319.249313]  [<c04710eb>] __cond_resched+0x1b/0x30
[  319.258715]  [<c097d906>] _cond_resched+0x26/0x30
[  319.268197]  [<c097bdc0>] mutex_lock+0x10/0x28
[  319.277673]  [<f82a43ed>] ath9k_htc_sta_rc_update+0x2d/0x90 [ath9k_htc]
[  319.287094]  [<c0472ebf>] ? wake_up_process+0x1f/0x40
[  319.296356]  [<c045bd1e>] ? wake_up_worker+0x1e/0x30
[  319.305492]  [<c045c5ce>] ? insert_work+0x4e/0x80
[  319.314530]  [<c045c6f7>] ? __queue_work+0xf7/0x2a0
[  319.323544]  [<f82a43c0>] ? ath9k_htc_conf_tx+0x100/0x100 [ath9k_htc]
[  319.332572]  [<f8040e53>] rate_control_rate_update+0xff/0x138 [mac80211]
[  319.341481]  [<c04767ed>] ? __enqueue_entity+0x6d/0x80
[  319.350245]  [<c04700d0>] ? update_rq_clock.part.78+0x260/0x2a0
[  319.358918]  [<f8012b7e>] ieee80211_rx_handlers+0x1a5e/0x1e90 [mac80211]
[  319.367588]  [<c047c8c5>] ? update_sd_lb_stats+0xc5/0x450
[  319.376253]  [<f80133c3>] ieee80211_prepare_and_rx_handle+0x413/0xa50 [mac80211]
[  319.384961]  [<f8013cab>] ieee80211_rx+0x2ab/0x7a0 [mac80211]
[  319.393513]  [<f82a2f36>] ath9k_rx_tasklet+0x336/0x600 [ath9k_htc]
[  319.401906]  [<c046942f>] ? raw_notifier_call_chain+0x1f/0x30
[  319.410183]  [<c044c2a5>] tasklet_action+0x55/0xe0
[  319.418376]  [<c044c6e9>] __do_softirq+0xc9/0x1e0
[  319.426578]  [<c047543d>] ? sched_clock_idle_wakeup_event+0x1d/0x20
[  319.434725]  [<c044c965>] irq_exit+0x95/0xa0
[  319.442701]  [<c0404515>] do_IRQ+0x45/0xb0
[  319.450499]  [<c0986773>] common_interrupt+0x33/0x38
[  319.458176]  [<c04387e5>] ? native_safe_halt+0x5/0x10
[  319.465780]  [<c0409dcc>] default_idle+0x1c/0xa0
[  319.473344]  [<c0409e8a>] amd_e400_idle+0x3a/0xe0
[  319.480735]  [<c040a516>] arch_cpu_idle+0x26/0x30
[  319.487880]  [<c049083b>] cpu_startup_entry+0x9b/0x200
[  319.494837]  [<c042d33b>] ? setup_APIC_timer+0xab/0x130
[  319.501628]  [<c042bba8>] start_secondary+0x208/0x2d0
Comment 9 Andrew Walker 2013-09-19 05:24:21 EDT
Oh, btw, while this bug report was created on 01-Aug-2013, I've had this bug since 22-May-2013 (Bug #966249).
Comment 10 Andrew Walker 2013-10-27 23:34:35 EDT
I just updated to 3.11.6-200.fc19.i686 a few days ago and so far I have not seen the problem occur under this kernel. Here's hoping...
Comment 11 Stanislaw Gruszka 2013-11-04 05:05:02 EST
This bug is not fixed for sure, just it is not easy to hit it.
Comment 12 Christian Stadelmann 2014-01-26 18:02:56 EST
Created attachment 855836 [details]
kernel stack trace from journalctl

I got this error too, but my hardware didn't change for quite some time. I have problems with the ath9k driver (and hardware) for quite some time (see https://bugzilla.kernel.org/show_bug.cgi?id=61111 ). I don't think I ever ran into this bug before. The only special thing I did today before this happened was trying to suspend (1) and to hibernate (2) Fedora. This bug happened after awaking from that.
Comment 13 Stanislaw Gruszka 2014-01-28 07:18:31 EST
I posted patch which partially fix this bug (for most commonly used station mode). It was already reviewed by Oleksij.

http://marc.info/?l=linux-wireless&m=139089679607090&w=2

Josh, please apply it as fix for this bug. For remaining issues (IBSS & mesh modes) I will clone this bug report.
Comment 14 Josh Boyer 2014-01-28 10:10:15 EST
Added in Fedora git.  Thanks!
Comment 15 Chris Kennedy 2014-03-26 09:25:22 EDT

I've experienced this bug twice in the last week on two different Dell R720's running Fedora 20 w/ 3.13.5-200.fc20.x86_64:

Mar 25 18:16:01 mdct-04pi kernel: BUG: scheduling while atomic: python/11974/0x00010000
Mar 25 18:16:01 mdct-04pi kernel: Modules linked in: binfmt_misc ipmi_devintf iTCO_wdt iTCO_vendor_support gpio_ich dcdbas x86_pkg_temp_thermal coretemp kvm_intel kvm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel microcode sb_edac edac_core ipmi_si ipmi_
Mar 25 18:16:01 mdct-04pi kernel: CPU: 0 PID: 11974 Comm: python Not tainted 3.13.5-200.fc20.x86_64 #1
Mar 25 18:16:01 mdct-04pi kernel: Hardware name: Dell Inc. PowerEdge R720/0X3D66, BIOS 2.1.3 11/20/2013
Mar 25 18:16:01 mdct-04pi kernel:  ffff88080fa14580 ffff88080fa03c08 ffffffff81686fdc ffff881002fbcda0
Mar 25 18:16:01 mdct-04pi kernel:  ffff88080fa03c18 ffffffff81683452 ffff88080fa03c78 ffffffff8168a980
Mar 25 18:16:01 mdct-04pi kernel:  ffff881002fbcda0 ffff880a585d5fd8 0000000000014580 0000000000014580
Mar 25 18:16:01 mdct-04pi kernel: Call Trace:
Mar 25 18:16:01 mdct-04pi kernel:  <IRQ>  [<ffffffff81686fdc>] dump_stack+0x45/0x56
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff81683452>] __schedule_bug+0x4c/0x5a
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff8168a980>] __schedule+0x730/0x740
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff8168a9b9>] schedule+0x29/0x70
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff8168d1f5>] rwsem_down_read_failed+0xe5/0x120
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813216e4>] call_rwsem_down_read_failed+0x14/0x30
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff8168cae0>] ? down_read+0x20/0x30
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813dc800>] n_tty_receive_buf2+0x40/0xd0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff810a2668>] ? __enqueue_entity+0x78/0x80
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813df4a5>] flush_to_ldisc+0xd5/0x120
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813df539>] tty_flip_buffer_push+0x49/0x50
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813f9ce4>] serial8250_rx_chars+0xc4/0x1f0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813f9e74>] serial8250_handle_irq.part.14+0x64/0xa0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813f9ef7>] serial8250_default_handle_irq+0x27/0x30
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813f8eeb>] serial8250_interrupt+0x5b/0xe0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff810c10fe>] handle_irq_event_percpu+0x3e/0x1d0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff810c12c7>] handle_irq_event+0x37/0x60
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff810c3c6f>] handle_edge_irq+0x6f/0x120
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff8101560f>] handle_irq+0xbf/0x150
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff81072927>] ? irq_enter+0x47/0x80
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff816981cd>] do_IRQ+0x4d/0xc0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff8168dead>] common_interrupt+0x6d/0x6d
Mar 25 18:16:01 mdct-04pi kernel:  <EOI>  [<ffffffff813d9050>] ? n_tty_chars_in_buffer+0xa0/0xa0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff810b29c6>] ? up_write+0x6/0x20
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813d90a8>] ? n_tty_ioctl+0x58/0x110
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff813d8314>] tty_ioctl+0x6d4/0xb60
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff8109e370>] ? wake_up_state+0x20/0x20
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff811cb6d8>] do_vfs_ioctl+0x2d8/0x4a0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff811b898e>] ? vfs_read+0xee/0x160
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff811cb921>] SyS_ioctl+0x81/0xa0
Mar 25 18:16:01 mdct-04pi kernel:  [<ffffffff81695fa9>] system_call_fastpath+0x16/0x1b
Comment 16 Stanislaw Gruszka 2014-03-26 10:29:03 EDT
Chris, you hit different issue (tty related), please open a separate bug report.

Note You need to log in before you can comment on or make changes to this bug.