public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/10227] GDB resumes inferior unexpectedly when receiving ignored signal; step/next behave as continue
       [not found] <bug-10227-4717@http.sourceware.org/bugzilla/>
@ 2012-07-04 17:02 ` palves at redhat dot com
  2012-10-24 15:54 ` palves at redhat dot com
  2012-10-24 16:02 ` ppluzhnikov at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: palves at redhat dot com @ 2012-07-04 17:02 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=10227

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-07-04
                 CC|                            |palves at redhat dot com
   Target Milestone|6.8                         |7.5
     Ever Confirmed|0                           |1

--- Comment #2 from Pedro Alves <palves at redhat dot com> 2012-07-04 17:02:24 UTC ---
Hi Paul,

This recent patch should have fixed this:

2012-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
            Pedro Alves  <palves@redhat.com>

        * gdbthread.h (ALL_THREADS): New macro.
        (thread_list): Declare.
        * infrun.c (handle_inferior_event) <spurious signal>: Don't keep
        going, but instead fall through to the stepping handling.
        * linux-nat.c (resume_lwp): New parameter 'signo'.  Resume with
        the passed in signal.  Adjust debug output.
        (resume_callback): Rename to ...
        (linux_nat_resume_callback): ... this.  Pass the thread's last
        stop signal, if in "pass" state.
        (linux_nat_resume): Adjust to rename.
        (stop_wait_callback): New assertion.  Don't respawn signals;
        instead let the LWP remain with SIGNALLED set.
        (linux_nat_wait_1): Remove flushing of pending SIGSTOPs.
        * remote.c (append_pending_thread_resumptions): New.
        (remote_vcont_resume): Call it.
        * target.h (target_resume): Extend comment.

I tried both your tests with current mainline, and didn't see anything wrong. 
I checkout a gdb from just before that patch, and tries your first test, and
indeed it broke.

Can you confirm?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug threads/10227] GDB resumes inferior unexpectedly when receiving ignored signal; step/next behave as continue
       [not found] <bug-10227-4717@http.sourceware.org/bugzilla/>
  2012-07-04 17:02 ` [Bug threads/10227] GDB resumes inferior unexpectedly when receiving ignored signal; step/next behave as continue palves at redhat dot com
@ 2012-10-24 15:54 ` palves at redhat dot com
  2012-10-24 16:02 ` ppluzhnikov at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: palves at redhat dot com @ 2012-10-24 15:54 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=10227

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Pedro Alves <palves at redhat dot com> 2012-10-24 15:54:38 UTC ---
Paul, I'm quite confident the issue is now fixed, so I'm closing it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug threads/10227] GDB resumes inferior unexpectedly when receiving ignored signal; step/next behave as continue
       [not found] <bug-10227-4717@http.sourceware.org/bugzilla/>
  2012-07-04 17:02 ` [Bug threads/10227] GDB resumes inferior unexpectedly when receiving ignored signal; step/next behave as continue palves at redhat dot com
  2012-10-24 15:54 ` palves at redhat dot com
@ 2012-10-24 16:02 ` ppluzhnikov at google dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2012-10-24 16:02 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=10227

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED

--- Comment #4 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-10-24 16:02:31 UTC ---
Manually confirmed fix on the original test case.
Thanks!

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug threads/10227] GDB resumes inferior unexpectedly when receiving ignored signal; step/next behave as continue
  2009-06-02  6:15 [Bug threads/10227] New: " ppluzhnikov at google dot com
@ 2009-06-02  6:36 ` ppluzhnikov at google dot com
  0 siblings, 0 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2009-06-02  6:36 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From ppluzhnikov at google dot com  2009-06-02 06:36 -------
Smaller/simpler test case:

/* compile with "gcc -pthread -g t.c"
 * Test program generates an endless stream of SIGPIPE in second thread.  */

#include <unistd.h>
#include <signal.h>
#include <pthread.h>

void *fn(void *p)
{
  int fd = *(int*)p;
  while (1) {
    int x = 1;
    x++;
    x++;
    write(fd, &x, sizeof(x));
  }
}

int foo()
{
  return 42;
}

int main()
{
  int fd[2];
  pthread_t tid;

  signal(SIGPIPE, SIG_IGN);

  if (pipe(fd) == -1)
    return 1;

  close(fd[0]);
  pthread_create(&tid, 0, fn, &fd[1]);

  while (1) {
    int x = foo();
  }
  return 0;
}


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10227

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-24 16:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10227-4717@http.sourceware.org/bugzilla/>
2012-07-04 17:02 ` [Bug threads/10227] GDB resumes inferior unexpectedly when receiving ignored signal; step/next behave as continue palves at redhat dot com
2012-10-24 15:54 ` palves at redhat dot com
2012-10-24 16:02 ` ppluzhnikov at google dot com
2009-06-02  6:15 [Bug threads/10227] New: " ppluzhnikov at google dot com
2009-06-02  6:36 ` [Bug threads/10227] " ppluzhnikov at google dot com

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).