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 "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/08/15 06:37:13 UTC

[jira] Created: (DERBY-1694) derbynet/testProperties.java hangs

derbynet/testProperties.java hangs
----------------------------------

                 Key: DERBY-1694
                 URL: http://issues.apache.org/jira/browse/DERBY-1694
             Project: Derby
          Issue Type: Bug
          Components: Test
    Affects Versions: 10.3.0.0
         Environment: Windows XP  IBM 142 JRE
            Reporter: Daniel John Debrunner


The testProperties.execCmd() is used to fork a JVM and not handle its
streams. This will cause problems, as indicated by the javadoc for Process.

"The parent process uses these streams to feed input to and get output
from the subprocess. Because some native platforms only provide limited
buffer size for standard input and output streams, failure to promptly
write the input stream or read the output stream of the subprocess may
cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1694?page=comments#action_12428160 ] 
            
John H. Embretsen commented on DERBY-1694:
------------------------------------------

Yes, that is true. I see now that the JavaDoc must have been wrong before applying the patch as well, since there was no parameter to execCmdDumpResults called wait, although there is a JavaDoc @param tag saying so.

By the way, can someone help me understand why derbynet/testProperties_derby.properties sets some of the properties multiple times? It seems that the patch for DERBY-706 only set them once, but that something went wrong when applying/committing the patch... (?)

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Daniel John Debrunner updated DERBY-1694:
-----------------------------------------

    Derby Info: [Patch Available]

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Sunitha Kambhampati updated DERBY-1694:
---------------------------------------

    Derby Info: [Patch Available]

derby1694.p2.diff.txt patch available for review. 

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Sunitha Kambhampati resolved DERBY-1694.
----------------------------------------

    Resolution: Fixed

For other improvements identified here, I have opened DERBY-1878. 

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Assigned To: Sunitha Kambhampati
>             Fix For: 10.2.1.0, 10.3.0.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1694?page=comments#action_12428151 ] 
            
Daniel John Debrunner commented on DERBY-1694:
----------------------------------------------

Thanks John, I need to fix up the javadoc and coments in the code. However I think that before my patch that wait=true did not dump
output to standard out. It called execCmd which just forks the process, it doesn't perform the extra magic that execCmdDumpResults does 
to display the output.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1694?page=comments#action_12430343 ] 
            
Daniel John Debrunner commented on DERBY-1694:
----------------------------------------------

I also see this failing on IBM 1.4.2 JVM on linux, not a hang but a failure to connect to the server.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Sunitha Kambhampati updated DERBY-1694:
---------------------------------------

    Attachment: derby1694.p2.diff.txt
                derby1694.p2.stat.txt

I was looking at the testProperties issue that caused problems because of test hang. The test doesnt hang in my environment but I thought I would look to see why the test didnt timeout. 

I found couple of issues here:
0. The testProperties.java and several networkserver tests exec new processes to start server, test properties,shutdown server etc. In some cases, we wait to capture the output from the subprocess that is started. ProcessStreamResult is used for this purpose.  ProcessStreamResult is part of the harness (see org.apache.derbyTesting.functionTests.harness.ProcessStreamResult) and it starts a thread to read data from the process's stream and writes it out. Once EOS (-1) is reached, the thread exits after doing a notifyAll. 

1. ProcessStreamResult.Wait() does not work with the timeout case. I think the original intention of the method that takes the timeout was to force the thread to stop, once the timeout period has elapsed. The method Wait() does not handle this case.
2. On timeout, the myThread needs to stop its work. The run() method does not handle this case.
3. testProperties test does not make use of the ProcessStreamResult timeout mechanism.  
4. Process's are exec'd in the tests and they are not destroyed within a timeout period. The network server tests start server using Process, and then cleanup by shutting them down.  It will all work ok, if no deadlock or blocking of process's occur. It seems to me though, that we should have a way to destroy the processes that are 
started as part of each test given a timeout period.  Each test must learn to do the cleanup when it leaves and the test has knowledge of all the sub-processes that it has exec'd.  The current test harness has a class TimedProcess which could work. 

In the spirit of incremental development, I am attaching a patch(derby1694.p2.diff.txt and corresponding stat file - derby1694.p2.stat.txt)  that fixes problems 1,2 and 3.  I think #4 can be handled as a separate issue/patch.

This patch 
-- fixes the timeout handling in ProcessStreamResult.  Instance variable 'interrupted' is a flag to indicate if a timeout has occurred or if the thread's work has been interrupted in between.  The flag 'finished' indicates whether  the work has been finished by the thread. Changes are in Wait() method to make use of wait(timeoutms) if a timeout is specified in ProcessStreamResult. If timeout time has elapsed, then the interrupted flag is set to true.
-- Adds condition in the run() method to check if interrupted is true. If so, the thread will stop its work and leave.
-- correctly return if the thread's work was interrupted either because of a timeout or if it was interrupted.
-- Make use of the ProcessStreamResult with a timeout setting of 2 minutes in testProperties test. Note, the timeout handling only comes into effect when ProcessStreamResult.Wait() method is called.

