Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are exceptions in GDB system calls and IO #1170

Closed
n-WN opened this issue May 10, 2024 · 3 comments
Closed

There are exceptions in GDB system calls and IO #1170

n-WN opened this issue May 10, 2024 · 3 comments
Labels
t/bug Something isn't working

Comments

@n-WN
Copy link

n-WN commented May 10, 2024

Describe the bug

env: arm CPU run x86 Ubuntu

test code

@ubuntu86:~/jyy$ cat hello.c
int main() {
}
@ubuntu86:~/jyy$ gcc hello.c
@ubuntu86:~/jyy$ ./a.out
@ubuntu86:~/jyy$ gdb ./a.out
@ubuntu86:~/jyy$ gdb ./a.out
GNU gdb (Ubuntu 14.0.50.20230907-0ubuntu1) 14.0.50.20230907-git
Copyright (C) 2023 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-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
pwndbg: loaded 156 pwndbg commands and 44 shell commands. Type pwndbg [--shell | --all] [filter] for a list.
pwndbg: created $rebase, $base, $ida GDB functions (can be used with print/break)
Reading symbols from ./a.out...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.ubuntu.com>
Debuginfod has been disabled.
To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
(No debugging symbols found in ./a.out)
------- tip of the day (disable with set show-tips off) -------
Use vmmap -A|-B <number> <filter> to display <number> of maps after/before filtered ones
pwndbg> r
Starting program: /home/a.out
warning: linux_ptrace_test_ret_to_nx: Cannot PTRACE_GETREGS: Input/output error
warning: linux_ptrace_test_ret_to_nx: PC 0x9ffffe970 is neither near return address 0x7ffffffc2000 nor is the return instruction 0x5555559815f1!
Couldn't get CS register: Input/output error.
Exception occurred: Error: Couldn't get registers: Input/output error. (<class 'gdb.error'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Exception occurred: Error: Couldn't get registers: Input/output error. (<class 'gdb.error'>)
For more info invoke `set exception-verbose on` and rerun the command
or debug it by yourself with `set exception-debugger on`
Python Exception <class 'gdb.error'>: Couldn't get registers: Input/output error.
pwndbg>

To Reproduce

No response

Expected behavior

Normal debugging

Diagnostic report (REQUIRED)

No response

Screenshots and additional context (optional)

No response

@n-WN n-WN added the t/bug Something isn't working label May 10, 2024
@JunJie-zhang-o
Copy link

you can see #113

@n-WN
Copy link
Author

n-WN commented May 13, 2024

you can see #113

However, Ubuntu x86 under UTM can be attached to the program normally, and the IO is also normal. Is it possible to study the differences in implementation? This function is really important; I am very excited to experience such high-speed x86 using orbstack on arm mac, but this The defect prevents me from continuing to use orbstack to complete experiments. If it can be solved without losing performance, I am willing to pay as an individual user.

@kdrag0n
Copy link
Member

kdrag0n commented May 14, 2024

Unfortunately this is not really feasible to support, but you can use the workaround in #113. It's specifically because of the same reasons behind the large difference in performance.

@kdrag0n kdrag0n closed this as completed May 14, 2024
@kdrag0n kdrag0n closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants