public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
@ 2011-08-03 21:19 ` crow at linux dot org.ba
  2011-08-03 21:41 ` sergiodj at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: crow at linux dot org.ba @ 2011-08-03 21:19 UTC (permalink / raw)
  To: gdb-prs

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

crow <crow at linux dot org.ba> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |crow at linux dot org.ba

--- Comment #9 from crow <crow at linux dot org.ba> 2011-08-03 21:18:46 UTC ---
What is current status of this? Today i got same as in Comment 5:
But i am runing it on:
gdb --version
GNU gdb (Gentoo 7.2 p1) 7.2


[Thread 0xb798db70 (LWP 13905) exited]
[New Thread 0xb798db70 (LWP 14250)]
[Thread 0xb798db70 (LWP 14250) exited]
infrun.c:2966: internal-error: handle_inferior_event: Assertion `inf' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
infrun.c:2966: internal-error: handle_inferior_event: Assertion `inf' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Aborted (core dumped)

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
  2011-08-03 21:19 ` [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np crow at linux dot org.ba
@ 2011-08-03 21:41 ` sergiodj at redhat dot com
  2012-05-29 16:17 ` palves at redhat dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: sergiodj at redhat dot com @ 2011-08-03 21:41 UTC (permalink / raw)
  To: gdb-prs

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

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sergiodj at redhat dot com

--- Comment #10 from Sergio Durigan Junior <sergiodj at redhat dot com> 2011-08-03 21:40:32 UTC ---
FWIW I made a test using FSF GDB HEAD and the testcase posted on comment #1,
and everything worked.

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
  2011-08-03 21:19 ` [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np crow at linux dot org.ba
  2011-08-03 21:41 ` sergiodj at redhat dot com
@ 2012-05-29 16:17 ` palves at redhat dot com
  2012-06-14 15:01 ` palves at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: palves at redhat dot com @ 2012-05-29 16:17 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4839|0                           |1
        is obsolete|                            |
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at sourceware    |palves at redhat dot com
                   |dot org                     |

--- Comment #11 from Pedro Alves <palves at redhat dot com> 2012-05-29 16:16:03 UTC ---
Created attachment 6426
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6426
reproducer 2

@Sergio, your machine probably has more than 4 cores.  The problem happens when
pthread_create fails due to attempting to set the thread affinity to a
non-existing cpu.  Try with this tweaked reproducer.

$ gcc affinity2.c -o affinity2 -pthread
$ ./affinity2
binding to cpu 0
binding to cpu 1
binding to cpu 2
binding to cpu 3
binding to cpu 4
pthread_create: 22: Invalid argument

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-05-29 16:17 ` palves at redhat dot com
@ 2012-06-14 15:01 ` palves at redhat dot com
  2012-06-14 15:17 ` palves at redhat dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: palves at redhat dot com @ 2012-06-14 15:01 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #12 from Pedro Alves <palves at redhat dot com> 2012-06-14 15:00:42 UTC ---
When the TARGET_WAITKIND_SPURIOUS patch is hit, this is what the thread
that reported a trap is doing:

(gdb) bt
#0  0x000000363be0f991 in __GI__dl_debug_state () at dl-debug.c:77
#1  0x000000363be06a1a in _dl_map_object_from_fd (name=name@entry=0x363ca1153f
"libgcc_s.so.1", fd=fd@entry=11, fbp=fbp@entry=0x7ffff5fcd080, 
    realname=0x7ffff00008c0 "/lib64/libgcc_s.so.1", loader=loader@entry=0x0,
l_type=l_type@entry=2, mode=mode@entry=-1879048191, 
    stack_endp=stack_endp@entry=0x7ffff5fcd3e0, nsid=nsid@entry=0) at
dl-load.c:1042
#2  0x000000363be086bc in _dl_map_object (loader=0x0,
loader@entry=0x7ffff7ffd658, name=name@entry=0x363ca1153f "libgcc_s.so.1",
type=type@entry=2, 
    trace_mode=trace_mode@entry=0, mode=mode@entry=-1879048191, nsid=<optimized
out>) at dl-load.c:2342
#3  0x000000363be136a4 in dl_open_worker (a=a@entry=0x7ffff5fcd5f0) at
dl-open.c:225
#4  0x000000363be0f006 in _dl_catch_error
(objname=objname@entry=0x7ffff5fcd638,
errstring=errstring@entry=0x7ffff5fcd640,
mallocedp=mallocedp@entry=0x7ffff5fcd64f, 
    operate=operate@entry=0x363be13560 <dl_open_worker>,
args=args@entry=0x7ffff5fcd5f0) at dl-error.c:178
#5  0x000000363be1317a in _dl_open (file=0x363ca1153f "libgcc_s.so.1",
mode=-2147483647, caller_dlopen=0x363ca0fc2c <pthread_cancel_init+76>, nsid=-2,
argc=1, 
    argv=<optimized out>, env=0x7fffffffdd98) at dl-open.c:575
#6  0x000000363c32c7d2 in do_dlopen (ptr=ptr@entry=0x7ffff5fcd7f0) at
dl-libc.c:89
#7  0x000000363be0f006 in _dl_catch_error (objname=0x7ffff5fcd820,
errstring=0x7ffff5fcd810, mallocedp=0x7ffff5fcd82f, operate=0x363c32c790
<do_dlopen>, 
    args=0x7ffff5fcd7f0) at dl-error.c:178
#8  0x000000363c32c894 in dlerror_run (args=0x7ffff5fcd7f0,
operate=0x363c32c790 <do_dlopen>) at dl-libc.c:48
#9  __GI___libc_dlopen_mode (name=name@entry=0x363ca1153f "libgcc_s.so.1",
mode=mode@entry=-2147483647) at dl-libc.c:165
#10 0x000000363ca0fc2c in pthread_cancel_init () at
../nptl/sysdeps/pthread/unwind-forcedunwind.c:53
#11 0x000000363ca0fdec in _Unwind_ForcedUnwind (exc=<optimized out>,
stop=stop@entry=0x363ca0dfc0 <unwind_stop>, stop_argument=<optimized out>)
    at ../nptl/sysdeps/pthread/unwind-forcedunwind.c:130
#12 0x000000363ca0e150 in __GI___pthread_unwind (buf=<optimized out>) at
unwind.c:130
#13 0x000000363ca067aa in __do_cancel () at ../nptl/pthreadP.h:265
#14 sigcancel_handler (sig=<optimized out>, si=<optimized out>, ctx=<optimized
out>) at nptl-init.c:221
#15 sigcancel_handler (sig=<optimized out>, si=<optimized out>, ctx=<optimized
out>) at nptl-init.c:174
#16 <signal handler called>
#17 __lll_lock_wait_private () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:96
#18 0x000000363ca08d83 in _L_lock_3093 () from /lib64/libpthread.so.0
#19 0x000000363ca07f8a in start_thread (arg=0x7ffff5fce700) at
pthread_create.c:298
#20 0x000000363c2f0f5d in clone () at
../sysdeps/unix/sysv/linux/x86_64/clone.S:115

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-06-14 15:01 ` palves at redhat dot com
@ 2012-06-14 15:17 ` palves at redhat dot com
  2012-07-20 17:28 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 17+ messages in thread
From: palves at redhat dot com @ 2012-06-14 15:17 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #13 from Pedro Alves <palves at redhat dot com> 2012-06-14 15:16:42 UTC ---
IOW, this was a dlopen event.

For pthread_create, glibc clones the new thread stopped, and afterwards when it
sets the affinity on it, and sees that failing, it kills the new clone with a
SIGCANCEL, which triggers the unwinding, which does '__libc_dlopen
(LIBGCC_S_SO)'.

Tweaking the reproducer to do only the failing pthread_create doesn't make the
issue reproducible all the time, unfortunately.

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-06-14 15:17 ` palves at redhat dot com
@ 2012-07-20 17:28 ` cvs-commit at gcc dot gnu.org
  2012-07-20 17:36 ` palves at redhat dot com
  2012-07-21  9:43 ` palves at redhat dot com
  7 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2012-07-20 17:28 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #14 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-07-20 17:27:37 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    palves@sourceware.org    2012-07-20 17:27:29

Modified files:
    gdb            : ChangeLog infrun.c linux-thread-db.c 
    gdb/testsuite  : ChangeLog 
