Bug 168444 - Segfault in devel/gdb version 7.4.1
Summary: Segfault in devel/gdb version 7.4.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-29 21:40 UTC by Brett Gmoser
Modified: 2012-06-23 10:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Gmoser 2012-05-29 21:40:01 UTC
  GDB crashes when loading a core file for my application.

How-To-Repeat:   While I cannot release the binaries it attempts to load a core file for, I've build gdb with debugging symbols and pasted a stack trace below:
  
$ gdb741 -c ./gdb741.core `which gdb741`
GNU gdb (GDB) 7.4.1 [GDB v7.4.1 for FreeBSD]
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd9.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/bin/gdb741...done.
[New process 21193567]
Core was generated by `gdb741'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000000699429 in bfd_map_over_sections (abfd=0x0, operation=0x484441 <fbsd_core_get_first_lwp>, user_storage=0x7fffffffd4fc) at section.c:1284
1284      for (sect = abfd->sections; sect != NULL; i++, sect = sect->next)
(gdb) bt
#0  0x0000000000699429 in bfd_map_over_sections (abfd=0x0, operation=0x484441 <fbsd_core_get_first_lwp>, user_storage=0x7fffffffd4fc) at section.c:1284
#1  0x00000000004844ee in get_current_lwp (pid=0) at fbsd-threads.c:280
#2  0x0000000000484546 in get_current_thread () at fbsd-threads.c:297
#3  0x0000000000484904 in fbsd_thread_activate () at fbsd-threads.c:418
#4  0x0000000000484a48 in check_for_thread_db () at fbsd-threads.c:475
#5  0x0000000000484a8a in fbsd_thread_new_objfile (objfile=0x802ab9000) at fbsd-threads.c:490
#6  0x000000000044da57 in observer_new_objfile_notification_stub (data=0x484a72, args_data=0x7fffffffd7e0) at observer.inc:266
#7  0x000000000044d4cb in generic_observer_notify (subject=0x8029b7cb0, args=0x7fffffffd7e0) at observer.c:167
#8  0x000000000044dae9 in observer_notify_new_objfile (objfile=0x802ab9000) at observer.inc:291
#9  0x00000000005432b1 in symbol_file_add_with_addrs_or_offsets (abfd=0x8029d6500, add_flags=6, addrs=0x0, offsets=0x0, num_offsets=0, flags=0, parent=0x0) at symfile.c:1174
#10 0x0000000000543380 in symbol_file_add_from_bfd (abfd=0x8029d6500, add_flags=6, addrs=0x0, flags=0, parent=0x0) at symfile.c:1215
#11 0x00000000005433bc in symbol_file_add (name=0x7fffffffddeb "app.cgi", add_flags=6, addrs=0x0, flags=0) at symfile.c:1227
#12 0x0000000000543425 in symbol_file_add_main_1 (args=0x7fffffffddeb "app.cgi", from_tty=1, flags=0) at symfile.c:1250
#13 0x00000000005433e3 in symbol_file_add_main (args=0x7fffffffddeb "app.cgi", from_tty=1) at symfile.c:1243
#14 0x00000000005716b1 in catch_command_errors (command=0x5433be <symbol_file_add_main>, arg=0x7fffffffddeb "app.cgi", from_tty=1, mask=6) at exceptions.c:529
#15 0x000000000044834a in captured_main (data=0x7fffffffdb30) at ./main.c:850
#16 0x00000000005715dd in catch_errors (func=0x4476e2 <captured_main>, func_args=0x7fffffffdb30, errstring=0x76a28f "", mask=6) at exceptions.c:502
#17 0x0000000000448671 in gdb_main (args=0x7fffffffdb30) at ./main.c:951
#18 0x000000000044736f in main (argc=4, argv=0x7fffffffdba0) at gdb.c:43
(gdb)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-05-31 19:46:07 UTC
Maintainer of devel/gdb,

Please note that PR ports/168444 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/168444

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2012-05-31 19:46:10 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 luca.pizzamiglio 2012-06-04 09:33:04 UTC
I'm not able to reproduce the error.
Could you provide a minimal repro-case?
Did you see that problem on other FreeBSD version also?

Best regards,
Luca
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2012-06-20 14:51:50 UTC
State Changed
From-To: feedback->analyzed

To submitter: does the patch in ports/169265 fix this problem?
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2012-06-20 16:33:34 UTC
State Changed
From-To: analyzed->closed

See ports/168444 for a fix.
Comment 6 Mark Linimon 2012-06-20 16:34:48 UTC
----- Forwarded message from Brett Gmoser <bgmoser@codexterous.com> -----

Date: Wed, 20 Jun 2012 10:53:55 -0400
From: Brett Gmoser <bgmoser@codexterous.com>
To: linimon@FreeBSD.org
CC: luca.pizzamiglio@gmail.com, freebsd-ports-bugs@FreeBSD.org
Subject: Re: ports/168444: Segfault in devel/gdb version 7.4.1

It does, thanks! Specifically the portion at the end for
fbsd-threads.c. That portion was written by John Baldwin in an e-mail
chain between myself, John, and the maintainer for this port who is
CC'd here. Luca did say he'd integrate the patch. Definitely ok to
close this at this point if that patch is committed.

Thanks again for your time.

----- End forwarded message -----
Comment 7 dfilter service freebsd_committer freebsd_triage 2012-06-23 10:12:16 UTC
scheidell    2012-06-23 09:12:05 UTC

  FreeBSD ports repository

  Modified files:
    devel/gdb            Makefile 
    devel/gdb/files      fbsd-threads.c 
  Log:
  - Fix Segfault [1]
  - Update to OptionsNG [2]
  
  PR:             ports/168444 [1]
  PR:             ports/169265 [2]
  Reported by:    bgmoser@codexterous.com [1]
  Submitted by:   Luca Pizzamiglio <luca.pizzamiglio@gmail.com> (maintainer)
  
  Revision  Changes    Path
  1.18      +14 -13    ports/devel/gdb/Makefile
  1.4       +5 -1      ports/devel/gdb/files/fbsd-threads.c
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"