httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin C. Darby" <win...@kradaudio.net>
Subject Re: libmysqlclient and apache2
Date Wed, 31 Oct 2001 20:02:01 GMT
On Wed, 31 Oct 2001, Aaron Bannert wrote:

> Apache also uses malloc() under the covers. Post a stack trace and we
> may be able to help.
>
> -aaron
>

I'll provide as much information about the install as I can.

Server info:

Configure line: ./configure --enable-ssl --enable-so --with-mpm=prefork
--enable-maintainer-mode

--with-mpm=prefork because threaded seems to be a mess at the moment,
--enable-maintainer-mode to (try to) build debugging data into httpd.

Server version string: Apache/2.0.27-dev (Unix) mod_ssl/3.0a0 OpenSSL/0.9.6

>From CVS, httpd-2.0 tree, October 22nd.

Same problem occurs with 2.0.26-dev snapshots.

Problem starts with #5 and goes up, the (!!) below is when I attempt to
hit the site with a web browser.. The same code snippits I'm using in the
TMySQLSet class work in other standalone applications with no visible
faults.

GDB output:
...
(gdb) set args -X
(gdb) exec httpd
(gdb) run
Starting program: /usr/local/apache2/bin/httpd -X
[New Thread 1024 (LWP 11156)]
(!!)
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 11156)]
chunk_alloc (ar_ptr=0x40313a00, nb=16) at malloc.c:2877
2877    malloc.c: No such file or directory.
        in malloc.c
(gdb) bt
#0  chunk_alloc (ar_ptr=0x40313a00, nb=16) at malloc.c:2877
#1  0x40261d3a in malloc_check (sz=11, caller=0x4033937e) at malloc.c:4645
#2  0x4025f06d in __libc_malloc (bytes=11) at malloc.c:2798
#3  0x4033937e in my_malloc (Size=11, MyFlags=16) at my_malloc.c:36
#4  0x4033958f in my_strdup (from=0x403278c0 "WebSession", MyFlags=16)
    at my_malloc.c:81
#5  0x40336a23 in mysql_options (mysql=0x40313a10,
    option=MYSQL_READ_DEFAULT_GROUP, arg=0x403278c0 "WebSession")
    at libmysql.c:2283
#6  0x403210a3 in TMySQLSet::Configure (this=0x8199578)
    at classtemplate/TMySQLSet.tmpl:26
#7  0x40320fe3 in TMySQLSet::TMySQLSet (this=0x8199578)
    at classtemplate/TMySQLSet.tmpl:7
#8  0x40321218 in TWebSession::TWebSession (this=0x81a0d98)
    at classtemplate/TWebSession.tmpl:7
#9  0x4032206b in websession_handler (r=0x81462ec) at main.cpp:145
#10 0x0809bef7 in ?? () at eval.c:41
#11 0x0809c67d in ?? () at eval.c:41
#12 0x08086758 in ?? () at eval.c:41
#13 0x0808144c in ?? () at eval.c:41
#14 0x080a8387 in ?? () at eval.c:41
#15 0x080a85d2 in ?? () at eval.c:41
#16 0x0809a6b2 in ?? () at eval.c:41
#17 0x0809a77c in ?? () at eval.c:41
#18 0x0809a8d7 in ?? () at eval.c:41
#19 0x0809adaa in ?? () at eval.c:41
#20 0x080a150b in ?? () at eval.c:41
#21 0x401fb627 in __libc_start_main (main=0x80a0edc, argc=2,
    ubp_av=0xbffffb24, init=0x80617f4, fini=0x80c0330,
    rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffb1c)
    at ../sysdeps/generic/libc-start.c:129
(gdb) bt full
#0  chunk_alloc (ar_ptr=0x40313a00, nb=16) at malloc.c:2877
        victim = 0x0
        victim_size = 16
        idx = 2
        bin = 0x40313a00
        remainder = 0xbfffd6c8
        remainder_size = 2
        remainder_index = 1076967952
        block = 1077222432
        startidx = 5
        fwd = 0x40313a10
        bck = 0x5
        q = 0x40313a10
        victim_size = 16
        idx = 2
        remainder = 0xbfffd6c8
        remainder_index = 1076967952
        block = 1077222432
