You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Ashish Paliwal (JIRA)" <ji...@apache.org> on 2014/11/05 12:33:35 UTC
[jira] [Resolved] (FLUME-1258) TailDirSource might get dead lock
when delete file in dir.
[ https://issues.apache.org/jira/browse/FLUME-1258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashish Paliwal resolved FLUME-1258.
-----------------------------------
Resolution: Won't Fix
Fix Version/s: v0.9.5
Won't fix. 0.X branch not maintained anymore
> TailDirSource might get dead lock when delete file in dir.
> -------------------------------------------------------------
>
> Key: FLUME-1258
> URL: https://issues.apache.org/jira/browse/FLUME-1258
> Project: Flume
> Issue Type: Bug
> Components: Sinks+Sources
> Affects Versions: v0.9.3
> Reporter: Li Junjun
> Priority: Critical
> Fix For: v0.9.5
>
>
> when fileDelete fired ,DirWatcher it calls tail.removeCursor(c)
> DirWather:
> 1,(sucess)get lock of tail --> synchronized public void removeCursor
> 2,get lock of rmCursors--->synchronized (rmCursors) { rmCursors.add(cursor);}
> if at this time , TailThread has some rmCursors to handle
> TailThread:
> 1,(sucess)get lock of rmCursors
> 2,foreach rmCursors call c.flush()
> in c.flush(), it put event in SynchronousQueue,block until
> another thread(PumperThread) to poll it
> PumperThread:
> 1,(success)poll from SynchronousQueue,
> 2,try get lock of tail to updateEventProcessingStats,but it can beacuse
> DirWather get it!so the PumperThread block here.
> Because the PumperThread blocked , the SynchronousQueue didn't release it's capacity,then the TailThread 2 step blocked ,and the TailThread didn't release the lock of rmCursors ,and the DirWather 2 step blocked .
> it's a block chain.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)