Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Possible regression on gdb.gdb/complaints.exp (was: Re: [RFA 0/9] Radically simplify the complaint system)
Date: Mon, 04 Jun 2018 20:25:00 -0000	[thread overview]
Message-ID: <87a7saz4d2.fsf@redhat.com> (raw)
In-Reply-To: <20180522050704.10845-1-tom@tromey.com> (Tom Tromey's message of	"Mon, 21 May 2018 23:06:55 -0600")

On Tuesday, May 22 2018, Tom Tromey wrote:

> I must confess, I've long disliked the complaint system.  It got in
> the way a little bit, ages ago, when I tried to multi-thread the
> psymtab reader.  And, it got in the way a bit more during one of my
> attempts to format the "Reading symbols" output more nicely (spoiler:
> I have another approach to this in the works, but I took this detour
> first).  Aside from these things, the code also seemed unusually
> complex for the task it performed.
>
> This series radically simplifies the complaint system.  It removes
> most of the code -- which, I think, has never really been used.
>
> Tested by the buildbot.  I also locally tested complaints.exp with
> each patch in the series.

Hi Tom,

While preparing a Fedora GDB release for rawhide, I stumbled upon a
failure on gdb.gdb/complaints.exp.  Here's what I see here:

  (gdb) PASS: gdb.gdb/complaints.exp: run until breakpoint at captured_command_loop
  set stop_whining = 2
  (gdb) PASS: gdb.gdb/complaints.exp: set stop_whining = 2
  set var $cstr = "Register a complaint"
  (gdb) PASS: gdb.gdb/complaints.exp: set var $cstr = "Register a complaint"
  call complaint_internal ($cstr)
  free(): invalid pointer
  
  Thread 1 "xgdb" received signal SIGSEGV, Segmentation fault.
  0x00007ffff5c535ce in raise () from /lib64/libc.so.6
  The program being debugged was signaled while in a function called from GDB.
  GDB remains in the frame where the signal was received.
  To change this behavior use "set unwindonsignal on".
  Evaluation of the expression containing the function
  (complaint_internal(char const*, ...)) will be abandoned.
  When the function is done executing, GDB will silently stop.

While trying to reproduce it on my Fedora 27, I wasn't able to trigger
the failures.  Anyway, after a lot of time investigating this issue, I
found that you have to use a recent GCC (git HEAD as of 2018-06-04, for
example), and you have to compile GDB using -O2 -g.

I'm not sure if this is a regression introduced by your patch, so I also
ran a git-bisect on GCC and found the following possible culprit:

ea5d398198b93e37e9a343dfdb7660f71fdca404 is the first bad commit
commit ea5d398198b93e37e9a343dfdb7660f71fdca404
Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Oct 19 20:19:15 2017 +0000                                                         

Not sure if it makes sense...

Anyway, I'm reporting because I thought it was the right thing to do.
As per IRC discussions recently, I know gdb.gdb/ is fragile and one idea
(by Tom) is to replace it by selftests.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/


  parent reply	other threads:[~2018-06-04 20:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22  5:09 [RFA 0/9] Radically simplify the complaint system Tom Tromey
2018-05-22  5:07 ` [RFA 2/9] Remove elements from complaint_series Tom Tromey
2018-05-22  5:07 ` [RFA 9/9] Remove struct complaints Tom Tromey
2018-05-22  5:08 ` [RFA 6/9] Remove vcomplaint Tom Tromey
2018-05-22  5:08 ` [RFA 5/9] Remove struct explanation Tom Tromey
2018-05-22  5:09 ` [RFA 8/9] Remove struct complain Tom Tromey
2018-05-22  5:09 ` [RFA 4/9] Remove symfile_complaints Tom Tromey
2018-05-22  5:09 ` [RFA 1/9] Remove internal_complaint Tom Tromey
2018-05-22  5:50 ` [RFA 3/9] Remove "noisy" parameter from clear_complaints Tom Tromey
2018-05-22  7:01 ` [RFA 7/9] Remove file and line from struct complain Tom Tromey
2018-05-23 14:49 ` [RFA 0/9] Radically simplify the complaint system Pedro Alves
2018-05-23 15:08   ` Tom Tromey
2018-05-23 17:44     ` Pedro Alves
2018-05-28 10:41       ` Tom Tromey
2018-05-28 10:41         ` Tom Tromey
2018-05-28 19:37         ` Pedro Alves
2018-05-28 22:19           ` Tom Tromey
2018-05-29 16:05             ` Pedro Alves
2018-06-04 20:25 ` Sergio Durigan Junior [this message]
2018-06-04 21:38   ` Possible regression on gdb.gdb/complaints.exp Tom Tromey
2018-06-04 23:29     ` Sergio Durigan Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7saz4d2.fsf@redhat.com \
    --to=sergiodj@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox