kernel crashed when probe_start failed

bibo,mao bibo.mao@intel.com
Tue Sep 26 09:39:00 GMT 2006


Hi,
  I use latest systemtap to probe multiple function, and system will crash if register_kprobe for one function fails. I checked systemtap source code, in function _stp_handle_start(), if probe_start( ) return < 0, _stp_exit_called will  be equal 1. So that _stp_kill_time will never be called in function _stp_cleanup_and_exit(), but _stp_init_time is ever called.

  Hence system will crash because register timer handler is freed when module exits. Kernel oops like this:

_stp_transport_init:274 transport_init from 4364 4365

_stp_proc_write_cmd. count:28 type:4

_stp_transport_open:229 stp_transport_open: 0 Mb buffer. target=0

_stp_transport_open:234 transport_mode=1

_stp_proc_write_cmd. count:8 type:5

_stp_handle_start:97 stp_handle_start pid=5

timer handler function is f8b518ab 

ERROR: dwarf probe kernel.function("atomic_notifier_call_chain@kernel/sys.c:225"

) registration f_stp_cleanup_and_exit:130 cleanup_and_exit (0)

ailed, rc=1

_stp_transport_close:199 ************** transport_close *************

_stp_cleanup_and_exit:130 cleanup_and_exit (1)

_stp_transport_close:209 ---- CLOSED ----

BUG: unable to handle kernel paging request<1>BUG: unable to handle kernel pagin

g request at virtual address f8b518ab

 printing eip:

f8b518ab

*pde = 017f7067

*pte = 00000000

Oops: 0000 [#1]

SMP 

Modules linked in: binfmt_misc e1000 e100 ext3 jbd

CPU:    1

EIP:    0060:[<f8b518ab>]    Not tainted VLI

EFLAGS: 00010286   (2.6.18-rc7ia32 #4) 

EIP is at 0xf8b518ab

eax: 00000000   ebx: 00000100   ecx: f7ea1f48   edx: f7ea0000

esi: f7e0a000   edi: f8b518ab   ebp: 00000001   esp: f7ea1f44

ds: 007b   es: 007b   ss: 0068

Process swapper (pid: 0, ti=f7ea0000 task=f7e82550 task.ti=f7ea0000)

Stack: c0125f03 f7ea1f48 f7ea1f48 00000011 c03dcb08 0000000a c0122208 00000046 

       00000000 00000000 00000000 c012229f f7ea0008 c01037ef f7ea0008 00000000 

       00000000 00000000 00000000 00000000 00000000 0000007b c011007b ffffff10 

Call Trace:

 [<c0125f03>] run_timer_softirq+0xfa/0x14f

 [<c0122208>] __do_softirq+0x5a/0xbb

 [<c012229f>] do_softirq+0x36/0x3a

 [<c01037ef>] apic_timer_interrupt+0x1f/0x24

 [<c011007b>] acpi_copy_wakeup_routine+0x1b/0x9a

 [<c0101b8a>] mwait_idle+0x25/0x38

 [<c0101b4b>] cpu_idle+0x9f/0xb9



More information about the Systemtap mailing list