Crash Analysis on Linux

What is the best way to analyze crashes on Linux?

We expect to build the software and deliver a release version to testers. The testers may not be able remember how to reproduce the crash or the crash may be totally intermittent. They also will not have a development environment on their machines. The software is written in C/C++ and compiled into native machine code for distribution.

-------------Problems Reply------------

I believe what you're looking for is this:

If you have space on the disk, let the application create its coredump when it crashes.

ulimit -c unlimited

Later you can debug it with GDB.

Aside from coredumping and stacktracing as already noted - make sure you can easily identify which versions of your executable people are running, and be able to answer what version of each source file goes into what binary version (i.e. spend some time with your source code control system and your build scripts). Otherwise neither a core file nor a stack trace is going to help.

Core dumps are helpful, but they don't always tell you everything you want to know about how you ended up in the error condition.

Logging actions, inputs, and events can be very helpful. If you are able to log each run of your program in such a way that in the event of a crash a developer could get access to the log and regenerate the error could be very helpful.

If possible you should build your programs with maximum debug symbols generated and then strip them if you don't want or can't let your release versions to have them, but keep a copy of each released version with the debug symbols which you can couple with the core file if you need to debug a crash.

In addition to generating a stacktrace in a SIGSEGV handler and/or generating a core dump, it may also be useful to find where an uncaught C++ exception is thrown.

Category:c# Views:1 Time:2010-07-27
Tags: c# linux crash

Related post

  • Crash Analysis - Fusion.dll - Access Violation Exception (0xC0000005) when trying to read from memory location 0x006f0071 on thread 0 2013-12-30

    Hi, I run a bat file whose exe is built on .Net Framework 1.1. I execute it in a system with Windows XP SP3, .Net Framework 1.1, 2.0, 3.0 and 3.5. At the end of the execution, I am encountered with an error reading : "The instruction at "0x008d4eba"

  • Real Time Audio Analysis In Linux 2009-03-31

    I'm wondering what is the recommended audio library to use? I'm attempting to make a small program that will aid in tuning instruments. (Piano, Guitar, etc.). I've read about ALSA & Marsyas audio libraries. I'm thinking the idea is to sample data

  • DLLImport crash in Mono (linux): icall_wrapper_mono_marshal_free 2010-01-11

    I'm stucked with a problem with Mono Interop in Linux. I have a native shared library (made in Lazarus) that I need to use in a C# assembly. The shared library is used by a Mono C# assemblie on Windows and on Linux. The assembly loads the shared libr

  • what makes backtrace() crash(SIGSEGV ) on Linux 64 bit 2011-06-16

    I am developeing an application on linux where i wanted to have backtrace of all running threads at a particular frequency. so my user defined signal handler SIGUSR1 (for all threads) calls backtrace(). i am getting crash(SIGSEGV) in my signal handle

  • how to diagnose a memory-related Java crash on production linux box 2012-03-15

    In production we have a CentOS 5 linux box running multiple instances of Apache Tomcat 5.5.30 over Java 1.6.0_21. Each Tomcat is hosting a Java EE WebApp which pulls data from a Postgres 9.1 RDBMS and generates HTML/PDF/etc reports. Every few days, d

  • C++ file operations cause "crash" on embedded Linux 2011-03-24

    I'm in a embedded led measuring system project now. It uses ARM & linux, and has 64M memory and 1G storage. When measuring, it's supposed to write data to a .csv file. I did it this way: Create/open a file before measurement begins In the measuri

  • RAM analysis on Linux 2011-05-25

    I want to get the map of allocated memory in RAM running on Linux. I am looking to find the utilization of memory at a given time as well as specifics of allocation in terms of user process and kernel modules and kernel itself. --------------Solution

  • Android 2.1: Grateful for crash analysis help: signal 11 (SIGSEGV), fault addr deadbaad 2012-02-11

    The output at this post's bottom is produced shortly after cancelling bluetooth discovery within my app. Can you please help me identify what goes wrong? I've attached an uncaught exception handler to my app which indicates no exceptions have been th

  • How to use WinDbg to analyze the crash dump for VC++ application? 2009-04-09

    How do I use WinDbg for analyzing a dump file? --------------Solutions------------- Here are some general steps that will get you on your way: First, you must change your compiler's settings so that it creates PDB files, even for release builds. Late

  • Program only crashes as release build - how to debug? 2008-10-09

    I've got a "Schroedinger's Cat" type of problem here -- my program (actually the test suite for my program, but a program nonetheless) is crashing, but only when built in release mode, and only when launched from the command line. Through caveman deb

  • I need to find the point in my userland code that crash my kernel 2009-05-16

    I have big system that make my system crash hard. When I boot up, I don't even have a coredump. If I log every line that get executed until my system goes down. I will find that evil code. Can I log every source code line in GDB to a file? UPDATE: ok

  • Generating java core dump log file for applets in Linux 2009-12-04

    I have an applet that is crashing Firefox on Linux. Can anyone tell me how I can enable the java core dump log file for this applet and where the file would be generated? --------------Solutions------------- Doh! It was generated automatically in the

  • How is linux kernel tested? 2010-07-05

    How do the Linux kernel developers test their code locally and after they have it committed? Do they use some kind of unit testing, build automation? test plans? --------------Solutions------------- The linux kernel has a heavy emphasis on community

  • Debugging a mysterious IIS crash 2010-07-15

    I have an ASP.NET MVC web application which integrates a C# managed library of ours that loads unmanaged plugins to do some file processing. These unmanaged plugins in-turn rely on a few 3rd party libraries to do their dirty work; some of which are c

  • Windows Service crashes 2011-01-22

    i have a windows service running on Windows Server 2003. The service crashes ocassionlly. I tried analysis error through DebugDiag and got following information. Can anyone help me to understand the problem. The service uses GSM libaray for SMS servi

  • how to read jvm crash report ? What could be the resone of the report 2011-03-08

    How to read below jvm crash report in Linux box ?What could be the issue for this ?This issues is coming while we pdf from on server to other transfer. Please help me to fix this issue . A fatal error has been detected by the Java Runtime Environment

  • how to create inifile in Delphi Prism for .net that will work on window and Linux(Mono)? 2011-08-11

    My Delphi Prism program needs to create and read and write into an inifile, but I think I noticed Delphi Prism doesn't really support any sort of Inifile structure. (Correct me if I am wrong.) This leads me into talking about ShineOn library file, wh

  • Parsing Linux source into abstract syntax tree 2011-12-08

    I'd like to perform source code analysis of Linux kernel, but to do that, I first need to parse it. What are my options? I'd prefer an AST usable from python, but any other language is ok too. Apparently CIL is able to parse whole kernel, but it's no

  • What is the easiest way to make a C++ program crash? 2011-12-12

    I'm trying to make a Python program that interfaces with a different crashy process (that's out of my hands). Unfortunately the program I'm interfacing with doesn't even crash reliably! So I want to make a quick C++ program that crashes on purpose bu

Copyright (C), All Rights Reserved.

processed in 0.223 (s). 11 q(s)