On Mon, Feb 12, 2018 at 12:50:12PM +0100, Stefan Sperling wrote: > The svn-bb-openbsd bot has found a crash in the object pool code. > > It is triggered when running RA serf tests on OpenBSD. The httpd > work processes crash due to what looks like a use-after-free (0xdf > means this byte of memory has been freed). > > I can reproduce this on sparc64 and amd64 machines. > The build is without APR_HAS_THREADS, using the prefork MPM with HTTPD 2.2. > Let me know if you need more details. I have no time at present to hunt > this down myself, so I'm sending this info to the list in hope that it > will be useful.
Hmm, a quick check revealed that this started happening with r1823787, where I stopped pre-loading libpthread.so into httpd. To the best of my knowledge dlopen() now works without this hack on OpenBSD. However, the httpd modules in my build *are* linked to libpthread.so for some reason, even though APR is compiled without threads: $ ldd modules/svn-trunk/{mod_authz_svn,mod_dav_svn,mod_dontdothat}.so | grep pthread 00001afb97159000 00001afb97362000 rlib 0 10 0 /usr/lib/libpthread.so.25.1 00001afb2c499000 00001afb2c6a2000 rlib 0 10 0 /usr/lib/libpthread.so.25.1 00001afb81409000 00001afb81612000 rlib 0 3 0 /usr/lib/libpthread.so.25.1 So this could just be a local problem in my build. I'll investigate this later, and revert r1823787 for now. ------------------------------------------------------------------------ r1823787 | stsp | 2018-02-10 18:17:17 +0100 (Sat, 10 Feb 2018) | 3 lines * tools/dev/unix-build/Makefile.svn: Remove the LIB_PTHREAD_HACK. This is no longer needed. Index: tools/dev/unix-build/Makefile.svn =================================================================== --- tools/dev/unix-build/Makefile.svn (revision 1823786) +++ tools/dev/unix-build/Makefile.svn (revision 1823787) @@ -1940,17 +1940,9 @@ endif libpath: @echo export LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \ "PYTHONPATH=$(SVN_PREFIX)/lib/svn-python" -# -# OpenBSD requires an LD_PRELOAD hack to dlopen() libraries linked to -# libpthread (e.g. libsvn_auth_gnome_keyring.so) into executables that -# aren't linked to libpthread. -ifeq ($(UNAME),OpenBSD) -LIB_PTHREAD_HACK=LD_PRELOAD=libpthread.so -endif - .PHONY: start-svnserve stop-svnserve start-httpd stop-httpd -HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \ +HTTPD_CMD = env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ $(PREFIX)/httpd/bin/apachectl HTTPD_START_CMD = $(HTTPD_CMD) -f $(HTTPD_CHECK_CONF) -k start HTTPD_START_CMD_PROXY = $(HTTPD_CMD) -f $(HTTPD_PROXY_CONF) @@ -2007,7 +1999,7 @@ define do_check -cd $(svn_builddir) && for fs in fsfs bdb; do \ echo "Begin test: $(subst svn-check-,,$@) x $$fs"; \ test -d "$(RAMDISK)/tmp" && export TMPDIR="$(RAMDISK)/tmp"; \ - env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(LIB_PTHREAD_HACK) \ + env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ env MAKEFLAGS= make check PARALLEL=$(PARALLEL) CLEANUP=$(CLEANUP) \ EXCLUSIVE_WC_LOCKS=$(EXCLUSIVE_WC_LOCKS) \ SVN_BIN_DIR=$(SVN_PREFIX)/bin \ @@ -2066,7 +2058,6 @@ svn-check-swig-pl: -if [ $(ENABLE_PERL_BINDINGS) = yes ]; then \ (cd $(svn_builddir) && \ env LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ - $(LIB_PTHREAD_HACK) \ env MAKEFLAGS= make check-swig-pl 2>&1) | \ tee $(svn_builddir)/tests.log.bindings.pl; \ fi @@ -2084,8 +2075,7 @@ svn-check-swig-rb: env RUBYLIB=$(RUBYLIB) \ LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) \ PATH=$(SVN_PREFIX)/bin:$$PATH \ - $(LIB_PTHREAD_HACK) \ - env MAKEFLAGS= make check-swig-rb 2>&1) | \ + MAKEFLAGS= make check-swig-rb 2>&1) | \ tee $(svn_builddir)/tests.log.bindings.rb svn-check-javahl: ------------------------------------------------------------------------