My environment is kernel-2.6.20-rc6,elfutils-0.124,systemtap--20070217. When I executed the tests on ppc64 system,I got the below error in dmesg. But system didn't crashed and tests are still running. But these messages are getting generated frequently,making the system less responsive. ========================================================================= BUG: sleeping function called from invalid context at /home/systemtap/tmp/stap_testing_200702191409/install/share/systemtap/runtime/string.c:78 in_atomic():0, irqs_disabled():1 Call Trace: [C0000000010EF680] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C0000000010EF720] [C0000000000614F0] .__might_sleep+0xec/0x108 [C0000000010EF7A0] [D0000000008917A0] ._stp_text_str+0x330/0x340 [stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919] [C0000000010EF850] [D000000000893AB0] .probe_1674+0x19c/0x1c0 [stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919] [C0000000010EF8E0] [D000000000893088] .enter_begin_probe+0x134/0x24c [stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919] [C0000000010EF970] [D000000000895DC0] .systemtap_module_init+0x160/0x250 [stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919] [C0000000010EFA20] [D000000000895EC0] .probe_start+0x10/0x2c [stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919] [C0000000010EFAA0] [D000000000895F4C] ._stp_handle_start+0x70/0x10c [stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919] [C0000000010EFBB0] [D0000000008961E8] ._stp_proc_write_cmd+0x200/0x984 [stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919] [C0000000010EFCF0] [C0000000000E5778] .vfs_write+0x120/0x208 [C0000000010EFD90] [C0000000000E61F8] .sys_write+0x4c/0x8c [C0000000010EFE30] [C0000000000086B4] syscall_exit+0x0/0x40 stap_f9e8bc0d73a7a5a7d310b3fb828e2e4b_3919: systemtap: 0.5.13, base: d000000000890000, memory: 48756+32832+22208+2103296+666489 data+text+ctx+io+glob, probes: 12 stap_be9ef545e9a11360e6bfd9c4aaebdb2e_3839: systemtap: 0.5.13, base: d000000000890000, memory: 48892+32824+22208+2103296+666489 data+text+ctx+io+glob, probes: 12 stap_f27f7719b34a104b4fa789db5d6f0abb_127631: systemtap: 0.5.13, base: d000000000930000, memory: 325044+34768+22208+2103296+666455 data+text+ctx+io+glob, probes: 951 stap_09cfd6b65e8d6bce0560504dedf60e17_875: systemtap: 0.5.13, base: d000000000890000, memory: 47212+29856+83648+2103296+666178 data+text+ctx+io+glob, probes: 1 stap_1009213fa0e29127b4e711b5f84f88ad_877: systemtap: 0.5.13, base: d000000000890000, memory: 44940+29032+17088+2103296+666177 data+text+ctx+io+glob, probes: 1 stap_d7092c2a7bdc5f0b07d1a4d263215e01_1327: systemtap: 0.5.13, base: d000000000890000, memory: 51324+32816+115008+2103296+666177 data+text+ctx+io+glob, probes: 1 stap_5e614b993b60fcbc273c6b4c80153f79_1336: systemtap: 0.5.13, base: d000000000890000, memory: 54708+34480+42688+2103296+666177 data+text+ctx+io+glob, probes: 1 stap_bededda0bf09215ade9700a615bb7e15_2879: systemtap: 0.5.13, base: d0000000008a0000, memory: 69468+44528+53568+2103296+666215 data+text+ctx+io+glob, probes: 1 stap_0102a0dbdef607096dd166d6332e9dcf_1588: systemtap: 0.5.13, base: d000000000890000, memory: 52044+33680+92608+2103296+666179 data+text+ctx+io+glob, probes: 1 [root@llm27lp1 ~]# BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C000000046FB3540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C000000046FB35E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C000000046FB3660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000046FB3770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000046FB3800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C000000046FB3890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C000000046FB3940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C000000046FB39D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C000000046FB3AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C000000046FB3D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C000000046FB3E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C000000039403540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C0000000394035E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C000000039403660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000039403770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000039403800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C000000039403890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C000000039403940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C0000000394039D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C000000039403AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C000000039403D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C000000039403E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000002B683540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000002B6835E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000002B683660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000002B683770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000002B683800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000002B683890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000002B683940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000002B6839D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000002B683AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000002B683D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000002B683E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000000FC73540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000000FC735E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000000FC73660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000FC73770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000FC73800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000000FC73890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000000FC73940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000000FC739D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000000FC73AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000000FC73D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000000FC73E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000002DE6B540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000002DE6B5E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000002DE6B660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000002DE6B770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000002DE6B800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000002DE6B890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000002DE6B940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000002DE6B9D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000002DE6BAA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000002DE6BD90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000002DE6BE30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000003E953540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000003E9535E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000003E953660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000003E953770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000003E953800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000003E953890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000003E953940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000003E9539D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000003E953AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000003E953D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000003E953E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C000000036A43540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C000000036A435E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C000000036A43660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000036A43770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000036A43800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C000000036A43890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C000000036A43940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C000000036A439D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C000000036A43AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C000000036A43D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C000000036A43E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C000000007637540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C0000000076375E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C000000007637660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000007637770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C000000007637800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C000000007637890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C000000007637940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C0000000076379D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C000000007637AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C000000007637D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C000000007637E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000003A2BB540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000003A2BB5E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000003A2BB660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000003A2BB770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000003A2BB800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000003A2BB890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000003A2BB940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000003A2BB9D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000003A2BBAA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000003A2BBD90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000003A2BBE30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000000A3FF540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000000A3FF5E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000000A3FF660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000A3FF770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000A3FF800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000000A3FF890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000000A3FF940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000000A3FF9D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000000A3FFAA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000000A3FFD90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000000A3FFE30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000000FC43540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000000FC435E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000000FC43660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000FC43770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000FC43800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000000FC43890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000000FC43940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000000FC439D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000000FC43AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000000FC43D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000000FC43E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C0000000010EF540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C0000000010EF5E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C0000000010EF660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C0000000010EF770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C0000000010EF800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C0000000010EF890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C0000000010EF940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C0000000010EF9D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C0000000010EFAA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C0000000010EFD90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C0000000010EFE30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000000FC87540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000000FC875E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000000FC87660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000FC87770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000000FC87800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000000FC87890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000000FC87940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000000FC879D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000000FC87AA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000000FC87D90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000000FC87E30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000003DF9B540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000003DF9B5E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000003DF9B660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000003DF9B770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000003DF9B800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000003DF9B890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000003DF9B940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000003DF9B9D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000003DF9BAA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000003DF9BD90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000003DF9BE30] [C0000000000086B4] syscall_exit+0x0/0x40 BUG: sleeping function called from invalid context at /tmp/stapTeqtXw/stap_786f531764228440af952c37c19aeeaa_267654.c:17306 in_atomic():0, irqs_disabled():1 Call Trace: [C00000004366B540] [C00000000000FEBC] .show_stack+0x68/0x1b0 (unreliable) [C00000004366B5E0] [C0000000000614F0] .__might_sleep+0xec/0x108 [C00000004366B660] [D000000000B5BCA8] .probe_1818+0x65c/0xc68 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000004366B770] [D000000000B03E58] .enter_kprobe_probe+0x188/0x260 [stap_786f531764228440af952c37c19aeeaa_267654] [C00000004366B800] [C000000000364D88] .aggr_pre_handler+0x64/0xe0 [C00000004366B890] [C000000000362BB4] .kprobe_exceptions_notify+0x29c/0x520 [C00000004366B940] [C000000000363CD0] .notifier_call_chain+0x4c/0x90 [C00000004366B9D0] [C00000000036228C] .program_check_exception+0x12c/0x5e8 [C00000004366BAA0] [C000000000004A7C] program_check_common+0xfc/0x100 --- Exception: 700 at .do_execve+0x0/0x31c LR = .kretprobe_trampoline_holder+0x0/0x8 [C00000004366BD90] [C000000000010BAC] .sys_execve+0x58/0xe4 (unreliable) [C00000004366BE30] [C0000000000086B4] syscall_exit+0x0/0x40 ===================================================
Looks like __get_user() and maybe some other copy functions are now calling might_sleep(). Their messages can be safely ignored in our case, but they do slow things down. The solution is either to use functions that do not call might_sleep in ppc64 or implement our own equivalent copy functions in runtime/copy.c
Or one could stop trying to get around the appropriate might_sleep warning, and instead use (and port if needed) the exception-fixup-protected mechanisms such as stp_strncpy_from_user or kread*.
(In reply to comment #2) > Or one could stop trying to get around the appropriate might_sleep warning, and > instead use (and port if needed) the exception-fixup-protected mechanisms such > as stp_strncpy_from_user or kread*. All the userspace copy mechanisms we use are exception-fixup-protected. And kread is only for kernel copies. Are you suggesting we create our own set of userspace copy functions instead of relying on the shifting ones in the kernel?
Just checked the kernel code as far back as linux-2.6.17... all versions have the might_sleep() check in __get_user_nocheck() on powerpc for the case where the address in question is in userspace. AFAICS, the check is legitimate since the user address may not be in memory at the time of access. We may not have hit this BUG on other architectures, but I don't see why not. Looking at x86_64, __get_user() -> __get_user_nocheck() -> __get_user_size() which ends up calling __chk_user_ptr() which is defined in include/linux/compiler.h. The call is stubbed out if __CHECKER__ isn't defined (the default case), but I don't know what that call translates to if __CHECKER__ is defined. Maybe that is a worthy exercise on x86_64? Martin, If you think that these warnings can safely be ignored, I guess the only way out is to have separate runtime/copy.c variants as you suggested earlier.
Martin says this is a powerpc-only bug. Powerpc runtime needs fixing. Assigning to Ananth.
Created attachment 1601 [details] Fix __get_user() usage in systemtap for powerpc Martin, I have attached a patch that gets rid of the warning flood. Tested on a Power5 box. Could you please review and confirm if this is indeed what you suggested as a fix for the problem? Also a spin on a different arch would be good too (I don't have a free system currently to test this out). Thanks, Ananth
Hi, The problem still exist in the latest drop of Systemtap [20070310]. Regards Hariharan T.S.
Martin, Can you please review the patch attached to this bug (http://sourceware.org/bugzilla/attachment.cgi?id=1601&action=view) let me know if this is what you had in mind to fix the problem? Thanks, Ananth
After more testing, it seems the patch attached isn't complete (yet) - in fact, it has a syntax error too. The warnings are spewn only if CONFIG_DEBUG_SPINLOCK_SLEEP is turned on in the kernel config. As such, it doesn't impede usage of systemtap. I'll relook at this bug next week.
A new variant of __get_user() for inatomic usage for powerpc is forthcoming (see http://ozlabs.org/pipermail/linuxppc-dev/2007-April/034182.html). That seems to be the ideal mechanism to handle this issue. Will track the patch and submit any runtime changes needed based on that patch
Created attachment 1880 [details] Use new __get_user_inatomic() instead of __get_user to rid log of warning flood Martin, This patch is against today's CVS. For powerpc64 it uses the newly provided (2.6.21 and above) __get_user_inatomic() call if available and falls back on __get_user() if not. Other archs continue to use __get_user() albeit under the __stp_get_user() wrapper. Ananth
Patch looks good. Checked into CVS.
Created attachment 1888 [details] Fix determination of macro presence Martin, This patch (over attachment 1880 [details]) fixes an issue with the earlier fix with determining the presence of __get_user_inatomic(). Patch tested with this week's snapshot. I've checked in the fix into CVS. Thanks to Srinivasa for figuring out the problem Ananth