This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug server/19855] readline abort when debugging with rr


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

--- Comment #9 from Yichao Yu <yyc1992 at gmail dot com> ---
OK, finally back to this issue. A few things that I discovered,

1. This happens when replaying python too, it is likely that the initial slow
jit in julia makes the window that this can happen bigger.
2. The only call to `add_file_handler(fd=0, ...)` is not from any of the
(remote|target)_terminal_(ours|inferior) it is called from `gdb_setup_readline`
(see bt).

    ```
    #0  add_file_handler (fd=0, proc=proc@entry=0x5c6f5e <stdin_event_handler>,
client_data=client_data@entry=0x0) at event-loop.c:389
    #1  0x00000000005c7a3e in gdb_setup_readline () at event-top.c:1032
    #2  0x00000000004f00ce in tui_resume (data=<optimized out>) at
./tui/tui-interp.c:177
    #3  0x00000000005c0701 in interp_set (interp=0xd2f840,
top_level=top_level@entry=1) at interps.c:187
    #4  0x00000000005c1d91 in captured_main (data=data@entry=0x7fffffffdda0) at
main.c:973
    #5  0x00000000005be514 in catch_errors (func=func@entry=0x5c152f
<captured_main>, func_args=func_args@entry=0x7fffffffdda0,
errstring=errstring@entry=0x78283a "", 
        mask=mask@entry=RETURN_MASK_ALL) at exceptions.c:240
    #6  0x00000000005c225f in gdb_main (args=args@entry=0x7fffffffdda0) at
main.c:1164
    #7  0x0000000000462e1e in main (argc=<optimized out>, argv=<optimized out>)
at gdb.c:32
```

3. There are calls to `remote_terminal_inferior` however
`target_async_permitted` is always `0` so it never does anything.


    The value is set to `0` with bt

    ```
    Old value = 1
    New value = 0
    maint_set_target_async_command (args=<optimized out>, from_tty=<optimized
out>, 
        c=<optimized out>) at target.c:3890
    3890    }
    (gdb) bt
    #0  maint_set_target_async_command (args=<optimized out>, 
        from_tty=<optimized out>, c=<optimized out>) at target.c:3890
    #1  0x00000000004da294 in do_sfunc (c=<optimized out>, args=<optimized
out>, 
        from_tty=<optimized out>) at ./cli/cli-decode.c:121
    #2  0x00000000004e1ac7 in do_set_command (arg=<optimized out>, 
        arg@entry=0x148f8c7 "0", from_tty=from_tty@entry=0, c=c@entry=0xc55fd0)
        at ./cli/cli-setshow.c:455
    #3  0x000000000067eb18 in execute_command (p=<optimized out>, 
        p@entry=0x148f8b0 "maint set target-async 0", from_tty=0) at top.c:460
    #4  0x00000000005c7612 in command_handler (
        command=0x148f8b0 "maint set target-async 0") at event-top.c:463
    #5  0x000000000067f7a4 in command_loop () at top.c:546
    #6  0x000000000067f7ea in read_command_file (stream=stream@entry=0x14ce000)
        at top.c:285
    #7  0x00000000004de474 in script_from_file (stream=stream@entry=0x14ce000, 
        file=file@entry=0x7fffffffe257 "/proc/20193/fd/4") at
./cli/cli-script.c:1698
    #8  0x00000000004deb37 in source_script_from_stream (stream=0x14ce000, 
        file=file@entry=0x7fffffffe257 "/proc/20193/fd/4", 
        file_to_open=<optimized out>) at ./cli/cli-cmds.c:578
    #9  0x00000000004e06b5 in source_script_with_search (
        file=file@entry=0x7fffffffe257 "/proc/20193/fd/4", 
        from_tty=from_tty@entry=1, search_path=search_path@entry=0)
        at ./cli/cli-cmds.c:618
    #10 0x00000000004e07bc in source_script (
        file=file@entry=0x7fffffffe257 "/proc/20193/fd/4",
from_tty=from_tty@entry=1)
        at ./cli/cli-cmds.c:628
    #11 0x00000000005c12f4 in catch_command_errors_const (
        command=0x4e07ae <source_script>, arg=0x7fffffffe257
"/proc/20193/fd/4", 
        from_tty=1) at main.c:395
    #12 0x00000000005c21ab in captured_main (data=data@entry=0x7fffffffdda0)
        at main.c:1128
    #13 0x00000000005be514 in catch_errors (
        func=func@entry=0x5c152f <captured_main>, 
        func_args=func_args@entry=0x7fffffffdda0, 
        errstring=errstring@entry=0x78283a "", mask=mask@entry=RETURN_MASK_ALL)
        at exceptions.c:240
    #14 0x00000000005c225f in gdb_main (args=args@entry=0x7fffffffdda0)
        at main.c:1164
    #15 0x0000000000462e1e in main (argc=<optimized out>, argv=<optimized out>)
        at gdb.c:32
    ```

    Is this something caused by rr?

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]