Um ...

On March 24, 2004 05:30 pm, Mathihalli, Madhusudan wrote:
>       Ever noticed the following set of messages in the error_log - they can
> really fill up the log file pretty quickly! I can't really get much
> useful information (and I don't even know what 'internal error' means
> ?)

It's my way of saying "a bug".

> -------------------------------------------
> [Wed Mar 24 13:55:46 2004] [error] shmcb_insert_encoded_session
> internal error [Wed Mar 24 13:55:46 2004] [error] can't store a
> session!
> [Wed Mar 24 13:55:46 2004] [error] 'shmcb' code was unable to store a
> session in the cache.
> -------------------------------------------

This is not supposed to happen...

> @@ -396,14 +399,20 @@
>  {
>      SSLModConfigRec *mc = myModConfig(s);
>      BOOL to_return = FALSE;
> +    int rv;
>
>      ssl_mutex_on(s);
> -    if (!shmcb_store_session(s, mc->tSessionCacheDataTable, id, idlen,
> -                             pSession, timeout))
> +    rv = shmcb_store_session(s, mc->tSessionCacheDataTable, id, idlen,
> +                             pSession, timeout);
> +    if (rv != TRUE) {
>          /* in this cache engine, "stores" should never fail. */
>          ap_log_error(APLOG_MARK, APLOG_ERR, 0, s,
> -                     "'shmcb' code was unable to store a "
> -                     "session in the cache.");
> +                     "'shmcb' was unable to store a session in the
> cache"
> +                     "(cause: %s)", 
> +                        (rv == SSL_INTERNAL_ERROR)  ? "internal error"
> +                      : (rv == SSL_SESSION_TOO_BIG) ? "session too
> big"
> +                      : "unknown error"); 
> +    }
>      else {
>          ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s,
>                       "shmcb_store successful");

Note the comment in the source. Rather than trimming this log message to 
be less of an eye-sore, I think we should probably fix the bug that's 
triggering it. It's been a long time since I last looked at shmcb in any 
detail, and it's possible that there were still bugs waiting to turn up 
eventually just as it's also possible that some of the porting to apache2 
might have introduced some niggles along the way. As it happens, I'm 
going to be delving in the next few days anyway because of bug 27751[1] - 
perhaps this is related? If you want to get some context from the mement 
this error occurs, we could try and dig in. I expect to be able to start 
hacking in earnest on this some time this weekend.

Cheers,
Geoff

[1] BTW Madhu, this is someone from your neck of the woods (based on the 
domain name, at least). Just in case you feel like syncing up about this.

-- 
Geoff Thorpe
[EMAIL PROTECTED]
http://www.geoffthorpe.net/

Reply via email to