> $ valgrind --log-fd=13 /bin/echo > ==3786620== Valgrind: failed to move log file descriptor into safe range, using stderr > ==3786620== Memcheck, a memory error detector > [...] > ==3786620== Warning: invalid file descriptor 2 in syscall close() > ==3786620== Use --log-fd=<number> to select an alternative log fd. > [...] firstly, the error message is very unhelpful, as the root cause is that the source descriptor is invalid. secondly, the message should be separated with an empty line from the blurb below, as otherwise it's way too easy to overlook. lastly, these warning messages (there can be lots of them; the particular syscalls vary depending on the traced program) make no sense; apparently something doesn't get reset properly.