Bug#406636: libapache2-mod-jk mis-built against apache-1.3 headers,
causes crashes
Wolfram Gloger
bugzilla at malloc.de
Fri Jan 12 13:48:23 UTC 2007
Package: libapache2-mod-jk
Version: 1.2.18-2
Severity: important
When doing some benchmarks on amd64, we noticed easily reproducible
apache2 crashes when mod_jk was used:
[Thu Jan 11 17:49:31 2007] [notice] Apache/2.2.3 (Debian) mod_jk/1.2.18 mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
*** glibc detected *** double free or corruption (!prev): 0x00000000009e3500 ***
[Thu Jan 11 18:15:15 2007] [notice] child pid 24360 exit signal Aborted (6), possible coredump in /var/tmp
{For reference, this can be reproduced when
using Tomcat5_5.0.30-12 and hitting the server
with 50 parallel requests for /servlets-examples/servlet/HelloWorldExample,
eg. with jmeter}
I rebuilt the libapache-mod-jk source package for debugging,
but could then _not_ reproduce the problem any more!
========================================================================
I think I have identified the reason now:
When I re-built myself, I omitted the compilation for apache-1.3.x
because i don't need that version. Looking at the Debian buildd-log,
however, which builds first for apache-1.3 and then for apache-2, it
is easily seen that the source files in native/common are built only
_once_, eg. like this:
/bin/sh ../libtool --mode=compile gcc -I/usr/include/apache-1.3 -g -O2 -DLINUX=22 -DEAPI -DTARGET="apache" -DHAVE_SET_DUMPABLE -DDB_DBM_HSEARCH=1 -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -O1 -g -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DJK_PREFORK -g -O2 -I /include -I /include/ -c jk_ajp12_worker.c -o jk_ajp12_worker.lo
whereas (as seen when omitting the build for apache-1.3), the files
should be compiled like this for apache2:
/usr/share/apr-1.0/build/libtool --silent --mode=compile x86_64-linux-gnu-gcc -I/usr/include/apache2 -g -O2 -DLINUX=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/postgresql -I/usr/include/xmltok -pthread -DHAVE_APR -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -g -O2 -I /include -I /include/ -c jk_ajp12_worker.c -o jk_ajp12_worker.lo
========================================================================
Proposed solution:
In debian/rules, the lines #25 and #32 reading
# -$(MAKE) -C native clean
should be un-commented.
Regards,
Wolfram.
More information about the pkg-java-maintainers
mailing list