Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5948295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:05:13+00:00 2026-05-22T17:05:13+00:00

How does one detect whether a segfault is being caused by an out-of-memory condition?

  • 0

How does one detect whether a segfault is being caused by an out-of-memory condition?

I have a segfault that defies diagnosis by valgrind and duma/efence because it seems to crash those tools themselves (Valgrind “the impossibe happened”, duma: “mprotect() failed: Cannot allocate memory” )

The application (Gazebo) simply crashes with a segfault, and a stack trace that doesn’t seem to offer many hints as to why.

TLDR: Is there an easy tool or method to either confirm or rule out the out-of-memory condition is the cause of a segfault?

(top does not show an inordinate amount of memory use before crash)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:05:14+00:00Added an answer on May 22, 2026 at 5:05 pm

    On Linux, an out-of-memory condition can manifest in one of two ways:

    • If overcommit is disabled, a brk() or mmap() call fails with ENOMEM. Shortly thereafter, the application attempts to dereference the NULL pointer returned from malloc() and crashes.
    • If overcommit is enabled, then the OOM killer kicks in, and kills the process with SIGKILL. A message is left in dmesg.

    As such, you can rule out OOMs by checking that strace doesn’t show brk() or mmap() calls failing with ENOMEM, and verifying that no OOM killer messages appear in dmesg.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that does the following: one component looks for changes in
Answerers: How does one literally detect the user's font scale, so that it may
How does one detect that the environment is Windows 8 Metro application from Javascript?
How can I detect that the telephone does not have hardware keyboard and only
How does one go about authoring a Regular Expression that matches against all strings
How does one invoke a groovy method that prints to stdout, appending the output
Does anyone know if it is possible to detect whether the browser has closed
I have a question very similar to this one but the answer does not
How does one avoid memory leaks in a relationship like this? @class Node; @interface
does one perform better over the other in terms of indexing/quering etc ? e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.