directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Geleyn (JIRA)" <>
Subject [jira] Created: (DIREVE-151) Shutting down server multiple times results in 'Failed to sync all'
Date Mon, 21 Mar 2005 09:04:21 GMT
Shutting down server multiple times results in 'Failed to sync all'

         Key: DIREVE-151
     Project: Directory Server
        Type: Bug
    Versions: 0.9    
 Environment: Windows XP, J2SE 1.4.2_05, Apache 0.9 SNAPSHOT
    Reporter: David Geleyn
 Assigned to: Alex Karasulu 
 Attachments:, out.txt

Situation in which the error occurs:

When shutting down server of Product X (which embeds Apache Directory Server) we 
have some problems with shutting down the embeded LDAP server. One of the 
reasons could be the addShutdownhook in When embedding the 
LDAP server we need to add a shutdownhook ourselves to make sure the LDAP 
server is gracefully shutdown (see code below). Among other things, the 
shutdown of the embedded LDAP server seems to call the sync on the 
RootNexus as well, causing an IllegalStateException as 2 separate threads 
are accessing the RootNexus.

Java API for System.exit:
The virtual machine's shutdown sequence consists of two phases. In the 
first phase all registered shutdown hooks, if any, are started in some 
unspecified order and allowed to run concurrently until they finish. 

Example of shutting down (which is implicitly a part of our shutdownhook):
Properties env = new Properties();
env.setProperty(Context.PROVIDER_URL, "ou=system");
env.setProperty(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
env.setProperty(Context.SECURITY_CREDENTIALS, "secret");
env.setProperty(EnvKeys.SYNC, "true");
env.setProperty(EnvKeys.SHUTDOWN, "true");
new InitialDirContext(env);

Maybe this is caused by the soluttion for bug report

I'm capable of reproducing this behavior in a small program which is attached.
The program will ask for input (via When asked for input, please press Control-C
to exit. The program will call the shutdown hook multiple times and will result in a 'Failed
to sync all'.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message