[ 
https://issues.apache.org/jira/browse/SPARK-15822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15333586#comment-15333586
 ] 

Pete Robbins edited comment on SPARK-15822 at 6/16/16 11:18 AM:
----------------------------------------------------------------

OK so I think I know what is happening! 

In the following generate SMJ code on line 058 the call to leftIter.next() will 
return either a Row constructed by pointing into a page OR for the final Row in 
the iterator it returns a copy of the row and the underlying memory pages are 
freed in cleanupResources. This now means that any Rows previously returned 
from the iterator are invalid as they are addressing freed memory. In the case 
where I see the segv the Row assigned to smj_value6 is pointing into freed 
memory and this causes the  segmentation fault.


{code}
/* 001 */ public Object generate(Object[] references) {
/* 002 */   return new GeneratedIterator(references);
/* 003 */ }
/* 004 */
/* 005 */ final class GeneratedIterator extends 
org.apache.spark.sql.execution.BufferedRowIterator {
/* 006 */   private Object[] references;
/* 007 */   private scala.collection.Iterator smj_leftInput;
/* 008 */   private scala.collection.Iterator smj_rightInput;
/* 009 */   private InternalRow smj_leftRow;
/* 010 */   private InternalRow smj_rightRow;
/* 011 */   private UTF8String smj_value4;
/* 012 */   private UTF8String smj_value5;
/* 013 */   private java.util.ArrayList smj_matches;
/* 014 */   private UTF8String smj_value6;
/* 015 */   private UTF8String smj_value7;
/* 016 */   private UTF8String smj_value8;
/* 017 */   private boolean smj_isNull4;
/* 018 */   private UTF8String smj_value9;
/* 019 */   private boolean smj_isNull5;
/* 020 */   private long smj_value10;
/* 021 */   private org.apache.spark.sql.execution.metric.SQLMetric 
smj_numOutputRows;
/* 022 */   private UnsafeRow smj_result;
/* 023 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder smj_holder;
/* 024 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter smj_rowWriter;
/* 025 */   private UnsafeRow project_result;
/* 026 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder project_holder;
/* 027 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter 
project_rowWriter;
/* 028 */
/* 029 */   public GeneratedIterator(Object[] references) {
/* 030 */     this.references = references;
/* 031 */   }
/* 032 */
/* 033 */   public void init(int index, scala.collection.Iterator inputs[]) {
/* 034 */     partitionIndex = index;
/* 035 */     smj_leftInput = inputs[0];
/* 036 */     smj_rightInput = inputs[1];
/* 037 */
/* 038 */     smj_rightRow = null;
/* 039 */
/* 040 */     smj_matches = new java.util.ArrayList();
/* 041 */
/* 042 */     this.smj_numOutputRows = 
(org.apache.spark.sql.execution.metric.SQLMetric) references[0];
/* 043 */     smj_result = new UnsafeRow(6);
/* 044 */     this.smj_holder = new 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder(smj_result, 128);
/* 045 */     this.smj_rowWriter = new 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(smj_holder, 
6);
/* 046 */     project_result = new UnsafeRow(3);
/* 047 */     this.project_holder = new 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder(project_result, 
64);
/* 048 */     this.project_rowWriter = new 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(project_holder,
 3);
/* 049 */   }
/* 050 */
/* 051 */   private boolean findNextInnerJoinRows(
/* 052 */     scala.collection.Iterator leftIter,
/* 053 */     scala.collection.Iterator rightIter) {
/* 054 */     smj_leftRow = null;
/* 055 */     int comp = 0;
/* 056 */     while (smj_leftRow == null) {
/* 057 */       if (!leftIter.hasNext()) return false;
/* 058 */       smj_leftRow = (InternalRow) leftIter.next();
/* 059 */
/* 060 */       boolean smj_isNull = smj_leftRow.isNullAt(0);
/* 061 */       UTF8String smj_value = smj_isNull ? null : 
(smj_leftRow.getUTF8String(0));
/* 062 */
/* 063 */       boolean smj_isNull1 = smj_leftRow.isNullAt(1);
/* 064 */       UTF8String smj_value1 = smj_isNull1 ? null : 
(smj_leftRow.getUTF8String(1));
/* 065 */       if (smj_isNull || smj_isNull1) {
/* 066 */         smj_leftRow = null;
/* 067 */         continue;
/* 068 */       }
/* 069 */       if (!smj_matches.isEmpty()) {
/* 070 */         comp = 0;
/* 071 */         if (comp == 0) {
/* 072 */           comp = smj_value.compare(smj_value6);
/* 073 */         }
/* 074 */         if (comp == 0) {
/* 075 */           comp = smj_value1.compare(smj_value7);
/* 076 */         }
/* 077 */
/* 078 */         if (comp == 0) {
/* 079 */           return true;
/* 080 */         }
/* 081 */         smj_matches.clear();
/* 082 */       }
/* 083 */
/* 084 */       do {
/* 085 */         if (smj_rightRow == null) {
/* 086 */           if (!rightIter.hasNext()) {
/* 087 */             smj_value6 = smj_value;
/* 088 */
/* 089 */             smj_value7 = smj_value1;
/* 090 */
/* 091 */             return !smj_matches.isEmpty();
/* 092 */           }
/* 093 */           smj_rightRow = (InternalRow) rightIter.next();
/* 094 */
/* 095 */           boolean smj_isNull2 = smj_rightRow.isNullAt(0);
/* 096 */           UTF8String smj_value2 = smj_isNull2 ? null : 
(smj_rightRow.getUTF8String(0));
/* 097 */
/* 098 */           boolean smj_isNull3 = smj_rightRow.isNullAt(1);
/* 099 */           UTF8String smj_value3 = smj_isNull3 ? null : 
(smj_rightRow.getUTF8String(1));
/* 100 */           if (smj_isNull2 || smj_isNull3) {
/* 101 */             smj_rightRow = null;
/* 102 */             continue;
/* 103 */           }
/* 104 */
/* 105 */           smj_value4 = smj_value2;
/* 106 */
/* 107 */           smj_value5 = smj_value3;
/* 108 */
/* 109 */         }
/* 110 */
/* 111 */         comp = 0;
/* 112 */         if (comp == 0) {
/* 113 */           comp = smj_value.compare(smj_value4);
/* 114 */         }
/* 115 */         if (comp == 0) {
/* 116 */           comp = smj_value1.compare(smj_value5);
/* 117 */         }
/* 118 */
/* 119 */         if (comp > 0) {
/* 120 */           smj_rightRow = null;
/* 121 */         } else if (comp < 0) {
/* 122 */           if (!smj_matches.isEmpty()) {
/* 123 */             smj_value6 = smj_value;
/* 124 */
/* 125 */             smj_value7 = smj_value1;
/* 126 */
/* 127 */             return true;
/* 128 */           }
/* 129 */           smj_leftRow = null;
/* 130 */         } else {
/* 131 */           smj_matches.add(smj_rightRow.copy());
/* 132 */           smj_rightRow = null;;
/* 133 */         }
/* 134 */       } while (smj_leftRow != null);
/* 135 */     }
/* 136 */     return false; // unreachable
/* 137 */   }
/* 138 */
/* 139 */   protected void processNext() throws java.io.IOException {
/* 140 */     while (findNextInnerJoinRows(smj_leftInput, smj_rightInput)) {
/* 141 */       int smj_size = smj_matches.size();
/* 142 */       smj_isNull4 = smj_leftRow.isNullAt(0);
/* 143 */       smj_value8 = smj_isNull4 ? null : 
(smj_leftRow.getUTF8String(0));
/* 144 */       smj_isNull5 = smj_leftRow.isNullAt(1);
/* 145 */       smj_value9 = smj_isNull5 ? null : 
(smj_leftRow.getUTF8String(1));
/* 146 */       smj_value10 = smj_leftRow.getLong(2);
/* 147 */       for (int smj_i = 0; smj_i < smj_size; smj_i ++) {
/* 148 */         InternalRow smj_rightRow1 = (InternalRow) 
smj_matches.get(smj_i);
/* 149 */
/* 150 */         smj_numOutputRows.add(1);
/* 151 */
/* 152 */         long smj_value13 = smj_rightRow1.getLong(2);
/* 153 */         boolean project_isNull8 = false;
/* 154 */         double project_value8 = -1.0;
/* 155 */         if (!false) {
/* 156 */           project_value8 = (double) smj_value13;
/* 157 */         }
/* 158 */         boolean project_isNull3 = false;
/* 159 */         double project_value3 = -1.0;
/* 160 */         if (project_value8 == 0) {
/* 161 */           project_isNull3 = true;
/* 162 */         } else {
/* 163 */           long project_value5 = -1L;
/* 164 */           project_value5 = smj_value10 * 100L;
/* 165 */           boolean project_isNull4 = false;
/* 166 */           double project_value4 = -1.0;
/* 167 */           if (!false) {
/* 168 */             project_value4 = (double) project_value5;
/* 169 */           }
/* 170 */           project_value3 = (double)(project_value4 / project_value8);
/* 171 */         }
/* 172 */         boolean project_isNull2 = project_isNull3;
/* 173 */         double project_value2 = -1.0;
/* 174 */         if (!project_isNull2) {
/* 175 */           if (Double.isNaN(project_value3) || 
Double.isInfinite(project_value3)) {
/* 176 */             project_value2 = project_value3;
/* 177 */           } else {
/* 178 */             project_value2 = 
java.math.BigDecimal.valueOf(project_value3).
/* 179 */             setScale(2, 
java.math.BigDecimal.ROUND_HALF_UP).doubleValue();
/* 180 */           }
/* 181 */         }
/* 182 */         project_holder.reset();
/* 183 */
/* 184 */         project_rowWriter.zeroOutNullBytes();
/* 185 */
/* 186 */         if (smj_isNull4) {
/* 187 */           project_rowWriter.setNullAt(0);
/* 188 */         } else {
/* 189 */           project_rowWriter.write(0, smj_value8);
/* 190 */         }
/* 191 */
/* 192 */         if (smj_isNull5) {
/* 193 */           project_rowWriter.setNullAt(1);
/* 194 */         } else {
/* 195 */           project_rowWriter.write(1, smj_value9);
/* 196 */         }
/* 197 */
/* 198 */         if (project_isNull2) {
/* 199 */           project_rowWriter.setNullAt(2);
/* 200 */         } else {
/* 201 */           project_rowWriter.write(2, project_value2);
/* 202 */         }
/* 203 */         project_result.setTotalSize(project_holder.totalSize());
/* 204 */         append(project_result.copy());
/* 205 */
/* 206 */       }
/* 207 */       if (shouldStop()) return;
/* 208 */     }
/* 209 */   }
/* 210 */ }
{code}


was (Author: robbinspg):
OK so I think I know what is happening! 

In the following generate SMJ code on line 058 the call to leftIter.next() will 
return either a Row constructed by pointing into a page OR for the final Row in 
the iterator it returns a copy of the row and the memory pages are freed in 
cleanupResources. This now means that any Rows previously returned from the 
iterator are invalid as they are addressing freed memory. In the case where I 
see the segv the Row assigned to smj_value6 is pointing into freed memory and 
this causes the  segmentation fault.


{code}
/* 001 */ public Object generate(Object[] references) {
/* 002 */   return new GeneratedIterator(references);
/* 003 */ }
/* 004 */
/* 005 */ final class GeneratedIterator extends 
org.apache.spark.sql.execution.BufferedRowIterator {
/* 006 */   private Object[] references;
/* 007 */   private scala.collection.Iterator smj_leftInput;
/* 008 */   private scala.collection.Iterator smj_rightInput;
/* 009 */   private InternalRow smj_leftRow;
/* 010 */   private InternalRow smj_rightRow;
/* 011 */   private UTF8String smj_value4;
/* 012 */   private UTF8String smj_value5;
/* 013 */   private java.util.ArrayList smj_matches;
/* 014 */   private UTF8String smj_value6;
/* 015 */   private UTF8String smj_value7;
/* 016 */   private UTF8String smj_value8;
/* 017 */   private boolean smj_isNull4;
/* 018 */   private UTF8String smj_value9;
/* 019 */   private boolean smj_isNull5;
/* 020 */   private long smj_value10;
/* 021 */   private org.apache.spark.sql.execution.metric.SQLMetric 
smj_numOutputRows;
/* 022 */   private UnsafeRow smj_result;
/* 023 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder smj_holder;
/* 024 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter smj_rowWriter;
/* 025 */   private UnsafeRow project_result;
/* 026 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder project_holder;
/* 027 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter 
project_rowWriter;
/* 028 */
/* 029 */   public GeneratedIterator(Object[] references) {
/* 030 */     this.references = references;
/* 031 */   }
/* 032 */
/* 033 */   public void init(int index, scala.collection.Iterator inputs[]) {
/* 034 */     partitionIndex = index;
/* 035 */     smj_leftInput = inputs[0];
/* 036 */     smj_rightInput = inputs[1];
/* 037 */
/* 038 */     smj_rightRow = null;
/* 039 */
/* 040 */     smj_matches = new java.util.ArrayList();
/* 041 */
/* 042 */     this.smj_numOutputRows = 
(org.apache.spark.sql.execution.metric.SQLMetric) references[0];
/* 043 */     smj_result = new UnsafeRow(6);
/* 044 */     this.smj_holder = new 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder(smj_result, 128);
/* 045 */     this.smj_rowWriter = new 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(smj_holder, 
6);
/* 046 */     project_result = new UnsafeRow(3);
/* 047 */     this.project_holder = new 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder(project_result, 
64);
/* 048 */     this.project_rowWriter = new 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(project_holder,
 3);
/* 049 */   }
/* 050 */
/* 051 */   private boolean findNextInnerJoinRows(
/* 052 */     scala.collection.Iterator leftIter,
/* 053 */     scala.collection.Iterator rightIter) {
/* 054 */     smj_leftRow = null;
/* 055 */     int comp = 0;
/* 056 */     while (smj_leftRow == null) {
/* 057 */       if (!leftIter.hasNext()) return false;
/* 058 */       smj_leftRow = (InternalRow) leftIter.next();
/* 059 */
/* 060 */       boolean smj_isNull = smj_leftRow.isNullAt(0);
/* 061 */       UTF8String smj_value = smj_isNull ? null : 
(smj_leftRow.getUTF8String(0));
/* 062 */
/* 063 */       boolean smj_isNull1 = smj_leftRow.isNullAt(1);
/* 064 */       UTF8String smj_value1 = smj_isNull1 ? null : 
(smj_leftRow.getUTF8String(1));
/* 065 */       if (smj_isNull || smj_isNull1) {
/* 066 */         smj_leftRow = null;
/* 067 */         continue;
/* 068 */       }
/* 069 */       if (!smj_matches.isEmpty()) {
/* 070 */         comp = 0;
/* 071 */         if (comp == 0) {
/* 072 */           comp = smj_value.compare(smj_value6);
/* 073 */         }
/* 074 */         if (comp == 0) {
/* 075 */           comp = smj_value1.compare(smj_value7);
/* 076 */         }
/* 077 */
/* 078 */         if (comp == 0) {
/* 079 */           return true;
/* 080 */         }
/* 081 */         smj_matches.clear();
/* 082 */       }
/* 083 */
/* 084 */       do {
/* 085 */         if (smj_rightRow == null) {
/* 086 */           if (!rightIter.hasNext()) {
/* 087 */             smj_value6 = smj_value;
/* 088 */
/* 089 */             smj_value7 = smj_value1;
/* 090 */
/* 091 */             return !smj_matches.isEmpty();
/* 092 */           }
/* 093 */           smj_rightRow = (InternalRow) rightIter.next();
/* 094 */
/* 095 */           boolean smj_isNull2 = smj_rightRow.isNullAt(0);
/* 096 */           UTF8String smj_value2 = smj_isNull2 ? null : 
(smj_rightRow.getUTF8String(0));
/* 097 */
/* 098 */           boolean smj_isNull3 = smj_rightRow.isNullAt(1);
/* 099 */           UTF8String smj_value3 = smj_isNull3 ? null : 
(smj_rightRow.getUTF8String(1));
/* 100 */           if (smj_isNull2 || smj_isNull3) {
/* 101 */             smj_rightRow = null;
/* 102 */             continue;
/* 103 */           }
/* 104 */
/* 105 */           smj_value4 = smj_value2;
/* 106 */
/* 107 */           smj_value5 = smj_value3;
/* 108 */
/* 109 */         }
/* 110 */
/* 111 */         comp = 0;
/* 112 */         if (comp == 0) {
/* 113 */           comp = smj_value.compare(smj_value4);
/* 114 */         }
/* 115 */         if (comp == 0) {
/* 116 */           comp = smj_value1.compare(smj_value5);
/* 117 */         }
/* 118 */
/* 119 */         if (comp > 0) {
/* 120 */           smj_rightRow = null;
/* 121 */         } else if (comp < 0) {
/* 122 */           if (!smj_matches.isEmpty()) {
/* 123 */             smj_value6 = smj_value;
/* 124 */
/* 125 */             smj_value7 = smj_value1;
/* 126 */
/* 127 */             return true;
/* 128 */           }
/* 129 */           smj_leftRow = null;
/* 130 */         } else {
/* 131 */           smj_matches.add(smj_rightRow.copy());
/* 132 */           smj_rightRow = null;;
/* 133 */         }
/* 134 */       } while (smj_leftRow != null);
/* 135 */     }
/* 136 */     return false; // unreachable
/* 137 */   }
/* 138 */
/* 139 */   protected void processNext() throws java.io.IOException {
/* 140 */     while (findNextInnerJoinRows(smj_leftInput, smj_rightInput)) {
/* 141 */       int smj_size = smj_matches.size();
/* 142 */       smj_isNull4 = smj_leftRow.isNullAt(0);
/* 143 */       smj_value8 = smj_isNull4 ? null : 
(smj_leftRow.getUTF8String(0));
/* 144 */       smj_isNull5 = smj_leftRow.isNullAt(1);
/* 145 */       smj_value9 = smj_isNull5 ? null : 
(smj_leftRow.getUTF8String(1));
/* 146 */       smj_value10 = smj_leftRow.getLong(2);
/* 147 */       for (int smj_i = 0; smj_i < smj_size; smj_i ++) {
/* 148 */         InternalRow smj_rightRow1 = (InternalRow) 
smj_matches.get(smj_i);
/* 149 */
/* 150 */         smj_numOutputRows.add(1);
/* 151 */
/* 152 */         long smj_value13 = smj_rightRow1.getLong(2);
/* 153 */         boolean project_isNull8 = false;
/* 154 */         double project_value8 = -1.0;
/* 155 */         if (!false) {
/* 156 */           project_value8 = (double) smj_value13;
/* 157 */         }
/* 158 */         boolean project_isNull3 = false;
/* 159 */         double project_value3 = -1.0;
/* 160 */         if (project_value8 == 0) {
/* 161 */           project_isNull3 = true;
/* 162 */         } else {
/* 163 */           long project_value5 = -1L;
/* 164 */           project_value5 = smj_value10 * 100L;
/* 165 */           boolean project_isNull4 = false;
/* 166 */           double project_value4 = -1.0;
/* 167 */           if (!false) {
/* 168 */             project_value4 = (double) project_value5;
/* 169 */           }
/* 170 */           project_value3 = (double)(project_value4 / project_value8);
/* 171 */         }
/* 172 */         boolean project_isNull2 = project_isNull3;
/* 173 */         double project_value2 = -1.0;
/* 174 */         if (!project_isNull2) {
/* 175 */           if (Double.isNaN(project_value3) || 
Double.isInfinite(project_value3)) {
/* 176 */             project_value2 = project_value3;
/* 177 */           } else {
/* 178 */             project_value2 = 
java.math.BigDecimal.valueOf(project_value3).
/* 179 */             setScale(2, 
java.math.BigDecimal.ROUND_HALF_UP).doubleValue();
/* 180 */           }
/* 181 */         }
/* 182 */         project_holder.reset();
/* 183 */
/* 184 */         project_rowWriter.zeroOutNullBytes();
/* 185 */
/* 186 */         if (smj_isNull4) {
/* 187 */           project_rowWriter.setNullAt(0);
/* 188 */         } else {
/* 189 */           project_rowWriter.write(0, smj_value8);
/* 190 */         }
/* 191 */
/* 192 */         if (smj_isNull5) {
/* 193 */           project_rowWriter.setNullAt(1);
/* 194 */         } else {
/* 195 */           project_rowWriter.write(1, smj_value9);
/* 196 */         }
/* 197 */
/* 198 */         if (project_isNull2) {
/* 199 */           project_rowWriter.setNullAt(2);
/* 200 */         } else {
/* 201 */           project_rowWriter.write(2, project_value2);
/* 202 */         }
/* 203 */         project_result.setTotalSize(project_holder.totalSize());
/* 204 */         append(project_result.copy());
/* 205 */
/* 206 */       }
/* 207 */       if (shouldStop()) return;
/* 208 */     }
/* 209 */   }
/* 210 */ }
{code}

> segmentation violation in o.a.s.unsafe.types.UTF8String 
> --------------------------------------------------------
>
>                 Key: SPARK-15822
>                 URL: https://issues.apache.org/jira/browse/SPARK-15822
>             Project: Spark
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>         Environment: linux amd64
> openjdk version "1.8.0_91"
> OpenJDK Runtime Environment (build 1.8.0_91-b14)
> OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
>            Reporter: Pete Robbins
>            Assignee: Herman van Hovell
>            Priority: Blocker
>
> Executors fail with segmentation violation while running application with
> spark.memory.offHeap.enabled true
> spark.memory.offHeap.size 512m
> Also now reproduced with 
> spark.memory.offHeap.enabled false
> {noformat}
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGSEGV (0xb) at pc=0x00007f4559b4d4bd, pid=14182, tid=139935319750400
> #
> # JRE version: OpenJDK Runtime Environment (8.0_91-b14) (build 1.8.0_91-b14)
> # Java VM: OpenJDK 64-Bit Server VM (25.91-b14 mixed mode linux-amd64 
> compressed oops)
> # Problematic frame:
> # J 4816 C2 
> org.apache.spark.unsafe.types.UTF8String.compareTo(Lorg/apache/spark/unsafe/types/UTF8String;)I
>  (64 bytes) @ 0x00007f4559b4d4bd [0x00007f4559b4d460+0x5d]
> {noformat}
> We initially saw this on IBM java on PowerPC box but is recreatable on linux 
> with OpenJDK. On linux with IBM Java 8 we see a null pointer exception at the 
> same code point:
> {noformat}
> 16/06/08 11:14:58 ERROR Executor: Exception in task 1.0 in stage 5.0 (TID 48)
> java.lang.NullPointerException
>       at 
> org.apache.spark.unsafe.types.UTF8String.compareTo(UTF8String.java:831)
>       at org.apache.spark.unsafe.types.UTF8String.compare(UTF8String.java:844)
>       at 
> org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator.findNextInnerJoinRows$(Unknown
>  Source)
>       at 
> org.apache.spark.sql.catalyst.expressions.GeneratedClass$GeneratedIterator.processNext(Unknown
>  Source)
>       at 
> org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator.java:43)
>       at 
> org.apache.spark.sql.execution.WholeStageCodegenExec$$anonfun$doExecute$2$$anon$2.hasNext(WholeStageCodegenExec.scala:377)
>       at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:408)
>       at 
> scala.collection.convert.Wrappers$IteratorWrapper.hasNext(Wrappers.scala:30)
>       at org.spark_project.guava.collect.Ordering.leastOf(Ordering.java:664)
>       at org.apache.spark.util.collection.Utils$.takeOrdered(Utils.scala:37)
>       at 
> org.apache.spark.rdd.RDD$$anonfun$takeOrdered$1$$anonfun$30.apply(RDD.scala:1365)
>       at 
> org.apache.spark.rdd.RDD$$anonfun$takeOrdered$1$$anonfun$30.apply(RDD.scala:1362)
>       at 
> org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$23.apply(RDD.scala:757)
>       at 
> org.apache.spark.rdd.RDD$$anonfun$mapPartitions$1$$anonfun$apply$23.apply(RDD.scala:757)
>       at 
> org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:38)
>       at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:318)
>       at org.apache.spark.rdd.RDD.iterator(RDD.scala:282)
>       at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:70)
>       at org.apache.spark.scheduler.Task.run(Task.scala:85)
>       at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:274)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
>       at java.lang.Thread.run(Thread.java:785)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to