-
Notifications
You must be signed in to change notification settings - Fork 917
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
pdns_server --list-modules dumps core on OpenBSD #2422
Comments
With the geo backend disabled and the bind backend enabled I see a similar crash:
With only the sqlite backend enabled --list-modules works fine. |
Any chance you could run valgrind on this? |
On 04/11/15 13:13, Aki Tuomi wrote:
Not at this time, openbsd doesn't have valgrind, yet. |
Oh, heh, I didn't know he valgrind to work yet.
host stacktrace:
|
Can you compile the code again without removing debugging symbols and see what gdb thinks. To be sure, you can add -ggdb to the CFLAGS and CXXFLAGS. |
After updating the port to put the modules in /usr/local/lib/pdns/ (as opposed to /usr/local/lib/powerdns/pdns/), the crash seems to be gone:
|
Did you update PKGLIBDIR when moving the modules to the other directory? |
Or module-dir in powerdns config |
The alternative location was set with |
Can you test if the crash occurs if you define "module-dir= /usr/local/lib/powerdns/pdns" in pdns.conf? |
It doesn't:
So I guess that rules out the module-dir part? |
did you recompile it to original problem state first? can you run grep PKGLIBDIR in some Makefile? |
Oh, sorry, no I didn't. Let me do that now. Will report in a few minutes. |
Confirmed that a binary with the
Also, here's the grep for PKGLIBDIR:
|
um, can you grep again for pkglibdir? |
and
|
interesting that it crashes when you change that. i can't find any references in the code for PKGLIBDIR other than as default value for module-dir. did you compile with -ggdb, can you use gdb to get us a stack trace? |
I'd have to look into that as I'm not 100% sure about the details. Will get back to you later today or tomorrow. Thanks for your interest so far! |
make clean |
|
Can you run valgrind once more? Not that I expect it to reveal anything new. |
I don't quite get why valgrind outputs ??? for boost, it's build with debug symbols [florian@openbsd-build:~]$ valgrind pdns_server --list-modules valgrind: m_coredump/coredump-elf.c:816 (make_elf_coredump): Assertion 'VG_(lseek)(core_fd, phdrs[idx].p_offset, VKI_SEEK_SET) == phdrs[idx].p_offset' failed. host stacktrace: sched status: Thread 1: status = VgTs_Runnable |
Wonder if this can be due to our hardening features... can you provide the CXXFLAGS, CFLAGS and LDFLAGS from Makefile? |
Sorry for the slow reply.
I would suspect the OpenBSD hardening features before PowerDNS hardening features (since this seems an OpenBSD-only problem). Happy to be proven wrong though :) |
Those are not used here, it seems, unless the compiler itself adds some stuff by default. |
On OpenBSD, binaries are built with several hardening features by default (pie and stack protection come to mind). |
This is fixed by 44ac597 |
did you test it? I didn’t. |
I did. |
Thank you!
|
Is this worth backporting to 3.x? |
geobackend is gone, closing this |
When running pdns_server --list-modules I get a core dump on OpenBSD. This is PowerDNS 3.4.3 (port not updated in OpenBSD ports tree yet):
Running gdb on the core file I get the following backtrace:
The text was updated successfully, but these errors were encountered: