[gdb 0005231]: gcore dumps core when trying to get core from running process

Mantis Bug Tracker via bug-notifications bug-notifications at lists.opencsw.org
Wed Feb 18 09:28:29 CET 2015


The following issue has been SUBMITTED. 
====================================================================== 
https://www.opencsw.org/mantis/view.php?id=5231 
====================================================================== 
Reported By:                hjb
Assigned To:                
====================================================================== 
Project:                    gdb
Issue ID:                   5231
Category:                   regular use
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2015-02-18 09:28 CET
Last Modified:              2015-02-18 09:28 CET
====================================================================== 
Summary:                    gcore dumps core when trying to get core from
running process
Description: 
Using the gcore binary provided in the CSWgdb package to get a core image
of a running process doesn't work - the written corefile is zero byte size.
Instead gcore itself dumps a core :)

See this example:

root at ulysses# echo $BASH
/usr/bin/bash

root at ulysses# /opt/csw/bin/gcore $$
[New process 20121]
Retry https://www.opencsw.org/mantis/view.php?id=1:
Retry https://www.opencsw.org/mantis/view.php?id=2:
Retry https://www.opencsw.org/mantis/view.php?id=3:
Retry https://www.opencsw.org/mantis/view.php?id=4:
0xff14d4d8 in ?? ()
procfs.c:5523: internal-error: procfs_make_note_section: Assertion
`thread_args.note_data != note_data' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from
terminal]
procfs.c:5523: internal-error: procfs_make_note_section: Assertion
`thread_args.note_data != note_data' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Abort - core dumped

root at ulysses# ls -ltrh | tail -2
-rw-r--r--   1 root     root           0 Feb 18 09:21 core.20121
-rw-------   1 root     root        8.9M Feb 18 09:21 core

root at ulysses# pstack core
core 'core' of 11673:   /opt/csw/bin/sparcv9/gdb --nx --batch -ex set
pagination off -ex set h
 ffffffff7f1daf1c _lwp_kill (6, 0, ffffffff7f1b9a94, ffffffffffffffff,
ffffffff7f33c000, 0) + 8
 ffffffff7f14b310 abort (1, 1d8, 0, 1f0dfc, 0, 0) + 118
 000000010025c8c4 ???????? (1, 1005f8e20, 1003cb8e0, ffffffff7eb0b7a8, 0,
6)
 000000010025eea0 ???????? (100538570, 100338858, 1005f8e20, 1, 1003cc3b8,
100400)
 000000010025ef24 internal_verror (100338858, 1593, 100338838,
ffffffff7fffedb8, 400, 100563088) + 20
 000000010025ef6c internal_error (100338858, 1593, 100338838, 1003397a0,
100338868, 6) + 20
 0000000100062c8c ???????? (1005f8c30, ffffffff7ffff07c, 0, 100561000,
1005fe340, 1005fe340)
 00000001002896b0 write_gcore_file (1005f8c30, 1005f8c30, ffffffff7ffffb3b,
a, 1002c9bdc, 1005f8c30) + 34
 00000001002899a8 ???????? (1005e9f10, 0, 1005e9f40, 100400, 1005f8c30,
1005fb620)
 0000000100096dc0 ???????? (1005daf60, ffffffff7ffffb31, 0, 1,
ffffffff7ffff160, 1005daf60)
 0000000100099234 cmd_func (1005daf60, ffffffff7ffffb31, 0, 80808080, ff00,
80808080) + 14
 000000010025a1a8 execute_command (ffffffff7ffffb2b, 0, 1005e9f70,
1003762c8, ffffffff7ffffb31, 1005daf60) + 2c8
 0000000100179b78 catch_command_errors (100259ee0, ffffffff7ffffb2b, 0, 6,
0, 2) + 50
 000000010017cfc0 ???????? (0, 100259ee0, 10009e2f4, 1005400a0, 100400, 4)
 0000000100179a88 catch_errors (1, ffffffff7ffff7b0, 100393888, 6, 1c00, 0)
+ 68
 000000010017d9c0 gdb_main (1, 0, ffffffff7f348240, ffffffff7f349e44,
ffffffff7f400200, 10053b458) + 40
 000000010033304c main (11, ffffffff7ffff888, ffffffff7ffff918, 100563088,
100000000, ffffffff7f400200) + 28
 00000001000536d4 _start (0, 0, 0, 0, 0, 0) + 7c

======================================================================



More information about the bug-notifications mailing list