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/14107] New: Bad user unwinding from kernel fatal signal handler for some x86_64 kernels


http://sourceware.org/bugzilla/show_bug.cgi?id=14107

             Bug #: 14107
           Summary: Bad user unwinding from kernel fatal signal handler
                    for some x86_64 kernels
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap@sourceware.org
        ReportedBy: mjw@redhat.com
                CC: atomlin@redhat.com, bmr@redhat.com
    Classification: Unclassified


The following program:

int
func (void)
{
        int *foo = (void *) 0x1234;
        *foo = 0x12345;
        return 0;
}

int
main (void)
{
  return func ();
}

compiled with gcc -o bad_code bad_code.c and the following stap script:

probe kernel.function("show_signal_msg") {
        /*(PF_USER | PR_WRITE) */
        if (execname() == "bad_code") {
                if ($error_code & 0x6) {
                        printf ("\nUser mode process %s [pid: %d] received a
SIGSEGV - error_code: 0x%x\n", execname(), pid(), $error_code)
                        print_ubacktrace()
                }
        }
}


ran with: stap -d ./bad_code --ldd show_signal_msg.stp -c ./bad_code

produces the following (correct) user backtrace on 3.3.5-2.fc16.x86_64:

User mode process bad_code [pid: 18431] received a SIGSEGV - error_code: 0x6
 0x400484 : func+0x10/0x1d [/usr/local/build/systemtap-obj/bad_code]
 0x40049a : main+0x9/0xf [/usr/local/build/systemtap-obj/bad_code]
 0x7fd419d1069d : __libc_start_main+0xed/0x1c0 [/lib64/libc-2.14.90.so]
 0x4003b9 : _start+0x29/0x2c [/usr/local/build/systemtap-obj/bad_code]

But on some other x86_64 kernels it produces:

WARNING: _stp_read_address failed to access memory location

User mode process bad_code [pid: 12152] received a SIGSEGV - error_code: 0x6
 0x400484 : func+0x10/0x1d [/home/mark/build/systemtap-obj/bad_code]
Warning: child process exited with signal 11 (Segmentation fault)
WARNING: Number of errors: 0, skipped probes: 1
WARNING: /usr/local/install/systemtap/bin/staprun exited with status: 1

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]