Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

presto-mysql, presto-hive tests fail due to missing/incompatible binaries/libraries on ppc64le #14549

Closed
amitsadaphule opened this issue May 18, 2020 · 5 comments

Comments

@amitsadaphule
Copy link
Contributor

amitsadaphule commented May 18, 2020

ENV:
arch=ppc64le
os=RHEL7.6
maven=3.6.3

I was able to compile presto commit c51b285 on ppc64le RHEL 7.6 as mvn install -DskipTests. However, there were test failures for 5 packages namely presto-function-namespace-managers, presto-mysql, presto-verifier, presto-benchmark-runner, presto-raptor caused by the following error:

java.lang.RuntimeException: archive not found: /mysql-Linux-ppc64le.tar.gz

After some debugging, I found that the issue was due to missing mysql-Linux-ppc64le.tar.gz in ~/.m2/repository/com/facebook/presto/testing-mysql-server-5/0.6/testing-mysql-server-5-0.6.jar. I could get the tests to PASS by adding mysqld, etc. files from rh-mysql57 installation from my setup to mysql-Linux-ppc64le.tar.gz and then adding that as a part of testing-mysql-server-5-0.6.jar in the local maven repo.

Similarly, I had to replace the native libraries libhadoop.so, libsnappy.so in nativelib/Linux-ppc64le/ of ~/.m2/repository/com/facebook/presto/hadoop/hadoop-apache2/2.7.4-7/hadoop-apache2-2.7.4-7.jar and libsnappyjava.so in org/xerial/snappy/native/Linux/ppc64le/ of ~/.m2/repository/org/xerial/snappy/snappy-java/1.1.7.1/snappy-java-1.1.7.1.jar to get the tests for packages presto-hive, presto-jdbc, presto-geospatial, presto-spark-base to PASS. The test failures which were seen for these packages were caused by one or more of the following errors:

java.lang.RuntimeException: failed to load Hadoop native library
java.lang.UnsatisfiedLinkError: /tmp/snappy4037485277328500341.tmp: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /tmp/snappy4037485277328500341.tmp
java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy

I have the following questions in relation to this:

  1. Is there a way to make the test execution look for the necessary binaries/libraries in the local yum/rpm installation paths instead of trying to find those in the downloaded jars? How can it be accomplished?
  2. If the answer to Add simple HashAggregation #1 is no, what is the procedure to get the updated binaries/libraries for ppc64le in the jars in presto maven repos?

Thanks in advance!

@amitsadaphule
Copy link
Contributor Author

Got some answers on #14550

@amitsadaphule
Copy link
Contributor Author

About snappy-java-1.1.7.1.jar which is a dependency for presto-hive does not contain libsnappyjava.so for ppc64le which causes the following issue:

java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy

