[ https://issues.apache.org/jira/browse/HADOOP-11969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14560189#comment-14560189 ]
Hudson commented on HADOOP-11969: --------------------------------- SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #209 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/209/]) HADOOP-11969. ThreadLocal initialization in several classes is not thread safe (Sean Busbey via Colin P. McCabe) (cmccabe: rev 7dba7005b79994106321b0f86bc8f4ea51a3c185) * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesInput.java * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/record/BinaryRecordOutput.java * hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ReflectionUtils.java * hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestDirHelper.java * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesOutput.java * hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/Text.java * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/record/BinaryRecordInput.java * hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestJettyHelper.java * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesRecordOutput.java * hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/task/reduce/ShuffleSchedulerImpl.java * hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/lib/Chain.java * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesRecordInput.java * hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestHdfsHelper.java * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesWritableOutput.java * hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/MD5Hash.java * hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/DistCpUtils.java * hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/typedbytes/TypedBytesWritableInput.java * hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSMDCFilter.java * hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/pipes/PipesPartitioner.java * hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/servlet/ServerWebApp.java > ThreadLocal initialization in several classes is not thread safe > ---------------------------------------------------------------- > > Key: HADOOP-11969 > URL: https://issues.apache.org/jira/browse/HADOOP-11969 > Project: Hadoop Common > Issue Type: Bug > Components: io > Reporter: Sean Busbey > Assignee: Sean Busbey > Priority: Critical > Labels: thread-safety > Fix For: 2.8.0 > > Attachments: HADOOP-11969.1.patch, HADOOP-11969.2.patch, > HADOOP-11969.3.patch, HADOOP-11969.4.patch, HADOOP-11969.5.patch > > > Right now, the initialization of hte thread local factories for encoder / > decoder in Text are not marked final. This means they end up with a static > initializer that is not guaranteed to be finished running before the members > are visible. > Under heavy contention, this means during initialization some users will get > an NPE: > {code} > (2015-05-05 08:58:03.974 : solr_server_log.log) > org.apache.solr.common.SolrException; null:java.lang.NullPointerException > at org.apache.hadoop.io.Text.decode(Text.java:406) > at org.apache.hadoop.io.Text.decode(Text.java:389) > at org.apache.hadoop.io.Text.toString(Text.java:280) > at org.apache.hadoop.hdfs.protocolPB.PBHelper.convert(PBHelper.java:764) > at > org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.buildBaseHeader(DataTransferProtoUtil.java:81) > at > org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil.buildClientHeader(DataTransferProtoUtil.java:71) > at > org.apache.hadoop.hdfs.protocol.datatransfer.Sender.readBlock(Sender.java:101) > at > org.apache.hadoop.hdfs.RemoteBlockReader2.newBlockReader(RemoteBlockReader2.java:400) > at > org.apache.hadoop.hdfs.BlockReaderFactory.getRemoteBlockReader(BlockReaderFactory.java:785) > at > org.apache.hadoop.hdfs.BlockReaderFactory.getRemoteBlockReaderFromTcp(BlockReaderFactory.java:663) > at > org.apache.hadoop.hdfs.BlockReaderFactory.build(BlockReaderFactory.java:327) > at > org.apache.hadoop.hdfs.DFSInputStream.actualGetFromOneDataNode(DFSInputStream.java:1027) > at > org.apache.hadoop.hdfs.DFSInputStream.fetchBlockByteRange(DFSInputStream.java:974) > at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:1305) > at org.apache.hadoop.fs.FSInputStream.readFully(FSInputStream.java:78) > at > org.apache.hadoop.fs.FSDataInputStream.readFully(FSDataInputStream.java:107) > ... SNIP... > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)