Re: Potential bug in ngx_event.c

2019-09-02 Thread Rian Hunter
On 2019-09-02 09:24, Maxim Dounin wrote: My bad, you are right here. This isn't a problem though, as accept mutex does not use sem_wait(), but only uses ngx_shmtx_trylock() - that is, only atomic operations. And for other mutexes we allocate ngx_shmtx_t structures from shared memory, so it work

Re: Potential bug in ngx_event.c

2019-09-02 Thread Maxim Dounin
Hello! On Sun, Sep 01, 2019 at 11:45:20AM -0700, Rian Hunter wrote: > On 2019-08-31 11:28, Maxim Dounin wrote: > > Hello! > > > > On Fri, Aug 30, 2019 at 06:26:57PM -0700, Rian Hunter wrote: > > > >> On 2019-08-30 07:19, Maxim Dounin wrote: > >> > Yes, this is intentional. > >> > > >> > The fir

Re: Potential bug in ngx_event.c

2019-09-01 Thread Rian Hunter
On 2019-08-31 11:28, Maxim Dounin wrote: Hello! On Fri, Aug 30, 2019 at 06:26:57PM -0700, Rian Hunter wrote: On 2019-08-30 07:19, Maxim Dounin wrote: > Yes, this is intentional. > > The first agument of the ngx_shmtx_create() function is a pointer > to the ngx_shmtx_t structure, which is not e

Re: Potential bug in ngx_event.c

2019-08-31 Thread Maxim Dounin
Hello! On Fri, Aug 30, 2019 at 06:26:57PM -0700, Rian Hunter wrote: > On 2019-08-30 07:19, Maxim Dounin wrote: > > Hello! > > > > On Fri, Aug 23, 2019 at 11:00:41AM -0700, Rian Hunter wrote: > > > >> While browsing the source I noticed something that seemed wrong, even > >> though I haven't obs

Re: Potential bug in ngx_event.c

2019-08-30 Thread Rian Hunter
On 2019-08-30 07:19, Maxim Dounin wrote: Hello! On Fri, Aug 23, 2019 at 11:00:41AM -0700, Rian Hunter wrote: While browsing the source I noticed something that seemed wrong, even though I haven't observed any buggy behavior or have reproduced this bug myself. In ngx_event.c there is a line:

Re: Potential bug in ngx_event.c

2019-08-30 Thread Maxim Dounin
Hello! On Fri, Aug 23, 2019 at 11:00:41AM -0700, Rian Hunter wrote: > While browsing the source I noticed something that seemed wrong, even > though I haven't observed any buggy behavior or have reproduced this bug > myself. In ngx_event.c there is a line: > > if (ngx_shmtx_create(&ngx_ac

Potential bug in ngx_event.c

2019-08-23 Thread Rian Hunter
Hello, While browsing the source I noticed something that seemed wrong, even though I haven't observed any buggy behavior or have reproduced this bug myself. In ngx_event.c there is a line: if (ngx_shmtx_create(&ngx_accept_mutex, (ngx_shmtx_sh_t *) shared, cycle->