Re: xmlSetGenericErrorFunc Abuse

From: Date: Thu, 22 Apr 2004 01:16:43 +0000
Subject: Re: xmlSetGenericErrorFunc Abuse
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-9477@lists.php.net to get a copy of this message
On Wed, 2004-04-21 at 18:50, Sterling Hughes wrote: > Its actually quite different than that problem. This is a problem for > people who use threads. I am afraid that you are completely wrong. httpd -V: Server version: Apache/2.1.0-dev Server built: Feb 15 2004 14:26:54 Server's Module Magic Number: 20030821:3 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled) -D APR_USE_FLOCK_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="/home/httpd/local" -D SUEXEC_BIN="/home/httpd/local/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" Yes. That is correct, I am using the PREFORK MPM, which is not multi-threaded. If I was using the worker MPM, i wouldn't even bother submitting this because I know the PHP-Devs do not care about thread safety. and here is an example backtrace of this happening: #0 php_apache_sapi_send_headers (sapi_headers=0x2857ce98) at /usr/home/httpd/src/php-src/sapi/apache2handler/sapi_apache2.c:140 #1 0x28472714 in sapi_send_headers () at /usr/home/httpd/src/php-src/main/SAPI.c:747 #2 0x284230de in php_header () at /usr/home/httpd/src/php-src/ext/standard/head.c:60 #3 0x28478f50 in php_ub_body_write ( str=0x8143154 "<br />\n<b>Warning</b>: I/O warning : failed to load external entity \"docbooka/xsl/html/docbook.xsl\" in <b>Unknown</b> on line <b>0</b><br />\n", str_length=142) at /usr/home/httpd/src/php-src/main/output.c:704 #4 0x28477fa9 in php_body_write ( str=0x8143154 "<br />\n<b>Warning</b>: I/O warning : failed to load external entity \"docbooka/xsl/html/docbook.xsl\" in <b>Unknown</b> on line <b>0</b><br />\n", str_length=142) at /usr/home/httpd/src/php-src/main/output.c:119 #5 0x2846b6e2 in php_printf (format=0x28502600 "%s<br />\n<b>%s</b>: %s in <b>%s</b> on line <b>%d</b><br />\n%s") at /usr/home/httpd/src/php-src/main/main.c:400 #6 0x2846c05e in php_error_cb (type=2, error_filename=0x284fba9c "Unknown", error_lineno=0, format=0x2850223d "%s", args=0xbfbfe604 "ô0\024\b\n") at /usr/home/httpd/src/php-src/main/main.c:736 #7 0x2849f356 in zend_error (type=2, format=0x2850223d "%s") at /usr/home/httpd/src/php-src/Zend/zend.c:930 #8 0x2835fec4 in php_libxml_internal_error_handler (error_type=0, ctx=0x0, msg=0x0, ap=0xbfbfe654 "") at /usr/home/httpd/src/php-src/ext/libxml/libxml.c:351 #9 0x2835ffb0 in php_libxml_error_handler (ctx=0x0, msg=0x287339fb "%s") at /usr/home/httpd/src/php-src/ext/libxml/libxml.c:377 #10 0x286a48ab in xmlReportError (err=0x826b580, ctxt=0x826b400, str=0x8269300 "failed to load external entity \"docbooka/xsl/html/docbook.xsl\"\n", channel=0x2835ff98 <php_libxml_error_handler>, data=0x0) at error.c:381 #11 0x286a4d4b in __xmlRaiseError (schannel=0, channel=0x286a4f3e <xmlParserWarning>, data=0x826b400, ctx=0x826b400, nod=0x0, domain=8, code=1549, level=XML_ERR_WARNING, file=0x0, line=0, str1=0x8249a20 "docbooka/xsl/html/docbook.xsl", str2=0x0, str3=0x0, int1=0, int2=0, msg=0x28724b40 "failed to load external entity \"%s\"\n") at error.c:573 #12 0x286c2b88 in __xmlLoaderErr (ctx=0x2857ce40, msg=0x28724b40 "failed to load external entity \"%s\"\n", filename=0x8249a20 "docbooka/xsl/html/docbook.xsl") at xmlIO.c:426 #13 0x286a69f2 in xmlNewInputFromFile (ctxt=0x826b400, filename=0x8249a20 "docbooka/xsl/html/docbook.xsl") at parserInternals.c:1465 #14 0x286c4eed in xmlDefaultExternalEntityLoader (URL=0x82499e0 "docbooka/xsl/html/docbook.xsl", ID=0x0, ctxt=0x826b400) at xmlIO.c:3176 #15 0x286c4f91 in xmlLoadExternalEntity (URL=0x8249a20 "docbooka/xsl/html/docbook.xsl", ID=0x0, ctxt=0x826b400) at xmlIO.c:3233 #16 0x286b6f60 in xmlCreateURLParserCtxt (filename=0x826d300 "docbooka/xsl/html/docbook.xsl", options=16398) at parser.c:11039 #17 0x286b7dfe in xmlReadFile (filename=0x826d300 "docbooka/xsl/html/docbook.xsl", encoding=0x0, options=136754176) at parser.c:12093 #18 0x2899ac0e in xsltParseStylesheetFile (filename=0x826d300 "docbooka/xsl/html/docbook.xsl") at xslt.c:2129 #19 0x2899b110 in xsltLoadStylesheetPI (doc=0x824ca00) at xslt.c:2357 #20 0x28a043ad in transform_run (f=0x8257f60, doc=0x826d300) at mod_transform.c:182 #21 0x28a044d2 in transform_filter (f=0x8257f60, bb=0x825a120) at mod_transform.c:249 #22 0x0806d8db in ap_pass_brigade (next=0x2857ce40, bb=0x2857ce40) at util_filter.c:511 #23 0x0807412b in default_handler (r=0x8256050) at core.c:3513 #24 0x080630be in ap_run_handler (r=0x8256050) at config.c:151 #25 0x08063582 in ap_invoke_handler (r=0x8256050) at config.c:358 #26 0x08060a03 in ap_process_request (r=0x8256050) at http_request.c:246 #27 0x0805c639 in ap_process_http_connection (c=0x8250128) at http_core.c:253 #28 0x0806b6e2 in ap_run_process_connection (c=0x8250128) at connection.c:42 #29 0x08061c57 in child_main (child_num_arg=0) at prefork.c:623 #30 0x08061d47 in make_child (s=0x8099db8, slot=0) at prefork.c:663 #31 0x0806256c in ap_mpm_run (_pconf=0x8098018, plog=0x80c2018, s=0x8099db8) at prefork.c:937 #32 0x08067633 in main (argc=2, argv=0xbfbfebe8) at main.c:665 #33 0x0805c1c8 in _start (ap=0xbfbfecec "/usr/home/httpd/local/bin/httpd") at /usr/src/lib/csu/i386-elf/crt1.c:104 > People who use threads for serving dynamic > webpages with PHP should be castrated and then shot (well, at least > castrated, we don't want this problem proliferating.) The solution > here is either to use a global context of our own, if libxml2 allows us > to do so, use a mutex, or just laugh very hard and very loud when > people tell us they have a problem using php in threaded environments. > On that note.... > Please don't be so quick to judge. Thanks, -Paul Querna > bwahhhahahahhahahaha. > > -Sterling

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.internals (#9477) next »