> OK, after several days of investigation, it seems this problem probably
> occurred because race condition between threads of the same workers, here
> is my conclusion:
>
> "wsgi_req" which is a shared struct between threads of all the workers is
> reset to zero in "uwsgi_destroy_request" or "uwsgi_close_request".
> Unfortunately , in     "uwsgi_destroy_request" & "uwsgi_close_request" ,
> pthread_setcancelstate is called before memset of wsgi_req, does this
> implies that if an other thread calls pthread_cancel while reaching max
> requests meanwhile, "wsgi_req" is vulnerable remains last value in the new
> forked worker, since the new worker reusing shared memory of workers[i]
> struct without zero-filled.
>
> Is there any chance to do with that?
>

I think the best approach would be clearing the whole wsgi_request
structures of a worker when it is started/respawned

I will commit a patch soon


-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to