starting apache22 in a jail - name-based shared memory failure

Julian H. Stacey jhs at berklix.com
Sat Jun 22 01:11:30 UTC 2013


Hi, Reference:
> From:		Mateusz Guzik <mjguzik at gmail.com> 
> Date:		Sat, 22 Jun 2013 02:45:13 +0200 

Mateusz Guzik wrote:
> On Sat, Jun 22, 2013 at 02:35:14AM +0200, Julian H. Stacey wrote:
> > Hi all,
> > Any ideas ?
> > I have a jail running 9.1-RELEASE in a jail, with a kernel as
> > shown by uname -a
> > 
> > 	FreeBSD land.berklix.org 9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4
> > 	#0: Mon Jun 17 11:42:37 UTC 2013
> > 	root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
> > 	amd64
> > 
> > cd /usr/ports/www/apache22 ; su ; make install ;
> > cd /usr/local/etc/rc.d # using default httpd.conf
> > ./apache22 stop ; ./apache22 start
> > tail -F /var/log/httpd-error.log
> > 
> >   [info] mod_unique_id: using ip addr 144.76.10.75
> >   [info] Init: Seeding PRNG with 144 bytes of entropy
> >   [info] Init: Generating temporary RSA private keys (512/1024 bits)
> >   [info] Init: Generating temporary DH parameters (512/1024 bits)
> >   [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
> >   [info] Init: Initializing (virtual) servers for SSL
> >   [info] mod_ssl/2.2.23 compiled against Server: Apache/2.2.23, Library: OpenSSL/0.9.8x
> >   [notice] Digest: generating secret for digest authentication ...
> >   [notice] Digest: done
> >   [info] mod_unique_id: using ip addr 144.76.10.75
> >   [info] Init: Seeding PRNG with 144 bytes of entropy
> >   [info] Init: Generating temporary RSA private keys (512/1024 bits)
> >   [info] Init: Generating temporary DH parameters (512/1024 bits)
> >   [info] Init: Initializing (virtual) servers for SSL
> >   [info] mod_ssl/2.2.23 compiled against Server: Apache/2.2.23, Library: OpenSSL/0.9.8x
> >   [warn] pid file /var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
> >   [crit] (78)Function not implemented: unable to create or access scoreboard "/var/run/httpd.scoreboard" (name-based shared memory failure)
> > 
> 
> Can you include truss/ktrace output so that actual syscall is shown?
> 
> -- 
> Mateusz Guzik <mjguzik gmail.com>

Thanks for the quick reply!
I'm afraid I have to sleep before I read man truss & ktrace
& think what options you might want, but meantime I append truss output.
Really confusingly, with truss its just started working, viz
	http://land.berklix.org/
Despite I tried to install a generic httpd.conf for the truss run.
Hmm, I'll come back to this tomorrow. Thanks !

--------
9.1-p4 /dev/pts/0 jhs 68 land/usr/local/etc/rc.d ./apache22 start
Performing sanity check on apache22 configuration:
Warning: DocumentRoot [/home/graham/public_html/surfacevision/] does not exist
Warning: DocumentRoot [/home/graham/public_html/surfacevision/] does not exist
Warning: DocumentRoot [/usr/local/www/backup/surfacevision.com] does not exist
Syntax OK
Starting apache22.
Warning: DocumentRoot [/home/graham/public_html/surfacevision/] does not exist
Warning: DocumentRoot [/home/graham/public_html/surfacevision/] does not exist
Warning: DocumentRoot [/usr/local/www/backup/surfacevision.com] does not exist
9.1-p4 /dev/pts/0 jhs 69 land/usr/local/etc/rc.d ./apache22 stop
apache22 not running? (check /var/run/httpd.pid).
9.1-p4 /dev/pts/0 jhs 70 land/usr/local/etc/rc.d script
Script started, output file is typescript
9.1-p4 /dev/pts/3 root 65 land/usr/local/etc/rc.d xs
Un-necessary: You were previously root.
9.1-p4 /dev/pts/3 root 65 land/usr/local/etc/rc.d exit
9.1-p4 /dev/pts/3 root 66 land/usr/local/etc/rc.d truss ./apache22 start
readlink("/etc/malloc.conf",0x7fffffffcef0,1024) ERR#2 'No such file or directory'
issetugid(0x4d9820,0x7fffffffcef0,0xffffffffffffffff,0x0,0x2,0x1000) = 0 (0x0)
break(0x716610)                                  = 0 (0x0)
break(0x800000)                                  = 0 (0x0)
mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34367062016 (0x8006fc000)
mmap(0x800afc000,1064960,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34371256320 (0x800afc000)
munmap(0x8006fc000,1064960)                      = 0 (0x0)
sysarch(0x81,0x7fffffffd3f0,0x0,0x0,0x10,0x7fffffffca30) = 0 (0x0)
getpid()                                         = 95116 (0x1738c)
geteuid()                                        = 0 (0x0)
getppid()                                        = 95115 (0x1738b)
getuid()                                         = 0 (0x0)
geteuid()                                        = 0 (0x0)
getgid()                                         = 0 (0x0)
getegid()                                        = 0 (0x0)
open("./apache22",O_RDONLY,037777752070)         = 3 (0x3)
fcntl(3,F_DUPFD,0xa)                             = 10 (0xa)
close(3)                                         = 0 (0x0)
fcntl(10,F_SETFD,FD_CLOEXEC)                     = 0 (0x0)
sigaction(SIGINT,0x0,{ SIG_DFL SA_RESTART ss_t }) = 0 (0x0)
sigaction(SIGINT,{ 0x4152c0 0x0 ss_t },0x0)      = 0 (0x0)
sigaction(SIGQUIT,0x0,{ SIG_DFL SA_RESTART ss_t }) = 0 (0x0)
sigaction(SIGQUIT,{ 0x4152c0 0x0 ss_t },0x0)     = 0 (0x0)
sigaction(SIGTERM,0x0,{ SIG_DFL 0x0 ss_t })      = 0 (0x0)
sigaction(SIGTERM,{ SIG_DFL 0x0 ss_t },0x0)      = 0 (0x0)
sigaction(SIGWINCH,0x0,{ SIG_DFL SA_RESTART ss_t }) = 0 (0x0)
sigaction(SIGWINCH,{ SIG_DFL 0x0 ss_t },0x0)     = 0 (0x0)
stat(".",{ mode=drwxr-xr-x ,inode=6018,size=6,blksize=4096 }) = 0 (0x0)
stat("/usr/local/etc/rc.d",{ mode=drwxr-xr-x ,inode=6018,size=6,blksize=4096 }) = 0 (0x0)
read(10,"#!/bin/sh\n#\n# $FreeBSD: branch"...,1023) = 1023 (0x3ff)
read(10,"f_http kernel\n#                "...,1023) = 1023 (0x3ff)
open("/etc/rc.subr",O_RDONLY,057)                = 3 (0x3)
fcntl(3,F_DUPFD,0xa)                             = 11 (0xb)
close(3)                                         = 0 (0x0)
fcntl(11,F_SETFD,FD_CLOEXEC)                     = 0 (0x0)
read(11,"# $NetBSD: rc.subr,v 1.67 2006/1"...,1023) = 1023 (0x3ff)
read(11,"SS FOR A PARTICULAR\n# PURPOSE A"...,1023) = 1023 (0x3ff)
madvise(0x800823000,0x1000,0x5,0x22,0x7fffffffc380,0x7fffffffc320) = 0 (0x0)
read(11,"l] [desc]\n#\n#\tEcho or define "...,1023) = 1023 (0x3ff)
read(11,"\\$$1(old) -> \\$$2(new) is defi"...,1023) = 1023 (0x3ff)
read(11,"eturn 1\n\t\t;;\n\t*)\n\t\twarn "...,1023) = 1023 (0x3ff)
read(11,"$critical_filesystems_${1}\n\tfo"...,1023) = 1023 (0x3ff)
read(11,"name [interpreter]\n#\tEnsures t"...,1023) = 1023 (0x3ff)
read(11,"n alternative, to deal with inte"...,1023) = 1023 (0x3ff)
read(11,"}\n\t\t_fp_args='_argv'\n\t\t_fp"...,1023) = 1023 (0x3ff)
read(11,"n\n\t\t\tbreak\n\t\tfi\n\t\t_lis"...,1023) = 1023 (0x3ff)
read(11,"ng faststart at\n#\tboot time) c"...,1023) = 1023 (0x3ff)
read(11,"y, command is interpreted, so\n#"...,1023) = 1023 (0x3ff)
read(11,"nd} as, using su(1) if not\n#\t"...,1023) = 1023 (0x3ff)
read(11,"ven\n#\t\t\t\tfiles before runni"...,1023) = 1023 (0x3ff)
read(11,"ning && checkyesno ${rcvar}\n#\t"...,1023) = 1023 (0x3ff)
read(11,"by the precmd method.\n#\n#\trc_"...,1023) = 1023 (0x3ff)
read(11,"arg#${_rc_prefix}}\n\t\trc_quiet"...,1023) = 1023 (0x3ff)
read(11," _user\n\t\tfi\n\tfi\n\n\teval $"...,1023) = 1023 (0x3ff)
read(11,"d\n\t\t\treturn $_return\n\t\tfi"...,1023) = 1023 (0x3ff)
read(11,"doit="su -m $_user -c 'sh -c \\""...,1023) = 1023 (0x3ff)
read(11,"start)\n\t\t\t\t\t# prevent rest"...,1023) = 1023 (0x3ff)
read(11,"\t\t\t_h="-"\n\n\t\t\t\teval ech"...,1023) = 1023 (0x3ff)
read(11,"ce" ]; then\n\t\t\treturn 1\n\t"...,1023) = 1023 (0x3ff)
read(11,"is set, otherwise it is run as a"...,1023) = 1023 (0x3ff)
read(11,"t $_arg; . $_file )\n\t\t\tfi\n"...,1023) = 1023 (0x3ff)
read(11,"ewvar\n\t\tcase $_v in\n\t\t"")"...,1023) = 1023 (0x3ff)
read(11,"tderr and log to the syslog, and"...,1023) = 1023 (0x3ff)
read(11,"file' into `cur', and save the p"...,1023) = 1023 (0x3ff)
read(11,"pdate"\n\n\t\t# ensure that hist"...,1023) = 1023 (0x3ff)
read(11," the\n#\tdirectory in which link"...,1023) = 1023 (0x3ff)
read(11,"fi\n\tdebug "reading rulesets fr"...,1023) = 1023 (0x3ff)
read(11,"n files. Returns\n#\tnon-zero if"...,1023) = 1023 (0x3ff)
read(11,"$devdir ruleset $rs; then\n\t\tw"...,1023) = 1023 (0x3ff)
read(11,"domount()\n{\n\tlocal devdir rs "...,1023) = 1023 (0x3ff)
read(11,"v"\n\t\treturn 1\n\tfi\n\treturn"...,1023) = 1023 (0x3ff)
read(11,"d [-e regex] [-m module] file'\n"...,1023) = 1023 (0x3ff)
read(11,"tpoint type options rest ; do\n"...,1023) = 1023 (0x3ff)
read(11,"ist="$slist $file"\n\t\t\tdone\n"...,1023) = 1023 (0x3ff)
read(11,"fi\n\t\t\tfi\n\t\tdone\n\n\t\tfo"...,1023) = 1023 (0x3ff)
read(11,"n_features_$1=1\n\t\treturn 1\n"...,1023) = 476 (0x1dc)
pipe(0x7fffffffca40)                             = 0 (0x0)
fork()                                           = 95117 (0x1738d)
close(4)                                         = 0 (0x0)
read(3,"0\n",128)                                = 2 (0x2)
read(3,0x7fffffffcc10,128)                       = 0 (0x0)
close(3)                                         = 0 (0x0)
getpgrp()                                        = 95115 (0x1738b)
wait4(0xffffffff,0x7fffffffcae4,0x2,0x0,0x716750,0x7fffffffbf20) = 95117 (0x1738d)
madvise(0x80082c000,0xf000,0x5,0x2b,0x7fffffffc6d0,0xffffffff) = 0 (0x0)
madvise(0x800823000,0x9000,0x5,0x22,0x7fffffffc6d0,0xffffffff) = 0 (0x0)
read(11,0x800813400,1023)                        = 0 (0x0)
close(11)                                        = 0 (0x0)
read(10,"sbin/kldstat -v | grep accf_http"...,1023) = 1023 (0x3ff)
stat("/etc/defaults/rc.conf",{ mode=-r--r--r-- ,inode=143,size=38070,blksize=38400 }) = 0 (0x0)
eaccess(0x80083b320,0x4,0x4c3ec0,0x0,0x80083b308,0x1) = 0 (0x0)
open("/etc/defaults/rc.conf",O_RDONLY,057)       = 3 (0x3)
fcntl(3,F_DUPFD,0xa)                             = 11 (0xb)
close(3)                                         = 0 (0x0)
fcntl(11,F_SETFD,FD_CLOEXEC)                     = 0 (0x0)
read(11,"#!/bin/sh\n\n# This is rc.conf -"...,1023) = 1023 (0x3ff)
read(11,"om rc.d\nrc_info="NO"\t\t# Enabl"...,1023) = 1023 (0x3ff)
read(11,"f_clobber="NO"\t# Overwrite old "...,1023) = 1023 (0x3ff)
read(11,"rting.\n\n# Experimental - test "...,1023) = 1023 (0x3ff)
read(11,"swap partitions.\n\nroot_rw_moun"...,1023) = 1023 (0x3ff)
read(11," to dhcp client program.\ndhclie"...,1023) = 1023 (0x3ff)
read(11,"\t# Set to YES to enable events "...,1023) = 1023 (0x3ff)
read(11,"rewall_simple_onet_ipv6="2001:db"...,1023) = 1023 (0x3ff)
read(11,"cated port\nip_portrange_last="N"...,1023) = 1023 (0x3ff)
read(11,"ogram lives\nipnat_rules="/etc/i"...,1023) = 1023 (0x3ff)
read(11,"o enable ftp-proxy(8) for pf\nft"...,1023) = 1023 (0x3ff)
read(11,"lt loopback device configuration"...,1023) = 1023 (0x3ff)
read(11," meaning.\nsppp_interfaces=""\t"...,1023) = 1023 (0x3ff)
read(11," address translation or NO.\nppp"...,1023) = 1023 (0x3ff)
read(11,"# Optional flags to hastd.\n#\n#"...,1023) = 1023 (0x3ff)
read(11,"erberos5_server_enable="NO"\t# R"...,1023) = 1023 (0x3ff)
read(11,"ce that pppoed runs on.\nsshd_en"...,1023) = 1023 (0x3ff)
read(11,".\nmountd_flags="-r"\t\t# Flags "...,1023) = 1023 (0x3ff)
read(11," for nfscbd\nnfsuserd_enable="NO"...,1023) = 1023 (0x3ff)
read(11,"#\nnis_client_enable="NO"\t\t# W"...,1023) = 1023 (0x3ff)
read(11,"atic route list (or leave empty)"...,1023) = 1023 (0x3ff)
read(11,"terface options: ###\natm_enable"...,1023) = 1023 (0x3ff)
read(11,"(8) (or NO)\nbthidd_config="/etc"...,1023) = 1023 (0x3ff)
read(11," find the correct\n\t\t\t\t# num"...,1023) = 1023 (0x3ff)
read(11,"e to set fec0:0000:0000:0006::/6"...,1023) = 1023 (0x3ff)
read(11," Examples for rtr.\n#ipv6_prefix"...,1023) = 1023 (0x3ff)
read(11,"IPv4\n\t\t\t\t# tunneling interf"...,1023) = 1023 (0x3ff)
read(11,"er, or AUTO)\n\n################"...,1023) = 1023 (0x3ff)
read(11,"default mice as enabled unless\n"...,1023) = 1023 (0x3ff)
read(11,"sendmail_pidfile="/var/run/sendm"...,1023) = 1023 (0x3ff)
read(11,"/usr/sbin/auditd"\t# Path to the"...,1023) = 1023 (0x3ff)
read(11,"nerate crash dump summary.\nquot"...,1023) = 1023 (0x3ff)
read(11,"/compat /usr/local/lib /usr/loca"...,1023) = 1023 (0x3ff)
read(11,"="/var/db/entropy" # Set to NO t"...,1023) = 1023 (0x3ff)
read(11,"dle state\neconomy_cpu_freq="NON"...,1023) = 1023 (0x3ff)
read(11,"ysvipc_allow="NO"\t# Allow Syste"...,1023) = 1023 (0x3ff)
read(11,"cute after the one for\n\t\t\t\t"...,1023) = 1023 (0x3ff)
read(11,"{\n\t\tlocal i sourced_files\n\t"...,1023) = 219 (0xdb)
read(11,0x800813400,1023)                        = 0 (0x0)
close(11)                                        = 0 (0x0)
stat("/etc/rc.conf",{ mode=-rw-r--r-- ,inode=512,size=1746,blksize=4096 }) = 0 (0x0)
eaccess(0x80083b3b0,0x4,0x4c3ec0,0x0,0x80083b398,0x2) = 0 (0x0)
open("/etc/rc.conf",O_RDONLY,057)                = 3 (0x3)
fcntl(3,F_DUPFD,0xa)                             = 11 (0xb)
close(3)                                         = 0 (0x0)
fcntl(11,F_SETFD,FD_CLOEXEC)                     = 0 (0x0)
read(11,"# land.berklix.org /etc/rc.conf"...,1023) = 1023 (0x3ff)
read(11,"t_autoupdate="YES"   # Automatic"...,1023) = 723 (0x2d3)
read(11,0x800813400,1023)                        = 0 (0x0)
close(11)                                        = 0 (0x0)
stat("/etc/rc.conf.local",0x7fffffffc8b0)        ERR#2 'No such file or directory'
stat("/etc/rc.conf.d/apache22",0x7fffffffccc0)   ERR#2 'No such file or directory'
read(10,"mits_args="\\${apache22limits_${"...,1023) = 1023 (0x3ff)
read(10,"ipped."\n\t\t\t\tcontinue\n\t\t"...,1023) = 1023 (0x3ff)
read(10," \n{\n\tapache22_checkconfig\n\n"...,1023) = 520 (0x208)
pipe(0x7fffffffc890)                             = 0 (0x0)
fork()                                           = 95118 (0x1738e)
close(4)                                         = 0 (0x0)
read(3,0x7fffffffca60,128)                       = 0 (0x0)
close(3)                                         = 0 (0x0)
getpgrp()                                        = 95115 (0x1738b)
wait4(0xffffffff,0x7fffffffc934,0x2,0x0,0x80083b510,0x0) = 95118 (0x1738e)
stat("/usr/local/sbin/httpd",{ mode=-rwxr-xr-x ,inode=591973,size=1345420,blksize=131072 }) = 0 (0x0)
eaccess(0x80083b448,0x1,0x4c3ee0,0x0,0x101010101010101,0x8080808080808080) = 0 (0x0)
geteuid()                                        = 0 (0x0)
stat("/usr/local/etc/apache22/httpd.conf",{ mode=-rw-r--r-- ,inode=592575,size=16838,blksize=16896 }) = 0 (0x0)
eaccess(0x80083b530,0x4,0x4c3ec0,0x0,0x101010101010101,0x8080808080808080) = 0 (0x0)
fork()                                           = 95121 (0x17391)
getpgrp()                                        = 95115 (0x1738b)
wait4(0xffffffff,0x7fffffffbe64,0x2,0x0,0x80083b550,0x0) = 95121 (0x17391)
stat("/usr/local/sbin/envvars",{ mode=-rw-r--r-- ,inode=355305,size=1191,blksize=4096 }) = 0 (0x0)
open("/usr/local/sbin/envvars",O_RDONLY,057)     = 3 (0x3)
fcntl(3,F_DUPFD,0xa)                             = 11 (0xb)
close(3)                                         = 0 (0x0)
fcntl(11,F_SETFD,FD_CLOEXEC)                     = 0 (0x0)
read(11,"# Licensed to the Apache Softwar"...,1023) = 1023 (0x3ff)
read(11,"lib"\nfi\nexport LD_LIBRARY_PATH"...,1023) = 168 (0xa8)
stat("/usr/local/etc/apache22/envvars.d",{ mode=drwxr-xr-x ,inode=377047,size=2,blksize=4096 }) = 0 (0x0)
open("/usr/local/etc/apache22/envvars.d",O_NONBLOCK|0x20000,00) = 3 (0x3)
fstat(3,{ mode=drwxr-xr-x ,inode=377047,size=2,blksize=4096 }) = 0 (0x0)
fcntl(3,F_SETFD,FD_CLOEXEC)                      = 0 (0x0)
fstatfs(0x3,0x7fffffffb2a0,0x4,0x24,0x716750,0x0) = 0 (0x0)
getdirentries(0x3,0x8009e9000,0x1000,0x8008230c8,0x716750,0x0) = 24 (0x18)
getdirentries(0x3,0x8009e9000,0x1000,0x8008230c8,0x716750,0x0) = 0 (0x0)
lseek(3,0x0,SEEK_SET)                            = 0 (0x0)
close(3)                                         = 0 (0x0)
stat("/sbin/ls",0x7fffffffb5c0)                  ERR#2 'No such file or directory'
stat("/bin/ls",{ mode=-r-xr-xr-x ,inode=572606,size=875416,blksize=131072 }) = 0 (0x0)
pipe(0x7fffffffb7f0)                             = 0 (0x0)
fork()                                           = 95122 (0x17392)
close(4)                                         = 0 (0x0)
read(3,0x7fffffffb9c0,128)                       = 0 (0x0)
close(3)                                         = 0 (0x0)
getpgrp()                                        = 95115 (0x1738b)
wait4(0xffffffff,0x7fffffffb894,0x2,0x0,0x101010101010101,0x8080808080808080) = 95122 (0x17392)
read(11,0x800815c00,1023)                        = 0 (0x0)
close(11)                                        = 0 (0x0)
Performing sanity check on apache22 configuration:
write(1,"Performing sanity check on apach"...,51) = 51 (0x33)
fork()                                           = 95123 (0x17393)
getpgrp()                                        = 95115 (0x1738b)
Syntax OK
wait4(0xffffffff,0x7fffffffba24,0x2,0x0,0x80083bb18,0x0) = 95123 (0x17393)
Starting apache22.
write(1,"Starting apache22.\n",19)               = 19 (0x13)
fork()                                           = 95124 (0x17394)
getpgrp()                                        = 95115 (0x1738b)
wait4(0xffffffff,0x7fffffffc4a4,0x2,0x0,0x80083b560,0x0) = 95124 (0x17394)
read(10,0x7151c0,1023)                           = 0 (0x0)
process exit, rval = 0
--------

Cheers,
Julian
-- 
Julian Stacey, BSD Unix Linux C Sys Eng Consultant, Munich http://berklix.com
 Reply below not above, like a play script.  Indent old text with "> ".
 Send plain text.  No quoted-printable, HTML, base64, multipart/alternative.


More information about the freebsd-jail mailing list