DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd February 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default how can I get a core file out of this program

I've taken an interest in a Qt/Webkit based browser called Arora, the only major problems being it loads pages slow as crap and occasionally crashes (without core file). It has a great restore-last-session feature, but I'd rather know what causes the crash. The only way I can think of to go about it, compile it with debugging information and do a postmortem on it after a crash.


My shell session and default login class are granted unlimited size on core file sizes, but how do I actually make the process dump core whenever it crashs?
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #2   (View Single Post)  
Old 23rd February 2009
anemos's Avatar
anemos anemos is offline
Fdisk Soldier
 
Join Date: May 2008
Location: Ελλάδα
Posts: 53
Thanked 5 Times in 5 Posts
Default

You could also compile the program with debugging information, start the program and attach the running process to gdb.
Reply With Quote
  #3   (View Single Post)  
Old 24th February 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Compiling it with debugging information is the easy part ;-)

attaching gdb to it at run time though, I don't think is something I want to do. The crashes happen intermitently as if for know reason, and I've yet to get enough data to try and track down what causes it based on input. Attaching GDB seems to "lock" the program so to speak; killing the ability to run Arora interactively, which would make it trickier to debug without having to generate a simulation by scripting gdb.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
  #4   (View Single Post)  
Old 24th February 2009
anemos's Avatar
anemos anemos is offline
Fdisk Soldier
 
Join Date: May 2008
Location: Ελλάδα
Posts: 53
Thanked 5 Times in 5 Posts
Default

Yoy’re right. Attaching gdb to the process requires at least that you know how to reproduce the crash.
AFAIK, the task of dumping a core depends entirely on the OS, provided that all sysctls are set correctly.
If there is no signal handler, a default is set which means that dumping the core is the default behaviour. Not doing so means that either there is a signal handler which tells explicitly to the program to ignore the signal or that there is no crash at all.
One way or another, I would try to see how to trigger the crash.
Reply With Quote
  #5   (View Single Post)  
Old 25th February 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

Ahh, found it.

# sysctl kern.core=1

core dumps on, thanks.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote
Reply

Tags
browser crash, core files

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP read file contents - Maximum file size cksraj Programming 1 21st September 2009 11:38 AM
Sftp Bus error: 10 (core dumped) smokem FreeBSD General 0 21st April 2009 12:45 PM
PHP Dumping Core Every 15 seconds?? Michael FreeBSD General 2 21st June 2008 08:17 PM
mc core dump in root sheriff26 FreeBSD General 4 21st June 2008 07:56 PM
Dual core and FreeBSD ViperChief FreeBSD General 13 2nd June 2008 08:30 PM


All times are GMT. The time now is 09:44 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick