First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 235152
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo/BSD Team <bsd@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Michael A. Smith <michael@smith-li.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
apache2_start /etc/init.d/apache2 --debug start output text/plain Michael A. Smith 2008-08-18 23:21 0000 7.58 KB Details
apache2.diff apache2_initscript.diff patch Michael A. Smith 2008-08-19 03:01 0000 1.54 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 235152 depends on: Show dependency tree
Bug 235152 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-08-18 23:20 0000
/etc/init.d/apache2 start takes a really long time to start, and prints a lot
to stderr, but eventually works. 

Reproducible: Always

Steps to Reproduce:




Portage 2.2_rc8 (default-bsd/fbsd/6.2/x86, gcc-4.1.2, freebsd-lib-6.2-r4,
6.2-RELEASE i386)
=================================================================
System uname: FreeBSD-6.2-RELEASE-i386-32bit
Timestamp of tree: Mon, 18 Aug 2008 17:30:02 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r6, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-devel/autoconf:  2.62-r1
sys-devel/automake:  1.10.1-r1
sys-devel/binutils:  2.17-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  6.2-r4
ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd"
CBUILD="i686-gentoo-freebsd6.2"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-gentoo-freebsd6.2"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d
/etc/eselect/postgresql /etc/gconf /etc/gentoo-release /etc/revdep-rebuild
/etc/terminfo"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks parallel-fetch preserve-libs sfperms
strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
MAKEOPTS="-sj3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --stats --timeout=180 --exclude=/distfiles
--exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="berkdb cli cracklib crypt cups dri gdbm iconv java5 midi ncurses nls oss
pam pcre perl postgres ppds python readline reflection session spl ssl tcpd
unicode x86-fbsd zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare
dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter
mmap_emul mulaw multi null plug rate route share shm softvol"
APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm
authn_default authn_file authz_dbm authz_default authz_groupfile authz_host
authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir
disk_cache env expires ext_filter file_cache filter headers include info
log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling
status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork"
ELIBC="FreeBSD" INPUT_DEVICES="keyboard mouse" KERNEL="FreeBSD"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses
text" USERLAND="BSD" VIDEO_CARDS="apm ark chips cirrus cyrix dummy i128 i810
mach64 mga  neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion
sis   sisusb tga trident tseng vga via vmware"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL,
LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Michael A. Smith 2008-08-18 23:21:55 0000 -------
Created an attachment (id=163259) [edit]
/etc/init.d/apache2 --debug start output

If I had to guess, I'd say it's an openrc problem, but I'm not too sure.

------- Comment #2 From Javier Villavicencio 2008-08-19 00:41:32 0000 -------
The problem is that the apache init.d script uses (bashism) "let i++" instead
of a more portable "i=$(($i+1))", that's why it shows so much stderr at start
(FreeBSD's /bin/sh does not understands the i++).

However that might not be the real cause of apache's startup delay, do you have
any extra modules or some configuration that might require a freebsd kernel
module (kevent/accf_http for example)?

------- Comment #3 From Michael A. Smith 2008-08-19 03:01:22 0000 -------
Created an attachment (id=163270) [edit]
apache2_initscript.diff

This diff is sh-compliant. I'm not getting the let i++ complaints anymore with
the changes here, but I still get...

[Tue Aug 19 02:56:15 2008] [warn] (2)No such file or directory: Failed to
enable the 'httpready' Accept Filter
[Tue Aug 19 02:56:15 2008] [warn] (2)No such file or directory: Failed to
enable the 'httpready' Accept Filter

I don't know if that's related to missing kernel modules or not...

------- Comment #4 From Javier Villavicencio 2008-08-19 12:23:43 0000 -------
That's the issue indeed, try to load the accf_http[1] kernel module or add it
to /boot/loader.conf:

# kldload accf_http
or
# echo 'accf_http_load="YES"' >> /boot/loader.conf
(and reboot)

Apache uses these accept filters [2] to have the kernel handle http requests
before apache to increase performance, by default apache is compiled with the
filters enabled.

[1] http://www.freebsd.org/cgi/man.cgi?query=accf_http
[2] http://httpd.apache.org/docs/2.2/mod/core.html

------- Comment #5 From Michael A. Smith 2008-08-20 00:11:49 0000 -------
(In reply to comment #4)
Yep, that did it. Thanks!

------- Comment #6 From Benedikt Böhm 2008-08-29 13:31:15 0000 -------
message added to apache-2.eclass

First Last Prev Next    No search results available      Search page      Enter new bug