Unable to generate core dumps for a program
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Unable to generate core dumps for a program




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Unable to generate core dumps for a program  
Frank Meerkötter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-03-06 06:14 PM

Hi,

i'm having trouble generating core dumps for a certain program.
In general i can get a core dump. When running "kill -SIGILL $$" i
end up with a nice shining core file of my current shell. So in
principal it works but when doing the same thing to the program
i would like to debug no core dump is generated (it just quits).

The ulimit for core files is unlimited and the current working
directory is writeable. What else could be the problem that no
core dump is generated?

Can a program do something that prevents coredump generation?

Thanks.

Regards,
Frank






[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Bjorn Reese


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-03-06 06:14 PM

Frank Meerkötter wrote:

> Can a program do something that prevents coredump generation?

On AIX a program can prevent coredumping by setting the SA_NODUMP flag
with sigaction() for every appropriate signal.

--
mail1dotstofanetdotdk





[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Frank Meerkötter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-03-06 06:14 PM

Bjorn Reese wrote:
> Frank Meerk=F6tter wrote:

Hi,
 
>
> On AIX a program can prevent coredumping by setting the SA_NODUMP flag
> with sigaction() for every appropriate signal.

The system i'm running on is linux (2.6) which doesn't have this flag.

Thanks for reply.

Regards,
Frank






[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-03-06 06:14 PM

"Frank Meerkötter" <frank@betaversion.net> writes:

> Can a program do something that prevents coredump generation?

On any UNIX system, a program can establish signal handler for all
core-dumping signals, and call _exit() when that handler is invoked.

Since you are on linux, run the program under strace and see if in
fact it does that for SIGILL. If so, see if it also does that for
other core-dumping signals (usually SIGQUIT is the signal you'll
want to send -- its *only* reason is to stop program with a core).

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.





[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Jordan Abel


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-03-06 06:14 PM

2006-06-03 <1149345627.647575.136850@y43g2000cwc.googlegroups.com>,
Frank Meerkötter wrote:
> Hi,
>
> i'm having trouble generating core dumps for a certain program.
> In general i can get a core dump. When running "kill -SIGILL $$" i
> end up with a nice shining core file of my current shell. So in
> principal it works but when doing the same thing to the program
> i would like to debug no core dump is generated (it just quits).
>
> The ulimit for core files is unlimited and the current working
> directory is writeable. What else could be the problem that no
> core dump is generated?
>
> Can a program do something that prevents coredump generation?

it might be setting its own ulimit.





[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Maxim Yegorushkin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-04-06 12:25 AM


Paul Pluzhnikov wrote:
> "Frank Meerk=F6tter" <frank@betaversion.net> writes:
> 
>
> On any UNIX system, a program can establish signal handler for all
> core-dumping signals, and call _exit() when that handler is invoked.

One can also block all ignorable signals using sigprocmask().






[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Paul Pluzhnikov


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-04-06 12:25 AM

"Maxim Yegorushkin" <maxim.yegorushkin@gmail.com> writes:

> One can also block all ignorable signals using sigprocmask().

True. However that is *not* what's happening to the OP program, since
it "just quits". If it blocked SIGILL, it would "just keep running".

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.





[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Bas


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-04-06 12:25 AM

>
> Can a program do something that prevents coredump generation?
>

Yes. The program can prevent coredump generation by calling setrlimit.







[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Barry Margolin


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-04-06 06:28 AM

In article <e5t2uj$tqe$1@news3.zwoll1.ov.home.nl>,
"Bas" <no-email@forme.nl> wrote:
 
>
> Yes. The program can prevent coredump generation by calling setrlimit.

Another thing that will prevent core dumps is if the program is setuid.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***





[ Post a follow-up to this message ]



    Re: Unable to generate core dumps for a program  
Jordan Abel


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-04-06 06:28 AM

2006-06-04 <barmar-E9421C.21424703062006@comcast.dca.giganews.com>,
Barry Margolin wrote:
> In article <e5t2uj$tqe$1@news3.zwoll1.ov.home.nl>,
>  "Bas" <no-email@forme.nl> wrote:
> 
>
> Another thing that will prevent core dumps is if the program is setuid.

That would also prevent him sending signals





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:10 AM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register