You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It occurred at the moment parent.config was reloaded.
My investigation
Based on the code and this stack trace, I suspect the issue is occurring at position HttpTransact.cc#L6889. build_request is called after the null check for HttpTransact.cc#L2931, but it appears there is no subsequent null check.
I would like to know the following
Is it possible for execution to reach point HttpTransact.cc#L6889 with s->current.server being null?
Thanks for the report, and for digging into it — your read is correct, and the analysis saved me a lot of time.
To answer your question directly: yes, s->current.server can be null at that point. There's a path through find_server_and_update_current_info() that reaches build_request() without it being set.
The function has two exits that both mean "no upstream available", and they don't behave identically:
The PARENT_FAIL case sets s->current.request_to = HOST_NONEand returns HOST_NONE.
The PARENT_DIRECT case, when proxy.config.http.no_dns_just_forward_to_parent is enabled, sets s->parent_result.result = PARENT_FAIL and returnsHOST_NONE — but never assigns s->current.request_to.
HandleCacheOpenReadHit discards the return value and tests the member instead, requiring both conditions:
The second exit only satisfies half of that, so the guard is skipped, server_up stays true, and build_request() is called at line 2961 — outside the s->current.server != nullptr check at 2931 that you spotted. handle_request_keep_alive_headers() then dereferences it at 6889.
Two details that make me fairly confident this is your crash. First, the other build_request() call sites pass s->current.server->http_version as an argument, so a null there would fault in the calling frame — your trace faults insidebuild_request, which only fits the one call site that uses a local http_version. Second, the sibling callers LookupSkipOpenServer and the cache-miss path both check parent_result.result == PARENT_FAIL on its own and call handle_parent_died(); HandleCacheOpenReadHit is the only one that adds the request_to condition.
This is still present on current master, and it isn't a dangling pointer from the reload — parent_params is reference counted per transaction, so the config object stays alive. My working theory on the reload timing is that the newly loaded table returns DIRECT for a host that previously matched a parent rule, which is what steers you into that second exit.
Could you confirm two things?
Do you have proxy.config.http.no_dns_just_forward_to_parent set to 1? The path requires it, and it's 0 by default.
Just before the crash, does your diags.log or error.log contain no available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.? That warning is emitted on exactly this branch, so it would confirm it.
If both hold, that settles it and I'll put up a fix — most likely making that exit set request_to like its sibling does, so the existing guard catches it. Labeling as a bug so we can track it.
Reacted by Kaz Suzuki, Hiroaki Nakamura, nozomi1773 and kansei
Do you have proxy.config.http.no_dns_just_forward_to_parent set to 1? The path requires it, and it's 0 by default.
Yes, it is set to 1 by default.
Just before the crash, does your diags.log or error.log contain no available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.? That warning is emitted on exactly this branch, so it would confirm it.
We have confirmed that multiple instances occurred within a short period of time in this manner.
[Aug 5 10:44:10.498] [ET_NET 33] WARNING: no available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.
[Aug 5 10:44:10.521] [ET_NET 6] WARNING: no available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.
[Aug 5 10:44:10.521] [ET_NET 15] WARNING: no available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.
[Aug 5 10:44:10.591] [ET_NET 37] WARNING: no available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.
The second exit only satisfies half of that, so the guard is skipped, server_up stays true, and build_request() is called at line 2961 — outside the s->current.server != nullptr check at 2931 that you spotted. handle_request_keep_alive_headers() then dereferences it at 6889.
I think The second exit indicates 'if (response_returnable == true && is_stale_cache_response_returnable(s) == true)', but if the initial condition isn't met, handle_parent_died is called and the function returns; it seems to me that build_request wouldn't be called in that case—what do you think?
Activity
bryancall commentedon Aug 26, 2026
Thanks for the report, and for digging into it — your read is correct, and the analysis saved me a lot of time.
To answer your question directly: yes,
s->current.servercan be null at that point. There's a path throughfind_server_and_update_current_info()that reachesbuild_request()without it being set.The function has two exits that both mean "no upstream available", and they don't behave identically:
PARENT_FAILcase setss->current.request_to = HOST_NONEand returnsHOST_NONE.PARENT_DIRECTcase, whenproxy.config.http.no_dns_just_forward_to_parentis enabled, setss->parent_result.result = PARENT_FAILand returnsHOST_NONE— but never assignss->current.request_to.HandleCacheOpenReadHitdiscards the return value and tests the member instead, requiring both conditions:The second exit only satisfies half of that, so the guard is skipped,
server_upstaystrue, andbuild_request()is called at line 2961 — outside thes->current.server != nullptrcheck at 2931 that you spotted.handle_request_keep_alive_headers()then dereferences it at 6889.Two details that make me fairly confident this is your crash. First, the other
build_request()call sites passs->current.server->http_versionas an argument, so a null there would fault in the calling frame — your trace faults insidebuild_request, which only fits the one call site that uses a localhttp_version. Second, the sibling callersLookupSkipOpenServerand the cache-miss path both checkparent_result.result == PARENT_FAILon its own and callhandle_parent_died();HandleCacheOpenReadHitis the only one that adds therequest_tocondition.This is still present on current master, and it isn't a dangling pointer from the reload —
parent_paramsis reference counted per transaction, so the config object stays alive. My working theory on the reload timing is that the newly loaded table returnsDIRECTfor a host that previously matched a parent rule, which is what steers you into that second exit.Could you confirm two things?
proxy.config.http.no_dns_just_forward_to_parentset to1? The path requires it, and it's0by default.diags.logorerror.logcontainno available parents and the config proxy.config.http.no_dns_just_forward_to_parent, prevents origin lookups.? That warning is emitted on exactly this branch, so it would confirm it.If both hold, that settles it and I'll put up a fix — most likely making that exit set
request_tolike its sibling does, so the existing guard catches it. Labeling as a bug so we can track it.kanseiishikawa commentedon Aug 27, 2026
Yes, it is set to 1 by default.
We have confirmed that multiple instances occurred within a short period of time in this manner.
kanseiishikawa commentedon Sep 16, 2026
@bryancall
I have a question
I think
The second exitindicates 'if (response_returnable == true && is_stale_cache_response_returnable(s) == true)', but if the initial condition isn't met,handle_parent_diedis called and the function returns; it seems to me thatbuild_requestwouldn't be called in that case—what do you think?bryancall commentedon Nov 3, 2026
Fixed by #13858, merged to master and picked up on 10.2.x for 10.2.2. Thanks for tracking this down and sending the fix.