public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/12929] New: Incorrect behavior with async mode
@ 2011-06-24 12:50 kevin.pouget at gmail dot com
  2011-06-24 12:59 ` [Bug python/12929] " kevin.pouget at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-06-24 12:50 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: Incorrect behavior with async mode
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: kevin.pouget@gmail.com


In asynchronous mode, commands executed from Python don't behave correctly:

(gdb) set target-async on
(gdb) py gdb.execute("attach PID") ; gdb.execute("where")
#0  0x0000003cbd0aa47e in ?? ()
#1  0x0000000000000000 in ?? ()
0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6

where as the behavior should be the same as synchronous mode:

(gdb) set target-async off
(gdb) py gdb.execute("attach PID") ; gdb.execute("where")
0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6
#0  0x0000003cbd0aa47e in waitpid () from /lib64/libc.so.6
#1  0x000000000043ede2 in ?? ()
#2  0x000000000044005f in wait_for ()
#3  0x0000000000430c45 in execute_command_internal ()
#4  0x0000000000430e0e in execute_command ()
#5  0x000000000041d526 in reader_loop ()
#6  0x000000000041ccde in main ()

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

* [Bug python/12929] Incorrect behavior with async mode
  2011-06-24 12:50 [Bug python/12929] New: Incorrect behavior with async mode kevin.pouget at gmail dot com
@ 2011-06-24 12:59 ` kevin.pouget at gmail dot com
  2011-07-11 14:27 ` [Bug cli/12929] " pmuldoon at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: kevin.pouget at gmail dot com @ 2011-06-24 12:59 UTC (permalink / raw)
  To: gdb-prs

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

Kevin Pouget <kevin.pouget at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kevin.pouget at gmail dot
                   |                            |com

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

* [Bug cli/12929] Incorrect behavior with async mode
  2011-06-24 12:50 [Bug python/12929] New: Incorrect behavior with async mode kevin.pouget at gmail dot com
  2011-06-24 12:59 ` [Bug python/12929] " kevin.pouget at gmail dot com
@ 2011-07-11 14:27 ` pmuldoon at redhat dot com
  2012-05-25 10:00 ` qiyao at gcc dot gnu.org
  2012-06-12 19:38 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: pmuldoon at redhat dot com @ 2011-07-11 14:27 UTC (permalink / raw)
  To: gdb-prs

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

Phil Muldoon <pmuldoon at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pmuldoon at redhat dot com
          Component|python                      |cli

--- Comment #1 from Phil Muldoon <pmuldoon at redhat dot com> 2011-07-11 14:26:42 UTC ---
It's not a Python issue. The issue is "attach" is not finishing in asynchronous
mode before "where" is executed.  If you do the below with asynchronous mode
"off" (the default) it works.  First the non-Python failing case.

[user@localhost gdb]$ sleep &
[2] 12216

[user@localhost gdb]$ gdb

GNU gdb (GDB) Fedora (7.2.90.20110525-39.fc15)
Copyright (C) 2011 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Setting up the environment for debugging gdb.

(gdb) set target-async on

(gdb) define at
>attach 11790
>where
>end

(gdb) at
#0  0x378ab660 in ?? ()
Backtrace stopped: Not enough registers or memory available to unwind further
During symbol reading, corrupt probe when reading
`/usr/lib/debug/lib64/libc-2.14.so.debug'.
0x00000030378ab660 in __nanosleep_nocancel () at
../sysdeps/unix/syscall-template.S:82
82    T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
Current language:  auto
The current source language is "auto; currently asm".

With target-async off:


[pmuldoon@localhost gdb]$ gdb

GNU gdb (GDB) Fedora (7.2.90.20110525-39.fc15)
Copyright (C) 2011 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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Setting up the environment for debugging gdb.

(gdb) define at
>attach 11790
>where
>end

(gdb) at
During symbol reading, corrupt probe when reading
`/usr/lib/debug/lib64/libc-2.14.so.debug'.
0x00000030378ab660 in __nanosleep_nocancel () at
../sysdeps/unix/syscall-template.S:82
82    T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
#0  0x00000030378ab660 in __nanosleep_nocancel () at
../sysdeps/unix/syscall-template.S:82
During symbol reading, incomplete CFI data; unspecified registers (e.g., rax)
at 0x30378ab66d.
#1  0x0000000000403c58 in rpl_nanosleep (requested_delay=0x7fff48c54b60,
remaining_delay=0x0) at nanosleep.c:93
#2  0x00000000004032c5 in xnanosleep (seconds=<optimized out>) at
xnanosleep.c:111
During symbol reading, cannot get low and high bounds for subprogram DIE at
859.
#3  0x0000000000401416 in main (argc=<optimized out>, argv=<optimized out>) at
sleep.c:147

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

* [Bug cli/12929] Incorrect behavior with async mode
  2011-06-24 12:50 [Bug python/12929] New: Incorrect behavior with async mode kevin.pouget at gmail dot com
  2011-06-24 12:59 ` [Bug python/12929] " kevin.pouget at gmail dot com
  2011-07-11 14:27 ` [Bug cli/12929] " pmuldoon at redhat dot com
@ 2012-05-25 10:00 ` qiyao at gcc dot gnu.org
  2012-06-12 19:38 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: qiyao at gcc dot gnu.org @ 2012-05-25 10:00 UTC (permalink / raw)
  To: gdb-prs

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

Yao Qi <qiyao at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |qiyao at gcc dot gnu.org

--- Comment #2 from Yao Qi <qiyao at gcc dot gnu.org> 2012-05-25 10:00:41 UTC ---
Looks this bug has been fixed by this patch

  Flip the interpreter to synchronously wait for commands finishing, in command
lists and similars
  http://sourceware.org/ml/gdb-patches/2011-09/msg00037.html

Can we close this one?

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

* [Bug cli/12929] Incorrect behavior with async mode
  2011-06-24 12:50 [Bug python/12929] New: Incorrect behavior with async mode kevin.pouget at gmail dot com
                   ` (2 preceding siblings ...)
  2012-05-25 10:00 ` qiyao at gcc dot gnu.org
@ 2012-06-12 19:38 ` tromey at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at redhat dot com @ 2012-06-12 19:38 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |tromey at redhat dot com
         Resolution|                            |FIXED
   Target Milestone|---                         |7.5

--- Comment #3 from Tom Tromey <tromey at redhat dot com> 2012-06-12 19:37:51 UTC ---
I tried it and it worked for me.

Yao - it is fine to use your best judgment and modify bugzilla.
Close things if you reasonably believe them to be fixed.
There isn't too much process here, and really bugzilla would
benefit from more random love.
I usually just give the bug a try first...

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

end of thread, other threads:[~2012-06-12 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-24 12:50 [Bug python/12929] New: Incorrect behavior with async mode kevin.pouget at gmail dot com
2011-06-24 12:59 ` [Bug python/12929] " kevin.pouget at gmail dot com
2011-07-11 14:27 ` [Bug cli/12929] " pmuldoon at redhat dot com
2012-05-25 10:00 ` qiyao at gcc dot gnu.org
2012-06-12 19:38 ` tromey at redhat 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).