httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: apache 2.2 crashes at the start time in mod_dbd.c then preparing AuthDBDUserPWQuery
Date Fri, 18 Aug 2006 12:02:21 GMT
On Friday 18 August 2006 12:35, paritosh wrote:

> recompiled everything with -O0, the new backtrace is:

> #2  0xb7d5626f in apr_hash_get (ht=0x813f270, key=0x0, klen=-1) at
> tables/apr_hash.c:330

Aha!  NULL key.  That should be the server name.

> #3  0x0808c433 in ap_dbd_prepare (s=0x80eaab0, query=0x8144178 "SELECT
> pwhash FROM users WHERE name = %s and realm = %s", label=0x81441b8
> "authn_dbd_1") at mod_dbd.c:152

whereas that now makes sense.  The junk before was indeed optimisation.

> #4  0x08086243 in authn_dbd_prepare (cmd=0xbf94b76c, cfg=0x8144170,
> query=0x8144178 "SELECT pwhash FROM users WHERE name = %s and realm = %
> s") at mod_authn_dbd.c:72

That should be line 70, not 72.  Still slightly confusing.

Anyway, this traceback iidentifies the problem: we need to make a
special case of a null server name.

> The problem is that s->server_hostname is sent as 'key' to
> apr_hash_get(). But it is NULL if ServerName directive is not set in the
> httpd.conf. Simply adding following to httpd.conf solved the problem:
>
> SeverName 127.0.0.1:80
>
> ( I should mention that 2.2.2 with similar setup did not crash even
> without the ServerName directive )

Yes, the fix in 2.2.3 over 2.2.2 was for a bug in handling of virtualhosts.
Thanks for the report, and for helping to fix it!

I'll commit a patch to /trunk/ shortly.

-- 
Nick Kew

Mime
View raw message