nginx crash

Dk Jack dnj0496 at gmail.com
Thu Jul 28 03:16:55 UTC 2022


Thanks Dounin,
I will look through my code. As I said, I try not to touch nginx data structure or variables in my module. Is there a guideline document that details when a module should increment or decrement reference count value. When invoking some of these functions? 

Thanks,
Dk. 

> On Jul 27, 2022, at 8:05 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> 
> Hello!
> 
>> On Wed, Jul 27, 2022 at 08:40:41AM -0700, Dk Jack wrote:
>> 
>> In my code I am not modifying the reference count. Could you let 
>> me if there any function calls if invoked would indirectly 
>> update the reference count?
> 
> There are quite a few functions and/or return codes which might 
> indirectly modify request reference counter, including the 
> ngx_http_internal_redirect() function (which increments reference 
> count and assumes it is decremented by further processing), 
> request body reading code (which increments reference counter and 
> assumes it is decremented by the body handler) and 
> ngx_http_finalize_request() (which is normally used to decrement 
> reference counter).  Further, lack of explicit reference counting 
> might be the issue if you are trying to do something non-trivial, 
> and, for example, calling functions which might indirectly 
> finalize the request.  That's why I've suggested to review the 
> code logic in the first place.
> 
> -- 
> Maxim Dounin
> http://mdounin.ru/
> _______________________________________________
> nginx-devel mailing list -- nginx-devel at nginx.org
> To unsubscribe send an email to nginx-devel-leave at nginx.org



More information about the nginx-devel mailing list