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

Dynamic analysis: "Tracing system call error: ESRCH: No such process" #43

Open
godzie44 opened this issue Sep 19, 2024 · 9 comments · Fixed by #48
Open

Dynamic analysis: "Tracing system call error: ESRCH: No such process" #43

godzie44 opened this issue Sep 19, 2024 · 9 comments · Fixed by #48
Labels
bug Something isn't working effort: difficult This will take some time help wanted Extra attention is needed

Comments

@godzie44
Copy link

Describe the bug

For some of binaries, after press enter at "Dynamic" tab, i see a "ESRCH: No such process" error.

To reproduce

cargo new hello
cd hello
cargo build
binsider ./target/debug/hello

Screenshots / Logs

image

Software information

  • Operating system: Ubuntu 24.04.1 LTS
  • Rust version: rustc 1.81.0 (eeb90cda1 2024-09-04)
  • Project version: binsider 0.1.0
@godzie44 godzie44 added the bug Something isn't working label Sep 19, 2024
@orhun
Copy link
Owner

orhun commented Sep 20, 2024

Yeah, not sure why it happens yet. Also reported here: JakWai01/lurk#48

Maybe try without leading slash 👀

@godzie44
Copy link
Author

Unfortunately it dont help for me

@orhun
Copy link
Owner

orhun commented Sep 22, 2024

This will be fixed in #48 :)

@orhun orhun closed this as completed in #48 Sep 24, 2024
@algomaster99
Copy link

algomaster99 commented Sep 25, 2024

@godzie44 ! did it fix for you? I have the same issue with a simple hello world program in C. I simply ran cargo run install --force after pulling the latest changes. Then I ran binsider hello.elf and it did not work. I also tried absolute paths, but I get the same error. I am assuming the changes are incorporated in the binary.

@orhun orhun reopened this Sep 25, 2024
@orhun
Copy link
Owner

orhun commented Sep 25, 2024

I was too confident about the fix 😅 The issue seems to be still there and I'm even more puzzled by it now. It apparently works for some files and not for others. Can you share the file you are trying this with?

@orhun
Copy link
Owner

orhun commented Sep 25, 2024

Btw it fails for this function:

pub fn ptrace_init_options(pid: Pid) -> nix::Result<()> {
    ptrace::setoptions(
        pid,
        Options::PTRACE_O_TRACESYSGOOD | Options::PTRACE_O_TRACEEXIT | Options::PTRACE_O_TRACEEXEC,
    )
}

I guess either the pid is not available at that time or something wrong with the permissions / file type. Still investigating...

@algomaster99
Copy link

algomaster99 commented Sep 25, 2024

@orhun I am on phone right now, but this was the source code.

#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}

I then compiled it with gcc -o hello.elf hello.c. My computer details - Ubuntu 22.04 amd64.
Finally, binsider hello.elf.

Thank you for looking into it!

@godzie44
Copy link
Author

Looks like this dont fix for me too :(

@orhun orhun removed their assignment Sep 27, 2024
@orhun orhun added help wanted Extra attention is needed effort: difficult This will take some time labels Sep 27, 2024
@orhun
Copy link
Owner

orhun commented Sep 27, 2024

I'm quite puzzled by this, @JakWai01 any ideas? 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working effort: difficult This will take some time help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants