From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264276AbUEDIyF (ORCPT ); Tue, 4 May 2004 04:54:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S264278AbUEDIyF (ORCPT ); Tue, 4 May 2004 04:54:05 -0400 Received: from ee.oulu.fi ([130.231.61.23]:51172 "EHLO ee.oulu.fi") by vger.kernel.org with ESMTP id S264276AbUEDIxb (ORCPT ); Tue, 4 May 2004 04:53:31 -0400 Date: Tue, 4 May 2004 11:53:30 +0300 (EEST) From: Tuukka Toivonen X-X-Sender: tuukkat@stekt37 To: linux-kernel@vger.kernel.org Subject: Re: bug: sleeping function called from invalid context at include/linux/rwsem.h:43 In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 3 May 2004, Tuukka Toivonen wrote: >I have dual PentiumIII, gcc 2.95.4 on Debian 3.0, linux 2.6.5. I open two The computer has ECC memory so I don't think it's memory error, especially since the error message seems to be same every time. >aterms and run > while true; do rmmod atkbd; done >in first and > while true; do modprobe atkbd; done >in the second. Works fine for a while, but then I got the following Oops: > >input: AT Translated Set 2 keyboard on isa0060/serio0 >input: AT Translated Set 2 keyboard on isa0060/serio0 >Debug: sleeping function called from invalid context at include/linux/rwsem.h:43 >in_atomic():0, irqs_disabled():1 >Call Trace: > [] __might_sleep+0xa3/0xb0 > [] do_page_fault+0x83/0x4ba > [] do_page_fault+0x0/0x4ba > [] kmem_cache_free+0x253/0x298 > [] __pte_chain_free+0x46/0x64 > [] __change_page_attr+0x22/0x1b4 > [] change_page_attr+0x6b/0xd0 I tried again, this time with the "rtc" module. So no, (as someone asked), it doesn't depend on atkbd module, and I can produce the same problem each time (although it takes maybe 30 seconds before the problem occurs). Real Time Clock Driver v1.12 Real Time Clock Driver v1.12 Debug: sleeping function called from invalid context at include/linux/rwsem.h:43 in_atomic():0, irqs_disabled():1 Call Trace: [] __might_sleep+0xa3/0xb0 [] do_page_fault+0x83/0x4ba [] do_page_fault+0x0/0x4ba [] dput+0x1f/0x37c [] link_path_walk+0x90b/0xac0 [] recalc_task_prio+0x140/0x150 [] schedule+0x5d7/0x710 [] error_code+0x2d/0x38 [] module_text_address+0x67/0x84 [] kernel_text_address+0x2f/0x3b [] store_stackinfo+0x61/0x88 [] kmem_cache_free+0x221/0x298 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] syscall_call+0x7/0xb Unable to handle kernel paging request at virtual address 00100100 printing eip: c013890b *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC CPU: 1 EIP: 0060:[] Not tainted EFLAGS: 00010007 (2.6.5) EIP is at module_text_address+0x67/0x84 eax: f88f0000 ebx: 00002124 ecx: 00000000 edx: 001000fc esi: 00000000 edi: 00000001 ebp: f6fa7f1c esp: f6fa7f10 ds: 007b es: 007b ss: 0068 Process devfsd (pid: 283, threadinfo=f6fa6000 task=f6fd3a30) Stack: e556b010 00000000 f6fa7f5c f6fa7f28 c0131a1b 00000000 f6fa7f44 c0141685 00000000 e4dc7e68 f7ffd788 e556b000 00000ff0 f6fa7f74 c0143c7d f7ffd788 e556b000 c01673db 00000000 e5b8df58 e556b000 00001000 c01673db c1af9f78 Call Trace: [] kernel_text_address+0x2f/0x3b [] store_stackinfo+0x61/0x88 [] kmem_cache_free+0x221/0x298 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] syscall_call+0x7/0xb Code: 8b 42 04 0f 18 00 90 8d 42 04 3d 98 5c 2c c0 75 b4 31 c0 5b <7>CLASS: registering class device: ID = 'rtc' class_hotplug - name = rtc Real Time Clock Driver v1.12 CLASS: Unregistering class device. ID = 'rtc' class_hotplug - name = rtc device class 'rtc': release. CLASS: registering class device: ID = 'rtc' class_hotplug - name = rtc Real Time Clock Driver v1.12 CLASS: Unregistering class device. ID = 'rtc' <...> I also ran ksymoops, although I'm not sure if this old version works very well. At least is disassembler the code. Also note that the Oops happens just after the first problem. ksymoops 2.4.5 on i686 2.6.5. Options used -V (default) -k /proc/ksyms (default) -l /proc/modules (default) -o /lib/modules/2.6.5/ (default) -m /mnt/powerzone/boot/vmlinuz-2.6.5.map (specified) Error (regular_file): read_ksyms stat /proc/ksyms failed No modules in ksyms, skipping objects No ksyms, skipping lsmod Call Trace: [] __might_sleep+0xa3/0xb0 [] do_page_fault+0x83/0x4ba [] do_page_fault+0x0/0x4ba [] dput+0x1f/0x37c [] link_path_walk+0x90b/0xac0 [] recalc_task_prio+0x140/0x150 [] schedule+0x5d7/0x710 [] error_code+0x2d/0x38 [] module_text_address+0x67/0x84 [] kernel_text_address+0x2f/0x3b [] store_stackinfo+0x61/0x88 [] kmem_cache_free+0x221/0x298 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] syscall_call+0x7/0xb Unable to handle kernel paging request at virtual address 00100100 c013890b *pde = 00000000 Oops: 0000 [#1] CPU: 1 EIP: 0060:[] Not tainted Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010007 (2.6.5) eax: f88f0000 ebx: 00002124 ecx: 00000000 edx: 001000fc esi: 00000000 edi: 00000001 ebp: f6fa7f1c esp: f6fa7f10 ds: 007b es: 007b ss: 0068 Stack: e556b010 00000000 f6fa7f5c f6fa7f28 c0131a1b 00000000 f6fa7f44 c0141685 00000000 e4dc7e68 f7ffd788 e556b000 00000ff0 f6fa7f74 c0143c7d f7ffd788 e556b000 c01673db 00000000 e5b8df58 e556b000 00001000 c01673db c1af9f78 Call Trace: [] kernel_text_address+0x2f/0x3b [] store_stackinfo+0x61/0x88 [] kmem_cache_free+0x221/0x298 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] sys_unlink+0xf7/0x148 [] syscall_call+0x7/0xb Code: 8b 42 04 0f 18 00 90 8d 42 04 3d 98 5c 2c c0 75 b4 31 c0 5b Trace; c011c48b <__might_sleep+a3/b0> Trace; c0116ccb Trace; c0116c48 Trace; c016e2f7 Trace; c0165a2b Trace; c0117fb8 Trace; c0119f17 Trace; c0107ed9 Trace; c013890b Trace; c0131a1b Trace; c0141685 Trace; c0143c7d Trace; c01673db Trace; c01673db Trace; c01673db Trace; c010746f >>EIP; c013890b <===== >>eax; f88f0000 <__crc_utf8_wctomb+5feef7/61ed76> >>ebx; 00002124 Before first symbol >>edx; 001000fc <__crc_do_rw_taskfile+366f1/825c6> >>ebp; f6fa7f1c <__crc_net_ratelimit+ebee1/181be3> >>esp; f6fa7f10 <__crc_net_ratelimit+ebed5/181be3> Trace; c0131a1b Trace; c0141685 Trace; c0143c7d Trace; c01673db Trace; c01673db Trace; c01673db Trace; c010746f Code; c013890b 00000000 <_EIP>: Code; c013890b <===== 0: 8b 42 04 mov 0x4(%edx),%eax <===== Code; c013890e 3: 0f 18 00 prefetchnta (%eax) Code; c0138911 6: 90 nop Code; c0138912 7: 8d 42 04 lea 0x4(%edx),%eax Code; c0138915 a: 3d 98 5c 2c c0 cmp $0xc02c5c98,%eax Code; c013891a f: 75 b4 jne ffffffc5 <_EIP+0xffffffc5> c01388d0 Code; c013891c 11: 31 c0 xor %eax,%eax Code; c013891e 13: 5b pop %ebx 1 error issued. Results may not be reliable.