473,666 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Backtrace / crash report on segfault w/o user interaction

Hi,

is there any way to print/log a backtrace or crash report on segfault
without the need of user interaction? I know I could run my program
via gdb and use "bt" to see what happened on crash but the program I
want to debug is a server which *must* be restarted immediately after
it crashed. I didn't find an auto-restart like feature in gdb. Tools
like valgrind came also in option but they slow down too much.
All I need is a simple information on what function/call caused the
crash that can be logged into a file or at least dumped to stdout/
stderr.

--
Many thanks in advance
Martin Schlosser

Mar 29 '07 #1
2 2112
On 2007-03-29 17:39, NeoTrantor wrote:
Hi,

is there any way to print/log a backtrace or crash report on segfault
without the need of user interaction? I know I could run my program
via gdb and use "bt" to see what happened on crash but the program I
want to debug is a server which *must* be restarted immediately after
it crashed. I didn't find an auto-restart like feature in gdb. Tools
like valgrind came also in option but they slow down too much.
All I need is a simple information on what function/call caused the
crash that can be logged into a file or at least dumped to stdout/
stderr.
This is totally up to the environment (OS + other apps) you are using
and independent of whatever language was used to develop the app or
debuggers. Thus this is off-topic here, try the newsgroups/mailing-
lists/forums of your OS.

--
Erik Wikström
Mar 29 '07 #2
On 29 Mrz., 18:50, Erik Wikström <Erik-wikst...@telia. comwrote:
On 2007-03-29 17:39, NeoTrantor wrote:
Hi,
is there any way to print/log a backtrace or crash report on segfault
without the need of user interaction? I know I could run my program
via gdb and use "bt" to see what happened on crash but the program I
want to debug is a server which *must* be restarted immediately after
it crashed. I didn't find an auto-restart like feature in gdb. Tools
like valgrind came also in option but they slow down too much.
All I need is a simple information on what function/call caused the
crash that can be logged into a file or at least dumped to stdout/
stderr.

This is totally up to the environment (OS + other apps) you are using
and independent of whatever language was used to develop the app or
debuggers. Thus this is off-topic here, try the newsgroups/mailing-
lists/forums of your OS.

--
Erik Wikström
Yup, I forgot to mention the OS, sorry. It's Linux, but I'll try a
suitable ng.
Thanks.

--
Martin Schlosser

Mar 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3299
by: Paul Miller | last post by:
I'm not sure if this is a python bug or a bug in an associated library, and I'm not even sure how to correctly report it, but here is Anytime python is accepting keyboard input, whether it's with raw_input, or sitting on the command line waiting for the user to type code, you can crash python by holding ctrl+shift and then pressing enter. This is on a RedHat 9.0 system running on an Athlon 600. Basically everything about the system is...
0
2422
by: dsclements | last post by:
>Description: I'm running mysql in a 3 server configuration, with 2 servers being slaves to the first. I'm running vpopmail, which means a connection every incoming mail and every check. I woke up this morning to a mysql that wasn't answering connections, and that had left this in the log: 030716 13:48:06 InnoDB: Started mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the...
1
2856
by: Khalid Hussain | last post by:
hi Could someone please help me in following: I need to update Policy status base upon commencement date and then print with new Policy status. I written a stored procedure to update the policy. Now I need to work out how I can print a report. We already doing the report manually in our VB6 program but this is automatic process. So no users involve here. It would change the status by running the stored procedure and then print the...
14
5259
by: JK Peck | last post by:
I have a fairly large Access application that ran correctly in Access 2000. After upgrading to Access 2003 (and recompiling and updating references), it reliably crashes at a certain point. If I step through the VBA code, the crash does not occur. What is different about stepping through code instead of just running it? Any idea how to find the cause? I know about where it happens, but since it is Access itself crashing, finding a...
1
2241
by: joan.edington | last post by:
Hi, I have a report that includes some common data followed by a subreport which is made up of a tab control with 3 pages of different lengths, each displaying different information depending on a code in the input record. Ideally I would like each to be printed to its correct length. However, each one prints to the length of the longest page which leaves an ugly gap in the report.
7
2616
by: José Joye | last post by:
On all my Windows Services (written in C# and for some of them in MC++), I got from time to time crashes at startup (1 out of 10 startup). It occurs really at the time I click on the "Start service" button. I have try/catch sections all around, and also have defined an "UnhandledExceptionEventHandler" in the ctor of the Service Main(). I'm still not able to catch what is going on :-(( The error is: >>The instruction at "0x791cfea1"...
9
2456
by: badboybrown | last post by:
Hello, Is it possible to step through the "Create MDE" process and see what is causing Access to crash? I tried, unsuccessfully, many times to create an MDE from my database. But, randomly, I checked the "Allow Full Menus" in the Startup section. I was then able to create an MDE. That worked once. It has not worked since and I don't particularly
1
2109
by: Johannes Lochmann | last post by:
Hello list, I have a strange crash (segfault on FreeBSD) that I can not reliably reproduce and therefore unfortunately can not provide a self contained test case at the moment. Here is what I do (and what works almost always, but sometimes crashes): 1) find an item in a wx.TreeListCtrl by its pydata (code posted to this list) 2) if the item is found:
3
3332
by: cgable2003 | last post by:
I copied this code fragment from http://www.gnu.org/software/libc/manual/html_node/Backtraces.html #include <execinfo.h> #include <stdio.h> #include <stdlib.h> /* Obtain a backtrace and print it to stdout. */ void print_trace (void) {
0
8449
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8784
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8556
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4371
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2774
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1777
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.