Re: httpd v2.0 compile fails with mod_so on Linux
On Sun, Mar 30, 2003 at 03:35:24AM +0200, Graham Leggett wrote: Hi all, (fudging config.m4 to remove mod_auth-digest that refuses to compile) When I try to configure the latest head of v2.0 with the following line, it bombs out further down with an error: ./configure --enable-mods-shared=all checking whether to enable mod_userdir... shared (all) checking whether to enable mod_alias... shared (all) checking whether to enable mod_rewrite... shared (all) configure: error: shared objects have been requested but cannot be built since mod_so cannot be built Again, I have attached config.log - any clues? ... configure:15185: /include/apr.h: No such file or directory configure:15168: error: shared objects have been requested but cannot be built since mod_so cannot be built This is the same problem as in the other config.log you posted - APR_CHECK_APR_DEFINE can't find apr.h, so all the checks for APR_HAS_foo are failing. Maybe try adding a echo CPPFLAGS are $CPPFLAGS line after: CPPFLAGS=$CPPFLAGS $INCLUDES n APR_CHECK_APR_DEFINE to see why not. joe
debugging from devstudio pt2.
Okay, The last message was premature (typical for a newbie). And sorry for the annoying questions... I've stepped through more of the startup code and found that the service is getting started and then if (!strcasecmp(signal_arg, start)) { ap_listen_rec *lr; /* Close the listening sockets. */ for (lr = ap_listeners; lr; lr = lr-next) { apr_socket_close(lr-sd); lr-active = 0; } rv = mpm_service_start(ptemp, inst_argc, inst_argv); exit (rv); where rv returns 0 and then exits. When I open the services window (win2k), the service displays started. I guess I'm a little lost about how I can debug my module, if I'm not running apache from within dev studio? Or am I now that the service is started? How do I step through a module's code? Jeff.
Re: httpd v2.0 compile fails with mod_so on Linux
Joe Orton wrote: ./configure --enable-mods-shared=all checking whether to enable mod_userdir... shared (all) checking whether to enable mod_alias... shared (all) checking whether to enable mod_rewrite... shared (all) configure: error: shared objects have been requested but cannot be built since mod_so cannot be built Again, I have attached config.log - any clues? ... configure:15185: /include/apr.h: No such file or directory configure:15168: error: shared objects have been requested but cannot be built since mod_so cannot be built This is the same problem as in the other config.log you posted - APR_CHECK_APR_DEFINE can't find apr.h, so all the checks for APR_HAS_foo are failing. Maybe try adding a echo CPPFLAGS are $CPPFLAGS line after: CPPFLAGS=$CPPFLAGS $INCLUDES n APR_CHECK_APR_DEFINE to see why not. I tried this, but the configure script bombs out before this line so I never get to see these values. Surely CPPFLAGS should be set before the module checks? It looks like it is being set after the module checks, which might explain why it is failing. Regards, Graham -- - [EMAIL PROTECTED] There's a moon over Bourbon Street tonight...
Re: httpd v2.0 compile fails with mod_so on Linux
Jeff Trawick wrote: Can you try with some well-used autoconf instead of GNU Autoconf 2.57 and see if whatever is happening is related to the autoconf version? I checked out a fresh copy of the source tree (as opposed to cvs update'ing my existing tree) and the problems have gone away. I think there were some files lying around from old compiles that were breaking things. Regards, Graham -- - [EMAIL PROTECTED] There's a moon over Bourbon Street tonight...
Re: Showstopper? Inheritence, CGI Exec() changes bad for cgid
William A. Rowe, Jr. wrote: At 08:07 PM 3/29/2003, Jeff Trawick wrote: Maybe there is a Solaris patch for this :) It seems really sucky for exec to have a failure point after close-for-exec files are closed and after signal handling is reset. No... look at what we do in apr_proc_child_create ... we are the ones closing all of the handles that we need in invoking ap_log_error()! Can't blame the OS for this one :-) oh, in apr_proc_create()-apr_pool_cleanup_for_exec() I guess yeah, I can see the normal error log file descriptor getting cleaned up by apr_pool_cleanup_for_exec() but something I forgot about: mod_cgid sets r-server-error_log descriptor to STDERR after accepting a new CGI request: while (!daemon_should_exit) { int errfileno = STDERR_FILENO; ... apr_os_file_put(r-server-error_log, errfileno, 0, r-pool); apr_os_file_put(inout, sd2, 0, r-pool); and when I hit cgid_child_errfn() due to an exec failure, stderr is where it will try to write (gdb) p *r-server-error_log $6 = {pool = 0x813fba0, filedes = 2, fname = 0x0, flags = 2048, eof_hit = 0, is_pipe = 0, timeout = -1, buffered = 0, blocking = BLK_UNKNOWN, ungetchar = -1, buffer = 0x0, bufpos = 0, dataRead = 0, direction = 0, filePtr = 0, thlock = 0x0} oh darn, I took a wild branch... this doesn't have anything to do with cgid_child_errfn at all... it is this code, isn't it??? (look at Sander's minimal traceback (which would be much better with a -g build and line numbers!!!)) rc = ap_os_create_privileged_process(r, procnew, argv0, argv, (const char * const *)env, procattr, ptrans); if (rc != APR_SUCCESS) { /* Bad things happened. Everyone should have cleaned up. */ ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r, couldn't create child process: %d: %s, rc, apr_filename_of_pathname(r-filename)); when I force rc != APR_SUCCESS on Linux, I get a segfault... the problem is that ap_log_rerror() references r-headers_in, which wasn't replicated in the daemon... the attached patch works around that in the same manner as cgid_child_errfn() no theory here for why I get segfault and you get SIGPIPE from writing to a closed descriptor; it certainly is an indication that we are talking about different problems, but I've been up and down the cgid_child_errfn() path and can't make it fail alternatively, this code could just do ap_log_error(..., main_server, ...) also, shouldn't the APLOG_TOCLIENT flag get zapped since it doesn't apply to ap_log_error()? recap: I find different code that is problematic I can make that different code fail, but with different symptom from you please try the patch to see if your symptom changes or goes away Index: modules/generators/mod_cgid.c === RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v retrieving revision 1.145.2.3 diff -u -r1.145.2.3 mod_cgid.c --- modules/generators/mod_cgid.c 27 Feb 2003 12:33:08 - 1.145.2.3 +++ modules/generators/mod_cgid.c 30 Mar 2003 13:26:59 - @@ -757,10 +757,13 @@ procattr, ptrans); if (rc != APR_SUCCESS) { -/* Bad things happened. Everyone should have cleaned up. */ -ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r, - couldn't create child process: %d: %s, rc, - apr_filename_of_pathname(r-filename)); +/* Bad things happened. Everyone should have cleaned up. + * ap_log_rerror() won't work because the header table used by + * ap_log_rerror() hasn't been replicated in the phony r + */ +ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r-server, + couldn't create child process: %d: %s, rc, + apr_filename_of_pathname(r-filename)); } else { apr_hash_set(script_hash, cgid_req.conn_id, sizeof(cgid_req.conn_id),
Small enhancement to http_roll_release
Hi all, The attached patch allows the http_roll_release script to be used to pull releases out of tags other than just APACHE_2_0*, for example WROWE_2_0_45_RC2. Any thoughts? Regards, Graham -- - [EMAIL PROTECTED] There's a moon over Bourbon Street tonight... diff -u -r --exclude=CVS /home/minfrin/src/apache/pristine/httpd-2.0/build/httpd_roll_release httpd-2.0/build/httpd_roll_release --- /home/minfrin/src/apache/pristine/httpd-2.0/build/httpd_roll_releaseWed Sep 18 13:53:31 2002 +++ httpd-2.0/build/httpd_roll_release Sun Mar 30 15:25:38 2003 @@ -18,7 +18,7 @@ REPO=httpd-2.0 WORKING_DIR=`echo $REPO | sed -e 's/[\-\.]/./g'` -WORKING_TAG=`echo $TAG | sed -e 's/APACHE_2_0_/./'` +WORKING_TAG=`echo $TAG | sed -e 's/[A-Z]*_2_0_/./'` WORKING_DIR=$WORKING_DIR$WORKING_TAG START_DIR=`echo $PWD`
Bug report for Apache httpd-1.3 [2003/03/30]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 7492|Opn|Maj|2002-03-26|Rewritemap mismerges paths (c:/ not recognized as | | 7741|New|Nor|2002-04-04|some directives may be placed outside of proper co| | 7982|New|Maj|2002-04-11|mod_rewrite URL string empty when passed unicoded | | 8311|Opn|Nor|2002-04-19|error in PUT directive gives confusing error messa| | 8329|New|Nor|2002-04-20|mime_magic gives 500 and no error_log on Microsoft| | 8372|New|Nor|2002-04-22|Threadsaftey issue in Rewrite's cache [Win32/OS2/N| | 8508|New|Cri|2002-04-25|apxs generates incorrect LoadModule directive.| | 8683|New|Nor|2002-04-30|Insecure file permissions - make install | | 8849|New|Nor|2002-05-07|make install errors as root on NFS shares | | 8882|New|Enh|2002-05-07|[PATCH] mod_rewrite communicates with external rew| | 8889|New|Min|2002-05-07|Broken links in http://httpd.apache.org/dev/apidoc| | 9037|New|Min|2002-05-13|Slow performance when acessing an unresolved IP ad| | 9126|New|Blk|2002-05-15|68k-next-openstep v. 4.0 | | 9201|New|Maj|2002-05-17|Wrong REQUEST_URI with malformed HTTP queries | | 9427|New|Min|2002-05-26|bad negotiation when started with LANG=cs_CZ | | 9626|Opn|Nor|2002-06-05|ScriptAliasMatch fails with tilde in pattern | | 9678|New|Maj|2002-06-06|UTF-8 streams break some browsers | | 9726|New|Min|2002-06-09|Double quotes should be flagged as T_HTTP_TOKEN_ST| | 9894|New|Maj|2002-06-16|getline sub in support progs collides with existin| | |New|Nor|2002-06-19|Incorrect default manualdir value with layout.| |10025|New|Nor|2002-06-19|mod_rewrite broken in 1.3.26 ?| |10038|New|Min|2002-06-20|ab benchmaker hangs on 10K https URLs with keepali| |10052|New|Nor|2002-06-20|mod_proxy inserts a blank new line int headers whe| |10073|New|Maj|2002-06-20|upgrade from 1.3.24 to 1.3.26 breaks include direc| |10109|New|Maj|2002-06-21|problem running 1.3.26 and php on Solaris 7 / Spar| |10169|New|Nor|2002-06-24|Apache seg faults due to attempt to access out of | |10172|New|Maj|2002-06-24|Can't load libphp4.so with apache 1.3.26 + SSL 1.4| |10178|New|Maj|2002-06-24|Proxy server cuts off begining of buffer when spec| |10182|New|Nor|2002-06-24|Apache 1.3.26 and MOD_SO on OpenBSD 3.0 | |10195|New|Nor|2002-06-24|Configure script erroneously detects system Expat | |10199|New|Nor|2002-06-24|Configure can't handle directory names with unders| |10243|New|Maj|2002-06-26|CGI scripts not getting POST data | |10280|New|Nor|2002-06-27|notes / pnotes seem to no longer work in 1.3.27 | |10354|New|Nor|2002-06-30|ErrorDocument(.htaccess) fails when passed URL wit| |10470|New|Cri|2002-07-04|proxy module will not correctly serve mixed case f| |10666|New|Enh|2002-07-10|line-end comment error message missing file name | |10744|New|Nor|2002-07-12|suexec might fail to open log file| |10747|New|Maj|2002-07-12|ftp SIZE command and 'smart' ftp servers results i| |10760|New|Maj|2002-07-12|empty ftp directory listings from cached ftp direc| |10890|New|Cri|2002-07-17|if et locale is used, configure fails | |10939|New|Maj|2002-07-18|directory listing errors | |10961|Ass|Nor|2002-07-18|Redirect inside of Directory XYZ does not pass e| |11020|New|Maj|2002-07-21|APXS only recognise tests made by ./configure | |11236|New|Min|2002-07-27|Possible Log exhaustion bug? | |11265|New|Blk|2002-07-29|mod_rewrite fails to encode special characters| |11291|New|Nor|2002-07-30|Cygwin script with long filename fails.Path separa| |11668|New|Maj|2002-08-13|mod proxy mod_rewite generate a invalid http res| |11765|New|Nor|2002-08-16|.apaci.install.tmp installs in existing httpd.conf| |11986|New|Nor|2002-08-23|Restart hangs when piping logs on rotation log pro| |11993|Opn|Cri|2002-08-23|PDFs served through ProxyPass show up blank | |11998|New|Maj|2002-08-23|mod_usertrack spot_cookie() will not allow Apache |
Bug report for Apache httpd-2.0 [2003/03/30]
+---+ | Bugzilla Bug ID | | +-+ | | Status: UNC=Unconfirmed NEW=New ASS=Assigned| | | OPN=ReopenedVER=Verified(Skipped Closed/Resolved) | | | +-+ | | | Severity: BLK=Blocker CRI=CriticalMAJ=Major | | | | MIN=Minor NOR=Normal ENH=Enhancement | | | | +-+ | | | | Date Posted | | | | | +--+ | | | | | Description | | | | | | | | 7483|Ass|Enh|2002-03-26|Add FileAction directive to assign a cgi interpret| | 7862|New|Enh|2002-04-09|suexec never log a group name.| | 7882|Opn|Nor|2002-04-09|env LIBS ignored during build | | 7991|New|Enh|2002-04-11|Enhance ExpiresByType to accept wildcards (mod_exp| | 8167|New|Min|2002-04-16|--with-module does not build MODULE_DIRS correctly| | 8431|Opn|Nor|2002-04-23|AddHandler/Action not-found when file does not exi| | 8483|Opn|Min|2002-04-24|apache_2.0 .msi installer breaks .log and .conf fi| | 8493|Ass|Nor|2002-04-25|mod_rewrite does not try index.html like it used t| | 8500|Ass|Cri|2002-04-25|authorization user does not logged| | 8713|New|Min|2002-05-01|No Errorlog on PROPFIND/Depth:Infinity| | 8880|New|Enh|2002-05-07|AcceptPathInfo does not apply to DirectoryIndex fi| | 8910|Ass|Nor|2002-05-08|MultiviewsMatch Any does not work as expected | | 8925|New|Cri|2002-05-09|Service Install (win32 .msi/.exe) fails for port i| | 8993|Opn|Nor|2002-05-10|openssl library location(s) are hardcoded in confi| | 9011|Opn|Min|2002-05-12|Worker-MPM error log: the listener thread didn't e| | 9046|New|Min|2002-05-13|Cleaned up PNG/MNG converted icons| | 9484|New|Enh|2002-05-29|Dynamic ServerAdmin configuration | | 9488|Opn|Nor|2002-05-29|HTTP/0.9 requests spoken on https port returns HTT| | 9587|New|Min|2002-06-03|Wrong icon with FancyIndexing | | 9656|New|Nor|2002-06-06|Support of FTP Proxy only partially documented| | 9727|New|Min|2002-06-09|Double quotes should be flagged as T_HTTP_TOKEN_ST| | 9945|New|Enh|2002-06-18|[PATCH] new funtionality for apache bench | | 9953|New|Maj|2002-06-18|Normal incoming headers disappear when +ExportCert| |10076|New|Min|2002-06-20|Leading quote eats text in roratelogs.8 | |10114|Ass|Enh|2002-06-21|Negotiation gives no weight to order, only q value| |10154|Ass|Nor|2002-06-23|ApacheMonitor interferes with service uninstall/re| |10515|New|Maj|2002-07-05|cgi lock when writing to stderr | |10575|New|Enh|2002-07-09|no option to autoindex auth protected files/folder| |10678|New|Maj|2002-07-11|Several .htaccess files are consulted, REMOTE_USER| |10722|New|Nor|2002-07-12|ProxyPassReverse doesn't change cookie paths | |10774|New|Cri|2002-07-13|apr_shm_create core dump | |10775|New|Cri|2002-07-13|SCRIPT_NAME wrong value | |11000|New|Enh|2002-07-20|Mutex permission problems: configuration template | |11034|Opn|Nor|2002-07-22|Apache does not write to error-log| |11035|New|Min|2002-07-22|Apache adds double entries to headers generated by| |4|Opn|Nor|2002-07-24|Images[/anything] stored in AFS served corruptly | |11259|New|Enh|2002-07-29|'make install' should provide a deinstaller | |11294|New|Enh|2002-07-30|desired vhost_alias option| |11310|Ass|Nor|2002-07-30|#include ssl.h s/b #include openssl/ssl.h | |11331|New|Cri|2002-07-31|stale cgi process entries when using suexec | |11427|Opn|Maj|2002-08-02|Possible Memory Leak in CGI script invocation | |11475|New|Min|2002-08-05|usertrack can read Cookie2 header but spec says it| |11514|New|Maj|2002-08-07|worker MPM stalls on UnixWare 7.11| |11521|New|Nor|2002-08-07|Addition of Japanese error message | |11540|New|Nor|2002-08-07|ProxyTimeout ignored | |11580|Opn|Enh|2002-08-09|generate Content-Location headers | |11602|New|Min|2002-08-10|REMOTE_USER variable lost in conjunction with Scri| |11637|New|Nor|2002-08-12|PROPFIND returns invalid XML | |11660|New|Enh|2002-08-13|a New Hebrew Translation for Test Page for Apache| |11769|New|Nor|2002-08-16|2.0.39 Bindist does not work on all versions of So| |11960|New|Maj|2002-08-23|Apache default config doesn't include uk langauge |
RE: Small enhancement to http_roll_release
From: Graham Leggett [mailto:[EMAIL PROTECTED] Sent: Sunday, March 30, 2003 3:42 PM Hi all, The attached patch allows the http_roll_release script to be used to pull releases out of tags other than just APACHE_2_0*, for example WROWE_2_0_45_RC2. Any thoughts? Yeah, http_roll_release shouldn't be used anymore. I meant to delete it after the introduction of release.sh (in httpd-dist), but never got around to it. Sander
[PATCH] why cleanup regexs prior to exec?
somebody tell me why I shouldn't commit this :) Index: server/util.c === RCS file: /home/cvs/httpd-2.0/server/util.c,v retrieving revision 1.133.2.2 diff -u -r1.133.2.2 util.c --- server/util.c 12 Feb 2003 17:17:31 - 1.133.2.2 +++ server/util.c 30 Mar 2003 16:45:36 - @@ -311,7 +311,7 @@ return NULL; } -apr_pool_cleanup_register(p, (void *) preg, regex_cleanup, regex_cleanup); +apr_pool_cleanup_register(p, (void *) preg, regex_cleanup, apr_pool_cleanup_null); return preg; }
Re: [PATCH] why cleanup regexs prior to exec?
On Sun, 2003-03-30 at 08:47, Jeff Trawick wrote: somebody tell me why I shouldn't commit this :) Looks safe to me Brian
[PATCH] don't try to clean up listening sockets twice prior to exec
I'm not seeing any close(-1) calls on a trace of a mod_cgid-invoked script anymore now. old trace (in the new script child prior to exec): 5108: close(4)= 0 5108: close(3)= 0 5108: close(-1) Err#9 EBADF 5108: close(-1) Err#9 EBADF 5108: close(9)= 0 5108: close(6)= 0 5108: close(8)= 0 5108: close(7)= 0 5108: close(13) = 0 5108: fcntl(12, F_DUP2FD, 0x) = 0 5108: close(12) = 0 5108: close(14) = 0 5108: fcntl(15, F_DUP2FD, 0x0001) = 1 5108: close(15) = 0 5108: close(16) = 0 5108: fcntl(17, F_DUP2FD, 0x0002) = 2 5108: close(17) = 0 5108: sigaction(SIGCLD, 0xFFBEF5C8, 0xFFBEF6D0) = 0 5108: chdir(/export/home/trawick/apacheinst/cgi-bin/) = 0 new trace: 6616: close(4)= 0 6616: close(3)= 0 6616: close(9)= 0 6616: close(6)= 0 6616: close(8)= 0 6616: close(7)= 0 6616: close(13) = 0 6616: fcntl(12, F_DUP2FD, 0x) = 0 6616: close(12) = 0 6616: close(14) = 0 6616: fcntl(15, F_DUP2FD, 0x0001) = 1 6616: close(15) = 0 6616: close(16) = 0 6616: fcntl(17, F_DUP2FD, 0x0002) = 2 6616: close(17) = 0 6616: sigaction(SIGCLD, 0xFFBEF5C8, 0xFFBEF6D0) = 0 6616: chdir(/export/home/trawick/apacheinst/cgi-bin/) = 0 I'd been seeing these bogus closes for eons, but thought they were associated with pipes until I stepped through the cleanup-for-exec path early this a.m.. Index: server/listen.c === RCS file: /home/cvs/httpd-2.0/server/listen.c,v retrieving revision 1.83.2.2 diff -u -r1.83.2.2 listen.c --- server/listen.c 3 Feb 2003 17:32:00 - 1.83.2.2 +++ server/listen.c 30 Mar 2003 16:55:24 - @@ -340,6 +340,8 @@ ap_listen_rec *lr; ap_listen_rec *next; int num_open; +const char *userdata_key = ap_listen_open; +void *data; /* Don't allocate a default listener. If we need to listen to a * port, then the user needs to have a Listen directive in their @@ -370,8 +372,17 @@ } old_listeners = NULL; -apr_pool_cleanup_register(pool, NULL, apr_pool_cleanup_null, - close_listeners_on_exec); +/* we come through here on both passes of the open logs phase + * only register the cleanup once... otherwise we try to close + * listening sockets twice when cleaning up prior to exec + */ +apr_pool_userdata_get(data, userdata_key, pool); +if (!data) { +apr_pool_userdata_set((const void *)1, userdata_key, + apr_pool_cleanup_null, pool); +apr_pool_cleanup_register(pool, NULL, apr_pool_cleanup_null, + close_listeners_on_exec); +} return num_open ? 0 : -1; }
Re: Small optimization patch for 1.3
--On Friday, March 28, 2003 10:30 AM -0800 Rasmus Lerdorf [EMAIL PROTECTED] wrote: In doing a bit of performance tweaking on 1.3, I noticed that ap_send_header_field() does an ap_rvputs() with each little piece of a header which results in separate ap_bwrite() calls for Primitive, :, Value, crlf for each header line sent. Rather than having these 1 and 2 character ap_bwrite() calls wouldn't it make more sense to ap_pstrcat() these little bits together and do a single ap_bputs()? I don't think it will necessarily effect things because not every ap_bwrite call results in a network write. It should try to fill up the buffer, then write only when the buffer is filled or a flush is called. So, I think the savings of not having these extra calls to ap_bwrite (which typically won't block) will be offset by the (very expensive) ap_pstrcat call. You'd now be doing two copies (one strcpy and a memcpy). Not to mention that the lines get longer and harder to read. -- justin
Re: cvs commit: httpd-2.0/build/rpm httpd.init httpd.logrotate httpd.spec.in
On Sun, Mar 30, 2003 at 06:57:35PM -, Graham Leggett wrote: ... --- buildconf 12 Mar 2003 01:30:05 - 1.32 +++ buildconf 30 Mar 2003 18:57:34 - 1.33 @@ -181,4 +181,19 @@ rm -f config.cache ${AUTOCONF:-autoconf} 21 | grep -v $cross_compile_warning +echo rebuilding rpm spec file +( VMMN=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -e '^[0-9]'` + REVISION=`echo AP_SERVER_MAJORVERSION.AP_SERVER_MINORVERSION.AP_SERVER_PATCHLEVEL | cpp -include \`pwd\`/include/ap_release.h | tr -d \ | grep -e '^[0-9.\-]'` I wouldn't put this stuff in buildconf (at least on the stable branch), cpp -include probably isn't portable. joe
Re: cvs commit: httpd-2.0/build/rpm httpd.init httpd.logrotate httpd.spec.in
Joe Orton wrote: +( VMMN=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -e '^[0-9]'` + REVISION=`echo AP_SERVER_MAJORVERSION.AP_SERVER_MINORVERSION.AP_SERVER_PATCHLEVEL | cpp -include \`pwd\`/include/ap_release.h | tr -d \ | grep -e '^[0-9.\-]'` I wouldn't put this stuff in buildconf (at least on the stable branch), cpp -include probably isn't portable. Hmmm - I am not very good with the portability stuff - can anyone suggest a portable way to do this? Regards, Graham -- - [EMAIL PROTECTED] There's a moon over Bourbon Street tonight...
Re: [PATCH] don't try to clean up listening sockets twice prior toexec
+1 Jeff Trawick wrote: I'm not seeing any close(-1) calls on a trace of a mod_cgid-invoked script anymore now. old trace (in the new script child prior to exec): 5108: close(4)= 0 5108: close(3)= 0 5108: close(-1) Err#9 EBADF 5108: close(-1) Err#9 EBADF 5108: close(9)= 0 5108: close(6)= 0 5108: close(8)= 0 5108: close(7)= 0 5108: close(13) = 0 5108: fcntl(12, F_DUP2FD, 0x) = 0 5108: close(12) = 0 5108: close(14) = 0 5108: fcntl(15, F_DUP2FD, 0x0001) = 1 5108: close(15) = 0 5108: close(16) = 0 5108: fcntl(17, F_DUP2FD, 0x0002) = 2 5108: close(17) = 0 5108: sigaction(SIGCLD, 0xFFBEF5C8, 0xFFBEF6D0) = 0 5108: chdir(/export/home/trawick/apacheinst/cgi-bin/) = 0 new trace: 6616: close(4)= 0 6616: close(3)= 0 6616: close(9)= 0 6616: close(6)= 0 6616: close(8)= 0 6616: close(7)= 0 6616: close(13) = 0 6616: fcntl(12, F_DUP2FD, 0x) = 0 6616: close(12) = 0 6616: close(14) = 0 6616: fcntl(15, F_DUP2FD, 0x0001) = 1 6616: close(15) = 0 6616: close(16) = 0 6616: fcntl(17, F_DUP2FD, 0x0002) = 2 6616: close(17) = 0 6616: sigaction(SIGCLD, 0xFFBEF5C8, 0xFFBEF6D0) = 0 6616: chdir(/export/home/trawick/apacheinst/cgi-bin/) = 0 I'd been seeing these bogus closes for eons, but thought they were associated with pipes until I stepped through the cleanup-for-exec path early this a.m.. Index: server/listen.c === RCS file: /home/cvs/httpd-2.0/server/listen.c,v retrieving revision 1.83.2.2 diff -u -r1.83.2.2 listen.c --- server/listen.c 3 Feb 2003 17:32:00 - 1.83.2.2 +++ server/listen.c 30 Mar 2003 16:55:24 - @@ -340,6 +340,8 @@ ap_listen_rec *lr; ap_listen_rec *next; int num_open; +const char *userdata_key = ap_listen_open; +void *data; /* Don't allocate a default listener. If we need to listen to a * port, then the user needs to have a Listen directive in their @@ -370,8 +372,17 @@ } old_listeners = NULL; -apr_pool_cleanup_register(pool, NULL, apr_pool_cleanup_null, - close_listeners_on_exec); +/* we come through here on both passes of the open logs phase + * only register the cleanup once... otherwise we try to close + * listening sockets twice when cleaning up prior to exec + */ +apr_pool_userdata_get(data, userdata_key, pool); +if (!data) { +apr_pool_userdata_set((const void *)1, userdata_key, + apr_pool_cleanup_null, pool); +apr_pool_cleanup_register(pool, NULL, apr_pool_cleanup_null, + close_listeners_on_exec); +} return num_open ? 0 : -1; }
Re: cvs commit: httpd-2.0/build/rpm httpd.init httpd.logrotatehttpd.spec.in
--On Sunday, March 30, 2003 7:02 PM + [EMAIL PROTECTED] wrote: Backport of the RPM build scripts to v2.0 Obtained from: Joe Orton [EMAIL PROTECTED] This generates failures on Solaris (which does not have cpp). It also looks like your grep usage is relying upon some extended grep semantics (-e). rebuilding rpm spec file ./buildconf: cpp: not found grep: illegal option -- e Usage: grep -hblcnsviw pattern file . . . ./buildconf: cpp: not found grep: illegal option -- e Usage: grep -hblcnsviw pattern file . . . Please be more considerate when you commit to stable without review. +echo rebuilding rpm spec file +( VMMN=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -e '^[0-9]'` + REVISION=`echo AP_SERVER_MAJORVERSION.AP_SERVER_MINORVERSION.AP_SERVER_PATCHLEVEL | cpp -include \`pwd\`/include/ap_release.h | tr -d \ | grep -e '^[0-9.\-]'` + VERSION=`echo $REVISION | cut -d- -s -f1` + RELEASE=`echo $REVISION | cut -d- -s -f2` + if [ x$VERSION = x ]; then +VERSION=$REVISION +RELEASE=1 + fi + cat ./build/rpm/httpd.spec.in | \ + sed -e s/APACHE_VERSION/$VERSION/ \ + -e s/APACHE_RELEASE/$RELEASE/ \ + -e s/APACHE_MMN/$VMMN/ \ + httpd.spec ) + Looking at how other projects do it, they generate their spec files as output from autoconf rather than generating them manually. This has the drawback as the vendor must run configure to produce the spec files, but this seems to be the common practice. So, I think it's acceptable. And, if you were to do this, this would become much cleaner and portable (a few AC_SUBST's and autoconf can find an egrep and cpp that work to expand/find the #define's for you). Regardless, this commit needs to be fixed or reverted on stable. -- justin
Re: cvs commit: httpd-2.0/build/rpm httpd.init httpd.logrotate httpd.spec.in
Justin Erenkrantz wrote: This generates failures on Solaris (which does not have cpp). It also looks like your grep usage is relying upon some extended grep semantics (-e). I will take the code out of buildconf until it can be fixed. I was not aware of these portability issues, having used the same techniques used in the spec file (which in hindsight is obviously redhat specific). Looking at how other projects do it, they generate their spec files as output from autoconf rather than generating them manually. This has the drawback as the vendor must run configure to produce the spec files, but this seems to be the common practice. So, I think it's acceptable. And, if you were to do this, this would become much cleaner and portable (a few AC_SUBST's and autoconf can find an egrep and cpp that work to expand/find the #define's for you). Where does ap_release.h get it's version #define's from? These exist before ./configure is generated - surely the same method (whatever it is) can be used here? Regards, Graham -- - [EMAIL PROTECTED] There's a moon over Bourbon Street tonight...
Re: [PATCH] don't try to clean up listening sockets twice prior to exec
++1 - makes perfect sense. One more oddball observation. Why repeatedly invoke the cleanups? We need only a few handles in cgid, it seems that setting those few handles aside and invoking cleanup_for_exec ourselves before we enter the server loop in the fork()ed cgid worker would speed things up quite considerably, over running cleanups hundreds of times. Bill At 11:07 AM 3/30/2003, you wrote: I'm not seeing any close(-1) calls on a trace of a mod_cgid-invoked script anymore now. old trace (in the new script child prior to exec): 5108: close(4)= 0 5108: close(3)= 0 5108: close(-1) Err#9 EBADF 5108: close(-1) Err#9 EBADF 5108: close(9)= 0 5108: close(6)= 0 5108: close(8)= 0 5108: close(7)= 0 5108: close(13) = 0 5108: fcntl(12, F_DUP2FD, 0x) = 0 5108: close(12) = 0 5108: close(14) = 0 5108: fcntl(15, F_DUP2FD, 0x0001) = 1 5108: close(15) = 0 5108: close(16) = 0 5108: fcntl(17, F_DUP2FD, 0x0002) = 2 5108: close(17) = 0 5108: sigaction(SIGCLD, 0xFFBEF5C8, 0xFFBEF6D0) = 0 5108: chdir(/export/home/trawick/apacheinst/cgi-bin/) = 0 new trace: 6616: close(4)= 0 6616: close(3)= 0 6616: close(9)= 0 6616: close(6)= 0 6616: close(8)= 0 6616: close(7)= 0 6616: close(13) = 0 6616: fcntl(12, F_DUP2FD, 0x) = 0 6616: close(12) = 0 6616: close(14) = 0 6616: fcntl(15, F_DUP2FD, 0x0001) = 1 6616: close(15) = 0 6616: close(16) = 0 6616: fcntl(17, F_DUP2FD, 0x0002) = 2 6616: close(17) = 0 6616: sigaction(SIGCLD, 0xFFBEF5C8, 0xFFBEF6D0) = 0 6616: chdir(/export/home/trawick/apacheinst/cgi-bin/) = 0 I'd been seeing these bogus closes for eons, but thought they were associated with pipes until I stepped through the cleanup-for-exec path early this a.m.. Index: server/listen.c === RCS file: /home/cvs/httpd-2.0/server/listen.c,v retrieving revision 1.83.2.2 diff -u -r1.83.2.2 listen.c --- server/listen.c 3 Feb 2003 17:32:00 - 1.83.2.2 +++ server/listen.c 30 Mar 2003 16:55:24 - @@ -340,6 +340,8 @@ ap_listen_rec *lr; ap_listen_rec *next; int num_open; +const char *userdata_key = ap_listen_open; +void *data; /* Don't allocate a default listener. If we need to listen to a * port, then the user needs to have a Listen directive in their @@ -370,8 +372,17 @@ } old_listeners = NULL; -apr_pool_cleanup_register(pool, NULL, apr_pool_cleanup_null, - close_listeners_on_exec); +/* we come through here on both passes of the open logs phase + * only register the cleanup once... otherwise we try to close + * listening sockets twice when cleaning up prior to exec + */ +apr_pool_userdata_get(data, userdata_key, pool); +if (!data) { +apr_pool_userdata_set((const void *)1, userdata_key, + apr_pool_cleanup_null, pool); +apr_pool_cleanup_register(pool, NULL, apr_pool_cleanup_null, + close_listeners_on_exec); +} return num_open ? 0 : -1; }
Re: cvs commit: httpd-2.0/build/rpm httpd.init httpd.logrotatehttpd.spec.in
--On Sunday, March 30, 2003 11:27 PM +0200 Graham Leggett [EMAIL PROTECTED] wrote: I will take the code out of buildconf until it can be fixed. I was not aware of these portability issues, having used the same techniques used in the spec file (which in hindsight is obviously redhat specific). Keep in mind that RPM isn't necessarily RedHat specific. Other platforms have RPMs available - IBM uses it for AIX, I think. Where does ap_release.h get it's version #define's from? These exist before ./configure is generated - surely the same method (whatever it is) can be used here? The release manager elf changes it on bumping. -- justin
[security?] device names crash Apache 2.0.44 on OS/2
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] From: Robert Howard [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Sun, 30 Mar 2003 14:20:12 -0800 (PST) Reply-To: Robert Howard [EMAIL PROTECTED] Priority: Normal X-Mailer: PMMail 2.20.2382 for OS/2 Warp 4.5 Subject: device names crash Apache 2.0.44 on OS/2 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N If Apache 2.0.44 for OS/2 receives a URL that has a device name such as LPT1 or COM1 etc. in the URL, the apache server spawns multiple httpd threads and then dies. e.g. http://yourservername/LPT 1 http://yourservername/COM1 regards Robert Howard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: httpd-2.0/modules/generators mod_cgid.c
+1 for 2.0.45 Brian On Sun, 2003-03-30 at 20:44, [EMAIL PROTECTED] wrote: wrowe 2003/03/30 20:44:11 Modified:modules/generators mod_cgid.c Log: Solve segfaults from unusual error exceptions in cgid. The daemon has no 'real' request_rec, so we can't use ap_log_rerror() anywhere within the cgid_server() code. Also, one of the two log messages was echoed to the child, no point when the actual request logic should take care of that notification. Submitted by: Jeff Trawick Reviewed by:Bill Rowe Revision ChangesPath 1.149 +12 -6 httpd-2.0/modules/generators/mod_cgid.c Index: mod_cgid.c === RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v retrieving revision 1.148 retrieving revision 1.149 diff -u -r1.148 -r1.149 --- mod_cgid.c 12 Feb 2003 18:27:37 - 1.148 +++ mod_cgid.c 31 Mar 2003 04:44:11 - 1.149 @@ -735,8 +735,11 @@ ((rc = apr_procattr_cmdtype_set(procattr, cmd_type)) != APR_SUCCESS) || ((rc = apr_procattr_child_errfn_set(procattr, cgid_child_errfn)) != APR_SUCCESS)) { /* Something bad happened, tell the world. */ -ap_log_rerror(APLOG_MARK, APLOG_ERR, rc, r, - couldn't set child process attributes: %s, r-filename); + * ap_log_rerror() won't work because the header table used by + * ap_log_rerror() hasn't been replicated in the phony r + */ +ap_log_error(APLOG_MARK, APLOG_ERR, rc, r-server, + couldn't set child process attributes: %s, r-filename); } else { apr_pool_userdata_set(r, ERRFN_USERDATA_KEY, apr_pool_cleanup_null, ptrans); @@ -757,10 +760,13 @@ procattr, ptrans); if (rc != APR_SUCCESS) { -/* Bad things happened. Everyone should have cleaned up. */ -ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r, - couldn't create child process: %d: %s, rc, - apr_filename_of_pathname(r-filename)); +/* Bad things happened. Everyone should have cleaned up. + * ap_log_rerror() won't work because the header table used by + * ap_log_rerror() hasn't been replicated in the phony r + */ +ap_log_error(APLOG_MARK, APLOG_ERR, rc, r-server, + couldn't create child process: %d: %s, rc, + apr_filename_of_pathname(r-filename)); } else { apr_hash_set(script_hash, cgid_req.conn_id, sizeof(cgid_req.conn_id),
Re: Showstopper? Inheritence, CGI Exec() changes bad for cgid
At 07:34 AM 3/30/2003, Jeff Trawick wrote: oh darn, I took a wild branch... this doesn't have anything to do with cgid_child_errfn at all... it is this code, isn't it??? (look at Sander's minimal traceback (which would be much better with a -g build and line numbers!!!)) rc = ap_os_create_privileged_process(r, procnew, argv0, argv, (const char * const *)env, procattr, ptrans); if (rc != APR_SUCCESS) { /* Bad things happened. Everyone should have cleaned up. */ ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r, couldn't create child process: %d: %s, rc, apr_filename_of_pathname(r-filename)); when I force rc != APR_SUCCESS on Linux, I get a segfault... the problem is that ap_log_rerror() references r-headers_in, which wasn't replicated in the daemon... the attached patch works around that in the same manner as cgid_child_errfn() Right... and we had a third I cleaned up :-( no theory here for why I get segfault and you get SIGPIPE from writing to a closed descriptor; it certainly is an indication that we are talking about different problems, but I've been up and down the cgid_child_errfn() path and can't make it fail No doubt this is a strange overload condition. The point is that we were being pretty ungraceful about it. I think all the ap_log_rerror foobars were the biggest issue. Hope these clear it all up. also, shouldn't the APLOG_TOCLIENT flag get zapped since it doesn't apply to ap_log_error()? Fixed. I agree. See the last commit to httpd-2.1 (1.149)... if I see anyone else agree I'll go ahead and commit to -2.0 and we can call this closed. Thanks for they eyeballs, Jeff! Bill
[patch] two small problems in ssl_engine_mutex.c
One, win32 won't compile (nor any platform missing chown). In this case we didn't need it and have a good macro to look at. This raised another bug in the next line. We assumed because we default to SYSV mutexes we should do that magic. I believe this is wrong, and we should be looking for that sort of lock explicitly. Please review. BillIndex: modules/ssl/ssl_engine_mutex.c === RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_mutex.c,v retrieving revision 1.17.2.4 diff -u -r1.17.2.4 ssl_engine_mutex.c --- modules/ssl/ssl_engine_mutex.c 30 Mar 2003 23:17:22 - 1.17.2.4 +++ modules/ssl/ssl_engine_mutex.c 31 Mar 2003 06:50:40 - @@ -84,16 +84,21 @@ Cannot create SSLMutex); return FALSE; } +#if APR_HAS_FLOCK_SERIALIZE if (mc-szMutexFile mc-ChownMutexFile == TRUE) chown(mc-szMutexFile, unixd_config.user_id, -1); +#endif -#if APR_USE_SYSVSEM_SERIALIZE -rv = unixd_set_global_mutex_perms(mc-pMutex); -if (rv != APR_SUCCESS) { -ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, - Could not set permissions on ssl_mutex; check User - and Group directives); -return FALSE; +#if APR_HAS_SYSVSEM_SERIALIZE +if (((mc-nMutexMech == APR_LOCK_DEFAULT) APR_USE_SYSVSEM_SERIALIZE) +|| (mc-nMutexMech == APR_LOCK_SYSVSEM)) { +rv = unixd_set_global_mutex_perms(mc-pMutex); +if (rv != APR_SUCCESS) { +ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, + Could not set permissions on ssl_mutex; check User + and Group directives); +return FALSE; +} } #endif return TRUE;
Re: [patch] two small problems in ssl_engine_mutex.c
--On Monday, March 31, 2003 12:53 AM -0600 William A. Rowe, Jr. [EMAIL PROTECTED] wrote: One, win32 won't compile (nor any platform missing chown). In this case we didn't need it and have a good macro to look at. Yup. Bad. It'd never get executed on them, but how is the compiler to know? This raised another bug in the next line. We assumed because we default to SYSV mutexes we should do that magic. I believe this is wrong, and we should be looking for that sort of lock explicitly. Yup. But, as a stylistic nit, I'd prefer following what prefork.c:977 has instead. So: + #if APR_HAS_SYSVSEM_SERIALIZE +if (((mc-nMutexMech == APR_LOCK_DEFAULT) APR_USE_SYSVSEM_SERIALIZE) +|| (mc-nMutexMech == APR_LOCK_SYSVSEM)) { would be: #if APR_HAS_SYSVSEM_SERIALIZE #if APR_USE_SYSVSEM_SERIALIZE if (mc-nMutexMech == APR_LOCK_DEFAULT || mc-nMutexMech == APR_LOCK_SYSVSEM) { #else if (mc-nMutexMech == APR_LOCK_SYSVSEM) { #endif ... Take this for whatever it's worth. Looks good. +1. -- justin
Re: [patch] two small problems in ssl_engine_mutex.c
+1 Brian On Sun, 2003-03-30 at 22:53, William A. Rowe, Jr. wrote: One, win32 won't compile (nor any platform missing chown). In this case we didn't need it and have a good macro to look at. This raised another bug in the next line. We assumed because we default to SYSV mutexes we should do that magic. I believe this is wrong, and we should be looking for that sort of lock explicitly. Please review. Bill