Added files:
    gdb/testsuite/gdb.threads: create-fail.c create-fail.exp 

Log message:
    2012-07-20  Pedro Alves  <palves@redhat.com>

    PR threads/11692
    PR gdb/12203

    gdb/
    * infrun.c (handle_inferior_event) <new thread>: Don't special
    case minus_one_ptid.
    <TARGET_WAITKIND_SPURIOUS>: Ditto.
    * linux-thread-db.c (thread_get_info_callback): Don't return early
    if the thread is zombie.
    (thread_from_lwp): Change return type to void.  Rewrite stale
    comment.
    (attach_thread): Don't return early if the thread is zombie,
    instead set its "dying" flag.
    (thread_db_wait): Don't return TARGET_WAITKIND_SPURIOUS anymore.
    (find_new_threads_callback): Don't return early if the thread is
    zombie.

    gdb/testsuite/
    * gdb.threads/create-fail.c: New file.
    * gdb.threads/create-fail.exp: New file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14504&r2=1.14505
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/infrun.c.diff?cvsroot=src&r1=1.551&r2=1.552
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/linux-thread-db.c.diff?cvsroot=src&r1=1.104&r2=1.105
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/ChangeLog.diff?cvsroot=src&r1=1.3300&r2=1.3301
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.threads/create-fail.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/testsuite/gdb.threads/create-fail.exp.diff?cvsroot=src&r1=NONE&r2=1.1

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2012-07-20 17:28 ` cvs-commit at gcc dot gnu.org
@ 2012-07-20 17:36 ` palves at redhat dot com
  2012-07-21  9:43 ` palves at redhat dot com
  7 siblings, 0 replies; 17+ messages in thread
From: palves at redhat dot com @ 2012-07-20 17:36 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <palves at redhat dot com> changed:

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

--- Comment #15 from Pedro Alves <palves at redhat dot com> 2012-07-20 17:35:14 UTC ---
Patch checked in.

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
       [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2012-07-20 17:36 ` palves at redhat dot com
@ 2012-07-21  9:43 ` palves at redhat dot com
  7 siblings, 0 replies; 17+ messages in thread
From: palves at redhat dot com @ 2012-07-21  9:43 UTC (permalink / raw)
  To: gdb-prs

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

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|7.1                         |7.6

-- 
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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
                   ` (7 preceding siblings ...)
  2010-06-11 11:20 ` pedro at codesourcery dot com
@ 2010-06-11 11:29 ` pedro at codesourcery dot com
  8 siblings, 0 replies; 17+ messages in thread
From: pedro at codesourcery dot com @ 2010-06-11 11:29 UTC (permalink / raw)
  To: gdb-prs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
                   ` (6 preceding siblings ...)
  2010-06-11 11:07 ` frederic dot riss at gmail dot com
@ 2010-06-11 11:20 ` pedro at codesourcery dot com
  2010-06-11 11:29 ` pedro at codesourcery dot com
  8 siblings, 0 replies; 17+ messages in thread
From: pedro at codesourcery dot com @ 2010-06-11 11:20 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2010-06-11 11:20 -------
Hmmm, problem is linux-thread-db.c is returning a minus_one_ptid to infrun when
this happens.  See:

WL: waitpid Thread 0xb7fe16c0 (LWP 22258) received Stopped (signal) (stopped)
LLW: trap ptid is LWP 22262.
infrun: target_wait (-1, status) =
infrun:   -1 [process -1],
infrun:   status->kind = spurious

  if (have_threads (ptid))
    {
      /* Change ptids back into the higher level PID + TID format.  If
	 the thread is dead and no longer on the thread list, we will
	 get back a dead ptid.  This can occur if the thread death
	 event gets postponed by other simultaneous events.  In such a
	 case, we want to just ignore the event and continue on.  */

      ptid = thread_from_lwp (ptid);
      if (GET_PID (ptid) == -1)
	ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
    }

inferior -1 will obviously not be in the inferior table.

I'm not 100% certain what's best.  I've wanted to get rid of
TARGET_WAITKIND_SPURIOUS before, this may be the last drop.  :-)


-- 


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
                   ` (5 preceding siblings ...)
  2010-06-11 11:01 ` pedro at codesourcery dot com
