Welcome! Log In Create A New Profile

Advanced

Re: Unsafe AIO under FreeBSD?

Mahmoud Al-Qudsi
January 18, 2023 01:10PM
On Tue, Jan 17, 2023 at 6:00 PM Maxim Dounin <mdounin@mdounin.ru> wrote:
>
> The only aio operation nginx uses is aio_read(), and it does
> nothing "advanced" - just reads normal files which are being
> served by nginx.
>
> Further, nginx explicitly checks files being served, and rejects
> non-regular files. As such, the "unsafe AIO" checks shouldn't be
> triggered unless you are trying to serve something from non-local
> file systems (well, you indeed shouldn't).
>
> In general, if an aio_read() error happens, you should be able to
> see corresponding error in nginx error log at the "crit" level.
> The error will look like "[crit] ... aio_read("/path/to/file")
> failed (45: Operation not supported)". It should make it possible
> to find out what actually causes the error.


Hello and thanks for the reply!

This is exactly what I was hoping to hear; thanks for clarifying.

Due to a most unfortunate series of events (truncating the nginx error
log before setting up newsyslog(8) to manage it) I do not have the error
log for the three-hour window when this incident took place.

I do have an archive of error.log from shortly before then going all the
way back to 2016 and the only instances of the `[crit] .. aio_read(..)
failed (45: Operation not supported)` were six such errors from 2018 in
close succession, each for a different path, while nginx was trying to
read statically compressed .br versions of static assets as enabled by
ngx_brotli [0] (which doesn't make any `aio_read()` calls of its own).

I think it's improbable I'll see the error again anytime soon, but I now
know where to look if I do.

[0]: Specifically my mtime-enabled fork of ngx_brotli, open-sourced at
https://github.com/mqudsi/ngx_brotli

Thanks,

Mahmoud
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Unsafe AIO under FreeBSD?

Mahmoud Al-Qudsi January 17, 2023 01:06PM

Re: Unsafe AIO under FreeBSD?

Maxim Dounin January 17, 2023 07:02PM

Re: Unsafe AIO under FreeBSD?

Mahmoud Al-Qudsi January 18, 2023 01:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 136
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready