Sergey Shelukhin created TEZ-3812: ------------------------------------- Summary: race condition in ssl shuffle? Key: TEZ-3812 URL: https://issues.apache.org/jira/browse/TEZ-3812 Project: Apache Tez Issue Type: Bug Reporter: Sergey Shelukhin
ShuffleUtils does the following:{noformat} if (sslFactory == null) { synchronized (HttpConnectionParams.class) { //Create sslFactory if it is null or if it was destroyed earlier if (sslFactory == null || sslFactory.getKeystoresFactory().getTrustManagers() == null) { sslFactory = new SSLFactory(org.apache.hadoop.security.ssl.SSLFactory.Mode.CLIENT, conf); try { sslFactory.init(); {noformat} It is possible for a thread to get sslFactory that has been assigned but not initialized. It could result in e.g. the hostnameVerifier being null: {noformat} Caused by: java.lang.IllegalArgumentException: no HostnameVerifier specified at javax.net.ssl.HttpsURLConnection.setHostnameVerifier(HttpsURLConnection.java:265) at org.apache.tez.http.SSLFactory.configure(SSLFactory.java:219) at org.apache.tez.http.HttpConnection.setupConnection(HttpConnection.java:98) at org.apache.tez.http.HttpConnection.connect(HttpConnection.java:137) at org.apache.tez.http.HttpConnection.connect(HttpConnection.java:123) at org.apache.tez.runtime.library.common.shuffle.orderedgrouped.FetcherOrderedGrouped.setupConnection(FetcherOrderedGrouped.java:340) at org.apache.tez.runtime.library.common.shuffle.orderedgrouped.FetcherOrderedGrouped.copyFromHost(FetcherOrderedGrouped.java:260) at org.apache.tez.runtime.library.common.shuffle.orderedgrouped.FetcherOrderedGrouped.fetchNext(FetcherOrderedGrouped.java:178) at org.apache.tez.runtime.library.common.shuffle.orderedgrouped.FetcherOrderedGrouped.callInternal(FetcherOrderedGrouped.java:191) at org.apache.tez.runtime.library.common.shuffle.orderedgrouped.FetcherOrderedGrouped.callInternal(FetcherOrderedGrouped.java:54) {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)