You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Martin Thelian (JIRA)" <ji...@apache.org> on 2008/11/04 17:54:44 UTC

[jira] Created: (IO-185) FileSystemUtils.freeSpaceWindows blocks

FileSystemUtils.freeSpaceWindows blocks
---------------------------------------

                 Key: IO-185
                 URL: https://issues.apache.org/jira/browse/IO-185
             Project: Commons IO
          Issue Type: Bug
          Components: Utilities
    Affects Versions: 1.4
         Environment: x86 Windows XP 5.1,  Sun Microsystems Inc. Java(TM) SE Runtime Environment 1.6.0_10
            Reporter: Martin Thelian


Hi,

in my Application I have the problem that FileSystemUtils.freeSpaceWindows works properly for hours and then the function call blocks and does not return anymore. Any Ideas? Thanks.

The stacktrace:
-------------
"Thread-16" daemon prio=5 tid=33 RUNNABLE
    java.io.FileInputStream.readBytes(Native Method)
    java.io.FileInputStream.read(Unknown Source)
    java.io.BufferedInputStream.read1(Unknown Source)
    java.io.BufferedInputStream.read(Unknown Source)
    sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
    sun.nio.cs.StreamDecoder.implRead(Unknown Source)
    sun.nio.cs.StreamDecoder.read(Unknown Source)
    java.io.InputStreamReader.read(Unknown Source)
    java.io.BufferedReader.fill(Unknown Source)
    java.io.BufferedReader.readLine(Unknown Source)
    java.io.BufferedReader.readLine(Unknown Source)
    org.apache.commons.io.FileSystemUtils.performCommand(FileSystemUtils.java:413)
    org.apache.commons.io.FileSystemUtils.freeSpaceWindows(FileSystemUtils.java:225)
    org.apache.commons.io.FileSystemUtils.freeSpaceOS(FileSystemUtils.java:194)
    org.apache.commons.io.FileSystemUtils.freeSpaceKb(FileSystemUtils.java:166)
-------------

Regards,
Martin

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


[jira] Commented: (IO-185) FileSystemUtils.freeSpaceWindows blocks

Posted by "Martin Thelian (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650189#action_12650189 ] 

Martin Thelian commented on IO-185:
-----------------------------------

Any feedback on this? 
What about spanning a thead around the performCommand call and aborting the process after a timeout?


> FileSystemUtils.freeSpaceWindows blocks
> ---------------------------------------
>
>                 Key: IO-185
>                 URL: https://issues.apache.org/jira/browse/IO-185
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.4
>         Environment: x86 Windows XP 5.1,  Sun Microsystems Inc. Java(TM) SE Runtime Environment 1.6.0_10
>            Reporter: Martin Thelian
>
> Hi,
> in my Application I have the problem that FileSystemUtils.freeSpaceWindows works properly for hours and then the function call blocks and does not return anymore. Any Ideas? Thanks.
> The stacktrace:
> -------------
> "Thread-16" daemon prio=5 tid=33 RUNNABLE
>     java.io.FileInputStream.readBytes(Native Method)
>     java.io.FileInputStream.read(Unknown Source)
>     java.io.BufferedInputStream.read1(Unknown Source)
>     java.io.BufferedInputStream.read(Unknown Source)
>     sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
>     sun.nio.cs.StreamDecoder.implRead(Unknown Source)
>     sun.nio.cs.StreamDecoder.read(Unknown Source)
>     java.io.InputStreamReader.read(Unknown Source)
>     java.io.BufferedReader.fill(Unknown Source)
>     java.io.BufferedReader.readLine(Unknown Source)
>     java.io.BufferedReader.readLine(Unknown Source)
>     org.apache.commons.io.FileSystemUtils.performCommand(FileSystemUtils.java:413)
>     org.apache.commons.io.FileSystemUtils.freeSpaceWindows(FileSystemUtils.java:225)
>     org.apache.commons.io.FileSystemUtils.freeSpaceOS(FileSystemUtils.java:194)
>     org.apache.commons.io.FileSystemUtils.freeSpaceKb(FileSystemUtils.java:166)
> -------------
> Regards,
> Martin

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


[jira] Resolved: (IO-185) FileSystemUtils.freeSpaceWindows blocks

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

Niall Pemberton resolved IO-185.
--------------------------------

         Assignee: Niall Pemberton
    Fix Version/s: 2.0
       Resolution: Fixed

I have added additional methods that take a 'timeout' parameter which do as you suggest:

http://svn.apache.org/viewvc?view=revision&revision=1002689

> FileSystemUtils.freeSpaceWindows blocks
> ---------------------------------------
>
>                 Key: IO-185
>                 URL: https://issues.apache.org/jira/browse/IO-185
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.4
>         Environment: x86 Windows XP 5.1,  Sun Microsystems Inc. Java(TM) SE Runtime Environment 1.6.0_10
>            Reporter: Martin Thelian
>            Assignee: Niall Pemberton
>             Fix For: 2.0
>
>
> Hi,
> in my Application I have the problem that FileSystemUtils.freeSpaceWindows works properly for hours and then the function call blocks and does not return anymore. Any Ideas? Thanks.
> The stacktrace:
> -------------
> "Thread-16" daemon prio=5 tid=33 RUNNABLE
>     java.io.FileInputStream.readBytes(Native Method)
>     java.io.FileInputStream.read(Unknown Source)
>     java.io.BufferedInputStream.read1(Unknown Source)
>     java.io.BufferedInputStream.read(Unknown Source)
>     sun.nio.cs.StreamDecoder.readBytes(Unknown Source)
>     sun.nio.cs.StreamDecoder.implRead(Unknown Source)
>     sun.nio.cs.StreamDecoder.read(Unknown Source)
>     java.io.InputStreamReader.read(Unknown Source)
>     java.io.BufferedReader.fill(Unknown Source)
>     java.io.BufferedReader.readLine(Unknown Source)
>     java.io.BufferedReader.readLine(Unknown Source)
>     org.apache.commons.io.FileSystemUtils.performCommand(FileSystemUtils.java:413)
>     org.apache.commons.io.FileSystemUtils.freeSpaceWindows(FileSystemUtils.java:225)
>     org.apache.commons.io.FileSystemUtils.freeSpaceOS(FileSystemUtils.java:194)
>     org.apache.commons.io.FileSystemUtils.freeSpaceKb(FileSystemUtils.java:166)
> -------------
> Regards,
> Martin

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