You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2007/10/06 17:41:50 UTC

[jira] Created: (DERBY-3110) server hangs after trace on command fails

server hangs after trace on command fails
-----------------------------------------

                 Key: DERBY-3110
                 URL: https://issues.apache.org/jira/browse/DERBY-3110
             Project: Derby
          Issue Type: Bug
          Components: Network Server
    Affects Versions: 10.3.1.4
            Reporter: Sebb


Tried turning on trace:

>networkservercontrol  trace on
Invalid reply from network server: Insufficient data.

The server process shows the following stack trace:

access denied (java.io.FilePermission Server58.trace write)
java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
        at java.security.AccessController.checkPermission(AccessController.java:401)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
        at java.io.FileWriter.<init>(FileWriter.java:46)
        at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
        at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
        at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
        at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
        at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)

The server now does not respond to ping or shutdown, and has to be killed.

See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3110) server hangs after trace on command fails

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3110:
----------------------------------

    Attachment: derby-3110_stat.txt
                derby-3110_diff.txt

Attached is an initial patch for this issue. If there is an error in turning on tracing for any of the sessions, we fail to turn global tracing on and return an error to the client. The change also wraps the tracing in a privilege block   I am working to try to make a test for this.

Kathey



> server hangs after trace on command fails
> -----------------------------------------
>
>                 Key: DERBY-3110
>                 URL: https://issues.apache.org/jira/browse/DERBY-3110
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.3.1.4
>            Reporter: Sebb
>            Assignee: Kathey Marsden
>         Attachments: derby-3110_diff.txt, derby-3110_stat.txt
>
>
> Tried turning on trace:
> >networkservercontrol  trace on
> Invalid reply from network server: Insufficient data.
> The server process shows the following stack trace:
> access denied (java.io.FilePermission Server58.trace write)
> java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>         at java.io.FileWriter.<init>(FileWriter.java:46)
>         at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> The server now does not respond to ping or shutdown, and has to be killed.
> See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-3110) server hangs after trace on command fails

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-3110.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
                   10.3.1.5

> server hangs after trace on command fails
> -----------------------------------------
>
>                 Key: DERBY-3110
>                 URL: https://issues.apache.org/jira/browse/DERBY-3110
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.3.1.4
>            Reporter: Sebb
>            Assignee: Kathey Marsden
>             Fix For: 10.3.1.5, 10.4.0.0
>
>         Attachments: derby-3110_diff.txt, derby-3110_diff2.txt, derby-3110_stat.txt, derby-3110_stat2.txt, derby-3110_test_diff.txt
>
>
> Tried turning on trace:
> >networkservercontrol  trace on
> Invalid reply from network server: Insufficient data.
> The server process shows the following stack trace:
> access denied (java.io.FilePermission Server58.trace write)
> java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>         at java.io.FileWriter.<init>(FileWriter.java:46)
>         at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> The server now does not respond to ping or shutdown, and has to be killed.
> See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3110) server hangs after trace on command fails

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3110:
----------------------------------

    Attachment: derby-3110_stat2.txt
                derby-3110_diff2.txt

Here is a revised patch for this issue. The code patch remains the same. The test loads its own policy file to allow for tracing. The new test NetworkServerControlApiTest only tests tracing now but can be expanded to cover the other API calls.




> server hangs after trace on command fails
> -----------------------------------------
>
>                 Key: DERBY-3110
>                 URL: https://issues.apache.org/jira/browse/DERBY-3110
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.3.1.4
>            Reporter: Sebb
>            Assignee: Kathey Marsden
>         Attachments: derby-3110_diff.txt, derby-3110_diff2.txt, derby-3110_stat.txt, derby-3110_stat2.txt, derby-3110_test_diff.txt
>
>
> Tried turning on trace:
> >networkservercontrol  trace on
> Invalid reply from network server: Insufficient data.
> The server process shows the following stack trace:
> access denied (java.io.FilePermission Server58.trace write)
> java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>         at java.io.FileWriter.<init>(FileWriter.java:46)
>         at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> The server now does not respond to ping or shutdown, and has to be killed.
> See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3110) server hangs after trace on command fails

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3110:
----------------------------------

    Comment: was deleted

