nginx null bytes on static image

Maxim Dounin mdounin at
Thu Oct 5 13:39:11 UTC 2017


On Thu, Oct 05, 2017 at 08:57:14AM -0400, soulseekah wrote:

> Thanks. Turning off sendfile worked, but a small test program in C on the
> same filesystem doesn't yield this behavior.
> What else could I test to reproduce this and confirm OS or filesystem
> issues?

If you are able to reproduce the problem again by enabling 
sendfile in nginx, you may want to trace relevant syscalls nginx 
does and try to reproduce exactly the same in your C test program.  
In particular, something like O_DIRECT, non-blocking mode on 
sockets, or sendfile() headers/trailers might be important.

Maxim Dounin

More information about the nginx mailing list