other notes:
-- when you run a test, the suite property for timeout does not get picked up. I think this is intentional behavior. 
-- Issues mentioned above are not specific to just testProperties but exist for other networkserver tests. There are a total of 7 files in derbynet that make use of this.  

I'd like feedback on this patch. If this approach seems ok, then we can make these changes to the 6 other networkserver tests also.

I ran derbyall on ibm142/linux and no new failures. Two tests failed, blobclob4BLOB(derby-1844) and the known DerbyNetAutoStart.   These 2 failures are not related to these changes. 

Thanks. 

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "John H. Embretsen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1694?page=comments#action_12428146 ] 
            
John H. Embretsen commented on DERBY-1694:
------------------------------------------

Thank you for uploading the patch (derby1694diff.txt)! I spent a few minutes studying it, along with the existing code for testProperties.java, and it looks to me that this a clear improvement. I have not run any tests apart from testProperties.java in the DerbyNetClient framework on Solaris 10 x86, Sun JVM 1.5. 

The only thing I would like to mention is that if this patch gets committed as is, the JavaDoc for the execCmdDumpResults(...) method will (if I have understood the code correctly) no longer match its behavior:

        /**
	 * Execute the given command and dump the results to standard out
	 *
	 * @param args	command and arguments
	 * @param wait  true =wait for completion
	 * @exception Exception
	 */

With the patch, if wait == false, results will *not* be dumped to standard out.


> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Daniel John Debrunner updated DERBY-1694:
-----------------------------------------

    Component/s: Regression Test Failure
                     (was: Test)

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1694?page=comments#action_12431739 ] 
            
Daniel John Debrunner commented on DERBY-1694:
----------------------------------------------

Just realized I didn't put all the info I learnt here.

Increasing the wait time for booting the server makes the test pass.

The hang seems to be due to the cleanup code when one of the waits for  server to start fails.
The code then tries to shutdown all possible servers it started, the code is around line 322
with this comment

			// If something went wrong,
			// make sure all these servers are shutdown

Not sure what is causing the hang though.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Rick Hillegas updated DERBY-1694:
---------------------------------

    Urgency: Normal  (was: Urgent)

Degrading the urgency of this issue. If this is just an artifact of the testing machinery, then this should not block the 10.2 release.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1694?page=comments#action_12435629 ] 
            
Sunitha Kambhampati commented on DERBY-1694:
--------------------------------------------

Thanks Mike for looking at the derby1694.p2.diff.txt.  Yes, I would like this patch to be committed. 

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Mike Matrigali updated DERBY-1694:
----------------------------------


I see this test hang against ibm1.4.2, when running full suite against XP on a laptop.  Since switching I have tried 4 times and it has hung everytime.  Looks like time bomb does not work either as I have come back to it hours after leaving tests running overnight to find it hanging.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Mike Matrigali updated DERBY-1694:
----------------------------------

          Urgency: Urgent
    Fix Version/s: 10.2.1.0

I have now seen the test hang against sun jdk 1.4.2 in a 10.2 client branch.  What I see outside is the test hangs all night.  I thought it might be firewall related, but the other tests seem to work, and I just saw the 
hang with firewall completely disabled.  

I am bumping the urgency as it is starting to affect my ability to commit changes into the codeline as I
lose a day every time I run
The last part in the tmp file is:
Start testProperties to test property priority
Testing derby.properties Port 1528
org.apache.derby.drda.NetworkServerControl start
Successfully Connected
org.apache.derby.drda.NetworkServerControl shutdown
Apache Derby Network Server - 10.2.1.2 beta shutdown at 2006-08-30 19:01:54.666
GMT
Testing System properties  Port 1529
-Dderby.drda.portNumber=1529 org.apache.derby.drda.NetworkServerControl start
Successfully Connected
org.apache.derby.drda.NetworkServerControl shutdown -p 1529
Apache Derby Network Server - 10.2.1.2 beta shutdown at 2006-08-30 19:01:57.170
GMT
Testing command line option. Port 1530
org.apache.derby.drda.NetworkServerControl start -p 1530
Successfully Connected
org.apache.derby.drda.NetworkServerControl shutdown -p 1530
Apache Derby Network Server - 10.2.1.2 beta shutdown at 2006-08-30 19:01:59.773
GMT
Testing start server by specifying system properties without values
First shutdown server started on default port by the test harness
org.apache.derby.drda.NetworkServerControl shutdown -p 1527
Apache Derby Network Server - 10.2.1.2 beta shutdown at 2006-08-30 19:02:01.576
GMT
-Dderby.drda.logConnections -Dderby.drda.traceAll -Dderby.drda.traceDirectory -D
derby.drda.keepAlive -Dderby.drda.timeSlice -Dderby.drda.host -Dderby.drda.portN
umber -Dderby.drda.minThreads -Dderby.drda.maxThreads -Dderby.drda.startNetworkS
erver -Dderby.drda.debug org.apache.derby.drda.NetworkServerControl start
java.lang.Exception: DRDA_NoIO.S:Could not connect to Derby Network Server on ho
st 127.0.0.1, port 1527.
    at org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessag
eWork(NetworkServerControlImpl.java:2648)
    at org.apache.derby.impl.drda.NetworkServerControlImpl.consolePropertyMessag
e(NetworkServerControlImpl.java:1470)
    at org.apache.derby.impl.drda.NetworkServerControlImpl.setUpSocket(NetworkSe
rverControlImpl.java:2049)
    at org.apache.derby.impl.drda.NetworkServerControlImpl.ping(NetworkServerCon
trolImpl.java:827)
    at org.apache.derby.drda.NetworkServerControl.ping(NetworkServerControl.java
:312)
    at org.apache.derbyTesting.functionTests.tests.derbynet.testProperties.waitF
orStart(testProperties.java:218)
    at org.apache.derbyTesting.functionTests.tests.derbynet.testProperties.main(
testProperties.java:297)
org.apache.derby.drda.NetworkServerControl shutdown -p 1527
Could not connect to Derby Network Server on host localhost, port 1527.
org.apache.derby.drda.NetworkServerControl shutdown -p 1528
Could not connect to Derby Network Server on host localhost, port 1528.
org.apache.derby.drda.NetworkServerControl shutdown -p 1529
Could not connect to Derby Network Server on host localhost, port 1529.
org.apache.derby.drda.NetworkServerControl shutdown -p 1530
Could not connect to Derby Network Server on host localhost, port 1530.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Mike Matrigali updated DERBY-1694:
----------------------------------


I have not seen this test fail since I increased the timeout as part of DERBY-1810.  Is this test still failing for anyone since then?
In a  little debugging of this I think the problem might be related to OS port resources being freed  from the previous startup/shutdown of the network server on the default port 1527.  

There is definitely as separate test issue here, in that once the connect fails the test hangs - but I believe that is purely a test issue and not a product issue.  At least for me tests now run so I would not hold up 10.2 for this issue.  

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Sunitha Kambhampati updated DERBY-1694:
---------------------------------------

    Derby Info:   (was: [Patch Available])

The derby1694.p2.diff.txt is merged into 10.2 with ricks's mega merge http://svn.apache.org/viewvc?view=rev&rev=448961

So unchecking the patch available flag. 

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Assigned To: Sunitha Kambhampati
>             Fix For: 10.2.1.0, 10.3.0.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Daniel John Debrunner updated DERBY-1694:
-----------------------------------------

    Attachment: derby1694diff.txt

Patch for review - I will commit after running more tests.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Daniel John Debrunner updated DERBY-1694:
-----------------------------------------

    Derby Info:   (was: [Patch Available])

Applied patch but test still hangs. Seems the time to wait for  the server is too short. though wary of changing it if others are not seeing the hang.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Attachments: derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Mike Matrigali updated DERBY-1694:
----------------------------------

    Fix Version/s: 10.3.0.0

I committed the  derby1694.p2.diff.txt patch to the trunk.  It should be merged into 10.2.

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Assigned To: Sunitha Kambhampati
>             Fix For: 10.2.1.0, 10.3.0.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Sunitha Kambhampati reassigned DERBY-1694:
------------------------------------------

    Assignee: Sunitha Kambhampati

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>         Assigned To: Sunitha Kambhampati
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1694) derbynet/testProperties.java hangs

Posted by "Mike Matrigali (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1694?page=all ]

Mike Matrigali updated DERBY-1694:
----------------------------------


I ran full set of  successful tests against ibm 1.4.2 with the derby1694.p2.diff.txt.  The changes as described seem like an improvement to the current tests so I would be happy to commit these, let me know if you want this first patch committed or if I should wait for other comments/changes to other tests.
I welcome any incremental improvement to these network server tests which often intermittently fail in 
my environment.  This test run was actually first in my last 6 or 7 that had no network server intermittent failures -- probably more related to my particular netork than this patch.  

> derbynet/testProperties.java hangs
> ----------------------------------
>
>                 Key: DERBY-1694
>                 URL: http://issues.apache.org/jira/browse/DERBY-1694
>             Project: Derby
>          Issue Type: Bug
>          Components: Regression Test Failure
>    Affects Versions: 10.3.0.0
>         Environment: Windows XP  IBM 142 JRE
>            Reporter: Daniel John Debrunner
>             Fix For: 10.2.1.0
>
>         Attachments: derby1694.p2.diff.txt, derby1694.p2.stat.txt, derby1694diff.txt
>
>
> The testProperties.execCmd() is used to fork a JVM and not handle its
> streams. This will cause problems, as indicated by the javadoc for Process.
> "The parent process uses these streams to feed input to and get output
> from the subprocess. Because some native platforms only provide limited
> buffer size for standard input and output streams, failure to promptly
> write the input stream or read the output stream of the subprocess may
> cause the subprocess to block, and even deadlock"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira