Bug 907028

Summary: [abrt] gdb-7.5.1-32.fc18: dump_core: Process /usr/bin/gdb was killed by signal 6 (SIGABRT)
Product: [Fedora] Fedora Reporter: Szőke Károly <szoke.karcsi>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: gbenson, jan.kratochvil, palves, pmuldoon, sergiodj, tromey
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:bf3ef9266883a16e9a8b9845671f2d65a0bdf2ed
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-09 20:49:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages
none
The binary
none
Lazarus build options screenshot.
none
Lazarus 1.0.4 options none

Description Szőke Károly 2013-02-02 19:13:34 UTC
Description of problem:
-set up in lazarus gdb debugger
-run my program with breakpoint
-crash

Version-Release number of selected component:
gdb-7.5.1-32.fc18

Additional info:
backtrace_rating: 4
cmdline:        /usr/bin/gdb -silent -i mi -nx
crash_function: dump_core
executable:     /usr/bin/gdb
kernel:         3.7.4-204.fc18.x86_64
remote_result:  NOTFOUND
uid:            1000

Truncated backtrace:
Thread no. 1 (10 frames)
 #2 dump_core at ../../gdb/utils.c:694
 #3 internal_vproblem at ../../gdb/utils.c:852
 #5 internal_verror at ../../gdb/utils.c:877
 #6 internal_error at ../../gdb/utils.c:887
 #7 pop_subfile at ../../gdb/buildsym.c:711
 #8 process_one_symbol at ../../gdb/dbxread.c:2987
 #9 read_ofile_symtab at ../../gdb/dbxread.c:2644
 #10 dbx_psymtab_to_symtab_1 at ../../gdb/dbxread.c:2441
 #11 dbx_psymtab_to_symtab at ../../gdb/dbxread.c:2495
 #13 psymtab_to_symtab at ../../gdb/psymtab.c:797

Potential duplicate: bug 716627

Comment 1 Szőke Károly 2013-02-02 19:15:00 UTC
Created attachment 692036 [details]
File: backtrace

Comment 2 Szőke Károly 2013-02-02 19:15:02 UTC
Created attachment 692037 [details]
File: cgroup

Comment 3 Szőke Károly 2013-02-02 19:15:04 UTC
Created attachment 692038 [details]
File: core_backtrace

Comment 4 Szőke Károly 2013-02-02 19:15:06 UTC
Created attachment 692039 [details]
File: dso_list

Comment 5 Szőke Károly 2013-02-02 19:15:08 UTC
Created attachment 692040 [details]
File: environ

Comment 6 Szőke Károly 2013-02-02 19:15:10 UTC
Created attachment 692041 [details]
File: limits

Comment 7 Szőke Károly 2013-02-02 19:15:12 UTC
Created attachment 692042 [details]
File: maps

Comment 8 Szőke Károly 2013-02-02 19:15:14 UTC
Created attachment 692043 [details]
File: open_fds

Comment 9 Szőke Károly 2013-02-02 19:15:16 UTC
Created attachment 692044 [details]
File: proc_pid_status

Comment 10 Szőke Károly 2013-02-02 19:15:19 UTC
Created attachment 692045 [details]
File: var_log_messages

Comment 11 Jan Kratochvil 2013-02-03 02:17:59 UTC
The primary problem is that you had to use STABS format (fpc -gs).  STABS is obsolete and unsupported.  Use DWARF (fpc -g).  I do not know how Lazarus passes this debug option to fpc.

Could you attach the binary being debugged?  Expecting it is:
/home/karcsi/Program/lazarus/analizis/src/analizis

Comment 12 Szőke Károly 2013-02-05 21:24:13 UTC
Created attachment 693552 [details]
The binary

This is the binary, what I ran in debug.

Comment 13 Szőke Károly 2013-02-05 21:34:58 UTC
Lazarus debug settings:
http://www.flickr.com/photos/90897110@N07/8447959777/in/photostream

Comment 14 Szőke Károly 2013-02-05 22:00:55 UTC
Program settings, what I want to debug:
http://www.flickr.com/photos/90897110@N07/8448026911/in/photostream

Paste:
http://www.szerencsejatek.hu/xls/otos.csv
Then click on Letöltés.

