edb-debugger icon indicating copy to clipboard operation
edb-debugger copied to clipboard

execv() failed: No such file or directory

Open Ana06 opened this issue 3 years ago • 6 comments

I have installed edb in a VM with openSUSE Leap 15.2 and I am not able to open an executable ELF 64-bit LSB shared object, x86-64. Both the File-> Open and the --run option raise the following error: Failed to open and attach to process: execv() failed: No such file or directory.

Screenshot 2021-06-25 at 12 44 50

The executable works when running it without edb and attaching to it also works fine.

This doesn't seem related to https://github.com/eteran/edb-debugger/issues/741 as I am running a 64-bit executable in a 64-bit system.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Ana06 avatar Jun 25 '21 10:06 Ana06

Could you run EDB as follows and post the console output?

strace -feexecve ./edb --run /path/to/your-program

10110111 avatar Jun 25 '21 11:06 10110111

Oh, wait... do you actually have /usr/bin/xterm? If not, try disabling Open a terminal ... option in Preferences_→_Debugging.

10110111 avatar Jun 25 '21 11:06 10110111

Thanks for the fast answer @10110111!

I do have /usr/bin/xterm.

The output of strace -feexecve ./edb --run /path/to/your-program

/find_the_best_fishing_spot 
execve("./edb", ["./edb", "--run", "/home/flare/Desktop/find_the_bes"...], 0x7ffc2c218278 /* 96 vars */) = 0
strace: Process 40501 attached
strace: Process 40502 attached
strace: Process 40503 attached
child: PTRACE_TRACEME failed: Operation not permitted
[pid 40503] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=40503, si_uid=1000} ---
[pid 40503] +++ killed by SIGABRT (core dumped) +++
[pid 40500] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=40503, si_uid=1000, si_status=SIGABRT, si_utime=0, si_stime=0} ---
unexpected status returned by waitpid: 0x86
failed to kill child: No such process
Detect that read /proc/<pid>/mem works  =  false
Detect that write /proc/<pid>/mem works =  false
Starting edb version: 1.3.0
Please Report Bugs & Requests At: https://github.com/eteran/edb-debugger/issues
strace: Process 40505 attached
Running Terminal:  "/usr/bin/xterm"
Terminal Args:  ("-title", "edb output", "-hold", "-e", "sh", "-c", "tty > /tmp/edb_temp_file_1477747114_40500;trap \"\" INT QUIT TSTP;exec<&-; exec>&-;while :; do sleep 3600; done")
strace: Process 40506 attached
[pid 40506] execve("/usr/bin/xterm", ["/usr/bin/xterm", "-title", "edb output", "-hold", "-e", "sh", "-c", "tty > /tmp/edb_temp_file_1477747"...], 0x7ffe5c673328 /* 96 vars */) = 0
strace: Process 40507 attached
[pid 40507] execve("/home/flare/bin/sh", ["sh", "-c", "tty > /tmp/edb_temp_file_1477747"...], 0x55d369480a20 /* 99 vars */) = -1 ENOENT (No such file or directory)
[pid 40507] execve("/usr/local/bin/sh", ["sh", "-c", "tty > /tmp/edb_temp_file_1477747"...], 0x55d369480a20 /* 99 vars */) = -1 ENOENT (No such file or directory)
[pid 40507] execve("/usr/bin/sh", ["sh", "-c", "tty > /tmp/edb_temp_file_1477747"...], 0x55d369480a20 /* 99 vars */) = 0
strace: Process 40508 attached
[pid 40508] execve("/usr/bin/tty", ["tty"], 0x55ddb4cba6f0 /* 99 vars */) = 0
Terminal process has TTY:  "/dev/pts/2"
[pid 40508] +++ exited with 0 +++
[pid 40507] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40508, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 40509 attached
strace: Process 40510 attached
[pid 40510] execve("/usr/bin/sleep", ["sleep", "3600"], 0x55ddb4cd0e10 /* 99 vars */) = 0
[pid 40509] execve("/home/flare/Desktop/find_the_best_fishing_spot/find_the_best_fishing_spot", ["/home/flare/Desktop/find_the_bes"...], 0x7ffe5c673328 /* 96 vars */) = -1 ENOENT (No such file or directory)
[pid 40509] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=40509, si_uid=1000} ---
[pid 40509] +++ killed by SIGABRT (core dumped) +++
[pid 40500] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=40509, si_uid=1000, si_status=SIGABRT, si_utime=0, si_stime=0} ---
strace: Process 40513 attached
strace: Process 40512 attached
strace: Process 40514 attached
[pid 40514] execve("/bin/sh", ["sh", "-c", "(kreadconfig5 --key nonexistant)"...], 0x7ffe5c673328 /* 96 vars */) = 0
strace: Process 40515 attached
[pid 40515] execve("/usr/bin/kreadconfig5", ["kreadconfig5", "--key", "nonexistant"], 0x55a2e99653b0 /* 96 vars */) = 0
[pid 40515] +++ exited with 0 +++
[pid 40514] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40515, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[pid 40514] +++ exited with 0 +++
[pid 40513] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40514, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 40516 attached
[pid 40516] execve("/bin/sh", ["sh", "-c", "(qtpaths --paths GenericConfigLo"...], 0x7ffe5c673328 /* 96 vars */) = 0
strace: Process 40517 attached
[pid 40517] execve("/usr/bin/qtpaths", ["qtpaths", "--paths", "GenericConfigLocation"], 0x5639d5dfc3c0 /* 96 vars */) = 0
[pid 40517] +++ exited with 0 +++
[pid 40516] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40517, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[pid 40516] +++ exited with 0 +++
[pid 40513] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40516, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 40518 attached
[pid 40518] execve("/bin/sh", ["sh", "-c", "(kreadconfig5 --file kioslaverc "...], 0x7ffe5c673328 /* 96 vars */) = 0
strace: Process 40519 attached
[pid 40519] execve("/usr/bin/kreadconfig5", ["kreadconfig5", "--file", "kioslaverc", "--group", "Proxy Settings", "--key", "ProxyType", "--default", "-1"], 0x556c96fec3f0 /* 96 vars */) = 0
[pid 40519] +++ exited with 0 +++
[pid 40518] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40519, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[pid 40518] +++ exited with 0 +++
[pid 40513] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=40518, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
strace: Process 40520 attached
comparing versions: [4864] [4864]

Ana06 avatar Jun 25 '21 11:06 Ana06

[pid 40509] execve("/home/flare/Desktop/find_the_best_fishing_spot/find_the_best_fishing_spot", ["/home/flare/Desktop/find_the_bes"...], 0x7ffe5c673328 /* 96 vars */) = -1 ENOENT (No such file or directory)

So, the kernel says it can't find a file. This may be a shared library required by the executable. What does the following command say?

ldd /home/flare/Desktop/find_the_best_fishing_spot/find_the_best_fishing_spot

10110111 avatar Jun 25 '21 11:06 10110111

@10110111 Yes, the required shared library is in a .lib directory in the same directory as the executable. This way it is used when running the program from the console.

Ana06 avatar Jun 28 '21 09:06 Ana06

How exactly do you run the executable—right from opening a terminal? Do you set LD_LIBRARY_PATH for it to search the .lib directory?

10110111 avatar Jun 28 '21 09:06 10110111

Closing due to lack of feedback. Please re-open if the problem persists.

eteran avatar Feb 01 '23 19:02 eteran