Higher versions of this jar (>= 1.1.7.4) have support for ppc64le. But since that (https://github.com/xerial/snappy-java.git) is built with jdk11, the test execution for presto-hive runs into the following issue if we try to use jdk8 to build/test presto-hive (as per the requirements mentioned here):

[ERROR] testAllFormats(com.facebook.presto.hive.TestHivePageSink)  Time elapsed: 2.95 s  <<< FAILURE!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
        at org.xerial.snappy.Snappy.compress(Snappy.java:156)
        at parquet.hadoop.codec.SnappyCompressor.compress(SnappyCompressor.java:76)
        at org.apache.hadoop.io.compress.CompressorStream.compress(CompressorStream.java:81)
        at org.apache.hadoop.io.compress.CompressorStream.finish(CompressorStream.java:92)
        at parquet.hadoop.CodecFactory$BytesCompressor.compress(CodecFactory.java:112)
        at parquet.hadoop.ColumnChunkPageWriteStore$ColumnChunkPageWriter.writePage(ColumnChunkPageWriteStore.java:89)
        at parquet.column.impl.ColumnWriterV1.writePage(ColumnWriterV1.java:153)
        at parquet.column.impl.ColumnWriterV1.flush(ColumnWriterV1.java:241)
        at parquet.column.impl.ColumnWriteStoreV1.flush(ColumnWriteStoreV1.java:126)
        at parquet.hadoop.InternalParquetRecordWriter.flushRowGroupToStore(InternalParquetRecordWriter.java:154)
        at parquet.hadoop.InternalParquetRecordWriter.close(InternalParquetRecordWriter.java:113)
        at parquet.hadoop.ParquetRecordWriter.close(ParquetRecordWriter.java:112)
        at org.apache.hadoop.hive.ql.io.parquet.write.ParquetRecordWriterWrapper.close(ParquetRecordWriterWrapper.java:102)
        at org.apache.hadoop.hive.ql.io.parquet.write.ParquetRecordWriterWrapper.close(ParquetRecordWriterWrapper.java:119)
        at com.facebook.presto.hive.ParquetRecordWriterUtil$1.close(ParquetRecordWriterUtil.java:95)
        at com.facebook.presto.hive.RecordFileWriter.commit(RecordFileWriter.java:181)
        at com.facebook.presto.hive.HiveWriter.commit(HiveWriter.java:87)
        at com.facebook.presto.hive.HivePageSink.doFinish(HivePageSink.java:191)
        at com.facebook.presto.hive.authentication.NoHdfsAuthentication.doAs(NoHdfsAuthentication.java:23)
        at com.facebook.presto.hive.HdfsEnvironment.doAs(HdfsEnvironment.java:81)
        at com.facebook.presto.hive.HivePageSink.finish(HivePageSink.java:182)
        at com.facebook.presto.hive.TestHivePageSink.writeTestFile(TestHivePageSink.java:187)
        at com.facebook.presto.hive.TestHivePageSink.testAllFormats(TestHivePageSink.java:126)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   TestHivePageSink.testAllFormats:126->writeTestFile:187 ? NoSuchMethod java.nio...
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testArray:132 ? NoSuchMethod j...
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testArrayOfArrayOfStructOfArray:242 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testArrayOfMapOfArray:430 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testArrayOfMapOfStruct:360 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testArrayOfStructOfArray:279 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testArrayOfStructs:185 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testArraySchemas:1175 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testBinaryDictionarySequence:1447 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testBinaryDirectSequence:1436 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testBooleanSequence:776 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testComplexNestedStructs:609 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testCustomSchemaArrayOfStucts:211 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testDecimalBackedByFixedLenByteArray:877 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testDecimalBackedByINT32:844 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testDecimalBackedByINT64:860 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testDoubleNaNInfinity:1386 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testDoubleSequence:1379 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testEmptyArrays:140 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testEmptyBinarySequence:1457 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testEmptyStringSequence:1428 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testFloatNaNInfinity:1365 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testFloatSequence:1358 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testLongDirect:797->AbstractTestParquetReader.testRoundTripNumeric:1331 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testLongDirect2:809->AbstractTestParquetReader.testRoundTripNumeric:1331 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testLongPatchedBase:823->AbstractTestParquetReader.testRoundTripNumeric:1331 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testLongSequence:783->AbstractTestParquetReader.testRoundTripNumeric:1331 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testLongSequenceWithHoles:790->AbstractTestParquetReader.testRoundTripNumeric:1331 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testLongShortRepeat:816->AbstractTestParquetReader.testRoundTripNumeric:1331 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testLongStrideDictionary:1325->AbstractTestParquetReader.testRoundTripNumeric:1331 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testMap:309 ? NoSuchMethod jav...
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testMapOfArray:459 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testMapOfSingleLevelArray:472 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testMapOfStruct:487 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testMapSchemas:1226 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testMapWithNullValues:500 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testNestedArrays:157 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testNestedMaps:327 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testNestedStructs:528 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testNewAvroArray:1156 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testOldAvroArray:1141 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithOptionalOptionalRequiredFields:950 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithOptionalRequiredOptionalFields:976 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithRepeatedOptionalRequiredFields:918 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithRequiredOptionalOptionalFields:1028 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithRequiredOptionalRequired2Fields:1126 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithRequiredOptionalRequiredFields:1054 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithRequiredRequiredOptionalFields:1002 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSchemaWithRequiredStruct:1079 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelArrayOfMapOfArray:445 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelArrayOfMapOfStruct:377 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelArrayOfStructOfSingleElement:392 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelArrayOfStructOfStructOfSingleElement:412 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelSchemaArrayOfArrayOfStructOfArray:261 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelSchemaArrayOfMaps:347 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelSchemaArrayOfStructOfArray:296 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelSchemaArrayOfStucts:229 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testSingleLevelSchemaNestedArrays:174 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStringDictionarySequence:1414 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStringDirectSequence:1407 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStringStrideDictionary:1421 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStringUnicode:1400 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStruct:510 ? NoSuchMethod ...
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfArrayAndPrimitive:680 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfMaps:625 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfNullableArrayBetweenNonNullFields:663 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfNullableMapBetweenNonNullFields:644 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfPrimitiveAndArray:707 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfPrimitiveAndSingleLevelArray:721 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfSingleLevelArrayAndPrimitive:693 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfTwoArrays:735 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfTwoNestedArrays:748 ? NoSuchMethod
[ERROR]   TestFullParquetReader>AbstractTestParquetReader.testStructOfTwoNestedSingleLevelSchemaArrays:769 ? NoSuchMethod
[INFO]
[ERROR] Tests run: 2129, Failures: 73, Errors: 0, Skipped: 90
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  29:46 min
[INFO] Finished at: 2020-07-08T16:01:35Z
[INFO] ------------------------------------------------------------------------

Building https://github.com/xerial/snappy-java.git 1.1.7.6 from source using jdk8 and using the generated jar gets rid of the issue though. Not sure whether to raise PR to use 1.1.7.6 version and update requirements to jdk11.

Please advise!

@rschlussel
Copy link
Contributor

upgrading the java requirement to java 11 has much bigger implications. Let me start a conversation about it in the slack dev channel

@rschlussel
Copy link
Contributor

also, I should clarify that you can build presto with java 11. It just needs to be at least java 8.

@elharo
Copy link
Contributor

elharo commented Mar 22, 2024

now built with Java 11

@elharo elharo closed this as completed Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants