On Tue, Apr 05, 2005, Ladar Levison wrote:

> Howdy gents. I wrote an SMTP server using OpenSSL, and it periodically 
> likes to segmentation fault. The core dumps are below. I can't seem to 
> get full stack traces, but I think that is related to the number threads 
> I am using. When I have 128 threads, I get no core dumps. When I have 16 
> threads, I get the core dumps shown below. Any advice on how to get 
> better dumps would be appreciated. (I've already tried setrlimit.)
> 
> The problem only seems be happening once a process has been running for 
> about 24 hours. The majority of the cores indicate a problem with 
> SSL_SESSION_list_remove. Googling doesn't yield any answers.
> 
> The version is 0.9.7.f, compiled using ./configure threads -D_REENTRANT; 
> make install.
> 
> The machine itself is RHEL3, running kernel 2.4.21-27.0.2.ELsmp. I'd be 
> happy to hear any theories people have. The only two I have are, a) that 
> its some sort of obscure stack smashing bug. Or b) there is a conflict 
> with the RHEL version of OpenSSL loaded on the machine. The ldd output 
> seems to indicate that /lib/libssl.so.4, etc, is linked in, when I know 
> for a fact I've compiled against the libssl.a in the /usr/local/ssl/lib 
> directory. This particular build has that linked in statically. (I think 
> the mysqlclient is linking in the other SSL lib, though it shouldn't 
> make a difference because I don't use it.
> 
> 
> #0  0x080d64ee in CRYPTO_add_lock ()
> (gdb) quit
> 

Are you compiling OpenSSL with debugging symbols?

Hard to tell for sure from that what the cause is. It could well be a problem
with the locking callbacks though. A race condition might result in a
reference count not being incremented properly: which would cause a crash in
that function. 

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to