Bug 454701

Summary: SSL_InheritMPServerSIDCache failed error with fedora-ds-admin
Product: [Fedora] Fedora Reporter: Rich Megginson <rmeggins>
Component: mod_nssAssignee: Rob Crittenden <rcritten>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0.7-8.fc8 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-17 14:16:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch none

Description Rich Megginson 2008-07-09 20:03:37 UTC
Platform tested: Fedora 8 i386 - latest updates
Testing with fedora-ds-admin 1.1.6 (pre-release)

When fedora-ds-admin starts up, I get the following errors in
/var/log/dirsrv/admin-serv/error:
[Wed Jul 09 13:49:26 2008] [notice] child pid 7621 exit signal Segmentation
fault (11)
[Wed Jul 09 13:49:27 2008] [error] SSL_InheritMPServerSIDCache failed
[Wed Jul 09 13:49:27 2008] [error] SSL Library Error: -8191 Library Failure

The code in nss_init_Module() does the following:
    ap_mpm_query(AP_MPMQ_MAX_THREADS, &threaded);
    if (!threaded)
        SSL_ConfigMPServerSIDCache(mc->session_cache_size, (PRUint32)
mc->session_cache_timeout, (PRUint32) mc->ssl3_session_cache_timeout, NULL);
    else
        SSL_ConfigServerSessionIDCache(mc->session_cache_size, (PRUint32)
mc->session_cache_timeout, (PRUint32) mc->ssl3_session_cache_timeout, NULL);

fedora-ds-admin uses multi-threaded mode.  But because of the way Apache works,
it always forks child processes, which calls into this function:
void nss_init_Child(apr_pool_t *p, server_rec *base_server)
...
    if (SSL_InheritMPServerSIDCache(NULL) != SECSuccess) {

The problem is that you cannot call SSL_InheritMPServerSIDCache() unless you
have first called SSL_ConfigMPServerSIDCache().

I suppose the best thing to do would be to init the SSL caches for both mp and
mt modes.  Barring that, it's probably safe to just skip
SSL_InheritMPServerSIDCache in nss_init_Child if mt mode.

Comment 1 Rich Megginson 2008-07-09 22:40:22 UTC
Created attachment 311426 [details]
patch

I'm also having a core dump problem.  I think the problem is that none of the
SSL init stuff in nss_init_Child() should be done if ssl is not enabled,
similar to the way nss_init_Module works.  Attached is a patch.

Comment 2 Fedora Update System 2008-07-16 18:22:28 UTC
mod_nss-1.0.7-8.fc8 has been submitted as an update for Fedora 8

Comment 3 Fedora Update System 2008-07-16 18:23:49 UTC
mod_nss-1.0.7-9.fc9 has been submitted as an update for Fedora 9

Comment 4 Fedora Update System 2008-07-17 14:16:15 UTC
mod_nss-1.0.7-8.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2008-07-17 14:18:04 UTC
mod_nss-1.0.7-9.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.