@ 2010-06-11 11:07 ` frederic dot riss at gmail dot com
  2010-06-11 11:20 ` pedro at codesourcery dot com
  2010-06-11 11:29 ` pedro at codesourcery dot com
  8 siblings, 0 replies; 17+ messages in thread
From: frederic dot riss at gmail dot com @ 2010-06-11 11:07 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From frederic dot riss at gmail dot com  2010-06-11 11:07 -------
Having debugged my code a bit further, this could very well be a bug in
libthread_db (One might argue that GDB shouldn't crash anyways). The thing is
that the second thread creation of the program will fail because the cpu_set
does reference an unexisting CPU. Thus there could be some thread event because
pthread_create is called, but the thread never actually exists because the call
fails. Strange thing is that this doesn't happen if you only launch one thread,
you have to launch a second one for the problem to appear.

Here's the requested debug output:
(gdb) set debug infrun 1
(gdb) set debug lin-lwp 1
(gdb) r
Starting program: /tmp/a.out 
linux_nat_wait: [process 22258]
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLW: Candidate event Trace/breakpoint trap (stopped) in process 22258.
LLW: trap ptid is process 22258.
LLR: Preparing to resume process 22258, 0, inferior_ptid process 22258
RC: Not resuming sibling process 22258 (not stopped)
LLR: PTRACE_CONT process 22258, 0 (resume event thread)
linux_nat_wait: [process 22258]
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLW: Candidate event Trace/breakpoint trap (stopped) in process 22258.
LLW: trap ptid is process 22258.
infrun: proceed (addr=0x726850, signal=0, step=0)
infrun: resume (step=0, signal=0), trap_expected=0
LLR: Preparing to resume process 22258, 0, inferior_ptid process 22258
RC: Not resuming sibling process 22258 (not stopped)
LLR: PTRACE_CONT process 22258, 0 (resume event thread)
infrun: wait_for_inferior (treat_exec_as_sigtrap=0)
linux_nat_wait: [process -1]
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLW: Candidate event Trace/breakpoint trap (stopped) in process 22258.
LLW: trap ptid is process 22258.
infrun: target_wait (-1, status) =
infrun:   22258 [process 22258],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x7350d0
infrun: BPSTAT_WHAT_CHECK_SHLIBS
infrun: no stepping, continue
infrun: resume (step=1, signal=0), trap_expected=1
LLR: Preparing to step process 22258, 0, inferior_ptid process 22258
LLR: PTRACE_SINGLESTEP process 22258, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLW: Candidate event Trace/breakpoint trap (stopped) in process 22258.
SEL: Select single-step process 22258
LLW: trap ptid is process 22258.
infrun: target_wait (-1, status) =
infrun:   22258 [process 22258],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x7350d1
infrun: no stepping, continue
infrun: resume (step=0, signal=0), trap_expected=0
LLR: Preparing to resume process 22258, 0, inferior_ptid process 22258
RC: Not resuming sibling process 22258 (not stopped)
LLR: PTRACE_CONT process 22258, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLW: Candidate event Trace/breakpoint trap (stopped) in process 22258.
LLW: trap ptid is process 22258.
infrun: target_wait (-1, status) =
infrun:   22258 [process 22258],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x7350d0
infrun: BPSTAT_WHAT_CHECK_SHLIBS
[Thread debugging using libthread_db enabled]
infrun: no stepping, continue
infrun: resume (step=1, signal=0), trap_expected=1
LLR: Preparing to step process 22258, 0, inferior_ptid process 22258
LLR: PTRACE_SINGLESTEP process 22258, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLW: Candidate event Trace/breakpoint trap (stopped) in process 22258.
SEL: Select single-step process 22258
LLW: trap ptid is process 22258.
infrun: target_wait (-1, status) =
infrun:   22258 [process 22258],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x7350d1
infrun: no stepping, continue
infrun: resume (step=0, signal=0), trap_expected=0
LLR: Preparing to resume process 22258, 0, inferior_ptid process 22258
RC: Not resuming sibling process 22258 (not stopped)
LLR: PTRACE_CONT process 22258, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
LLW: waitpid 22261 received Stopped (signal) (stopped)
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLW: Handling extended status 0x03057f
LHEW: Got clone event from LWP 22258, resuming
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLTA: KILL(SIG0) LWP 22258 (OK)
LLW: Candidate event Trace/breakpoint trap (stopped) in LWP 22258.
SC:  kill LWP 22261 **<SIGSTOP>**
SC:  lwp kill 0 ERRNO-OK
WL: waitpid LWP 22261 received Stopped (signal) (stopped)
LLW: trap ptid is LWP 22258.
[New Thread 0xb7fe0b70 (LWP 22261)]
infrun: target_wait (-1, status) =
infrun:   22258 [Thread 0xb7fe16c0 (LWP 22258)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x8f7980
infrun: BPSTAT_WHAT_SINGLE
infrun: no stepping, continue
infrun: resume (step=1, signal=0), trap_expected=1
LLR: Preparing to step Thread 0xb7fe16c0 (LWP 22258), 0, inferior_ptid Thread
0xb7fe16c0 (LWP 22258)
LLR: PTRACE_SINGLESTEP process 22258, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
LLW: waitpid 22258 received Trace/breakpoint trap (stopped)
LLTA: KILL(SIG0) Thread 0xb7fe16c0 (LWP 22258) (OK)
LLW: Candidate event Trace/breakpoint trap (stopped) in Thread 0xb7fe16c0 (LWP
22258).
SEL: Select single-step Thread 0xb7fe16c0 (LWP 22258)
LLW: trap ptid is Thread 0xb7fe16c0 (LWP 22258).
infrun: target_wait (-1, status) =
infrun:   22258 [Thread 0xb7fe16c0 (LWP 22258)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x8f7981
infrun: no stepping, continue
infrun: resume (step=0, signal=0), trap_expected=0
LLR: Preparing to resume process 22258, 0, inferior_ptid Thread 0xb7fe16c0 (LWP
22258)
RC:  PTRACE_CONT Thread 0xb7fe0b70 (LWP 22261), 0, 0 (resuming sibling)
RC:  PTRACE_CONT Thread 0xb7fe0b70 (LWP 22261), 0, 0 (resume sibling)
RC: Not resuming sibling Thread 0xb7fe16c0 (LWP 22258) (not stopped)
LLR: PTRACE_CONT process 22258, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
I'm alive!
LLW: waitpid 22262 received Stopped (signal) (stopped)
LLW: waitpid 22261 received Trace/breakpoint trap (stopped)
LLTA: KILL(SIG0) Thread 0xb7fe0b70 (LWP 22261) (OK)
LLW: Candidate event Trace/breakpoint trap (stopped) in Thread 0xb7fe0b70 (LWP
22261).
SC:  kill Thread 0xb7fe16c0 (LWP 22258) **<SIGSTOP>**
SC:  lwp kill 0 ERRNO-OK
WL: waitpid Thread 0xb7fe16c0 (LWP 22258) received Trace/breakpoint trap (stopped)
WL: Handling extended status 0x03057f
LHEW: Got clone event from LWP 22258, resuming
WL: waitpid Thread 0xb7fe16c0 (LWP 22258) received Stopped (signal) (stopped)
LLW: trap ptid is Thread 0xb7fe0b70 (LWP 22261).
infrun: target_wait (-1, status) =
infrun:   22258 [Thread 0xb7fe0b70 (LWP 22261)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x8f7990
infrun: context switch
infrun: Switching context from Thread 0xb7fe16c0 (LWP 22258) to Thread
0xb7fe0b70 (LWP 22261)
infrun: BPSTAT_WHAT_SINGLE
infrun: no stepping, continue
infrun: resume (step=1, signal=0), trap_expected=1
LLR: Preparing to step Thread 0xb7fe0b70 (LWP 22261), 0, inferior_ptid Thread
0xb7fe0b70 (LWP 22261)
LLR: PTRACE_SINGLESTEP process 22261, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
LLW: waitpid 22261 received Trace/breakpoint trap (stopped)
LLTA: KILL(SIG0) Thread 0xb7fe0b70 (LWP 22261) (OK)
LLW: Candidate event Trace/breakpoint trap (stopped) in Thread 0xb7fe0b70 (LWP
22261).
SEL: Select single-step Thread 0xb7fe0b70 (LWP 22261)
LLW: trap ptid is Thread 0xb7fe0b70 (LWP 22261).
infrun: target_wait (-1, status) =
infrun:   22258 [Thread 0xb7fe0b70 (LWP 22261)],
infrun:   status->kind = stopped, signal = SIGTRAP
infrun: infwait_normal_state
infrun: TARGET_WAITKIND_STOPPED
infrun: stop_pc = 0x8f7991
infrun: no stepping, continue
infrun: resume (step=0, signal=0), trap_expected=0
LLR: Preparing to resume process 22258, 0, inferior_ptid Thread 0xb7fe0b70 (LWP
22261)
RC:  PTRACE_CONT LWP 22262, 0, 0 (resuming sibling)
RC:  PTRACE_CONT LWP 22262, 0, 0 (resume sibling)
RC: Not resuming sibling Thread 0xb7fe0b70 (LWP 22261) (not stopped)
RC:  PTRACE_CONT Thread 0xb7fe16c0 (LWP 22258), 0, 0 (resuming sibling)
RC:  PTRACE_CONT Thread 0xb7fe16c0 (LWP 22258), 0, 0 (resume sibling)
LLR: PTRACE_CONT process 22261, 0 (resume event thread)
infrun: prepare_to_wait
linux_nat_wait: [process -1]
LLW: waitpid 22262 received Unknown signal 32 (stopped)
LLTA: KILL(SIG0) LWP 22262 (OK)
LLW: PTRACE_CONT LWP 22262, Unknown signal 77 (preempt 'handle')
LLW: waitpid 22261 received 0 (exited)
LLW: Thread 0xb7fe0b70 (LWP 22261) exited.
[Thread 0xb7fe0b70 (LWP 22261) exited]
LLW: waitpid 22262 received Trace/breakpoint trap (stopped)
LLTA: KILL(SIG0) LWP 22262 (OK)
LLW: Candidate event Trace/breakpoint trap (stopped) in LWP 22262.
SC:  kill Thread 0xb7fe16c0 (LWP 22258) **<SIGSTOP>**
SC:  lwp kill 0 ERRNO-OK
WL: waitpid Thread 0xb7fe16c0 (LWP 22258) received Stopped (signal) (stopped)
LLW: trap ptid is LWP 22262.
infrun: target_wait (-1, status) =
infrun:   -1 [process -1],
infrun:   status->kind = spurious
../../gdb/infrun.c:2887: internal-error: handle_inferior_event: Assertion `inf'
failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) 



