What is a "segmentation violation"?

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

Environment

SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 9
SUSE Linux Enterprise Server 8
SUSE Linux Enterprise Real Time
SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 10
 

Situation

What does the ERROR: Segmentation violation mean and what can be done about it?

Resolution

On a Unix operating system such as Linux, a "segmentation violation" (also known as "signal 11", "SIGSEGV", "segmentation fault" or, abbreviated, "sig11" or "segfault") is a signal sent by the kernel to a process when the system has detected that the process was attempting to access a memory address that does not belong to it. Typically, this results in the offending process being terminated.

Background and common causes are discussed in more detail below.

Additional Information

Background

Modern general purpose hardware includes a "memory management unit" (or MMU). This hardware feature is used by operating systems like Linux to implement memory protection, i.e. to prevent different processes from accessing or modifying each other's memory (except in a strictly controlled fashion through specific APIs). This simplifies troubleshooting and increases resilience as processes are carefully contained and separated from one another.

A "segmentation violation" signal is sent to a process of which the memory management unit detected an attempt to use a memory address that does not belong to it.

Common cause: programming error

If a process tries to access memory through a pointer which has not been properly initialised, or which is pointing to memory that has previously been deallocated, this will likely result in a segfault. In this case, the segfault is occurring with a specific process or binary, possibly under a specific set of circumstances.

To deal with this type of segfault, begin by applying all relevant service packs and maintenance updates. Next, if the problem is still reproducible with current code, try to capture an application core dump for analysis. Details for this are found in TID 3054866 - How to obtain application core dumps .

If the problematic binary is shipped by SUSE as part of the product, open a Case with SUSE Technical services, supplying
  • a description of the circumstances under which the core dump was generated,
  • a supportconfig -v report for the affected system and
  • the core dump file itself, if smaller than 50 MB. If it is larger, wait for the service request to be assigned to an engineer and then work with the engineer to transfer it.
If the problematic binary was supplied by a third party, contact that party's support department for assistance.

Common cause: mismatched binary and libraries

Segfaults can occur with processes that combine binaries and shared libraries which aren't (fully) compatible. This can occur, for instance, when a library is updated in a way that changes the library's ABI (application binary interface), but the library's internal version number is not updated to reflect this. A binary that was built against an older version of the library may start to segfault when loaded against the newer version.


This case may be difficult to recognise, and there is no step list for dealing with it. When this case is suspected, some things to consider are:
  • Checking the system for file corruption (e.g. using the rpm-verify.txt file in a supportconfig -v report)
  • Checking the system's settings that relate to shared libraries, like the /etc/ld.so.conf and /etc/ld.so.conf.d/* configuration files and the LD_LIBRARY_PATH and LD_PRELOAD environment variables.
  • Using the objdump tool to check the binary for a built-in library search path override (RPATH).
Common cause: hardware or hardware configuration issue

When segfaults are occurring frequently, or with different processes or without a clear pattern to them, this can indicate that a system's hardware (memory subsystem) is problematic, or that low-level system configuration settings are inappropriate. Please refer to TID 3301593 - Linux system hangs or is unstable for more information on how to handle this situation.

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:7001662
  • Creation Date: 15-Oct-2008
  • Modified Date:05-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Real Time

< Back to Support Search

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

SUSE Support Forums

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

Join Our Community

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.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

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

Go to Customer Center