UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » Processes
  • » signal 6 - Abort signal when running a process

#1 2008-01-18 09:54 AM

Gowrisubha.R
Member
Registered: 2005-11-14
Posts: 9

Re: signal 6 - Abort signal when running a process

Hi,

Could you pls. tell me at which situations signal 6 - Abort will be thrown when running a process which was written in C++.

When I was running a process (which has sockets, STL maps etc) which was written in C++, at some point of time, singal 6 was thrown and got coredump.
when I tried to analyse the core using gdb, it shows a single line telling that some specific memory cannot be accessed, no other information was there. I have compiled the code with -g option to get the debuf info.

Since the gdb information is a single line, I could not able to find out the problem.
Thanks

Offline

#2 2008-01-18 01:15 PM

biologz
Administrator
From: Puking on the pavement
Registered: 2005-11-02
Posts: 396

Re: signal 6 - Abort signal when running a process

I don't know at all but there is the wiki maybe it could help:

http://en.wikipedia.org/wiki/SIGABRT


gethostbyintuition() is still a dream of mine

                                                 -- quoted from bash

Offline

#3 2008-01-18 03:12 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,826
Website

Re: signal 6 - Abort signal when running a process

It sounds like it might be glibc's malloc() code detecting a problem and abort()'ing...
See "man malloc", near the end, the discussion about "MALLOC_CHECK_"...  (In
recent versions of glibc, it seems the default is now 3, so it does the abort() stuff,
along with error messages...  Are you getting a bunch of junk (stack trace, memory
map, etc.) printed to stderr when you die, too?)

Or, does any code of yours do abort() anywhere?  It might be that...  You should be
able to tell who called the abort() via a stack backtrace from gdb'ing that coredump...
(I think the gdb command is "bt", though I loathe interactive debuggers, so don't quote
me on that...)

Offline

#4 2008-01-19 12:38 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,230

Re: signal 6 - Abort signal when running a process

Are you using any assertions? Those can call abort too, though they would've printed some info. Is it a multithread application by any chance?

Offline

#5 2009-01-03 06:18 PM

maciek_kraus
Guest

Re: signal 6 - Abort signal when running a process

Try to delete all *.o files and rebuild whole project. Sometimes that problem occures when you are using incremental linking.
Oh, now I've seen that topic is one year old. Sorry.

#6 2011-01-25 02:55 PM

sam
Guest

Re: signal 6 - Abort signal when running a process

I just had a problem with this signal. It was at a function call. This function asked a pointer. The error was that I didn't allocate the space for a pointer, but instead passed just the adress using the & operator (in C).

#7 2015-03-19 07:02 AM

Reddy
Guest

Re: signal 6 - Abort signal when running a process

SIGABRT sent by OS to the process when the process holds CPU for longer time. This is one reason

#8 2015-03-19 10:27 PM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,230

Re: signal 6 - Abort signal when running a process

You are replying to a four year old thread, with an answer that is incorrect.
If you use too much CPU you might get a SIGXCPU signal on some OSes,
but not a SIGABORT. Or do you know of some weird OS that actually
does that?

Offline

  • Index
  • » Processes
  • » signal 6 - Abort signal when running a process

Board footer

Powered by FluxBB