Consol output:
TApplication.HandleException Unknown Run-Time error : 210
  Stack trace:
  $00000000004FC88A  MAGE7BOOLEAN;2A.;FREEDATA,  line 111 of KENOANALIZIS__SETHUZASOK:F17
  $00000000004FC7F6 line 104 of KENOANALIZIS__SETHUZASOK:F17
  $000000000080EACA  
                     ?
                      L
                       M
I
  $000000000066EE69
  $00000033F4647A55
**
GLib:ERROR:gmain.c:2718:g_main_dispatch: assertion failed: (current->dispatching_sources == &current_source_link)
Félbeszakítva (core készült)

Comment 15 Jan Kratochvil 2013-02-06 06:34:49 UTC
Created attachment 693716 [details]
Lazarus build options screenshot.

The options for choosing debug format is elsewhere, see the attachment.

But debugging in Lazarus apparently uses different options than those set there - during Build All there was no debug info in the executable (as is set by the default options in this screenshot). But during debugging there was debug info, and it was the correct DWARF.

In your "analizis" executable I see a lot of STABS debug info:
readelf -WS analizis:
these two are STABS:
  [23] .stab             PROGBITS        0000000000000000 69b950 048f38
  [24] .stabstr          STRTAB          0000000000000000 6e4888 192c7c
these four are DWARF:
  [25] .debug_info       PROGBITS        0000000000000000 877504 673a31
  [26] .debug_abbrev     PROGBITS        0000000000000000 eeaf35 010a12
  [27] .debug_line       PROGBITS        0000000000000000 efb947 0c1d67
  [28] .debug_frame      PROGBITS        0000000000000000 fbd6b0 0961f0

Maybe you link in some pre-built static libraries with STABS?
When you run "maintenance info psymtabs" in GDB you get either these records, those are correct DWARF:
  { psymtab gtk2wsspin.pp ((struct partial_symtab *) 0x32b73c8)
    readin no
    fullname (null)
    text addresses 0x7ec420 -- 0x7ecab4
    psymtabs_addrmap_supported yes
    globals (* (struct partial_symbol **) 0x2e41cd8 @ 2)
    statics (* (struct partial_symbol **) 0x378ce18 @ 154)
    dependencies (none)
  }

Or these incorrect STABS records:
  { psymtab 5;2543;;FONTCHANGED::2549=##3;:14TCUSTOMCONTROL7TOBJECT;2A*114;2543;;SETCOLOR::2550=##3;:14TCUSTOMCONTROL14TGRAPHICSCOLOR;2A*122;2543;;PAINT::2551=##3;:14TCUSTOMCONTROL;2A*261;2543;;CREATE::2552=##2544;:__ct__14TCUSTOMCONTROL7POINTER10TCOMPONENT;2A*37;2543;;DESTROY::2553=##3;:__dt__14TCUSTOMCONTROL7POINTE---Type <return> to continue, or q <return> to quit---
R;2A*0;2543;;;~%4; ((struct partial_symtab *) 0x2e32448)
    readin no
    fullname (null)
    text addresses 0x837c6b -- 0x837c6b
    psymtabs_addrmap_supported no
    globals (none)
    statics (none)
    dependencies (none)
  }

See there "psymtabs_addrmap_supported no".

When you do:
(gdb) info line *0x837c6b
No line number information available for address 0x837c6b <DEBUGEND_OPENSSL>

You may get a hint where functions like DEBUGEND_OPENSSL come from.

Comment 16 Szőke Károly 2013-02-07 18:21:19 UTC
Created attachment 694696 [details]
Lazarus 1.0.4 options

This is my lazarus 1.0.4 linking settings.

Comment 17 Szőke Károly 2013-02-09 19:44:14 UTC
You can close this bug report, because I had found the problem. It was lnet package. With lnet I was'nt able to debug my program, without this package everything went all right. Thank you for your help.

Comment 18 Jan Kratochvil 2013-02-09 20:49:21 UTC
The lnet package is not distributed in Fedora I hope, at least I have not found it in Fedora.

While it is a valid GDB bug with STABS I am not going to fix it myself, there are more serious GDB bugs to fix.