httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: WWW Form Bug Report: "Internal Server Error - caused by SIGBUS" on HPUX
Date Sat, 14 Dec 1996 16:46:34 GMT
Rob Hartill wrote:
> 
> 
> Thanks for the info and the backtrace. I'll pass it on to see if anyone
> knows how to fix it.

env is palloc()ed. This should ensure that it is on a CLICK_SZ boundary.
However, there's a bug in palloc() - if the size is <= 0 (which it can only be
if someone asked for a negative amount of memory), then size is set to 1. This
buggers up alignment. Note that asking for negative amounts of memory is
almost certainly a bug somewhere else. Sigh. I propose that we fix this by
returning a NULL from palloc on allocations <= 0. Of course, it may not be
this, but it needs fixing anyway. Patch will follow. Hmmmm... it is also true
that malloc_block() relies on malloc() providing an aligned pointer. Is this
a bug? (probably not - malloc() should provide aligned memory, but might be
worth commenting).

Cheers,

Ben.

> 
> cheers,
> rob
> 
> jules@limitless.co.uk wrote:
> >
> >Submitter: jules@limitless.co.uk
> >Operating system: HPUX, version: 10.20
> >Version of Apache Used: 1.2b2 (also in 1.2b1, but not 1.1.1)
> >Extra Modules used: http_core.c mod_mime.c mod_access.c mod_auth.c mod_negotiation.c
mod_include.c mod_dir.c mod_cgi.c mod_userdir.c mod_alias.c mod_env.c mod_log_config.c mod_asis.c
mod_imap.c mod_actions.c mod_browser.c mod_log_agent.c mod_log_referer.c mod_rewrite.c mod_status.c
mod_info.c mod_expires.c
> >URL exhibiting problem: 
> >
> >Symptoms:
> >--
> >Intermittent SIGBUS when calling CGI programs.
> >
> >Error is occurring in util_script.c on line 118:
> >  if (tz!= NULL) env[j++] = pstrcat(p, "TZ=", tz, NULL);
> >
> >I don't know much about the code but it appears that `env' should
> >be aligned on a CLICK_SZ boundary - except that it has been given a
> >value of 0x40055b49.  This then causes a bus error when making the
> >assignment.
> >--
> >
> >Backtrace:
> >--
> > 0 create_environment (p = 0x40054410, t = 0x400545e0)    [util_script.c: 118]
> >        env_arr   = 0x400545e0
> >        elts      = 0x400545f8
> >        env       = 0x40055b49
> >        i         = 16
> >        j         = 1
> >        tz        = 0x7b03a466
> > 1 cgi_child (child_stuff = 0x7b03cb24)    [mod_cgi.c: 300]
> >        cld       = 0x7b03cb24
> >        r         = 0x4005f000
> >        argv0     = 0x40054b1c
> >        nph       = 0
> >        env       = 0x00000004
> >        err_string = 0x7b03ec60
> > 2 spawn_child_err (p = 0x40041428, func = 0x4000dd32, data = 0x7b03cb24, kill_how
= kill_after_timeout, pipe_in = 0x7b03ab0c, pipe_out = 0x7b03ab10, pipe_err = 0x7b03ab14)
   [alloc.c: 945]
> >        pid       = 0
> >        in_fds    = 0x7b03ebc8
> >        out_fds   = 0x7b03ebd0
> >        err_fds   = 0x7b03ebd8
> > 3 cgi_handler (r = 0x4005f000)    [mod_cgi.c: 391]
> >        retval    = 0
> >        nph       = 0
> >        dbpos     = 0
> >        argv0     = 0x40054b1c
> >        dbuf      =   00000000
> >        script_out = 0x00000001
> >        script_in = 0x40055538
> >        script_err = 0x4003ad28
> >        argsbuffer = 0x7b03ab18
> >        is_included = 0
> >        sconf     = 0x4004b150
> >        conf      = 0x4003b2f0
> >        cld       = 0x4005f000
> >        child_pid = 2588722
> >        handler   = 0x00029153
> >        dbsize    = -1073207005
> >        len_read  = 0
> >        location  = 0x00278032
> >        sbuf      = 0x7b03cb48
> >        ret       = 0
> > 4 invoke_handler (r = 0x4005f000)    [http_config.c: 323]
> >        modp      = 0x40008e00
> >        handp     = 0x40008e50
> >        content_type = 0x400565e0
> >        handler   = 0x40054ac8
> >        result    = 0
> >        starp     =   00000000
> >        len       = -1
> >        result    = 1074017520
> > 5 process_request_internal (r = 0x4005f000)    [http_request.c: 911]
> >        access_status = 0
> > 6 process_request (r = 0x4005f000)    [http_request.c: 927]
> >        old_stat  = 1074130944
> > 7 child_main (child_num_arg = 0)    [http_main.c: 1561]
> >        clen      = 16
> >        sa_server = 0x00020050
> >        sa_client = 0x00020b62
> >        conn_io   = 0x40041450
> >        r         = 0x4005f000
> >        fds       =   00000000
> >        fds       = 0x80000000
> > 8 make_child (server_conf = 0x4003aa20, child_num = 0)    [http_main.c: 1609]
> >        pid       = 1074020468
> > 9 standalone_main (argc = 4, argv = 0x7b03a4bc)    [http_main.c: 1871]
> >        sa_server = 0x00020050
> >        saved_sd  = -1
> >        lr        =   00000000
> >        fd        = 2063835136
> >        status    = 0
> >        child_slot = 1073990144
> >        pid       = 0
> >10 main (argc = 4, argv = 0x7b03a4bc)    [http_main.c: 1981]
> >        c         = -1
> >        conn      =   00000000
> >        r         =   00000000
> >        sa_server =   00000000
> >        sa_client =   00000000
> >        cio       =   00000000
> >--
> >
> 
> 
> -- 
> Rob Hartill.       Internet Movie Database Ltd.    http://www.imdb.com/  

-- 
Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
Freelance Consultant and  Fax:   +44 (181) 994 6472
Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
London, England.          Apache-SSL author

Mime
View raw message