pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkgsrc-current/www/apache22 segfaults on solaris 10 x86

hi all. pkgsrc newbie here. first the why's then the issues ...

i'm a relatively long-time sysadmin (15 years) having experience with
most prevalent *nix systems. during that time, i've provided services
- and rarely had folks logging into the systems. so there hasn't been
much need for debugging compiled code and such, and as a result i have
little experience doing so, and even less with C itself. shell and
python are my main tools.

the customer wants an AMP stack for concrete5, and wants it on their
solaris 10 x86 box. i had problems getting the bundled apache/apache2
running with mysql and php5 without recompiling everything, so i went
looking for alternatives. pkgsrc looked promising for this reason:
since it supported so many operating systems that i deal with, it
might be possible to run N commands via pkgsrc and get the job done on
whatever system (solaris or other) i end up on. basically the
portability sold me on pkgsrc.

i've been using freebsd/openbsd all over the place for years, but not
netbsd - and i am unfamiliar with pkgsrc. so i dug around and found
this ultra-simple recipe for getting the AMP stack running:

i start with a "vanilla" solaris 10 zone created specifically for this
task. step one is www/apache22, which appears to build and install ok.
however, the resultant httpd segfaults every time. it gets far enough
to create a logfile, but never populates it. pstack produces a
traceback from the core, but it's unreadable to me. truss is more
readable, but still isn't enough to give *me* a clue. i'll include
output from both at the bottom, in case someone else can make heads or
tails of the output.

i then double-checked the docs and found this:

3.3. Platform-specific notes
3.3.7. Solaris If you are using gcc
It makes life much simpler if you only use the same gcc consistently
for building all packages.
It is recommended that an external gcc be used only for bootstrapping,
then either build gcc from lang/gcc or install a binary gcc package,
then remove gcc used during bootstrapping.

... so i roll back to the "vanilla" zone prior to pkgsrc, and
bootstrap pkgsrc again. i then attempt to build gcc per the docs, so
it could be used to build the rest instead of using the gcc already on
the system:

# cd /opt/pkgsrc/lang/gcc
# bmake install clean clean-depends
gcc -c  -DIN_GCC   -O     -I. -I..
/opt/pkgsrc/lang/gcc/work/gcc-2.95.3/gcc/ch/decl.c: In function `start_struct':
/opt/pkgsrc/lang/gcc/work/gcc-2.95.3/gcc/ch/decl.c:4451: error:
argument "code" doesn't match prototype
/opt/pkgsrc/lang/gcc/work/gcc-2.95.3/gcc/ch/ch-tree.h:736: error:
prototype declaration
gmake[2]: *** [decl.o] Error 1
gmake[2]: Leaving directory `/opt/pkgsrc/lang/gcc/work/objdir/gcc/ch'
gmake[1]: *** [cc1chill] Error 2
gmake[1]: Leaving directory `/opt/pkgsrc/lang/gcc/work/objdir/gcc'
gmake: *** [all-gcc] Error 2
*** Error code 2

i did notice that despite calling bmake i'm seeing gmake errors, but
don't know if that's pertinent. anyway, at this point i can't test
building apache22 from pkgsrc-based gcc because i can't even build
gcc. so i go back to the docs again and find the following blurbs:
Solaris 2.6 through 9 are supported on both x86 and sparc. Please note
that the use of GNU binutils on Solaris is not supported, as of June

solaris 10 is not mentioned at all; is it supported? and can anyone
tell me if i'm using gnu binutils in this scenario?

so here i am, and here is what i am wondering:
am i just totally screwing this, am i just running into a few simple
bugs, or is pkgsrc just useless for me on solaris 10 x86?

if you've actually made it this far, thanks very much for reading.
it'd be great if you could answer a few of the questions ... limited
debug info follows:

pkgsrc-current (latest tarfile snapshot - though latest via cvs yields
same results)

# uname -a
SunOS webtest2 5.10 Generic_142901-11 i86pc i386 i86pc

# isainfo -k

# pkg_info |grep apache
apache-2.2.15nb2    Apache HTTP (Web) server, version 2.2

# which httpd

# httpd -V
Server version: Apache/2.2.15 (Unix)
Server built:   Jun 19 2010 22:33:09
Server's Module Magic Number: 20051115:24
Server loaded:  APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture:   32-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D HTTPD_ROOT="/opt/pkg"
 -D SUEXEC_BIN="/opt/pkg/bin/suexec"
 -D DEFAULT_PIDLOG="var/run/"
 -D DEFAULT_SCOREBOARD="var/run/apache_runtime_status"
 -D DEFAULT_LOCKFILE="var/run/accept.lock"
 -D DEFAULT_ERRORLOG="var/log/httpd/error.log"
 -D AP_TYPES_CONFIG_FILE="etc/httpd/mime.types"
 -D SERVER_CONFIG_FILE="etc/httpd/httpd.conf"

# ldd /opt/pkg/sbin/httpd =>     /lib/ =>     /opt/pkg/lib/ =>         /opt/pkg/lib/ =>         /opt/pkg/lib/ =>         /opt/pkg/lib/ =>   /lib/ =>  /lib/ =>      /lib/ =>    /lib/ =>        /lib/ =>       /lib/ =>     /lib/ =>         /usr/sfw/lib/ =>    /lib/ =>    /lib/ =>   /lib/ =>   /lib/ =>  /lib/ =>         /lib/ =>   /lib/

# httpd
Segmentation Fault (core dumped)

# pstack core
core 'core' of 1938:    httpd
 fe2ffd55 _init    (fe6d0cf0, feffb28c, feffb818, fe67056c, feff0ad0,
fe2ffd40) + 15
 fefd4c11 call_init (fe670568, 1) + f5
 fefd5132 load_completion (fe6d0cf0) + de
 fefd92a3 dlmopen_intn (feffb28c, 8116b60, d02, fefc04b8, 0, 0) + 103
 fefd938a dlmopen_check (feffb28c, 8116b60, d02, fefc04b8, 8047544) + c6
 fefd945c dlopen   (8116b60, 102, 8047578, fedbc6ee, feb857ee, 8047a80) + 48
 fedbdfc7 apr_dso_load (80476cc, 8116b60, 80c96b0, 80679b4) + 22
 0809425d load_module (8047a40, 80478b8, 8116b38, 8116b48) + 227
 08081dc2 invoke_cmd (80a8b40, 8047a40, 80478b8, 81017c2) + 2cd
 080831ed execute_now (8116ad8, 81017a3, 8047a40, 80c96b0, 80f9770,
80478b8) + 8f
 080827d7 ap_build_config_sub (80c96b0, 80f9770, 8101798, 8047a40,
8047914, 8047910) + 175
 08082d0f ap_build_config (8047a40, 80c96b0, 80f9770, 80bdd94) + 81
 0808366f process_resource_config_nofnmatch (80cf0d0, 80fd260,
80bdd94, 80c96b0, 80f9770, 0) + 2d2
 08083768 ap_process_resource_config (80cf0d0, 80fd260, 80bdd94,
80c96b0, 80f9770, 80a080d) + 9d
 0808427f ap_read_config (80c7738, 80f9770, 80a080d, 80bdd94) + ec
 0806b321 main     (1, 8047cc4, 8047ccc) + 595
 0806a414 _start   (1, 8047d88, 0, 8047d8e, 8047da2, 8047dad) + 80

# find /opt/pkg/var/log/httpd/

# truss -f httpd
1952:   execve("/opt/pkg/sbin/httpd", 0x08047CC8, 0x08047CD0)  argc = 1
1952:   mmap(0x00000000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC,
1952:   resolvepath("/usr/lib/", "/lib/", 1023) = 12
1952:   resolvepath("/opt/pkg/sbin/httpd", "/opt/pkg/sbin/httpd", 1023) = 19
1952:   sysconfig(_CONFIG_PAGESIZE)                     = 4096
1952:   stat64("/opt/pkg/sbin/httpd", 0x08047A60)       = 0
1952:   open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
1952:   stat64("/opt/pkg/lib/", 0x08047300)    Err#2 ENOENT
1952:   stat64("/usr/sfw/lib/", 0x08047300)    Err#2 ENOENT
1952:   stat64("/lib/", 0x08047300)            = 0
1952:   resolvepath("/lib/", "/lib/", 1023) = 14
1952:   open("/lib/", O_RDONLY)                = 3
1952:   stat64("/lib/", 0x08046B30)           = 0
1952:   resolvepath("/lib/", "/lib/", 1023) = 15
1952:   open("/lib/", O_RDONLY)               = 4
1952:   mmap(0xFEF00000, 32768, PROT_READ|PROT_EXEC,
1952:   mmap(0x00010000, 81920, PROT_NONE,
1952:   mmap(0xFE140000, 9124, PROT_READ|PROT_EXEC,
1952:   mmap(0xFE153000, 497, PROT_READ|PROT_WRITE,
1952:   munmap(0xFE143000, 65536)                       = 0
1952:   memcntl(0xFE140000, 1744, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
1952:   close(4)                                        = 0
1952:   munmap(0xFEF00000, 32768)                       = 0
1952:       Incurred fault #6, FLTBOUNDS  %pc = 0xFE2FFD55
1952:         siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
1952:       Received signal #11, SIGSEGV [default]
1952:         siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000

Home | Main Index | Thread Index | Old Index