#1  0x40261d3a in malloc_check (sz=11, caller=0x4033937e) at malloc.c:4645
        victim = 0x10
        nb = 16
#2  0x4025f06d in __libc_malloc (bytes=11) at malloc.c:2798
        result = (void *) 0x40313a00
        bytes = 1076967952
        ar_ptr = (arena *) 0x40313a10
        nb = 3221215064
        victim = 0x5
        hook = (void *(*)()) 0x40313a00 <main_arena>
        nb = 3221215064
#3  0x4033937e in my_malloc (Size=11, MyFlags=16) at my_malloc.c:36
        point = 0x4 <Address 0x4 out of bounds>
        _db_func_ = 0x4034ac0f "mysql_option"
        _db_file_ = 0x4034a488 "libmysql.c"
        _db_level_ = 2
        _db_framep_ = (char **) 0x403494a0
#4  0x4033958f in my_strdup (from=0x403278c0 "WebSession", MyFlags=16)
    at my_malloc.c:81
        ptr = 0x4034ac0f "mysql_option"
        length = 11
#5  0x40336a23 in mysql_options (mysql=0x40313a10,
    option=MYSQL_READ_DEFAULT_GROUP, arg=0x403278c0 "WebSession")
    at libmysql.c:2283
        mysql = (MYSQL *) 0x40313a10
        option = MYSQL_READ_DEFAULT_GROUP
        _db_func_ = 0x4034dee5 "?func"
        _db_file_ = 0x4034deeb "?file"
        _db_level_ = 1
        _db_framep_ = (char **) 0xbfffd7d8
#6  0x403210a3 in TMySQLSet::Configure (this=0x8199578)
    at classtemplate/TMySQLSet.tmpl:26
        this = (TMySQLSet *) 0x8199578
#7  0x40320fe3 in TMySQLSet::TMySQLSet (this=0x8199578)
    at classtemplate/TMySQLSet.tmpl:7
        this = (TMySQLSet *) 0x8199578
#8  0x40321218 in TWebSession::TWebSession (this=0x81a0d98)
    at classtemplate/TWebSession.tmpl:7
No locals.
#9  0x4032206b in websession_handler (r=0x81462ec) at main.cpp:145
        WebSession = (TWebSession *) 0x80d8cb4
        bapasswd = 0x80d8cb4 "D\231\r\b"
        type = 0x80d8cb4 "D\231\r\b"
        data = 0x40016b4c ""
        rc = 0
        child = (int (*)()) 0x8144a3c
        handle = (void *) 0x808e7ad
        error = 0xbfffd888 "\t\bb\024\bLk\001@\234\t\b\224d\024\bj\024\b\t"
#10 0x0809bef7 in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#11 0x0809c67d in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#12 0x08086758 in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#13 0x0808144c in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#14 0x080a8387 in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#15 0x080a85d2 in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#16 0x0809a6b2 in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#17 0x0809a77c in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#18 0x0809a8d7 in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#19 0x0809adaa in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#20 0x080a150b in ?? () at eval.c:41
        ap = (void **) 0xbffffb24
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        digval = 1076967936
        p = 0x40016b4c ""
        result = 3221224228
        result = 1073834828
#21 0x401fb627 in __libc_start_main (main=0x80a0edc, argc=2,
    ubp_av=0xbffffb24, init=0x80617f4, fini=0x80c0330,
    rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffb1c)
    at ../sysdeps/generic/libc-start.c:129
        ubp_av = (char **) 0xbffffb24
        fini = (void (*)()) 0x40016b4c <_dl_debug_mask>
        rtld_fini = (void (*)()) 0x2 <__strtol_internal+2>
        ubp_ev = (char **) 0xbffffb30
(gdb)



Mime
View raw message