Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 599498 - kernel crash on backtrace, stack_walk field not set
kernel crash on backtrace, stack_walk field not set
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: systemtap (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Frank Ch. Eigler
Petr Muller
:
: 602560 612322 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-03 07:25 EDT by Mark Wielaard
Modified: 2016-09-19 22:06 EDT (History)
4 users (show)

See Also:
Fixed In Version: systemtap-1.2-5.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:45:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Wielaard 2010-06-03 07:25:12 EDT
Description of problem:

There is a possibility of crashing the kernel when creating a backtrace in a stap script. This is caused by a kernel backport of the dump_stack code that now takes a new argument which wasn't filled in by the systemtap runtime code.

Version-Release number of selected component (if applicable):

systemtap-1.2-3.el6.x86_64

How reproducible:

50%. It depends on the normal systemtap unwinder failing (for example because it cannot access some memory needed), then the fallback kernel dump_stack code might be called with a not fully filled in stacktrace_ops struct (since the backport introduced a new stack_walk field we don't expect in kernel version < 2.6.33), which might lead to the kernel jumping to a random address.

Steps to Reproduce:
1. Run context.exp testcase (make installcheck RUNTESTFLAGS=context.exp)
  
Actual results:

Kernel crash with OOPs.

Expected results:

No crashing kernel, but passing testcase.

Additional info:

Fixed upstream

commit c265cd259a82542abf290a6aeb058056d6c18b73
Author: Mark Wielaard <mjw@redhat.com>
Date:   Thu Jun 3 11:26:17 2010 +0200

    Replace walk_stack field version guard with autoconf test.
    
    The test for whether or not to assign print_context_stack to the
    walk_stack stacktrace_ops field depended on the kernel version.
    Replace with a proper runtime/autoconf test to make sure the field
    always gets assigned when available.
    
    * buildrun.cxx (compile_pass): Add output for STAP_CONF_WALK_STACK.
    * runtime/autoconf-walk-stack.c: New test.
    * runtime/stack.c (print_stack_ops): Assign walk_stack field
      print_context_stack depending on STAP_CONF_WALK_STACK.
Comment 2 RHEL Product and Program Management 2010-06-03 08:23:16 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Frank Ch. Eigler 2010-06-25 12:01:13 EDT
*** Bug 602560 has been marked as a duplicate of this bug. ***
Comment 5 Frank Ch. Eigler 2010-07-07 17:20:07 EDT
*** Bug 612322 has been marked as a duplicate of this bug. ***
Comment 6 Issue Tracker 2010-07-13 12:56:46 EDT
Event posted on 07-13-2010 07:11am EDT by Glen Johnson

------- Comment From  2010-07-13 07:09 EDT-------
Ported and tested the RHEL 6 Beta2 systemtap packages with commit posted
in https://bugzilla.redhat.com/show_bug.cgi?id=599498#c0, it fixes the
bug.


This event sent from IssueTracker by jkachuck 
 issue 1092833
Comment 9 Petr Muller 2010-09-23 10:31:20 EDT
I've been running the testcase in a loop for about a day, and no box is dead. I suppose thats a PASS. There are still FAILs, but that's different story. 

Moving to VERIFIED.
Comment 10 releng-rhel@redhat.com 2010-11-10 16:45:00 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.