commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (VFS-293) FtpFileSystem causes deadlock
Date Wed, 16 May 2012 05:28:09 GMT

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

Gary D. Gregory closed VFS-293.
-------------------------------


Closing issue as this is fixed by "Ralph Goers added a comment - 23/Nov/10 00:30"
                
> FtpFileSystem causes deadlock
> -----------------------------
>
>                 Key: VFS-293
>                 URL: https://issues.apache.org/jira/browse/VFS-293
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 1.0
>            Reporter: Johannes Scharf
>             Fix For: 2.0
>
>
> I use Commons VFS to access FTP from multiple threads. In each thread I create directories
and copy files on the FTP server.
> Nearly everytime when i run the program  a deadlock occurs which causes all threads to
hang. I've created a stacktrace with "jstack" which clearly shows where the deadlock is happening.
> Stacktrace:
> {noformat}
> Found one Java-level deadlock:
> =============================
> "pool-1-thread-5":
>   waiting to lock monitor 0x030813b4 (object 0x22f972e8, a org.apache.commons.vfs.provider.ftp.FtpFileSystem),
>   which is held by "pool-1-thread-2"
> "pool-1-thread-2":
>   waiting to lock monitor 0x03082c7c (object 0x22f999e0, a java.lang.Object),
>   which is held by "pool-1-thread-4"
> "pool-1-thread-4":
>   waiting to lock monitor 0x030813b4 (object 0x22f972e8, a org.apache.commons.vfs.provider.ftp.FtpFileSystem),
>   which is held by "pool-1-thread-2"
> Java stack information for the threads listed above:
> ===================================================
> "pool-1-thread-5":
> 	at org.apache.commons.vfs.provider.AbstractFileSystem.streamOpened(AbstractFileSystem.java:569)
> 	- waiting to lock <0x22f972e8> (a org.apache.commons.vfs.provider.ftp.FtpFileSystem)
> 	at org.apache.commons.vfs.provider.DefaultFileContent.streamOpened(DefaultFileContent.java:92)
> 	at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:377)
> 	at at.js.jtransporter.transporter.VFSTransporter.createFile(VFSTransporter.java:119)
> 	at at.js.jtransporter.worker.resource.ResourceWorker.createFile(ResourceWorker.java:80)
> 	at at.js.jtransporter.worker.resource.ResourceWorker.processJob(ResourceWorker.java:51)
> 	at at.js.jtransporter.worker.AbstractRunnableWorker.run(AbstractRunnableWorker.java:82)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> 	at java.lang.Thread.run(Thread.java:619)
> "pool-1-thread-2":
> 	at org.apache.commons.vfs.provider.ftp.FtpFileSystem.putClient(FtpFileSystem.java:137)
> 	- waiting to lock <0x22f999e0> (a java.lang.Object)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:158)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileObject.getChildFile(FtpFileObject.java:103)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:181)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileObject.refresh(FtpFileObject.java:208)
> 	at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:319)
> 	- locked <0x22f972e8> (a org.apache.commons.vfs.provider.ftp.FtpFileSystem)
> 	at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:267)
> 	- locked <0x22f972e8> (a org.apache.commons.vfs.provider.ftp.FtpFileSystem)
> 	at org.apache.commons.vfs.provider.AbstractFileObject.getParent(AbstractFileObject.java:512)
> 	- locked <0x22f972e8> (a org.apache.commons.vfs.provider.ftp.FtpFileSystem)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileObject.getInfo(FtpFileObject.java:177)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileObject.refresh(FtpFileObject.java:208)
> 	at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:319)
> 	- locked <0x22f972e8> (a org.apache.commons.vfs.provider.ftp.FtpFileSystem)
> 	at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:267)
> 	- locked <0x22f972e8> (a org.apache.commons.vfs.provider.ftp.FtpFileSystem)
> 	at org.apache.commons.vfs.provider.AbstractFileObject.resolveFile(AbstractFileObject.java:670)
> 	at at.js.jtransporter.transporter.VFSTransporter.createFile(VFSTransporter.java:118)
> 	at at.js.jtransporter.worker.resource.ResourceWorker.createFile(ResourceWorker.java:80)
> 	at at.js.jtransporter.worker.resource.ResourceWorker.processJob(ResourceWorker.java:51)
> 	at at.js.jtransporter.worker.AbstractRunnableWorker.run(AbstractRunnableWorker.java:82)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> 	at java.lang.Thread.run(Thread.java:619)
> "pool-1-thread-4":
> 	at org.apache.commons.vfs.provider.AbstractFileSystem.resolveFile(AbstractFileSystem.java:267)
> 	- waiting to lock <0x22f972e8> (a org.apache.commons.vfs.provider.ftp.FtpFileSystem)
> 	at org.apache.commons.vfs.provider.AbstractFileSystem.getRoot(AbstractFileSystem.java:242)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileSystem.getClient(FtpFileSystem.java:108)
> 	- locked <0x22f999e0> (a java.lang.Object)
> 	at org.apache.commons.vfs.provider.ftp.FtpFileObject.doGetOutputStream(FtpFileObject.java:490)
> 	at org.apache.commons.vfs.provider.AbstractFileObject.getOutputStream(AbstractFileObject.java:1219)
> 	at org.apache.commons.vfs.provider.DefaultFileContent.getOutputStream(DefaultFileContent.java:373)
> 	at at.js.jtransporter.transporter.VFSTransporter.createFile(VFSTransporter.java:119)
> 	at at.js.jtransporter.worker.resource.ResourceWorker.createFile(ResourceWorker.java:80)
> 	at at.js.jtransporter.worker.resource.ResourceWorker.processJob(ResourceWorker.java:51)
> 	at at.js.jtransporter.worker.AbstractRunnableWorker.run(AbstractRunnableWorker.java:82)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> 	at java.lang.Thread.run(Thread.java:619)
> Found 1 deadlock.
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message