id = 911 title = "Unable to strace execve calls in mipsel user mode" state = "opened" created_at = "2022-03-16T00:05:27.772Z" closed_at = "n/a" labels = ["linux-user"] url = "https://gitlab.com/qemu-project/qemu/-/issues/911" host-os = "Ubuntu 20.04" host-arch = "x86_64" qemu-version = "6.2.0, 6.2.90" guest-os = "Linux MIPSEL" guest-arch = "MIPS Little Endian" description = """Used 6.2.0 ZIP and git to build, configured with ``` ./configure --target-list=mipsel-linux-user --static --disable-system --enable-linux-user ``` When trying to strace a mipsel-arch application, I cannot see traces for the `execve` syscall. It looks like the call to `safe_execve` is not returning, so the strace printout is never completed. I'm assuming this has to do with `execve` syscall not returning on success, but older versions appeared to be able to do it. I tried it with QEMU 4.2.1 from the package manager on Ubuntu and I saw the `execve` syscall (see qemu-4.2.1.log).""" reproduce = """1. Build mipsel app: ` mipsel-linux-gnu-gcc -o test.mipsel test.c` (Test code is attached as `test.c`) 2. Run qemu-mipsel: `./build/qemu-mipsel -L /usr/mipsel-linux-gnu/ -strace ../test.mipsel` 3. Note that even though the app uses both `system` and `popen` to create subprocesses, no `execve` syscall is shown in the strace output.""" additional = """[qemu-6.2.90.log](/uploads/ca03e6f40b3b0ea79a042786a123760a/qemu-6.2.90.log) [qemu-6.2.0.log](/uploads/ca15057398377d49b396e9e77a5cb639/qemu-6.2.0.log) [qemu-4.2.1.log](/uploads/1087250dd9fc4d8d106d2cbc58c2b14a/qemu-4.2.1.log) [test.c](/uploads/9d242a724b10b296cfd7a945ae4d6c4d/test.c)"""