Loads of --47513:1:VG_(fcnt fcntl error 9 Bad file descriptor messages This is due to init_preopened_fds_without_proc_self_fd() for (i = 0; i < count; i++) if (VG_(fcntl)(i, VKI_F_GETFL, 0) != -1) ML_(record_fd_open_named)(-1, i); The loop will result in one message per file that does not exist. On my RPi FreeBSD rlimit open files is 231219 and indeed I do see 231214 messages. I'll turn off logging for that loop.
On second thoughts, I'll just remove the VG_(debugLog) call. Pretty much all of the other libcfile.c functions do not log errors.