> server hangs after trace on command fails
> -----------------------------------------
>
>                 Key: DERBY-3110
>                 URL: https://issues.apache.org/jira/browse/DERBY-3110
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.3.1.4
>            Reporter: Sebb
>            Assignee: Kathey Marsden
>             Fix For: 10.3.2.1, 10.4.0.0
>
>         Attachments: derby-3110_diff.txt, derby-3110_diff2.txt, derby-3110_stat.txt, derby-3110_stat2.txt, derby-3110_test_diff.txt
>
>
> Tried turning on trace:
> >networkservercontrol  trace on
> Invalid reply from network server: Insufficient data.
> The server process shows the following stack trace:
> access denied (java.io.FilePermission Server58.trace write)
> java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>         at java.io.FileWriter.<init>(FileWriter.java:46)
>         at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> The server now does not respond to ping or shutdown, and has to be killed.
> See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3110) server hangs after trace on command fails

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585265#action_12585265 ] 

Kathey Marsden commented on DERBY-3110:
---------------------------------------

I am thinking this may be a problem with synchronization with Derby rather than a problem with the JVM. The thread dump shows a ping thread waiting for response from the server and ClientThread waiting to accept connections.  If I try to ping the server once the hang occurs my client hangs, as though, the ClientThread is accepting connections, but not designating a thread to pick them up.


> server hangs after trace on command fails
> -----------------------------------------
>
>                 Key: DERBY-3110
>                 URL: https://issues.apache.org/jira/browse/DERBY-3110
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.3.1.4
>            Reporter: Sebb
>            Assignee: Kathey Marsden
>             Fix For: 10.3.2.1, 10.4.0.0
>
>         Attachments: derby-3110_diff.txt, derby-3110_diff2.txt, derby-3110_stat.txt, derby-3110_stat2.txt, derby-3110_test_diff.txt
>
>
> Tried turning on trace:
> >networkservercontrol  trace on
> Invalid reply from network server: Insufficient data.
> The server process shows the following stack trace:
> access denied (java.io.FilePermission Server58.trace write)
> java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>         at java.io.FileWriter.<init>(FileWriter.java:46)
>         at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> The server now does not respond to ping or shutdown, and has to be killed.
> See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-3110) server hangs after trace on command fails

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reassigned DERBY-3110:
-------------------------------------

    Assignee: Kathey Marsden

> server hangs after trace on command fails
> -----------------------------------------
>
>                 Key: DERBY-3110
>                 URL: https://issues.apache.org/jira/browse/DERBY-3110
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.3.1.4
>            Reporter: Sebb
>            Assignee: Kathey Marsden
>
> Tried turning on trace:
> >networkservercontrol  trace on
> Invalid reply from network server: Insufficient data.
> The server process shows the following stack trace:
> access denied (java.io.FilePermission Server58.trace write)
> java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>         at java.io.FileWriter.<init>(FileWriter.java:46)
>         at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> The server now does not respond to ping or shutdown, and has to be killed.
> See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3110) server hangs after trace on command fails

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3110:
----------------------------------

    Attachment: derby-3110_test_diff.txt

I am attempting to write a test to test this issue but find that the network server started in the junit test is acting like it has not been started under security manager.  This test should fail because
1) It doesn't have the fix for derby-3110 
2) the derby_tests.policy file does not have write permission to derby.system.home

But I find that the trace files are created and no error occurs. Any thoughts on why network server wouldn't be starting with security manager? I used
 return TestConfiguration.clientServerSuite(NetworkServerControlApiTest.class);

to start network server.





> server hangs after trace on command fails
> -----------------------------------------
>
>                 Key: DERBY-3110
>                 URL: https://issues.apache.org/jira/browse/DERBY-3110
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>    Affects Versions: 10.3.1.4
>            Reporter: Sebb
>            Assignee: Kathey Marsden
>         Attachments: derby-3110_diff.txt, derby-3110_stat.txt, derby-3110_test_diff.txt
>
>
> Tried turning on trace:
> >networkservercontrol  trace on
> Invalid reply from network server: Insufficient data.
> The server process shows the following stack trace:
> access denied (java.io.FilePermission Server58.trace write)
> java.security.AccessControlException: access denied (java.io.FilePermission Server58.trace write)
>         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
>         at java.security.AccessController.checkPermission(AccessController.java:401)
>         at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
>         at java.lang.SecurityManager.checkWrite(SecurityManager.java:954)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:169)
>         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
>         at java.io.FileWriter.<init>(FileWriter.java:46)
>         at org.apache.derby.impl.drda.DssTrace.startComBufferTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.initTrace(Unknown Source)
>         at org.apache.derby.impl.drda.Session.setTraceOn(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.setTrace(Unknown Source)
>         at org.apache.derby.impl.drda.NetworkServerControlImpl.processCommands(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.sessionInitialState(Unknown Source)
>         at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
> The server now does not respond to ping or shutdown, and has to be killed.
> See also DERBY-3103

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.