Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a well-behaved stack trace printer (75x backport) #10422

Merged

Commits on Jul 28, 2015

  1. Implement a well-behaved stacktrace printer.

    This implements a stack trace printer which is safe to call
    from a signal handler (ROOT's stack trace printer is not async-signal
    safe; see 'man 7 signal' for more information about async-signal
    safety).
    
    Further, on Linux, this utilizes the clone library call directly;
    clone has the advantage of avoiding the pthread_atfork handlers.
    We have observed that jemalloc currently registers AS-unsafe atfork
    handlers, which would cause a deadlock if we use fork().
    
    (cherry picked from commit cff10d3)
    bbockelm committed Jul 28, 2015
    Copy the full SHA
    65329f5 View commit details
    Browse the repository at this point in the history
  2. Replace use of pstack with direct invocation of gdb.

    This switches from the system pstack script to using gdb directly.
    Ideally, this will be more usable on non-Linux platforms.
    
    NOTE that this will pull the gdb from the environment (i.e., probably
    CMSSW's gdb instead of the system one).  CMSSW's gdb can parse the
    debug symbols we ship, meaning that the backtrace will include
    niceties like filenames, line numbers, and decode arguments.
    
    The downside of this is that CMSSW's gdb requires 10 minutes
    and about 1GB RAM to generate the traceback.
    
    (cherry picked from commit b6d0bae)
    bbockelm committed Jul 28, 2015
    Copy the full SHA
    85f4e7f View commit details
    Browse the repository at this point in the history
  3. Toss exception instead of doing work in an assert.

    (cherry picked from commit 24c51a4)
    bbockelm committed Jul 28, 2015
    Copy the full SHA
    46af91a View commit details
    Browse the repository at this point in the history