Folks,

I'm running Apache 1.3.12 + modssl 2.6.3 + 0.9.5a on a Solaris 2.7 (X86)

I've run into a problem where the server is consistently coredumping after
it shuts down the connection.  It occurs immediately after the server log
reflects the following line:

[15/May/2000 12:26:23 24486] [info]  Connection to child 0 closed with
standard shutdown (server blackbird:8443, client 1.1.1.1)

Further investigation shows that this line is added to the log **AFTER** the
SSL struct has been freed in ssl_engine_kernel.c (approx. line 511 or
so....)

When debugging using the -DSSL -X options, I observe the following:

The server is currently blocking on the line in s3_pkt.c:
        
            clear_sys_error();
            if (s->rbio != NULL)
                {
                s->rwstate=SSL_READING;
blocked--->>    i=BIO_read(s->rbio, &(s->s3->rbuf.buf[off+newb]), max-newb);
                }

Then, the timer goes off and we start to cleanup the SSL struct.  At a
certain point, we get to the code that is (I assume...;->) supposed to
unblock the socket so that it can terminate.  It goes through the ssl_free()
function just fine.

What I'm observing is that the blocked read (above) never unblocks and the
server code goes about it's business cleaning up the SSL structure!  Thus,
it releases the s->s3 buffer, and the whole s pointer before the BIO_read()
from above ever unblocks!

Finally, the read unblocks and then picks up where it left off executing the
code below, and then SIGSEV occurs (obviously....)

            else
                {
                SSLerr(SSL_F_SSL3_READ_N,SSL_R_READ_BIO_NOT_SET);
                i = -1;
                }
    
            if (i <= 0)
                {
SIGSEGV-->>     s->s3->rbuf.left = newb;  /* s->s3 = 0, and I believe S has
been freed! */
                return(i);
                }
            newb+=i;
            }

I've compiled all parts using GCC 2.95.2 on a PIII X86 machine running
Solaris 7 (i.e. 2.7).

The only other thing which might be affecting this build is that I compiled
OpenSSL with the 'threads' options.  Plus, my mods have included some
additions that required to link in the pthreads library. (buy my changes to
the code had not yet run.....)

My guess is that the pthreads library has introduced either some unexpected
blocking I/O behavior (i.e. the pthread read function doesn't unblock with
the signal), and/or some signal sending/recieving problems are occuring.

Has anyone come across this problem when using libpthread with OpenSSL or
Apache?

Any help appreciated.

Thanks,

- Bob

P.S. I'm going to try switching to the Solaris compiler & debugger to see if
it provides any additional info....

------------------------------------------------------
Bob Burns                                        Zaxus
[EMAIL PROTECTED]           1-888-744-4976, X6510
                                (local) 1-954-846-6510
------------------------------------------------------ 
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [EMAIL PROTECTED]
Automated List Manager                            [EMAIL PROTECTED]

Reply via email to