-- 


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
                   ` (4 preceding siblings ...)
  2010-06-11 10:55 ` frederic dot riss at gmail dot com
@ 2010-06-11 11:01 ` pedro at codesourcery dot com
  2010-06-11 11:07 ` frederic dot riss at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: pedro at codesourcery dot com @ 2010-06-11 11:01 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2010-06-11 11:01 -------
No problem.  I'm not clear on what is happening.  core gdb gets a 
non-process-exit debug event, but the inferior is already gone from the inferior 
table.  To be super complete, and if you still have patience, you'd also 
paste the gdb log leading up to the internal error when you run with both "set 
debug infrun 1", and "set debug lin-lwp 1" set.  That should clear things up.


-- 


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
                   ` (3 preceding siblings ...)
  2010-06-11 10:54 ` pedro at codesourcery dot com
@ 2010-06-11 10:55 ` frederic dot riss at gmail dot com
  2010-06-11 11:01 ` pedro at codesourcery dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: frederic dot riss at gmail dot com @ 2010-06-11 10:55 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From frederic dot riss at gmail dot com  2010-06-11 10:55 -------
Sorry, that's all things I should have sent with the initial report... Here it is:

(gdb) r
Starting program: /tmp/a.out 
[Thread debugging using libthread_db enabled]
[New Thread 0xb7fe0b70 (LWP 21624)]
I'm alive!
[Thread 0xb7fe0b70 (LWP 21624) exited]
../../gdb/infrun.c:2887: internal-error: handle_inferior_event: Assertion `inf'
failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) ^C


-- 


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
                   ` (2 preceding siblings ...)
  2010-06-11 10:43 ` frederic dot riss at gmail dot com
@ 2010-06-11 10:54 ` pedro at codesourcery dot com
  2010-06-11 10:55 ` frederic dot riss at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: pedro at codesourcery dot com @ 2010-06-11 10:54 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2010-06-11 10:54 -------
Thanks.  It's also helpful to have a paste of the internal error gdb showed up
here.  From the backtrace, it looks to be inf != NULL.  Can you paste that, so
the report is more complete?  Thanks.


-- 


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
  2010-06-11  8:51 ` [Bug threads/11692] " frederic dot riss at gmail dot com
  2010-06-11 10:36 ` pedro at codesourcery dot com
@ 2010-06-11 10:43 ` frederic dot riss at gmail dot com
  2010-06-11 10:54 ` pedro at codesourcery dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: frederic dot riss at gmail dot com @ 2010-06-11 10:43 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From frederic dot riss at gmail dot com  2010-06-11 10:43 -------
I'm having the issue on i686, not x86_64. Here's the backtrace:

(gdb) bt
#0  0x00a66416 in __kernel_vsyscall ()
#1  0x00813003 in __read_nocancel () from /lib/libc.so.6
#2  0x007b21cb in _IO_new_file_underflow () from /lib/libc.so.6
#3  0x007b3dcb in _IO_default_uflow_internal () from /lib/libc.so.6
#4  0x007b53da in __uflow () from /lib/libc.so.6
#5  0x007aea4c in getc () from /lib/libc.so.6
#6  0x0805a1ee in defaulted_query (
    ctlstr=0x8306d88 "%s\nQuit this debugging session? ", defchar=0 '\000', 
    args=0xbfffea44 "\230sU\bG\v") at ../../gdb/utils.c:1562
#7  0x0805a3b8 in query (ctlstr=0x8306d88 "%s\nQuit this debugging session? ")
    at ../../gdb/utils.c:1672
#8  0x08059633 in internal_vproblem (problem=0x8400b18, 
    file=0x834209f "../../gdb/infrun.c", line=2887, 
    fmt=0x834214d "%s: Assertion `%s' failed.", 
    ap=0xbfffeaec "\245S4\b\224'4\b") at ../../gdb/utils.c:1003
