Re: opensmtpd 6.6.4p1 crashes on netbsd 9.0
On Mon, 9 Mar 2020, Martijn van Duren wrote: On 3/9/20 8:15 AM, Andi Vajda wrote: On Mar 8, 2020, at 23:58, Martijn van Duren wrote: I guess not a lot of opensmtpd developers have a NetBSD machine at hand (I certainly don't). Could you supply us with a backtrace, which most likely will be needed from the pony process. Rebuilding with libressl 3.0.2 (instead of openssl 1.1.1d) worked around the problem. So it's safe for me to assume you're fine with applying the workaround for every release and letting other people do the same? Speaking for myself, I am fine with building with libressl instead of openssl, yes. Here is a stacktrace of the crash in the pony process, without debugging symbols: (what extra flags do I need to pass to configure to get a build with debug symbols ? Adding --with-cflags=-g was not enough) #0 0x7cb54f76c8cf in ?? () #1 0x00430aa7 in resolver_getaddrinfo (hostname=0x7cb5514b4000 "", servname=0x8 , hints=0x7f7fff5009c0, cb=0x7cb550feac48, arg=0x9) at ../../smtpd/resolver.c:91 #2 0x in ?? () Andi..
Re: opensmtpd 6.6.4p1 crashes on netbsd 9.0
On 3/9/20 8:15 AM, Andi Vajda wrote: > >> On Mar 8, 2020, at 23:58, Martijn van Duren >> wrote: >> >> I guess not a lot of opensmtpd developers have a NetBSD machine at hand >> (I certainly don't). Could you supply us with a backtrace, which most >> likely will be needed from the pony process. > > Rebuilding with libressl 3.0.2 (instead of openssl 1.1.1d) worked around the > problem. So it's safe for me to assume you're fine with applying the workaround for every release and letting other people do the same? > > Andi.. > >> >> martijn@
Re: opensmtpd 6.6.4p1 crashes on netbsd 9.0
> On Mar 8, 2020, at 23:58, Martijn van Duren > wrote: > > I guess not a lot of opensmtpd developers have a NetBSD machine at hand > (I certainly don't). Could you supply us with a backtrace, which most > likely will be needed from the pony process. Rebuilding with libressl 3.0.2 (instead of openssl 1.1.1d) worked around the problem. Andi.. > > martijn@ > >> On 3/7/20 1:38 AM, Andi Vajda wrote: >> >> Hi, >> >> I've been running opensmtpd 6.6.4p1 on netbsd 7.2 just fine. >> >> I'm now upgrading to netbsd 9.0 and I'm seeing that opensmtpd 6.6.4p1 crashes >> when mail is submitted to it. The crash seems to happen right after 'message >> begin': >> >> --- snip --- >> smtp: 0x7ad646215000: fd 24 from queue >> smtp: 0x7ad646215000: message fd 24 >> smtp: 0x7ad646215000: message begin >> debug: parent -> pony: pipe closed >> debug: control -> pony express: pipe closed >> debug: control agent exiting >> smtpd: process pony socket closed >> debug: ca -> pony express: pipe closed >> --- snip --- >> >> If I copy the smtpd binary built on netbsd 7.2 to netbsd 9.0 then smtpd works >> fine again: >> --- snip --- >> smtp: 0x76e3f19b8000: fd 24 from queue >> smtp: 0x76e3f19b8000: message fd 24 >> smtp: 0x76e3f19b8000: message begin >> debug: 0x76e3f19b8000: end of message, error=0 >> ad1ae4fedfe423f1 smtp message msgid=c931775c size=567 nrcpt=1 proto=ESMTP >> --- snip --- >> and mail is delivered as expected. >> >> There is an ldd difference between the two binaries: >> >> on netbsd 7.2: >> -lz.1 => /usr/pkg/lib/libz.so.1 >> -lgcc_s.1 => /usr/lib/libgcc_s.so.1 >> -lc.12 => /usr/lib/libc.so.12 >> -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 >> -lpthread.1 => /usr/lib/libpthread.so.1 >> -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 >> -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 >> -lasr.0 => /usr/pkg/lib/libasr.so.0 >> -lcrypt.1 => /usr/lib/libcrypt.so.1 >> >> on netbsd 9.0: >> -lz.1 => /usr/pkg/lib/libz.so.1 >> -lc.12 => /usr/lib/libc.so.12 >> -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 >> -lpthread.1 => /usr/lib/libpthread.so.1 >> -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 >> -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 >> -lasr.0 => /usr/pkg/lib/libasr.so.0 >> -lcrypt.1 => /usr/lib/libcrypt.so.1 >> >> The -lgcc_s.1 entry is not present on 9.0. >> >> The compiler used on netbsd 7.2: gcc (nb2 20150115) 4.8.5 >> The compiler used on netbsd 9.0: gcc (nb3 20190319) 7.4.0 >> >> I also tried building opensmtpd 6.6.2p1 on netbsd 9.0, with the same result. >> >> Is there something about netbsd 9.0 (and its gcc 7.4.0 system compiler) that >> is known to cause this ? Is there some configure setting I need to change ? >> (on both OSs, I'm only changing paths, ie --prefix, --with-libssl, >> --with-libasr, --with-libevent as I'm using the pkgsrc installations (also >> built from sources) of these libraries). >> >> I'm going to try building opensmtpd with llvm next... >> Thank you for your insights ! >> >> Andi.. >> >
Re: opensmtpd 6.6.4p1 crashes on netbsd 9.0
I guess not a lot of opensmtpd developers have a NetBSD machine at hand (I certainly don't). Could you supply us with a backtrace, which most likely will be needed from the pony process. martijn@ On 3/7/20 1:38 AM, Andi Vajda wrote: > > Hi, > > I've been running opensmtpd 6.6.4p1 on netbsd 7.2 just fine. > > I'm now upgrading to netbsd 9.0 and I'm seeing that opensmtpd 6.6.4p1 crashes > when mail is submitted to it. The crash seems to happen right after 'message > begin': > >--- snip --- > smtp: 0x7ad646215000: fd 24 from queue > smtp: 0x7ad646215000: message fd 24 > smtp: 0x7ad646215000: message begin > debug: parent -> pony: pipe closed > debug: control -> pony express: pipe closed > debug: control agent exiting > smtpd: process pony socket closed > debug: ca -> pony express: pipe closed >--- snip --- > > If I copy the smtpd binary built on netbsd 7.2 to netbsd 9.0 then smtpd works > fine again: >--- snip --- > smtp: 0x76e3f19b8000: fd 24 from queue > smtp: 0x76e3f19b8000: message fd 24 > smtp: 0x76e3f19b8000: message begin > debug: 0x76e3f19b8000: end of message, error=0 > ad1ae4fedfe423f1 smtp message msgid=c931775c size=567 nrcpt=1 proto=ESMTP >--- snip --- > and mail is delivered as expected. > > There is an ldd difference between the two binaries: > > on netbsd 7.2: > -lz.1 => /usr/pkg/lib/libz.so.1 > -lgcc_s.1 => /usr/lib/libgcc_s.so.1 > -lc.12 => /usr/lib/libc.so.12 > -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 > -lpthread.1 => /usr/lib/libpthread.so.1 > -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 > -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 > -lasr.0 => /usr/pkg/lib/libasr.so.0 > -lcrypt.1 => /usr/lib/libcrypt.so.1 > > on netbsd 9.0: > -lz.1 => /usr/pkg/lib/libz.so.1 > -lc.12 => /usr/lib/libc.so.12 > -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 > -lpthread.1 => /usr/lib/libpthread.so.1 > -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 > -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 > -lasr.0 => /usr/pkg/lib/libasr.so.0 > -lcrypt.1 => /usr/lib/libcrypt.so.1 > > The -lgcc_s.1 entry is not present on 9.0. > > The compiler used on netbsd 7.2: gcc (nb2 20150115) 4.8.5 > The compiler used on netbsd 9.0: gcc (nb3 20190319) 7.4.0 > > I also tried building opensmtpd 6.6.2p1 on netbsd 9.0, with the same result. > > Is there something about netbsd 9.0 (and its gcc 7.4.0 system compiler) that > is known to cause this ? Is there some configure setting I need to change ? > (on both OSs, I'm only changing paths, ie --prefix, --with-libssl, > --with-libasr, --with-libevent as I'm using the pkgsrc installations (also > built from sources) of these libraries). > > I'm going to try building opensmtpd with llvm next... > Thank you for your insights ! > > Andi.. >
Re: opensmtpd 6.6.4p1 crashes on netbsd 9.0
On Sat, 7 Mar 2020, Andi Vajda wrote: On Fri, 6 Mar 2020, Andi Vajda wrote: Hi, I've been running opensmtpd 6.6.4p1 on netbsd 7.2 just fine. I'm now upgrading to netbsd 9.0 and I'm seeing that opensmtpd 6.6.4p1 crashes when mail is submitted to it. The crash seems to happen right after 'message begin': --- snip --- smtp: 0x7ad646215000: fd 24 from queue smtp: 0x7ad646215000: message fd 24 smtp: 0x7ad646215000: message begin debug: parent -> pony: pipe closed debug: control -> pony express: pipe closed debug: control agent exiting smtpd: process pony socket closed debug: ca -> pony express: pipe closed --- snip --- If I copy the smtpd binary built on netbsd 7.2 to netbsd 9.0 then smtpd works fine again: --- snip --- smtp: 0x76e3f19b8000: fd 24 from queue smtp: 0x76e3f19b8000: message fd 24 smtp: 0x76e3f19b8000: message begin debug: 0x76e3f19b8000: end of message, error=0 ad1ae4fedfe423f1 smtp message msgid=c931775c size=567 nrcpt=1 proto=ESMTP --- snip --- and mail is delivered as expected. There is an ldd difference between the two binaries: on netbsd 7.2: -lz.1 => /usr/pkg/lib/libz.so.1 -lgcc_s.1 => /usr/lib/libgcc_s.so.1 -lc.12 => /usr/lib/libc.so.12 -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 -lpthread.1 => /usr/lib/libpthread.so.1 -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 -lasr.0 => /usr/pkg/lib/libasr.so.0 -lcrypt.1 => /usr/lib/libcrypt.so.1 on netbsd 9.0: -lz.1 => /usr/pkg/lib/libz.so.1 -lc.12 => /usr/lib/libc.so.12 -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 -lpthread.1 => /usr/lib/libpthread.so.1 -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 -lasr.0 => /usr/pkg/lib/libasr.so.0 -lcrypt.1 => /usr/lib/libcrypt.so.1 The -lgcc_s.1 entry is not present on 9.0. The compiler used on netbsd 7.2: gcc (nb2 20150115) 4.8.5 The compiler used on netbsd 9.0: gcc (nb3 20190319) 7.4.0 I also tried building opensmtpd 6.6.2p1 on netbsd 9.0, with the same result. Is there something about netbsd 9.0 (and its gcc 7.4.0 system compiler) that is known to cause this ? Is there some configure setting I need to change ? (on both OSs, I'm only changing paths, ie --prefix, --with-libssl, --with-libasr, --with-libevent as I'm using the pkgsrc installations (also built from sources) of these libraries). I'm going to try building opensmtpd with llvm next... Compiling it with llvm/clang 9.0.1 didn't make a difference. Same crash. Trying with libressl next... And, build with libressl 3.0.2 (and system gcc), it works fine, mail is delivered, no crash ! Here is my new ldd output: -lz.1 => /usr/pkg/lib/libz.so.1 -lc.12 => /usr/lib/libc.so.12 -lssl.47 => /home/vajda/opensmtpd-6.6.4p1/local/lib/libssl.so.47 -lcrypto.45 => /home/vajda/opensmtpd-6.6.4p1/local/lib/libcrypto.so.45 -lpthread.1 => /usr/lib/libpthread.so.1 -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 -lasr.0 => /usr/pkg/lib/libasr.so.0 -lcrypt.1 => /usr/lib/libcrypt.so.1 Andi..
Re: opensmtpd 6.6.4p1 crashes on netbsd 9.0
On Fri, 6 Mar 2020, Andi Vajda wrote: Hi, I've been running opensmtpd 6.6.4p1 on netbsd 7.2 just fine. I'm now upgrading to netbsd 9.0 and I'm seeing that opensmtpd 6.6.4p1 crashes when mail is submitted to it. The crash seems to happen right after 'message begin': --- snip --- smtp: 0x7ad646215000: fd 24 from queue smtp: 0x7ad646215000: message fd 24 smtp: 0x7ad646215000: message begin debug: parent -> pony: pipe closed debug: control -> pony express: pipe closed debug: control agent exiting smtpd: process pony socket closed debug: ca -> pony express: pipe closed --- snip --- If I copy the smtpd binary built on netbsd 7.2 to netbsd 9.0 then smtpd works fine again: --- snip --- smtp: 0x76e3f19b8000: fd 24 from queue smtp: 0x76e3f19b8000: message fd 24 smtp: 0x76e3f19b8000: message begin debug: 0x76e3f19b8000: end of message, error=0 ad1ae4fedfe423f1 smtp message msgid=c931775c size=567 nrcpt=1 proto=ESMTP --- snip --- and mail is delivered as expected. There is an ldd difference between the two binaries: on netbsd 7.2: -lz.1 => /usr/pkg/lib/libz.so.1 -lgcc_s.1 => /usr/lib/libgcc_s.so.1 -lc.12 => /usr/lib/libc.so.12 -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 -lpthread.1 => /usr/lib/libpthread.so.1 -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 -lasr.0 => /usr/pkg/lib/libasr.so.0 -lcrypt.1 => /usr/lib/libcrypt.so.1 on netbsd 9.0: -lz.1 => /usr/pkg/lib/libz.so.1 -lc.12 => /usr/lib/libc.so.12 -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 -lpthread.1 => /usr/lib/libpthread.so.1 -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 -lasr.0 => /usr/pkg/lib/libasr.so.0 -lcrypt.1 => /usr/lib/libcrypt.so.1 The -lgcc_s.1 entry is not present on 9.0. The compiler used on netbsd 7.2: gcc (nb2 20150115) 4.8.5 The compiler used on netbsd 9.0: gcc (nb3 20190319) 7.4.0 I also tried building opensmtpd 6.6.2p1 on netbsd 9.0, with the same result. Is there something about netbsd 9.0 (and its gcc 7.4.0 system compiler) that is known to cause this ? Is there some configure setting I need to change ? (on both OSs, I'm only changing paths, ie --prefix, --with-libssl, --with-libasr, --with-libevent as I'm using the pkgsrc installations (also built from sources) of these libraries). I'm going to try building opensmtpd with llvm next... Compiling it with llvm/clang 9.0.1 didn't make a difference. Same crash. Trying with libressl next... Andi.. Thank you for your insights ! Andi..
opensmtpd 6.6.4p1 crashes on netbsd 9.0
Hi, I've been running opensmtpd 6.6.4p1 on netbsd 7.2 just fine. I'm now upgrading to netbsd 9.0 and I'm seeing that opensmtpd 6.6.4p1 crashes when mail is submitted to it. The crash seems to happen right after 'message begin': --- snip --- smtp: 0x7ad646215000: fd 24 from queue smtp: 0x7ad646215000: message fd 24 smtp: 0x7ad646215000: message begin debug: parent -> pony: pipe closed debug: control -> pony express: pipe closed debug: control agent exiting smtpd: process pony socket closed debug: ca -> pony express: pipe closed --- snip --- If I copy the smtpd binary built on netbsd 7.2 to netbsd 9.0 then smtpd works fine again: --- snip --- smtp: 0x76e3f19b8000: fd 24 from queue smtp: 0x76e3f19b8000: message fd 24 smtp: 0x76e3f19b8000: message begin debug: 0x76e3f19b8000: end of message, error=0 ad1ae4fedfe423f1 smtp message msgid=c931775c size=567 nrcpt=1 proto=ESMTP --- snip --- and mail is delivered as expected. There is an ldd difference between the two binaries: on netbsd 7.2: -lz.1 => /usr/pkg/lib/libz.so.1 -lgcc_s.1 => /usr/lib/libgcc_s.so.1 -lc.12 => /usr/lib/libc.so.12 -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 -lpthread.1 => /usr/lib/libpthread.so.1 -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 -lasr.0 => /usr/pkg/lib/libasr.so.0 -lcrypt.1 => /usr/lib/libcrypt.so.1 on netbsd 9.0: -lz.1 => /usr/pkg/lib/libz.so.1 -lc.12 => /usr/lib/libc.so.12 -lcrypto.1.1 => /usr/pkg/lib/libcrypto.so.1.1 -lpthread.1 => /usr/lib/libpthread.so.1 -lssl.1.1 => /usr/pkg/lib/libssl.so.1.1 -levent-2.1.7 => /usr/pkg/lib/libevent-2.1.so.7 -lasr.0 => /usr/pkg/lib/libasr.so.0 -lcrypt.1 => /usr/lib/libcrypt.so.1 The -lgcc_s.1 entry is not present on 9.0. The compiler used on netbsd 7.2: gcc (nb2 20150115) 4.8.5 The compiler used on netbsd 9.0: gcc (nb3 20190319) 7.4.0 I also tried building opensmtpd 6.6.2p1 on netbsd 9.0, with the same result. Is there something about netbsd 9.0 (and its gcc 7.4.0 system compiler) that is known to cause this ? Is there some configure setting I need to change ? (on both OSs, I'm only changing paths, ie --prefix, --with-libssl, --with-libasr, --with-libevent as I'm using the pkgsrc installations (also built from sources) of these libraries). I'm going to try building opensmtpd with llvm next... Thank you for your insights ! Andi..