LuciferYang commented on a change in pull request #34153:
URL: https://github.com/apache/spark/pull/34153#discussion_r727656443



##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       @srowen already fix  SPARK-36900, this pr will no longer change the 
value of  `-Xmx`, I will resolve this conversation, thanks all
   
   

##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       Since SPARK-36900 was reverted, this problem still exists

##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       
https://github.com/apache/spark/commit/92caa751257b894887d34e6abf02307931c090cd 
@HyukjinKwon already reverted this @srowen , I'm trying to find out what the 
minimum value, maybe 4100m can work normal
   
    

##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       
https://github.com/apache/spark/commit/92caa751257b894887d34e6abf02307931c090cd 
@HyukjinKwon already reverted this, @srowen , I'm trying to find out what the 
minimum value, maybe 4100m can work normal
   
    

##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       @srowen I test 
   ```
   mvn clean install -pl core -am -Dtest=none 
-DwildcardSuites=org.apache.spark.util.io.ChunkedByteBufferOutputStreamSuite
   ```
   with Java 11 and Java 17:
   
   - Java 11: if -Xmx >= 5155m , OOM will not occur again
   - Java 17: if -Xmx >= 4097m, OOM will not occur again
   
   
   
   

##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       ```
   test("SPARK-36464: size returns correct positive number even with over 2GB 
data") {
       val ref = new Array[Byte](1024 * 1024 * 1024)
       val o = new ChunkedByteBufferOutputStream(1024 * 1024, 
ByteBuffer.allocate)
       o.write(ref)
       o.write(ref)
       o.close()
       assert(o.size > 0L) // make sure it is not overflowing
       assert(o.size == ref.length.toLong * 2)
     }
   ```
   
   @srowen  can we use `ByteBuffer.allocateDirect` instead of 
`ByteBuffer.allocate` in the case,  I test this case with Java 8, Java 11 and 
Java 17, Heap OOM will not occur again when use `ByteBuffer.allocateDirect` 
even if `-Xmx` is 4g.
   
   It seems that using `ByteBuffer.allocateDirect` does not change what the use 
case wants to test, If we accept this, I will give a pr tomorrow.
   
   

##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       ```
   test("SPARK-36464: size returns correct positive number even with over 2GB 
data") {
       val ref = new Array[Byte](1024 * 1024 * 1024)
       val o = new ChunkedByteBufferOutputStream(1024 * 1024, 
ByteBuffer.allocate)
       o.write(ref)
       o.write(ref)
       o.close()
       assert(o.size > 0L) // make sure it is not overflowing
       assert(o.size == ref.length.toLong * 2)
     }
   ```
   
   @srowen  can we use `ByteBuffer.allocateDirect` instead of 
`ByteBuffer.allocate` in the case,  I re-test it with Java 8, Java 11 and Java 
17, Heap OOM will not occur again when use `ByteBuffer.allocateDirect` even if 
`-Xmx` is 4g.
   
   It seems that using `ByteBuffer.allocateDirect` does not change what the use 
case wants to test, If we accept this, I will give a pr tomorrow.
   
   

##########
File path: pom.xml
##########
@@ -2737,7 +2739,7 @@
             
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
             <junitxml>.</junitxml>
             <filereports>SparkTestSuite.txt</filereports>
-            <argLine>-ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>
+            <argLine>-ea -Xmx5g -Xss4m -XX:MaxMetaspaceSize=2g 
-XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} 
-Dio.netty.tryReflectionSetAccessible=true</argLine>

Review comment:
       ```
   test("SPARK-36464: size returns correct positive number even with over 2GB 
data") {
       val ref = new Array[Byte](1024 * 1024 * 1024)
       val o = new ChunkedByteBufferOutputStream(1024 * 1024, 
ByteBuffer.allocate)
       o.write(ref)
       o.write(ref)
       o.close()
       assert(o.size > 0L) // make sure it is not overflowing
       assert(o.size == ref.length.toLong * 2)
     }
   ```
   
   @srowen  can we use `ByteBuffer.allocateDirect` instead of 
`ByteBuffer.allocate` in the case,  I re-test it with Java 8, Java 11 and Java 
17, Heap OOM will not occur again when use `ByteBuffer.allocateDirect` even if 
`-Xmx` is 4g.
   
   It seems that using `ByteBuffer.allocateDirect` does not change what the UT 
wants to test, If we accept this, I will give a pr tomorrow.
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to