Bug 676474
Summary: | nd_syscall.fork probe returns fork_kernel_thread for usespace forks | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Josh Boyer <jwboyer> |
Component: | systemtap | Assignee: | Frank Ch. Eigler <fche> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 14 | CC: | dsmith, fche, jistone, mjw, roland, scox, wcohen |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-02-03 19:15:37 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Josh Boyer
2011-02-10 01:24:20 UTC
I don't have a 32-bit setup handy. Can you show the output from: stap -v -e 'probe nd_syscall.fork{printf("%s cs=%#x\n", name, @cast(regs, "pt_regs")->cs)}' ? Also please try version 1.4 from updates-testing. Reproduced with systemtap-1.4-2.fc14.i686 on 2.6.35.10-74.fc14.i686 stap -v -e 'probe kernel.function("do_fork") {printf("regs=%p cs=%#x ip=%#x orig_ax=%#x\n", $regs, $regs->cs, $regs->ip, $regs->orig_ax)} probe nd_syscall.fork{printf("%s regs=%p\n", name, regs) }' shows correct result from $regs in function probe but wrong result (all zeros) at nd_syscall.fork probe, i.e. kprobe.function probe, differing regs value. Adding manual probe kprobe.function("do_fork") { printf("regs=%p\n", pointer_arg(3)) }' shows the right result. do_fork is not asmlinkage, asmlinkage() in nd_syscalls.stp:nd_syscall.fork is wrong. Should be fixed upstream by commit e00876c, not tested. (In reply to comment #4) > Should be fixed upstream by commit e00876c, not tested. That's an easy enough change to test locally. I removed asmlinkage from do_fork in the nd_syscall.stp tapset on my machine and reran the simple testcase. It does what I would expect: [root@r2d2 testsuite]# stap -v -e 'probe nd_syscall.fork{println(name)}' Pass 1: parsed user script and 73 library script(s) using 22216virt/13068res/2248shr kb, in 570usr/60sys/663real ms. Pass 2: analyzed script: 1 probe(s), 5 function(s), 20 embed(s), 0 global(s) using 23048virt/14636res/3012shr kb, in 130usr/1810sys/2828real ms. Pass 3: translated to C into "/tmp/stap1fzO3q/stap_9fdccdaf7710f055358ef93a11c15f3a_15392.c" using 23156virt/14892res/3136shr kb, in 0usr/0sys/8real ms. Pass 4: compiled C into "stap_9fdccdaf7710f055358ef93a11c15f3a_15392.ko" in 5450usr/1350sys/7268real ms. Pass 5: starting run. fork fork ^?^CPass 5: run completed in 20usr/170sys/9950real ms. [root@r2d2 testsuite]# The forkwait test in the testsuite also passes now. The rest of the FAIL cases are still present, but that isn't because of this specific issue. Thanks for the quick resolution! fix present in 1.5+ |