#9  0x08059791 in internal_verror (file=0x834209f "../../gdb/infrun.c", 
    line=2887, fmt=0x834214d "%s: Assertion `%s' failed.", 
    ap=0xbfffeaec "\245S4\b\224'4\b") at ../../gdb/utils.c:1059
#10 0x080597c9 in internal_error (file=0x834209f "../../gdb/infrun.c", 
    line=2887, string=0x834214d "%s: Assertion `%s' failed.")
    at ../../gdb/utils.c:1069
#11 0x0814d163 in handle_inferior_event (ecs=0xbfffecec)
    at ../../gdb/infrun.c:2887
#12 0x0814c73f in wait_for_inferior (treat_exec_as_sigtrap=0)
    at ../../gdb/infrun.c:2472
#13 0x0814bc36 in proceed (addr=7497808, siggnal=TARGET_SIGNAL_0, step=0)
    at ../../gdb/infrun.c:1985
#14 0x08145753 in run_command_1 (args=0x0, from_tty=1, tbreak_at_main=0)
    at ../../gdb/infcmd.c:586
#15 0x08145783 in run_command (args=0x0, from_tty=1) at ../../gdb/infcmd.c:596
#16 0x080c1647 in do_cfunc (c=0x8453b90, args=0x0, from_tty=1)
    at ../../gdb/cli/cli-decode.c:67
