[Bug gdb/24694] New: FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/24694] New: FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture

giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24694

            Bug ID: 24694
           Summary: FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1:
                    selected_thread=1: follow_exec_mode=same: continue
                    across exec that changes architecture
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

I see this crash occasionally.

It's hard to reproduce, I only see it in a full run, never when I run the test
alone.

I'll post more details when I run into it again.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/24694] FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture

giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24694

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
...
(gdb) PASS: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1:
follow_exec_mode=new: set follow-exec-mode new
continue^M
Continuing.^M
Couldn't get registers: No such process.^M
Couldn't get registers: No such process.^M
(gdb) FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1:
follow_exec_mode=new: continue across exec that changes architecture
...

To give the full details: this is with a gdb build with -O0 -g
-fsanitize=address -lasan, and a trunk dwz build with the same options, using
target board cc-with-dwz, testing a tentative patch for PR24515 (
https://sourceware.org/bugzilla/attachment.cgi?id=11842 ) on top of 310b3441a0
"[gdb] Fix heap-buffer-overflow in child_path".

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/24694] FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24694

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #0)
> It's hard to reproduce, I only see it in a full run, never when I run the
> test alone.

I've run the test alone, in a loop. FAILed twice out of a hundred.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/24694] FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24694

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #1)
> testing a tentative patch for PR24515 (
> https://sourceware.org/bugzilla/attachment.cgi?id=11842 ) on top of
> 310b3441a0 "[gdb] Fix heap-buffer-overflow in child_path".

Now also reproduced with trunk@86e04673b4.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/24694] FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24694

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
So, this fails occasionally:
- https://sourceware.org/ml/gdb-testers/2018-q3/msg07034.html
- https://sourceware.org/ml/gdb-testers/2018-q3/msg07271.html

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/24694] FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24694

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Producible by doing run here a couple of times (provided gdb is build with
-fsanitize=addres -lasan):
...
$ gdb --args ./gdb
/data/gdb_versions/devel/build/gdb/testsuite/outputs/gdb.multi/multi-arch-exec/1-multi-arch-exec
-q -batch -ex "break all_started" -ex run -ex "delete breakpoints" -ex "break
main" -ex "thread 1" -ex "set follow-exec-mode same" -ex "info inferior" -ex
continue
...

Then, when setting a breakpoint at perror_with_name, we get:
...
(gdb) bt
#0  perror_with_name (string=0x1862860 "ptrace") at
/data/gdb_versions/devel/src/gdb/utils.c:613
#1  0x0000000000b6285d in inf_ptrace_target::resume (this=0x22c5240
<the_amd64_linux_nat_target>, ptid=...,
    step=0, signal=GDB_SIGNAL_0) at
/data/gdb_versions/devel/src/gdb/inf-ptrace.c:371
#2  0x00000000005198e6 in linux_nat_target::low_resume (this=0x22c5240
<the_amd64_linux_nat_target>,
    ptid=<error reading variable: Cannot access memory at address
0xffffffffffffffc0>, step=0, sig=GDB_SIGNAL_0)
    at /data/gdb_versions/devel/src/gdb/linux-nat.h:144
#3  0x0000000000c33c03 in linux_resume_one_lwp_throw (lp=0x60e000004640,
step=0, signo=GDB_SIGNAL_0)
    at /data/gdb_versions/devel/src/gdb/linux-nat.c:1531
#4  0x0000000000c33e90 in linux_resume_one_lwp (lp=0x60e000004640, step=0,
signo=GDB_SIGNAL_0)
    at /data/gdb_versions/devel/src/gdb/linux-nat.c:1585
#5  0x0000000000c35701 in linux_nat_target::resume (this=0x22c5240
<the_amd64_linux_nat_target>, ptid=...,
    step=0, signo=GDB_SIGNAL_0) at
/data/gdb_versions/devel/src/gdb/linux-nat.c:1777
#6  0x0000000000c7540d in thread_db_target::resume (this=0x212d7c0
<the_thread_db_target>, ptid=..., step=0,
    signo=GDB_SIGNAL_0) at
/data/gdb_versions/devel/src/gdb/linux-thread-db.c:1822
#7  0x00000000010d6b65 in target_resume (ptid=..., step=0, signal=GDB_SIGNAL_0)
    at /data/gdb_versions/devel/src/gdb/target.c:2113
#8  0x0000000000b965c8 in do_target_resume (resume_ptid=..., step=0,
sig=GDB_SIGNAL_0)
    at /data/gdb_versions/devel/src/gdb/infrun.c:2215
#9  0x0000000000b98160 in resume_1 (sig=GDB_SIGNAL_0) at
/data/gdb_versions/devel/src/gdb/infrun.c:2600
#10 0x0000000000b9836e in resume (sig=GDB_SIGNAL_0) at
/data/gdb_versions/devel/src/gdb/infrun.c:2613
#11 0x0000000000bb96ba in keep_going_pass_signal (ecs=0x7fffffffcb00)
    at /data/gdb_versions/devel/src/gdb/infrun.c:7541
#12 0x0000000000b9b50a in proceed (addr=18446744073709551615,
siggnal=GDB_SIGNAL_DEFAULT)
    at /data/gdb_versions/devel/src/gdb/infrun.c:3031
#13 0x0000000000b724d4 in continue_1 (all_threads=0) at
/data/gdb_versions/devel/src/gdb/infcmd.c:812
--Type <RET> for more, q to quit, c to continue without paging--
#14 0x0000000000b72bc7 in continue_command (args=0x0, from_tty=0)
    at /data/gdb_versions/devel/src/gdb/infcmd.c:904
#15 0x00000000006bd7bf in do_const_cfunc (c=0x61100015dc80, args=0x0,
from_tty=0)
    at /data/gdb_versions/devel/src/gdb/cli/cli-decode.c:107
#16 0x00000000006c557b in cmd_func (cmd=0x61100015dc80, args=0x0, from_tty=0)
    at /data/gdb_versions/devel/src/gdb/cli/cli-decode.c:1939
#17 0x0000000001132a92 in execute_command (p=0x7fffffffe0fa "", from_tty=0)
    at /data/gdb_versions/devel/src/gdb/top.c:627
#18 0x0000000000cad458 in catch_command_errors (command=0x113219a
<execute_command(char const*, int)>,
    arg=0x7fffffffe0f2 "continue", from_tty=0) at
/data/gdb_versions/devel/src/gdb/main.c:372
#19 0x0000000000cafd8d in captured_main_1 (context=0x7fffffffd930)
    at /data/gdb_versions/devel/src/gdb/main.c:1136
#20 0x0000000000cb00c0 in captured_main (data=0x7fffffffd930) at
/data/gdb_versions/devel/src/gdb/main.c:1161
#21 0x0000000000cb0155 in gdb_main (args=0x7fffffffd930) at
/data/gdb_versions/devel/src/gdb/main.c:1186
#22 0x000000000046e9f6 in main (argc=20, argv=0x7fffffffda78) at
/data/gdb_versions/devel/src/gdb/gdb.c:32
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug gdb/24694] FAIL: gdb.multi/multi-arch-exec.exp: first_arch=1: selected_thread=1: follow_exec_mode=same: continue across exec that changes architecture (Couldn't get registers: No such process)

giuliomoro at yahoo dot it
In reply to this post by giuliomoro at yahoo dot it
https://sourceware.org/bugzilla/show_bug.cgi?id=24694

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|FAIL:                       |FAIL:
                   |gdb.multi/multi-arch-exec.e |gdb.multi/multi-arch-exec.e
                   |xp: first_arch=1:           |xp: first_arch=1:
                   |selected_thread=1:          |selected_thread=1:
                   |follow_exec_mode=same:      |follow_exec_mode=same:
                   |continue across exec that   |continue across exec that
                   |changes architecture        |changes architecture
                   |                            |(Couldn't get registers: No
                   |                            |such process)

--
You are receiving this mail because:
You are on the CC list for the bug.