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

Todd Lipcon updated HDFS-1542:
------------------------------

    Attachment: hdfs-1542.txt

Here's one possible fix.

It's very slightly incompatible in that it used to be that we could make a 
FileSystem using a Configuration, then change settings in that Configuration 
(_after_ the FS was created) and they'd be reflected in open streams. This was 
only true for _some_ of the configurations, so I think it was probably more of 
a bug than a feature.

What do you think? I think fixing it at this layer makes more sense than 
changing Configuration.writeXML to copy itself first.

> Deadlock in Configuration.writeXml when serialized form is larger than one 
> DFS block
> ------------------------------------------------------------------------------------
>
>                 Key: HDFS-1542
>                 URL: https://issues.apache.org/jira/browse/HDFS-1542
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 0.22.0, 0.23.0
>            Reporter: Todd Lipcon
>            Priority: Critical
>         Attachments: deadlock.txt, hdfs-1542.txt, Test.java
>
>
> Configuration.writeXml holds a lock on itself and then writes the XML to an 
> output stream, during which DFSOutputStream will try to get a lock on 
> ackQueue/dataQueue. Meanwihle the DataStreamer thread will call functions 
> like conf.getInt() and deadlock against the other thread, since it could be 
> the same conf object.
> This causes a deterministic deadlock whenever the serialized form is larger 
> than block size.

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

Reply via email to