[ 
https://issues.apache.org/jira/browse/VFS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505882
 ] 

Chris Beams commented on VFS-98:
--------------------------------

Mario, all,

We are running into these threading issues (deadlocks) right and left, and 
trying to work around them by synchronizing on the default shared VFS 
FileSystemManager instance pretty much everywhere.  Even this is not working, 
however, and we're at a crossroads with what seems to be three options:  1) Get 
help from the VFS team  2) Attempt to fix the issues ourselves  3) ditch VFS 
and use lower-level libraries directly.

We'd like to avoid (3) if at all possible; VFS rocks in terms of functionality, 
and saves us a great deal of coding.  We're willing to look into option (2), 
but we'd like to have some design-level conversations with you first.  If there 
are just 'holes' in VFS's thread-safety that can be patched up, we can work 
with that; if there are fundamental design problems that preclude 
thread-safety, it's probably going to be beyond reasonable scope for us to work 
on.

We can also attempt to work up some simple examples that have high likelihood 
of exhibiting the deadlocks we're seeing.

At any rate, we'd really appreciate some feedback on this issue so we can 
quickly choose one of the three options above.

Thanks again!

> VFS causes deadlocks or is not thread-safe
> ------------------------------------------
>
>                 Key: VFS-98
>                 URL: https://issues.apache.org/jira/browse/VFS-98
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: jdk1.5.0_07 / Linux
>            Reporter: Juha-Matti Toppinen
>            Assignee: Mario Ivankovits
>         Attachments: vfs.dead.jstack.txt, 
> vfs.dead.threaddump.synchronizedfileobject.txt, vfs.dead.threaddump.txt, 
> vfs_deadlock.txt
>
>
> Newer versions of VFS seems to be unusable in multithreading environments, 
> causing a deadlock of some kind. This causes my Java  web server application 
> to completely hang when there is many concurrent connections. My application 
> uses a single FileSystemManager instance, and makes quite heavy use of VFS; 
> opening many files from many threads simultaneously.
> I have tried, without success different workarounds based on some mailing 
> list threads:
> - Using both NullReferenceFilesCache and the default SoftReferenceFilesCache. 
> (SoftReferenceFilesCache seemed to sometimes cause some additional 
> thread-related exceptions under heavy load, but propably unrelated to this 
> issue)
> - Using the new SynchorizedFileObjectDecorator also did not help. On the 
> contrary, it seemed to trigger the deadlock more easily.
> The version I have problems with is a nightly build: commons-vfs-20060831
> The older version commons-vfs-20060115 works beautifully, but I would like to 
> use newer version because I want to be able to use FileObject.refresh() to 
> reset the internal state of files (specially, to get a fresh list of 
> children).
> I hope the threading issues are going to be resolved in near future, and I am 
> willing to help in any way. I do not have very deep experience about 
> multithreading applications, so I wasn't able to get more close to the roots 
> of the issue. Feel free to ask for more information.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to