Description of problem: Resuming from a suspend I get the following in /var/log/messages. All appears to function OK, however. Aug 6 11:01:32 localhost kernel: Intel machine check architecture supported. Aug 6 11:01:32 localhost kernel: Intel machine check reporting enabled on CPU#0. Aug 6 11:01:32 localhost kernel: BUG: sleeping function called from invalid context at kernel/rwsem.c:20 Aug 6 11:01:32 localhost kernel: in_atomic():0, irqs_disabled():1 Aug 6 11:01:32 localhost kernel: [<c04051ee>] show_trace_log_lvl+0x58/0x159 Aug 6 11:01:32 localhost kernel: [<c04057ea>] show_trace+0xd/0x10 Aug 6 11:01:32 localhost kernel: [<c0405903>] dump_stack+0x19/0x1b Aug 6 11:01:32 localhost kernel: [<c041de6b>] __might_sleep+0x8d/0x95 Aug 6 11:01:32 localhost kernel: [<c0438ff8>] down_read+0x15/0x40 Aug 6 11:01:32 localhost kernel: [<c0430f3c>] blocking_notifier_call_chain+0x11/0x2d Aug 6 11:01:32 localhost kernel: [<c05a9237>] cpufreq_resume+0xf9/0x117 Aug 6 11:01:32 localhost kernel: [<c055271d>] __sysdev_resume+0x23/0x57 Aug 6 11:01:32 localhost kernel: [<c0552886>] sysdev_resume+0x19/0x4b Aug 6 11:01:32 localhost kernel: [<c0556ed2>] device_power_up+0x8/0xf Aug 6 11:01:32 localhost kernel: [<c0444cc7>] suspend_enter+0x3f/0x5e Aug 6 11:01:32 localhost kernel: [<c0444e3c>] enter_state+0x156/0x1b7 Aug 6 11:01:32 localhost kernel: [<c0444f23>] state_store+0x86/0x9c Aug 6 11:01:32 localhost kernel: [<c04a9e2c>] subsys_attr_store+0x20/0x25 Aug 6 11:01:32 localhost kernel: [<c04a9f30>] sysfs_write_file+0xab/0xd1 Aug 6 11:01:32 localhost kernel: [<c04731d3>] vfs_write+0xab/0x157 Aug 6 11:01:32 localhost kernel: [<c0473818>] sys_write+0x3b/0x60 Aug 6 11:01:32 localhost kernel: [<c0403faf>] syscall_call+0x7/0xb Aug 6 11:01:32 localhost kernel: DWARF2 unwinder stuck at syscall_call+0x7/0xb Aug 6 11:01:32 localhost kernel: Leftover inexact backtrace: Aug 6 11:01:32 localhost kernel: [<c04057ea>] show_trace+0xd/0x10 Aug 6 11:01:32 localhost kernel: [<c0405903>] dump_stack+0x19/0x1b Aug 6 11:01:32 localhost kernel: [<c041de6b>] __might_sleep+0x8d/0x95 Aug 6 11:01:32 localhost kernel: [<c0438ff8>] down_read+0x15/0x40 Aug 6 11:01:32 localhost kernel: [<c0430f3c>] blocking_notifier_call_chain+0x11/0x2d Aug 6 11:01:32 localhost named[2524]: D-BUS: dhclient for interface eth0 released lease - removing forwarders. Aug 6 11:01:32 localhost kernel: [<c05a9237>] cpufreq_resume+0xf9/0x117 Aug 6 11:01:32 localhost kernel: [<c055271d>] __sysdev_resume+0x23/0x57 Aug 6 11:01:32 localhost kernel: [<c0552886>] sysdev_resume+0x19/0x4b Aug 6 11:01:32 localhost kernel: [<c0556ed2>] device_power_up+0x8/0xf Aug 6 11:01:32 localhost kernel: [<c0444cc7>] suspend_enter+0x3f/0x5e Aug 6 11:01:32 localhost kernel: [<c0444e3c>] enter_state+0x156/0x1b7 Aug 6 11:01:32 localhost kernel: [<c0444f23>] state_store+0x86/0x9c Aug 6 11:01:32 localhost kernel: [<c04a9e2c>] subsys_attr_store+0x20/0x25 Aug 6 11:01:32 localhost kernel: [<c04a9f30>] sysfs_write_file+0xab/0xd1 Aug 6 11:01:32 localhost kernel: [<c04731d3>] vfs_write+0xab/0x157 Aug 6 11:01:32 localhost kernel: [<c0473818>] sys_write+0x3b/0x60 Aug 6 11:01:32 localhost kernel: [<c0403faf>] syscall_call+0x7/0xb Aug 6 11:01:32 localhost kernel: PCI: Enabling device 0000:00:1d.0 (0000 -> 0001) Aug 6 11:01:32 localhost kernel: ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 16 (level, low) -> IRQ 177 <<<<< SNIP >>>>> Aug 6 11:01:32 localhost kernel: tg3: eth0: Link is up at 100 Mbps, full duplex. Aug 6 11:01:32 localhost kernel: tg3: eth0: Flow control is on for TX and on for RX. Aug 6 11:01:32 localhost kernel: BUG: sleeping function called from invalid context at kernel/sched.c:4474 Aug 6 11:01:32 localhost kernel: in_atomic():0, irqs_disabled():1 Aug 6 11:01:32 localhost kernel: [<c04051ee>] show_trace_log_lvl+0x58/0x159 Aug 6 11:01:32 localhost kernel: [<c04057ea>] show_trace+0xd/0x10 Aug 6 11:01:32 localhost kernel: [<c0405903>] dump_stack+0x19/0x1b Aug 6 11:01:32 localhost kernel: [<c041de6b>] __might_sleep+0x8d/0x95 Aug 6 11:01:32 localhost kernel: [<c041fc9f>] __cond_resched+0x12/0x3c Aug 6 11:01:32 localhost kernel: [<c060d43b>] cond_resched+0x2a/0x31 Aug 6 11:01:32 localhost kernel: [<c060da86>] console_conditional_schedule+0x11/0x13 Aug 6 11:01:32 localhost kernel: [<c050186f>] fbcon_redraw+0xdf/0x13d Aug 6 11:01:32 localhost kernel: [<c050341c>] fbcon_scroll+0x5d1/0xb2f Aug 6 11:01:32 localhost kernel: [<c053c4d9>] scrup+0x56/0xb7 Aug 6 11:01:32 localhost kernel: [<c053c555>] lf+0x1b/0x3b Aug 6 11:01:32 localhost kernel: [<c053f778>] vt_console_print+0x142/0x208 Aug 6 11:01:32 localhost kernel: [<c042455e>] __call_console_drivers+0x5a/0x67 Aug 6 11:01:32 localhost kernel: [<c04245b9>] _call_console_drivers+0x4e/0x52 Aug 6 11:01:32 localhost kernel: [<c0424772>] release_console_sem+0x119/0x1eb Aug 6 11:01:32 localhost kernel: [<c0424856>] resume_console+0x12/0x14 Aug 6 11:01:32 localhost kernel: [<c0444e52>] enter_state+0x16c/0x1b7 Aug 6 11:01:32 localhost kernel: [<c0444f23>] state_store+0x86/0x9c Aug 6 11:01:32 localhost kernel: [<c04a9e2c>] subsys_attr_store+0x20/0x25 Aug 6 11:01:32 localhost kernel: [<c04a9f30>] sysfs_write_file+0xab/0xd1 Aug 6 11:01:32 localhost kernel: [<c04731d3>] vfs_write+0xab/0x157 Aug 6 11:01:32 localhost kernel: [<c0473818>] sys_write+0x3b/0x60 Aug 6 11:01:32 localhost kernel: [<c0403faf>] syscall_call+0x7/0xb Aug 6 11:01:32 localhost kernel: DWARF2 unwinder stuck at syscall_call+0x7/0xb Aug 6 11:01:32 localhost kernel: Leftover inexact backtrace: Aug 6 11:01:32 localhost kernel: [<c04057ea>] show_trace+0xd/0x10 Aug 6 11:01:32 localhost kernel: [<c0405903>] dump_stack+0x19/0x1b Aug 6 11:01:32 localhost kernel: [<c041de6b>] __might_sleep+0x8d/0x95 Aug 6 11:01:32 localhost kernel: [<c041fc9f>] __cond_resched+0x12/0x3c Aug 6 11:01:32 localhost kernel: [<c060d43b>] cond_resched+0x2a/0x31 Aug 6 11:01:32 localhost kernel: [<c060da86>] console_conditional_schedule+0x11/0x13 Aug 6 11:01:32 localhost kernel: [<c050186f>] fbcon_redraw+0xdf/0x13d Aug 6 11:01:32 localhost kernel: [<c050341c>] fbcon_scroll+0x5d1/0xb2f Aug 6 11:01:32 localhost kernel: [<c053c4d9>] scrup+0x56/0xb7 Aug 6 11:01:32 localhost kernel: [<c053c555>] lf+0x1b/0x3b Aug 6 11:01:32 localhost kernel: [<c053f778>] vt_console_print+0x142/0x208 Aug 6 11:01:32 localhost kernel: [<c042455e>] __call_console_drivers+0x5a/0x67 Aug 6 11:01:32 localhost kernel: [<c04245b9>] _call_console_drivers+0x4e/0x52 Aug 6 11:01:32 localhost kernel: [<c0424772>] release_console_sem+0x119/0x1eb Aug 6 11:01:32 localhost kernel: [<c0424856>] resume_console+0x12/0x14 Aug 6 11:01:32 localhost kernel: [<c0444e52>] enter_state+0x16c/0x1b7 Aug 6 11:01:32 localhost kernel: [<c0444f23>] state_store+0x86/0x9c Aug 6 11:01:32 localhost kernel: [<c04a9e2c>] subsys_attr_store+0x20/0x25 Aug 6 11:01:32 localhost kernel: [<c04a9f30>] sysfs_write_file+0xab/0xd1 Aug 6 11:01:32 localhost kernel: [<c04731d3>] vfs_write+0xab/0x157 Aug 6 11:01:32 localhost kernel: [<c0473818>] sys_write+0x3b/0x60 Aug 6 11:01:32 localhost kernel: [<c0403faf>] syscall_call+0x7/0xb Aug 6 11:01:32 localhost kernel: Restarting tasks...<6>usb 3-2: USB disconnect, address 7 Aug 6 11:01:32 localhost avahi-daemon[2448]: Withdrawing address record for 192.168.1.102 on eth0. Version-Release number of selected component (if applicable): kernel-2.6.17-1.2527.fc6 How reproducible: Haven't tested. Steps to Reproduce: 1. Suspend 2. Resume 3. Actual results: Expected results: Additional info:
From the comments cpufreq_resume() is called with interrupts off so it shouldn't be calling blocking_notifier_call_chain(). This is the commit that introduced the bug. http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e041c683412d5bf44dc2b109053e3b837b71742d
I sent Alan Stern an email with this bugzilla.
Alan Stern says that the bug is caused by cpufreq and there is a fix in the -mm kernel.
Continue to get the rwsem.c:20 incident with kernel-2.6.17-1.2548.fc6 Aug 13 09:21:45 localhost kernel: Intel machine check architecture supported. Aug 13 09:21:45 localhost kernel: Intel machine check reporting enabled on CPU#0. Aug 13 09:21:45 localhost kernel: BUG: sleeping function called from invalid context at kernel/rwsem.c:20 Aug 13 09:21:45 localhost kernel: in_atomic():0, irqs_disabled():1 Aug 13 09:21:45 localhost kernel: [<c04051ee>] show_trace_log_lvl+0x58/0x159 Not sure about timing of -mm stuff....
i also see this with 2.6.17-1.2611.fc6
Still there in 2.6.17-1.2647.fc6, but I think the patch for this has gone into Linus' tree for 2.6.18.
I see this on 2.6.17-1.3001.fc5 when resuming from S3 suspend. This is Dave Jones' test kernel, based on 2.6.18rc7git2. Sony Vaio FS640W, Intel 915GM/GMS/910GML. Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. Back to C! BUG: sleeping function called from invalid context at kernel/rwsem.c:20 in_atomic():0, irqs_disabled():1 [<c0403f8e>] show_trace_log_lvl+0x58/0x171 [<c040456d>] show_trace+0xd/0x10 [<c040460a>] dump_stack+0x19/0x1b [<c0417a28>] __might_sleep+0x8d/0x95 [<c042ec6c>] down_read+0x15/0x3f [<c0427392>] blocking_notifier_call_chain+0x11/0x2d [<c0597b8b>] cpufreq_resume+0xf5/0x11d [<c05413f9>] __sysdev_resume+0x23/0x57 [<c0541560>] sysdev_resume+0x19/0x4b [<c0545a7c>] device_power_up+0x8/0xf [<c0439d17>] suspend_enter+0x3f/0x5e [<c0439e93>] enter_state+0x15d/0x190 [<c0439f4c>] state_store+0x86/0x9c [<c049aa9c>] subsys_attr_store+0x20/0x25 [<c049ab9f>] sysfs_write_file+0xaa/0xcf [<c0464cad>] vfs_write+0xab/0x157 [<c04651e4>] sys_write+0x3b/0x60 [<c0402dbf>] syscall_call+0x7/0xb DWARF2 unwinder stuck at syscall_call+0x7/0xb Leftover inexact backtrace: [<c040456d>] show_trace+0xd/0x10 [<c040460a>] dump_stack+0x19/0x1b [<c0417a28>] __might_sleep+0x8d/0x95 [<c042ec6c>] down_read+0x15/0x3f [<c0427392>] blocking_notifier_call_chain+0x11/0x2d [<c0597b8b>] cpufreq_resume+0xf5/0x11d [<c05413f9>] __sysdev_resume+0x23/0x57 [<c0541560>] sysdev_resume+0x19/0x4b [<c0545a7c>] device_power_up+0x8/0xf [<c0439d17>] suspend_enter+0x3f/0x5e [<c0439e93>] enter_state+0x15d/0x190 [<c0439f4c>] state_store+0x86/0x9c [<c049aa9c>] subsys_attr_store+0x20/0x25 [<c049ab9f>] sysfs_write_file+0xaa/0xcf [<c0464cad>] vfs_write+0xab/0x157 [<c04651e4>] sys_write+0x3b/0x60 [<c0402dbf>] syscall_call+0x7/0xb PM: Finishing wakeup. acpi acpi: resuming agpgart-intel 0000:00:00.0: resuming pci 0000:00:02.0: resuming pci 0000:00:02.1: resuming PM: Writing back config space on device 0000:00:02.1 at offset 4 (was 0, writing 52000000) HDA Intel 0000:00:1b.0: resuming PM: Writing back config space on device 0000:00:1b.0 at offset 1 (was 100006, writing 100002) ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 16 (level, low) -> IRQ 169
I'm seeing a similar Bug with 2.6.18-1 2200 when resuming from suspend to disk. 2.6.16 hat suspend working, 2.6.17 brike it completely. Now it seem to work fine expect for trace below. swsusp: Need to copy 112010 pages Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. CPU0: Intel P4/Xeon Extended MCE MSRs (12) available CPU0: Thermal LVT vector (0xf0) already installed swsusp: Restoring Highmem BUG: sleeping function called from invalid context at kernel/rwsem.c:20 in_atomic():0, irqs_disabled():1 [<c0403f10>] dump_trace+0x69/0x1af [<c040406e>] show_trace_log_lvl+0x18/0x2c [<c04045e9>] show_trace+0xf/0x11 [<c0404673>] dump_stack+0x15/0x17 [<c042ef78>] down_read+0x12/0x1f [<c0427923>] blocking_notifier_call_chain+0xe/0x29 [<c05970df>] cpufreq_resume+0x118/0x13f [<c053f3d4>] __sysdev_resume+0x20/0x53 [<c053f515>] sysdev_resume+0x16/0x47 [<c05435a1>] device_power_up+0x5/0xa [<c0437299>] swsusp_suspend+0x74/0x90 [<c0437720>] pm_suspend_disk+0x43/0xc9 [<c04368bc>] enter_state+0x52/0x14f [<c0436a3e>] state_store+0x85/0x99 [<c04969ea>] subsys_attr_store+0x1e/0x22 [<c0496adc>] sysfs_write_file+0xa6/0xcc [<c0461292>] vfs_write+0xa8/0x159 [<c04617d8>] sys_write+0x41/0x67 [<c0402d9b>] syscall_call+0x7/0xb DWARF2 unwinder stuck at syscall_call+0x7/0xb
kernel 2.6.18-1.2849.fc6 (i686) has exactly same behavior when resuming from suspend through gnome-power-manager 2.16.0. Machine is IBM Thinkpad T42, Pentium-M 1.8GHz, ATI RV350 (Mobility Radeon 9600 M10) graphics card and Intel wireless network card (supported by ipw2200 driver). After resume screen is left blank, although everything else works, including wireless connection. dmesg shows: [quote] Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. Back to C! BUG: sleeping function called from invalid context at kernel/rwsem.c:20 in_atomic():0, irqs_disabled():1 [<c04051db>] dump_trace+0x69/0x1af [<c0405339>] show_trace_log_lvl+0x18/0x2c [<c04058ed>] show_trace+0xf/0x11 [<c04059ea>] dump_stack+0x15/0x17 [<c04394a2>] down_read+0x12/0x20 [<c0431601>] blocking_notifier_call_chain+0xe/0x29 [<c05a9d68>] cpufreq_resume+0x118/0x135 [<c0551998>] __sysdev_resume+0x20/0x53 [<c0551adb>] sysdev_resume+0x16/0x47 [<c0555cbf>] device_power_up+0x5/0xa [<c0441959>] suspend_enter+0x3b/0x44 [<c0441a88>] enter_state+0x126/0x176 [<c0441b5d>] state_store+0x85/0x99 [<c04a63ae>] subsys_attr_store+0x1e/0x22 [<c04a64a1>] sysfs_write_file+0xa7/0xce [<c046fa71>] vfs_write+0xa8/0x159 [<c047009e>] sys_write+0x41/0x67 [<c0404013>] syscall_call+0x7/0xb DWARF2 unwinder stuck at syscall_call+0x7/0xb Leftover inexact backtrace: ======================= [unquote] Alex
This bug has been fixed for me. I have 2.6.18-1.2849.fc6 installed. Suspend to RAM and suspend to disk wake up successfully without this error. (Sony Vaio VGN-FS640/W)
Tried again today with same IBM Thinkpad T42, same kernel 2.6.18-1.2849.fc6 (i686). No more stack dumps in dmesg, but exactly same behavior - screen left blank while everything else works. Another change is that Linux does not try to suspend when I am closing the lid (while it did) and logs this fact: Dec 15 09:29:09 bozy-nb gnome-power-manager: (root) DPMS blanking screen because the lid has been closed on ac power Dec 15 09:29:32 bozy-nb gnome-power-manager: (root) Turning LCD panel back on because laptop lid re-opened must be an ATI card then. When resuming, following logged to dmesg (note, ATI VGA card is device 01:00.0): Dec 6 15:22:09 bozy-nb kernel: agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0. Dec 6 15:22:09 bozy-nb kernel: agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode Dec 6 15:22:09 bozy-nb kernel: agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode Dec 6 15:22:10 bozy-nb kernel: [drm] Setting GART location based on new memory map Dec 6 15:22:10 bozy-nb kernel: [drm] Loading R300 Microcode Dec 6 15:22:10 bozy-nb kernel: [drm] writeback test succeeded in 2 usecs Does it 'see' two video adapters? Alex
*** Bug 215156 has been marked as a duplicate of this bug. ***
*** Bug 211590 has been marked as a duplicate of this bug. ***
Alex, can you please open a separate bug (if it's not already reported) for your issue. Closing this as it has been reported as fixed in the current release.
Looks like this bug isn't really fixed. I got it on every resume-from-disk on a laptop - please reopen this bug. because all duplicates are already closed, too. Version-Release number of selected component (if applicable): kernel-2.6.21-1.3228.fc7 grub.conf: kernel /boot/vmlinuz-2.6.21-1.3228.fc7 ro root=LABEL=/ vga=0x317 pci=usepirqmask,noacpi noapic irqpoll 5 (PCI and APIC options are required for non-suddenly-jumping-external-mouse support) agpgart-via 0000:00:00.0: EARLY resume BUG: sleeping function called from invalid context at kernel/rwsem.c:20 in_atomic():0, irqs_disabled():1 [<c0439f26>] down_read+0x12/0x28 [<c04f05ad>] pci_get_subsys+0x71/0xf3 [<c052259c>] acpi_pci_link_get_current+0x69/0xc9 [<c051f6e6>] acpi_bus_get_status+0x32/0x8a [<c04f0645>] pci_get_device+0x16/0x19 [<c04eed1b>] quirk_vialatency+0x18/0xcd [<c04ee602>] pci_fixup_device+0x6d/0x78 [<c04efd3d>] pci_device_resume_early+0x14/0x2a [<c055665f>] dpm_power_up+0x93/0xc4 [<c044595b>] swsusp_suspend+0x4d/0x54 [<c0445ffe>] pm_suspend_disk+0x101/0x21f [<c0444e2e>] enter_state+0x4d/0x1c8 [<c044502e>] state_store+0x85/0x99 [<c0444fa9>] state_store+0x0/0x99 [<c04ab9e6>] subsys_attr_store+0x1e/0x22 [<c04abb0a>] sysfs_write_file+0xbd/0xe7 [<c04aba4d>] sysfs_write_file+0x0/0xe7 [<c0475c97>] vfs_write+0xa8/0x154 [<c04762a6>] sys_write+0x41/0x67 [<c0404f70>] syscall_call+0x7/0xb ======================= Applying VIA southbridge workaround. Additional info: $ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 8 model name : mobile AMD Athlon(tm) XP-M 1800+ stepping : 0 cpu MHz : 800.056 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow up ts fid vid bogomips : 1600.82 clflush size : 32
Peter, your issue isn't cpufreq related and is therefore a different issue. Please open a new bug for it.