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

pdns_server 4.0.1 core dumps on illumos/SmartOS when starting with allow-axfr-ips set #4579

Closed
jussisallinen opened this issue Oct 17, 2016 · 11 comments
Labels

Comments

@jussisallinen
Copy link

@jussisallinen jussisallinen commented Oct 17, 2016

PowerDNS-4.0.1 core dumps on illumos/SmartOS if allow-axfr-ips=127.0.0.0/8,::1
With allow-axfr-ips= empty pdns_server starts as it should.

Please ask for more specific output as needed.
truss-pdns-4.0.1.txt

[root@pkgtest ~]# pstack core.pdns_server.89125 | c++filt
core 'core.pdns_server.89125' of 89125: /opt/local/sbin/pdns_server --daemon=yes
00000000005a07b4 NetmaskTree::insert(Netmask const&) () + 224
000000000064d076 TCPNameserver::TCPNameserver() () + 2e6
00000000005fbcc1 main () + 4921
00000000004bf5cc _start () + 6c

[root@pkgtest ~]# ldd /opt/local/sbin/pdns_server
libyaml-cpp.so.0.5 => /opt/local/lib//libyaml-cpp.so.0.5
libGeoIP.so.1 => /opt/local/lib//libGeoIP.so.1
libsocket.so.1 => /lib/64/libsocket.so.1
libnsl.so.1 => /lib/64/libnsl.so.1
libcrypto.so.1.0.0 => /opt/local/lib//libcrypto.so.1.0.0
libsqlite3.so.0 => /opt/local/lib//libsqlite3.so.0
libdl.so.1 => /lib/64/libdl.so.1
librt.so.1 => /lib/64/librt.so.1
libpthread.so.1 => /lib/64/libpthread.so.1
libumem.so.1 => /lib/64/libumem.so.1
libstdc++.so.6 => /opt/local/gcc49/x86_64-sun-solaris2.11/lib/amd64/libstdc++.so.6
libm.so.2 => /lib/64/libm.so.2
libssp.so.0 => /opt/local/gcc49/x86_64-sun-solaris2.11/lib/amd64/libssp.so.0
libgcc_s.so.1 => /opt/local/gcc49/x86_64-sun-solaris2.11/lib/amd64/libgcc_s.so.1
libc.so.1 => /lib/64/libc.so.1
libmp.so.2 => /lib/64/libmp.so.2
libmd.so.1 => /lib/64/libmd.so.1

@ghost
Copy link

@ghost ghost commented Oct 18, 2016

and what about truss -f ?

@jussisallinen
Copy link
Author

@jussisallinen jussisallinen commented Oct 18, 2016

@rgacogne
Copy link
Member

@rgacogne rgacogne commented Oct 19, 2016

I'm not too familiar with Illumos, any chance you could get the exact line number using gdb or perhaps gaddr2line?

@jussisallinen
Copy link
Author

@jussisallinen jussisallinen commented Oct 22, 2016

@rgacogne Here's gdb bt:

#0  0x00000000005a0794 in NetmaskTree<bool>::insert(Netmask const&) ()
#1  0x000000000064d056 in NetmaskGroup::addMask (nm=..., this=0x72a720 <TCPNameserver::d_ng>) at iputils.hh:800
#2  NetmaskGroup::addMask (ip=..., this=0x72a720 <TCPNameserver::d_ng>) at iputils.hh:794
#3  NetmaskGroup::toMasks (ips=..., this=0x72a720 <TCPNameserver::d_ng>) at iputils.hh:841
#4  TCPNameserver::TCPNameserver (this=0x888210) at tcpreceiver.cc:1171
#5  0x00000000005fbca1 in main ()
@skolot
Copy link
Contributor

@skolot skolot commented Jan 11, 2017

Hello

I had a similar crash under solaris 11.3 and found out that problem was in using byte ordering function with IN in name (BE_IN64 for example). This functions require pointer to integer as argument instead integer.

Path is attached.
sunos-byteorder-specific.patch.txt

@rgacogne
Copy link
Member

@rgacogne rgacogne commented Jan 11, 2017

Hi @skolot, thank you for this patch! Would you be willing to turn that into a pull request so your name appear in the log? If so, could you please add parentheses to prevent any surprises later, ie replacing BE_IN16(&x) with BE_IN16(&(x)) and so on.

skolot added a commit to skolot/pdns that referenced this issue Jan 11, 2017
@skolot skolot mentioned this issue Jan 11, 2017
0 of 7 tasks complete
@skolot
Copy link
Contributor

@skolot skolot commented Jan 11, 2017

@rgacogne, done #4877

BE_IN16(&(x))

i completely forgot that i'm working with macros, thank you (:

@rgacogne
Copy link
Member

@rgacogne rgacogne commented Jan 11, 2017

Thanks!

pieterlexis added a commit that referenced this issue Jan 24, 2017
issue #4579
@Habbie
Copy link
Member

@Habbie Habbie commented Mar 1, 2017

Can we close this now that #4877 has been merged?

@jussisallinen
Copy link
Author

@jussisallinen jussisallinen commented Mar 31, 2017

@Habbie This can now be closed, PowerDNS will be included in SmartOS pkgsrc 2017Q1.

@Habbie
Copy link
Member

@Habbie Habbie commented Mar 31, 2017

@jussisallinen thanks!

@Habbie Habbie closed this Mar 31, 2017
@jussisallinen jussisallinen changed the title pdns_server 4.0.1 core dumps on Illumos/SmartOS when starting with allow-axfr-ips set pdns_server 4.0.1 core dumps on illumos/SmartOS when starting with allow-axfr-ips set Mar 31, 2017
pieterlexis added a commit to pieterlexis/pdns that referenced this issue May 9, 2017
(cherry picked from commit 28fe507)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.