public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: palves@redhat.com (Pedro Alves)
Cc: tom@tromey.com (Tom Tromey), gdb-patches@sourceware.org
Subject: Re: [RFA 1/2] PR gdb/20604 - fix "quit" when an invalid expression is used
Date: Wed, 26 Oct 2016 19:44:00 -0000	[thread overview]
Message-ID: <20161026194417.E142310FDC2@oc8523832656.ibm.com> (raw)
In-Reply-To: <b9c93ad8-667d-40f4-d2bd-ff3c2a750ed1@redhat.com> from "Pedro Alves" at Sep 21, 2016 05:43:48 PM

Pedro Alves wrote:
> On 09/20/2016 11:45 PM, Tom Tromey wrote:
> >>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> > 
> > Pedro> Hi Tom, the gdb code looks fine.  Some comments on the test.
> > 
> > Pedro> Could you try the new test with --host_board=local-remote-host.exp?  
> > Pedro> That should cover at least remote ssh testing, which is what
> > Pedro> most people use nowadays, anyway.  I'd be happy with that.
> > 
> > I tried this today and it worked for me.
> > 
> >>> +close $gdb_spawn_id
> > 
> > Pedro> Maybe just calling clear_gdb_spawn_id at the end is all that's
> > Pedro> necessary?
> > 
> > Seems like a good idea, I made this change locally.
> > 
> 
> OK, thanks.  Fell free to push.  We'll do something about it if it
> causes problems on real remote hosts.

I just noticed that this test case completely breaks my daily testing.
When running the quit.exp test, GDB will hang in a way that it isn't
even killed by the timeout logic, and will keep blocking further
execution forever.

Attaching to GDB shows it blocked in an ioctl with this backtrace
(which for some reason doesn't even include the quit path ...)

#0  0x0feea474 in tcsetattr () from /lib/libc.so.6
#1  0x102d7004 in _set_tty_settings (tty=0, tiop=0x10641adc) at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/readline/rltty.c:476
#2  0x102d70e0 in set_tty_settings (tty=<value optimized out>, tiop=<value optimized out>)
    at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/readline/rltty.c:490
#3  0x102d7530 in rl_deprep_terminal () at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/readline/rltty.c:688
#4  0x102ea2d4 in rl_callback_read_char () at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/readline/callback.c:215
#5  0x1017defc in gdb_rl_callback_read_char_wrapper (client_data=<value optimized out>)
    at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/event-top.c:173
#6  0x1017ecc4 in stdin_event_handler (error=<value optimized out>, client_data=0x10650018)
    at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/event-top.c:505
#7  0x1017d630 in handle_file_event (file_ptr=0x10749238, ready_mask=<value optimized out>)
    at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/event-loop.c:733
#8  0x1017d84c in gdb_wait_for_event (block=0) at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/event-loop.c:884
#9  0x1017dc18 in gdb_do_one_event () at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/event-loop.c:322
#10 0x1017dd20 in start_event_loop () at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/event-loop.c:371
#11 0x10175968 in captured_command_loop (data=<value optimized out>) at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/main.c:325
#12 0x101714a8 in catch_errors(catch_errors_ftype *, void *, char *, ._43) (func=0x10175930 <captured_command_loop(void*)>, func_args=0x0, errstring=0x104ccb4c "", 
    mask=RETURN_MASK_ALL) at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/exceptions.c:236
#13 0x10176f54 in captured_main (args=<value optimized out>) at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/main.c:1145
#14 gdb_main (args=<value optimized out>) at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/main.c:1155
#15 0x10006e28 in main (argc=<value optimized out>, argv=<value optimized out>) at /home/uweigand/dailybuild/spu-tc-2016-10-25/binutils-gdb-head/binutils-gdb/gdb/gdb.c:32

Note that when running GDB directly, quit works fine.  The problem
occurs only when running GDB under the DejaGNU framework.

Does this ring any bells?  Any thoughts what could cause this?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2016-10-26 19:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 22:59 Tom Tromey
2016-09-14 22:59 ` [RFA 2/2] Make some test names invariant Tom Tromey
2016-09-15 15:16   ` Pedro Alves
2016-09-15 16:46     ` Tom Tromey
2016-09-15 15:06 ` [RFA 1/2] PR gdb/20604 - fix "quit" when an invalid expression is used Pedro Alves
2016-09-21  7:51   ` Tom Tromey
2016-09-21 17:16     ` Pedro Alves
2016-10-26 19:44       ` Ulrich Weigand [this message]
2016-11-03 11:21         ` Pedro Alves
2016-11-07 15:57           ` Ulrich Weigand
2017-10-17 17:28             ` Pedro Alves
2017-10-20 12:55               ` Ulrich Weigand

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=20161026194417.E142310FDC2@oc8523832656.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).