public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/29025] New: [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output)
@ 2022-04-04 14:13 vries at gcc dot gnu.org
  2022-04-04 14:22 ` [Bug testsuite/29025] " vries at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2022-04-04 14:13 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29025

            Bug ID: 29025
           Summary: [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp:
                    frame {1,2,3} (unexpected output)
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: testsuite
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

While running the gdb testsuite for gdb-12-branch on openSUSE Tumbleweed, I ran
into:
...
FAIL: gdb.mi/mi-cmd-user-context.exp: frame 1 (unexpected output)
FAIL: gdb.mi/mi-cmd-user-context.exp: frame 2 (unexpected output)
FAIL: gdb.mi/mi-cmd-user-context.exp: frame 3 (unexpected output)
...

I tried to reproduce, and managed by running in parallel with "stress -c 5", 4
times in a run of 25.

The first FAIL looks like this in more detail:
...
PASS: gdb.mi/mi-cmd-user-context.exp: info thread 5
Expecting: ^(frame[^M
]+)?(.*#0  .*child_sub_function .*[^M
]+[(]gdb[)] ^M
[ ]*)
frame^M
&"frame\n"^M
~"#0  0x00007ffff7d3049a in pthread_barrier_wait@GLIBC_2.2.5 () from
/lib64/libc.so.6\n"\
^M
^done^M
(gdb) ^M
FAIL: gdb.mi/mi-cmd-user-context.exp: frame 1 (unexpected output)
...

Reading through the source code, the behaviour makes sense.

A breakpoint is set in main, after the call to pthread_barrier_wait.

This guarantees that when the breakpoint is hit, all threads have reached the
barrier, and guarantees that the main thread has left the barrier, but not that
the other threads have left the barrier. 

So at first glance this looks like a testsuite problem.

-- 
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 testsuite/29025] [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output)
  2022-04-04 14:13 [Bug testsuite/29025] New: [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output) vries at gcc dot gnu.org
@ 2022-04-04 14:22 ` vries at gcc dot gnu.org
  2022-04-04 14:32 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2022-04-04 14:22 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29025

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simark at simark dot ca

-- 
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 testsuite/29025] [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output)
  2022-04-04 14:13 [Bug testsuite/29025] New: [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output) vries at gcc dot gnu.org
  2022-04-04 14:22 ` [Bug testsuite/29025] " vries at gcc dot gnu.org
@ 2022-04-04 14:32 ` vries at gcc dot gnu.org
  2022-04-05  8:07 ` vries at gcc dot gnu.org
  2022-04-05 12:18 ` simark at simark dot ca
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2022-04-04 14:32 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29025

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> While running the gdb testsuite for gdb-12-branch on openSUSE Tumbleweed, I
> ran into:
> ...
> FAIL: gdb.mi/mi-cmd-user-context.exp: frame 1 (unexpected output)
> FAIL: gdb.mi/mi-cmd-user-context.exp: frame 2 (unexpected output)
> FAIL: gdb.mi/mi-cmd-user-context.exp: frame 3 (unexpected output)
> ...
> 

Hm, actually the original FAIL was a reproduction of the problem fixed by this
( https://sourceware.org/pipermail/gdb-patches/2022-April/187319.html ):
...
PASS: gdb.mi/mi-cmd-user-context.exp: info thread 5
Expecting: ^(frame[^M
]+)?(.*#0  0x.*[^M
]+[(]gdb[)] ^M
[ ]*)
frame^M
&"frame\n"^M
~"#0  child_sub_function () at
/data/vries/gdb_versions/devel/src/gdb/testsuite/gdb.mi/u\
ser-selected-context-sync.c:33\n"^M
~"33\t    dummy = !dummy; /* thread loop line */\n"^M
^done^M
(gdb) ^M
FAIL: gdb.mi/mi-cmd-user-context.exp: frame 1 (unexpected output)
...

The detailed FAIL listed in comment 0, is what I got when trying reproduce.

-- 
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 testsuite/29025] [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output)
  2022-04-04 14:13 [Bug testsuite/29025] New: [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output) vries at gcc dot gnu.org
  2022-04-04 14:22 ` [Bug testsuite/29025] " vries at gcc dot gnu.org
  2022-04-04 14:32 ` vries at gcc dot gnu.org
@ 2022-04-05  8:07 ` vries at gcc dot gnu.org
  2022-04-05 12:18 ` simark at simark dot ca
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2022-04-05  8:07 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29025

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2022-April/187353.html

-- 
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 testsuite/29025] [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output)
  2022-04-04 14:13 [Bug testsuite/29025] New: [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output) vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-04-05  8:07 ` vries at gcc dot gnu.org
@ 2022-04-05 12:18 ` simark at simark dot ca
  3 siblings, 0 replies; 5+ messages in thread
From: simark at simark dot ca @ 2022-04-05 12:18 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29025

Simon Marchi <simark at simark dot ca> changed:

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

--- Comment #3 from Simon Marchi <simark at simark dot ca> ---
Fixed:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=9b571e28984a7fb757962be477322f89d2366c80

-- 
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:[~2022-04-05 12:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 14:13 [Bug testsuite/29025] New: [gdb/testsuite] FAIL: gdb.mi/mi-cmd-user-context.exp: frame {1,2,3} (unexpected output) vries at gcc dot gnu.org
2022-04-04 14:22 ` [Bug testsuite/29025] " vries at gcc dot gnu.org
2022-04-04 14:32 ` vries at gcc dot gnu.org
2022-04-05  8:07 ` vries at gcc dot gnu.org
2022-04-05 12:18 ` simark at simark dot ca

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