SUSE Support

Here When You Need Us

Application cores when strace is stopped.

This document (7017874) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 11

Situation

Ran strace utilizing timeout (from coreutils).  When using a --signal=9 (or SIGKILL) parameter, the target application would core upon termination.  For example:

   timeout --signal=9 30 strace -fttTp `pidof myproc` -o /tmp/myoutput.log
 

Resolution

Use --signal=2 (or SIGTERM) to terminate strace.

Additional Information

For proper termination, the man page for strace indicates that a termination signal of SIGINT is expected when using the -p parameter:

       -p pid      Attach  to  the  process with the process ID pid and
                   begin tracing.  The trace may be terminated  at  any
                   time   by  a  keyboard  interrupt  signal  (CTRL-C).

                   strace will respond by  detaching  itself  from  the
                   traced  process(es)  leaving  it  (them) to continue
                   running.
  Multiple -p options can be used to  attach
                   to  up to 32 processes in addition to command (which
                   is optional if at least one -p option is given).


Therefore, a proper command line to use to run strace for a specific amount of time, would be:

   timeout --signal=9 30 strace -fttTp `pidof myproc` -o /tmp/myoutput.log

Note: the target process of strace can also core under the following scenario:
 
  1. strace a given process in one terminal session.
  2. In another session, kill -9 the strace process (in #1).
The root cause is the same -- improper termination signal to strace -- but the steps to arrive are different.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7017874
  • Creation Date: 22-Jul-2016
  • Modified Date:04-Mar-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.