#17 0x080c3cf5 in cmd_func (cmd=0x8453b90, args=0x0, from_tty=1)
    at ../../gdb/cli/cli-decode.c:1771
#18 0x08056cf3 in execute_command (p=0x84269a9 "", from_tty=1)
    at ../../gdb/top.c:441
#19 0x08164228 in command_handler (command=0x84269a8 "")
    at ../../gdb/event-top.c:512
#20 0x08164860 in command_line_handler (rl=0x8503d28 "8=P\b\bLP\b")
    at ../../gdb/event-top.c:736
#21 0x0825119a in rl_callback_read_char () at ../../readline/callback.c:205
#22 0x081639bf in rl_callback_read_char_wrapper (client_data=0x0)
    at ../../gdb/event-top.c:178
#23 0x081640f5 in stdin_event_handler (error=0, client_data=0x0)
    at ../../gdb/event-top.c:433
#24 0x08162e88 in handle_file_event (data=...) at ../../gdb/event-loop.c:817
#25 0x081626cc in process_event () at ../../gdb/event-loop.c:399
#26 0x08162790 in gdb_do_one_event (data=0x0) at ../../gdb/event-loop.c:464
#27 0x0815d622 in catch_errors (func=0x81626da <gdb_do_one_event>, 
    func_args=0x0, errstring=0x8321bf3 "", mask=6)
    at ../../gdb/exceptions.c:518
#28 0x080d68dc in tui_command_loop (data=0x0) at ../../gdb/tui/tui-interp.c:171
#29 0x0815dcf4 in current_interp_command_loop () at ../../gdb/interps.c:291
#30 0x0804dece in captured_command_loop (data=0x0) at ../../gdb/main.c:235
#31 0x0815d622 in catch_errors (func=0x804dec3 <captured_command_loop>, 
    func_args=0x0, errstring=0x8303563 "", mask=6)
    at ../../gdb/exceptions.c:518
#32 0x0804ee39 in captured_main (data=0xbffff290) at ../../gdb/main.c:936
#33 0x0815d622 in catch_errors (func=0x804df04 <captured_main>, 
    func_args=0xbffff290, errstring=0x8303563 "", mask=6)
    at ../../gdb/exceptions.c:518
#34 0x0804ee6f in gdb_main (args=0xbffff290) at ../../gdb/main.c:945
#35 0x0804dc53 in main (argc=2, argv=0xbffff354) at ../../gdb/gdb.c:34


-- 


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
  2010-06-11  8:51 ` [Bug threads/11692] " frederic dot riss at gmail dot com
@ 2010-06-11 10:36 ` pedro at codesourcery dot com
  2010-06-11 10:43 ` frederic dot riss at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: pedro at codesourcery dot com @ 2010-06-11 10:36 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From pedro at codesourcery dot com  2010-06-11 10:36 -------
I tried this on mainline with x86_64 linux, and saw no internal error.  If this
happens in mainline for you, can you paste the gdb backtrace?


-- 


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

------- 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] 17+ messages in thread

* [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np
  2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
@ 2010-06-11  8:51 ` frederic dot riss at gmail dot com
  2010-06-11 10:36 ` pedro at codesourcery dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: frederic dot riss at gmail dot com @ 2010-06-11  8:51 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From frederic dot riss at gmail dot com  2010-06-11 08:51 -------
Created an attachment (id=4839)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4839&action=view)
program reproducing the issue


-- 


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

------- 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] 17+ messages in thread

end of thread, other threads:[~2012-07-21  9:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11692-4717@http.sourceware.org/bugzilla/>
2011-08-03 21:19 ` [Bug threads/11692] GDB internal error when using pthread_attr_setaffinity_np crow at linux dot org.ba
2011-08-03 21:41 ` sergiodj at redhat dot com
2012-05-29 16:17 ` palves at redhat dot com
2012-06-14 15:01 ` palves at redhat dot com
2012-06-14 15:17 ` palves at redhat dot com
2012-07-20 17:28 ` cvs-commit at gcc dot gnu.org
2012-07-20 17:36 ` palves at redhat dot com
2012-07-21  9:43 ` palves at redhat dot com
2010-06-11  8:51 [Bug threads/11692] New: " frederic dot riss at gmail dot com
2010-06-11  8:51 ` [Bug threads/11692] " frederic dot riss at gmail dot com
2010-06-11 10:36 ` pedro at codesourcery dot com
2010-06-11 10:43 ` frederic dot riss at gmail dot com
2010-06-11 10:54 ` pedro at codesourcery dot com
2010-06-11 10:55 ` frederic dot riss at gmail dot com
2010-06-11 11:01 ` pedro at codesourcery dot com
2010-06-11 11:07 ` frederic dot riss at gmail dot com
2010-06-11 11:20 ` pedro at codesourcery dot com
2010-06-11 11:29 ` pedro at codesourcery 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).