Project

General

Profile

Actions

Bug #84

closed

kill lighttpd get lighttp in 90% cpu usage

Added by Anonymous about 19 years ago. Updated about 17 years ago.

Status:
Fixed
Priority:
High
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

verified on system: cygwin, FreeBSD 5.3 but ctrl+c is ok

-- Xuefer <xuefer

Actions #1

Updated by Anonymous about 19 years ago


with: kill -TERM pid
$ gdb --args /usr/local/sbin/lighttpd.exe -Df /etc/lighttpd.conf 
GNU gdb 6.3.50_2004-12-28-cvs (cygwin-special)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) r
Starting program: /usr/local/sbin/lighttpd.exe -Df /etc/lighttpd.conf

Program received signal SIGSEGV, Segmentation fault.
0x610b4bb5 in random () from /bin/cygwin1.dll
(gdb) bt
#0  0x610b4bb5 in random () from /bin/cygwin1.dll
#1  0x6105b965 in dll_entry@12 () from /bin/cygwin1.dll
#2  0x6108e1ef in cygwin1!aclcheck () from /bin/cygwin1.dll
#3  0x00c610cb in mod_evhost_free (srv=0x10041dd8, p_d=0x1008e640)
    at mod_evhost.c:57
#4  0x0040b900 in plugins_call_cleanup (srv=0x10041dd8) at plugin.c:293
#5  0x0040c063 in plugins_free (srv=0x10041dd8) at plugin.c:411
#6  0x00401e1f in main (argc=3, argv=0x10041d48) at server.c:996
(gdb) q

with: kill -INT pid
(gdb) r
Starting program: /usr/local/sbin/lighttpd.exe -Df /etc/lighttpd.conf

Program exited with code 0201000.
(gdb) q

-- Xuefer <xuefer

Actions #2

Updated by Anonymous about 19 years ago


server.modules = (
        "mod_rewrite",
        "mod_redirect",
        "mod_evhost",
        "mod_alias",
        "mod_access",
        "mod_status",
        "mod_setenv",
        "mod_indexfile",
        "mod_fastcgi",
        "mod_compress",
        "mod_staticfile",
        "mod_accesslog" )
server.document-root             = "/www2/pages/" 
server.errorlog            = "/www2/logs/lighttpd.error.log" 
index-file.names          = ( "index.php", "index.html" )
accesslog.filename          = "/www2/logs/access.log" 
url.access-deny             = ( "~", ".inc", "CVS" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".py" )
server.port                = 80
server.bind                = "127.0.0.1" 
compress.cache-dir          = "/tmp/lighttpd/cache/compress/" 
compress.filetype           = ("text/plain", "text/html", "text/javascript")
status.status-url = "/server-status" 
status.config-url = "/server-info" 
$HTTP["host"] == "ul.test.net" {
    server.document-root = "/ul" 
    evhost.path-pattern = "/scripts/" 
}
$HTTP["host"] == "scripts.test.net" {
    server.document-root = "/scripts/" 
    evhost.path-pattern = "/scripts/" 
    server.name = "scripts.test.net" 
}

-- Xuefer <xuefer

Actions #3

Updated by Anonymous about 19 years ago

fixed


$ svn diff src/mod_evhost.c 
Index: src/mod_evhost.c
===================================================================
--- src/mod_evhost.c    (revision 256)
+++ src/mod_evhost.c    (working copy)
@@ -42,13 +42,13 @@
    if (!p) return HANDLER_GO_ON;

    if (p->config_storage) {
-       size_t i;
+       size_t i, j;
        for (i = 0; i < srv->config_context->used; i++) {
            plugin_config *s = p->config_storage[i];

            if(s->path_pieces) {
-               for (i = 0; i < s->len; i++) {
-                   buffer_free(s->path_pieces[i]);
+               for (j = 0; j < s->len; j++) {
+                   buffer_free(s->path_pieces[j]);
                }

                free(s->path_pieces);

-- Xuefer <xuefer

Actions #4

Updated by jan about 19 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Applied the patch in changeset r257

Actions

Also available in: Atom