Stop journald from masking why your exec calls are failing
By Saket Jain Published Linux/Unix
Stop journald from masking why your exec calls are failing
Technical Briefing | 10/9/2026
You probably think your system logs show everything. But I’ve spent enough nights staring at a dead service that exits with status 1 without a single log line to know that journald often drops the ball when it comes to the execve syscall. When a binary fails to execute because of a missing shared library or an incorrect interpreter path, the kernel doesn’t always broadcast that to your logging daemon. It just kills the process.
Why journald misses the death of your process
The issue is that the failure happens at the transition between the shell trying to invoke the process and the kernel actually mapping the binary. By the time the process is supposed to be up, it is already gone. Journald is listening for stdout and stderr, but there is no file descriptor to listen to if the process dies before it even reaches main. This leaves you guessing if the failure is environmental or purely code-based.
bpftrace -e 'tracepoint:syscalls:sys_enter_execve { printf("Process %s executing %s\n", comm, str(args->filename)); } tracepoint:syscalls:sys_exit_execve /args->ret < 0/ { printf("Failed to exec %s: return code %d\n", comm, args->ret); }'
- The execve syscall is the point of no return where the kernel maps the ELF binary into memory
- If a dynamic linker cannot resolve a dependency, the process terminates before your application logger ever initializes
- eBPF hooks directly into the syscall table, catching the return code before the process disappears from your process table
Seeing through the silence
Using bpftrace to hook into execve failures is the only honest way to debug these ghosts. You get the actual error code from the kernel, which tells you exactly why the loader walked away. Don’t waste time staring at journalctl -u service-name when the service never actually made it to the starting line. Put this tool in your back pocket for next time the system starts acting like a black box.
