This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/19833] monitor mode causes kernel crash when exited immediately


https://sourceware.org/bugzilla/show_bug.cgi?id=19833

--- Comment #2 from Felix Lu <flu at redhat dot com> ---
The order of procfs file removal when using cleanup_and_exit() seems to be
wrong.

Proper exit:

$ stap -vve 'probe procfs("file1").read {println("file1")} probe
procfs("file2").read{println("file2")}'

$ stap -vve 'probe kernel.function("remove_proc_subtree") {println($$vars)
println(kernel_string($name))}

Pass 5: starting run.
Running /opt/codebase/install/bin/staprun -v -R
/tmp/stapsevTUs/stap_64aaee2df74482eec00fd5d7e412c6de_4493.ko
staprun:insert_module:183 Module stap_64aaee2df74482eec00fd5d7e412c6d_22426
inserted from file
/tmp/stapsevTUs/stap_64aaee2df74482eec00fd5d7e412c6de_4493.ko
name=0xffff88006346fa45 parent=0xffff880062b13e40 root=? de=? next=?
fn=0xffff8800621c3d20 len=?
file2
name=0xffff88006346f685 parent=0xffff880062b13e40 root=? de=? next=?
fn=0xffff8800621c3d20 len=?
file1
name=0xffff880062b13ec5 parent=0xffff880139dfbc00 root=? de=? next=?
fn=0xffff8800621cfed0 len=?
stap_de015c12e52d8c7258bb2e8842dbb42_22414

The stap module proc folder is cleaned up after the files in this case.

-------------------------------------------------------------------------------

Using cleanup_and_exit():

$ stap --monitor -ve 'probe begin {println(1)}'

$ stap -vve 'probe kernel.function("remove_proc_subtree") {println($$vars)
println(kernel_string($name))}

Pass 5: starting run.
Running /opt/codebase/install/bin/staprun -v -R
/tmp/stapMXpr4y/stap_64aaee2df74482eec00fd5d7e412c6de_4493.ko
staprun:insert_module:183 Module stap_64aaee2df74482eec00fd5d7e412c6d_22447
inserted from file
/tmp/stapMXpr4y/stap_64aaee2df74482eec00fd5d7e412c6de_4493.ko
name=0xffff8800a1f8c805 parent=0xffff880139dfbc00 root=? de=? next=?
fn=0xffff88011aca3ed0 len=?
stap_438e1eb967615a30bf68838470e3126_22755
name=0xffff880138ce8205 parent=0xffff8800a1f8c780 root=? de=? next=?
fn=0xffff88011aca3e40 len=?
monitor_status
name=0xffff880138ce8b05 parent=0xffff8800a1f8c780 root=? de=? next=?
fn=0xffff88011aca3e40 len=?
monitor_control

In this case, the module proc folder is cleaned up before the subtree,
which is likely to be the cause of the crash.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]