db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1590817 - /db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
Date Mon, 28 Apr 2014 21:56:08 GMT
Author: myrnavl
Date: Mon Apr 28 21:56:07 2014
New Revision: 1590817

URL: http://svn.apache.org/r1590817
Log:
DERBY-6352; Access denied ("java.lang.RuntimePermission" "modifyThread") highly intermittent,
but e.g. in store.RecoveryAfterBackup test
  When we see a AccessControlException during shutdown in the notifyAll call, do nothing,
which lets the Thread finish on its own.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java?rev=1590817&r1=1590816&r2=1590817&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/services/context/ContextService.java
Mon Apr 28 21:56:07 2014
@@ -27,7 +27,6 @@ import java.util.HashSet;
 import java.util.Stack;
 
 import org.apache.derby.iapi.error.ShutdownException;
-import org.apache.derby.iapi.services.info.JVMInfo;
 import org.apache.derby.iapi.services.monitor.Monitor;
 import org.apache.derby.shared.common.sanity.SanityManager;
 import org.apache.derby.iapi.services.stream.HeaderPrintWriter;
@@ -556,10 +555,6 @@ public final class ContextService //OLD 
                 final Thread fActive = active;
 				if (cm.setInterrupted(c))
                 {
-                    // DERBY-6352; in some cases a SecurityException is seen
-                    // demanding an explicit granting of modifyThread 
-                    // permission, which should not be needed for Derby, as we
-                    // should not have any system threads.
                     try {
                         AccessController.doPrivileged(
                                 new PrivilegedAction<Void>() {
@@ -569,25 +564,8 @@ public final class ContextService //OLD 
                                     }
                                 });
                     } catch (java.security.AccessControlException ace) {
-                        // if sane, ASSERT and stop. The Assert will 
-                        // cause info on all current threads to be printed to
-                        // the console, and we're also adding details about 
-                        // the thread causing the security exception.
-                        // if insane, rethrow, and if an IBM JVM, do a jvmdump
-                        if (SanityManager.DEBUG)
-                        {
-                            SanityManager.THROWASSERT("unexpectedly needing " +
-                                    "an extra permission, for thread: " +
-                                    fActive.getName() + " with state: "+ 
-                                    fActive.getState());
-                            ace.printStackTrace();
-                        }
-                        else {
-                            if (JVMInfo.isIBMJVM()) {
-                                JVMInfo.javaDump();
-                            }
-                            throw ace;
-                        }
+                        // DERBY-6352; if we see an exception here, just
+                        // swallow it, leaving the thread to finish
                     }
                 }
 			}



Mime
View raw message