[jira] Created: (NET-217) TFTPServerPathTest fails in testWriteOutsideHome

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (NET-217) TFTPServerPathTest fails in testWriteOutsideHome

JIRA jira@apache.org
TFTPServerPathTest fails in testWriteOutsideHome
------------------------------------------------

                 Key: NET-217
                 URL: https://issues.apache.org/jira/browse/NET-217
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: $ mvn -v
Maven version: 2.0.8
Java version: 1.6.0_06
OS name: "linux" version: "2.6.24-16-generic" arch: "i386" Family: "unix"

            Reporter: Niklas Gustavsson


The TFTPServerPathTest fails in the testWriteOutsideHome method with the following stack trace:
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.045 sec <<< FAILURE!
testWriteOutsideHome(org.apache.commons.net.tftp.TFTPServerPathTest)  Time elapsed: 0.003 sec  <<< ERROR!
java.net.BindException: Address already in use
        at java.net.PlainDatagramSocketImpl.bind0(Native Method)
        at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
        at java.net.DatagramSocket.bind(DatagramSocket.java:368)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
        at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
        at org.apache.commons.net.DefaultDatagramSocketFactory.createDatagramSocket(DefaultDatagramSocketFactory.java:59)
        at org.apache.commons.net.DatagramSocketClient.open(DatagramSocketClient.java:119)
        at org.apache.commons.net.tftp.TFTPServer.launch(TFTPServer.java:239)
        at org.apache.commons.net.tftp.TFTPServer.<init>(TFTPServer.java:161)
        at org.apache.commons.net.tftp.TFTPServerPathTest.testWriteOutsideHome(TFTPServerPathTest.java:137)

This breaks are build for FtpServer as we currently bring in commons-net as there are no snapshots available.


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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (NET-217) TFTPServerPathTest fails in testWriteOutsideHome

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/NET-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598620#action_12598620 ]

Sebb commented on NET-217:
--------------------------

I can see the same problem on Ubuntu 8.04 (VMWare).

However, if I add a short sleep after the call to tftpS.shutdown(), the problem goes away.

Even sleep(1) works, but sleep(0) and yield() do not.

This suggests that there is some final tidyup that needs to be done which is not happening, perhaps because of thread starvation?
Or maybe shutdown() is not waiting for something to complete?
However, a quick trawl through the code does not reveal anything, so maybe it is a feature of the JVM on Ubuntu?

> TFTPServerPathTest fails in testWriteOutsideHome
> ------------------------------------------------
>
>                 Key: NET-217
>                 URL: https://issues.apache.org/jira/browse/NET-217
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: $ mvn -v
> Maven version: 2.0.8
> Java version: 1.6.0_06
> OS name: "linux" version: "2.6.24-16-generic" arch: "i386" Family: "unix"
>            Reporter: Niklas Gustavsson
>
> The TFTPServerPathTest fails in the testWriteOutsideHome method with the following stack trace:
> Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.045 sec <<< FAILURE!
> testWriteOutsideHome(org.apache.commons.net.tftp.TFTPServerPathTest)  Time elapsed: 0.003 sec  <<< ERROR!
> java.net.BindException: Address already in use
>         at java.net.PlainDatagramSocketImpl.bind0(Native Method)
>         at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
>         at java.net.DatagramSocket.bind(DatagramSocket.java:368)
>         at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
>         at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
>         at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
>         at org.apache.commons.net.DefaultDatagramSocketFactory.createDatagramSocket(DefaultDatagramSocketFactory.java:59)
>         at org.apache.commons.net.DatagramSocketClient.open(DatagramSocketClient.java:119)
>         at org.apache.commons.net.tftp.TFTPServer.launch(TFTPServer.java:239)
>         at org.apache.commons.net.tftp.TFTPServer.<init>(TFTPServer.java:161)
>         at org.apache.commons.net.tftp.TFTPServerPathTest.testWriteOutsideHome(TFTPServerPathTest.java:137)
> This breaks are build for FtpServer as we currently bring in commons-net as there are no snapshots available.

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (NET-217) TFTPServerPathTest fails in testWriteOutsideHome

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/NET-217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated NET-217:
---------------------

    Component/s: TFTP

> TFTPServerPathTest fails in testWriteOutsideHome
> ------------------------------------------------
>
>                 Key: NET-217
>                 URL: https://issues.apache.org/jira/browse/NET-217
>             Project: Commons Net
>          Issue Type: Bug
>          Components: TFTP
>    Affects Versions: 2.0
>         Environment: $ mvn -v
> Maven version: 2.0.8
> Java version: 1.6.0_06
> OS name: "linux" version: "2.6.24-16-generic" arch: "i386" Family: "unix"
>            Reporter: Niklas Gustavsson
>
> The TFTPServerPathTest fails in the testWriteOutsideHome method with the following stack trace:
> Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.045 sec <<< FAILURE!
> testWriteOutsideHome(org.apache.commons.net.tftp.TFTPServerPathTest)  Time elapsed: 0.003 sec  <<< ERROR!
> java.net.BindException: Address already in use
>         at java.net.PlainDatagramSocketImpl.bind0(Native Method)
>         at java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
>         at java.net.DatagramSocket.bind(DatagramSocket.java:368)
>         at java.net.DatagramSocket.<init>(DatagramSocket.java:210)
>         at java.net.DatagramSocket.<init>(DatagramSocket.java:261)
>         at java.net.DatagramSocket.<init>(DatagramSocket.java:234)
>         at org.apache.commons.net.DefaultDatagramSocketFactory.createDatagramSocket(DefaultDatagramSocketFactory.java:59)
>         at org.apache.commons.net.DatagramSocketClient.open(DatagramSocketClient.java:119)
>         at org.apache.commons.net.tftp.TFTPServer.launch(TFTPServer.java:239)
>         at org.apache.commons.net.tftp.TFTPServer.<init>(TFTPServer.java:161)
>         at org.apache.commons.net.tftp.TFTPServerPathTest.testWriteOutsideHome(TFTPServerPathTest.java:137)
> This breaks are build for FtpServer as we currently bring in commons-net as there are no snapshots available.

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