bugDDD - Bugs: bug #24879, Reassigned to another tracker...


bug #24879: Reassigned to another tracker [was: DDD log file should contain stack dump]

Submitter:  Peter Wainwright <pwainwright>
Submitted:  Wed 19 Nov 2008 06:35:01 PM UTC
Category:  None Severity:  1 - Wish
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  shaunak
Open/Closed:  Closed Release:  3.3.12-rc1
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Tue 13 Jan 2009 08:40:33 PM UTC, comment #5: 

Fixed in Subversion trunk.

Peter Wainwright <pwainwright>
Sat 29 Nov 2008 07:16:23 PM UTC, comment #4: 

What happens in DDD 3.3.11:

If you send a fatal signal, for example by "killall 11 ddd", a dialog box will pop up and a new menu "Maintenance" will appear on the menubar.  From this menu you can select the action to be taken when DDD crashes.  You can select "Debug DDD".  If you then restart DDD and send a fatal signal, you should see a terminal window appear with GDB, which loads the core dump.

If instead you select "Dump core", the interactive GDB window would not appear, but GDB should run noninteractively and produce a stack dump in the log file ~/.ddd/log.

However, if you are on a system with kernel.core_uses_pid=1, neither of these options works.  I have simulated the problem on my Ubuntu system using "sysctl -w kernel.core_uses_pid=x" to change this setting, and sending signals to DDD.  See the difference between the two attachments log-with-stack and log-without-stack.  The former is much more useful.

(file #16944, file #16945)

Peter Wainwright <pwainwright>
Sat 29 Nov 2008 09:38:17 AM UTC, comment #3: 

The labelling of core dumps with the process ID is a feature which can be enabled/disabled by means of the kernel sysctl mechanism:

sysctl -w kernel.core_uses_pid=1
sysctl -w kernel.core_uses_pid=0

Some systems seem to have this behaviour enabled by default in /etc/sysctl.conf (for example Scientific Linux 5.2, presumably following Red Hat Enterprise Linux).  On the other hand, others do not (for example Ubuntu 8.04). But of course you can use sysctl to turn it on/off dynamically.

Peter Wainwright <pwainwright>
Fri 21 Nov 2008 09:02:36 AM UTC, comment #2: 

I think that this should work with some minor modifications.

There is code in "exit.C" which should do the job.  However, that code assumes that the core dump file is just called "core".  However, in my experience some GNU/Linux distributions store the core file as "core.NNNNN", where NNNNN is the pid of the crashed process.  We need to detect this situation and handle appropriately.

[Of course, this still requires a DDD with debugging symbols enabled; this is up to the distribution].

Peter Wainwright <pwainwright>
Wed 19 Nov 2008 06:47:44 PM UTC, comment #1: 


Please, do not post any new comments to this item.

Peter Wainwright <pwainwright>
Wed 19 Nov 2008 06:35:01 PM UTC, original submission:  

When DDD receives a fatal signal, it should attempt to collect a decent stack dump and print it to the log file.

There are too many bug reports that end abruptly with "Segmentation fault". We need more information to fix the bugs. A stack dump would be a good start.

Peter Wainwright <pwainwright>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #16944:  log-with-stack added by pwainwright (36KiB - application/octet-stream - Logs with and without stack dump)
file #16945:  log-without-stack added by pwainwright (33KiB - application/octet-stream - Logs with and without stack dump)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pwainwright (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-01-13 pwainwright StatusNone Fixed
    2009-01-13 pwainwright Open/ClosedOpen Closed
    2008-12-13 pwainwright Assigned toNone shaunak
        ReleaseNone 3.3.12-rc1
    2008-11-29 pwainwright Attached File- Added log-with-stack, #16944
        Attached File- Added log-without-stack, #16945
    2008-11-21 pwainwright Open/ClosedClosed Open
    2008-11-19 pwainwright Reassign ItemDDD, bug #24879 DDD, task #8855

    Back to the top

    Powered by Savane 3.9