Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert error in getdns_result(): Condition((rr) != 0) not true. #116

Closed
delthas opened this issue May 24, 2024 · 1 comment
Closed

Assert error in getdns_result(): Condition((rr) != 0) not true. #116

delthas opened this issue May 24, 2024 · 1 comment

Comments

@delthas
Copy link

delthas commented May 24, 2024

Stressing Varnish + libvmod-dynamic with many dynamic backends (with probes), I'm sometimes getting the following panic:

Assert error in getdns_result(), dyn_resolver_getdns.c line 259:
  Condition((rr) != 0) not true.
Backtrace:
  0x55bf1d92da92: /usr/sbin/varnishd(+0x5ba92) [0x55bf1d92da92]
  0x55bf1d9aac45: /usr/sbin/varnishd(VAS_Fail+0x45) [0x55bf1d9aac45]
  0x7f845e54e5ec: ./vmod_cache/_vmod_dynamic.29b766e616262ab0ef9252419367ce48fbf642168ba34fc382b1742a77dac5c4(+0xf5ec) [0x7f845e54e5ec]
  0x7f845e544b65: ./vmod_cache/_vmod_dynamic.29b766e616262ab0ef9252419367ce48fbf642168ba34fc382b1742a77dac5c4(+0x5b65) [0x7f845e544b65]
  0x7f84731cd064: /lib/x86_64-linux-gnu/libpthread.so.0(+0x8064) [0x7f84731cd064]
  0x7f8472f0262d: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7f8472f0262d]

This refers to the assert here: https://github.com/nigoroll/libvmod-dynamic/blob/master/src/dyn_resolver_getdns.c#L259

I can't reproduce this on my machine to debug locally, I only got this on a remote server. I think the DNS server there might be having issues; but if this is caused by some DNS server issue we should probably not panic (and instead just add no backend).

From my understanding of the function, this can happen if getdns_common_more_answers(state) != 0 from the beginning (or if getdns_common_more_answers(state) == 0 and getdns_list_get_dict(state->answers, state->answer++, &rr) gives a NULL rr, not sure if that's relevant).

@nigoroll
Copy link
Owner

Nice find, thank you @delthas !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants