Open ronag opened 10 months ago
what's the kind of destination you are logging into? It looks like it doesn't support fsync, so we can really skip the error. Fancy a PR to ignore it?
Just regular stdout.
stdout is connected to a tty, a file, a pipe, docker..?
docker
Essentially if the callback error with EINVAL, it means the fd does not support fsync. It's not an error condition.
I don't think it's the callback. That would not cause a shutdown error. I suspect fsync throws invalid arguments synchronously if fd is invalid. How fd can be invalid is not something I've been able to figure out.
Got the following error in production:
{"level":50,"time":1703841986253,"name":"render","err":{"type":"Error","message":"EINVAL: invalid argument, fsync","stack":"Error: EINVAL: invalid argument, fsync","errno":-22,"code":"EINVAL","syscall":"fsync"},"msg":"shutdown error"}
Did a grep of the source code for
fsync
and as far as I can see only sonic-boom calls it. Unless there is something in core. However, the only thing in core I can find isfs.createWriteStream
with the flush option which is not used as far as I can tell.I suspect: