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

Andrew Kyle Purtell commented on HBASE-27872:
---------------------------------------------

After the proposed changes:

{noformat}
2023-05-18T16:49:25,730 ERROR [Time-limited test {}] xerial.SnappyCodec(58): 
The Snappy native libraries could not be loaded                                 
                       
java.lang.UnsatisfiedLinkError: 
/home/apurtell/src/hbase/hbase-compression/hbase-compression-snappy/target/snappy-1.1.9-1a39c2aa-088d-44df-a86b-7bc7d8682d47-libsnappyjava.so:
 /lib\
/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by 
/home/apurtell/src/hbase/hbase-compression/hbase-compression-snappy/target/snappy-1.1.9-1a39c2aa-088d-44d\
f-a86b-7bc7d8682d47-libsnappyjava.so)                                           
                                                                                
                    
    at java.lang.ClassLoader$NativeLibrary.load(Native Method) ~[?:1.8.0_332]   
                                                                                
                    
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1950) ~[?:1.8.0_332] 
                                                                                
                    
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1832) ~[?:1.8.0_332]  
                                                                                
                    
    at java.lang.Runtime.load0(Runtime.java:811) ~[?:1.8.0_332]                 
                                                                                
                    
    at java.lang.System.load(System.java:1088) ~[?:1.8.0_332]                   
                                                                                
                    
    at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:180) 
~[snappy-java-1.1.9.1.jar:1.1.9.1]                                              
                     
    at org.xerial.snappy.SnappyLoader.loadSnappyApi(SnappyLoader.java:155) 
~[snappy-java-1.1.9.1.jar:1.1.9.1]                                              
                         
    at org.xerial.snappy.Snappy.init(Snappy.java:70) 
~[snappy-java-1.1.9.1.jar:1.1.9.1]                                              
                                               
    at org.xerial.snappy.Snappy.<clinit>(Snappy.java:47) 
~[snappy-java-1.1.9.1.jar:1.1.9.1]                                              
                                           
    at 
org.apache.hadoop.hbase.io.compress.xerial.SnappyCodec.<clinit>(SnappyCodec.java:55)
 ~[classes/:?]                                                                  
         
    at 
org.apache.hadoop.hbase.io.compress.xerial.TestWALCompressionSnappy.setUpBeforeClass(TestWALCompressionSnappy.java:53)
 ~[test-classes/:?]                                    
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_332]                                                                  
                                 
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_332]                                                                  
               
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_332]                                                                 
        
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_332]          
                                                                                
                    
    at 
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
 ~[junit-4.13.2.jar:4.13.2]                                                     
         
    at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 ~[junit-4.13.2.jar:4.13.2]                                                     
          
    at 
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
 ~[junit-4.13.2.jar:4.13.2]                                                     
           
    at 
org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
 ~[junit-4.13.2.jar:4.13.2]                                                     
            
    at 
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) 
~[junit-4.13.2.jar:4.13.2]                                                      
               
    at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) 
~[junit-4.13.2.jar:4.13.2]                                                      
                 
    at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
 ~[junit-4.13.2.jar:4.13.2]                                                
    at 
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
 ~[junit-4.13.2.jar:4.13.2]                                                
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_332]  
                                                                                
                    
    at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_332]                     
                                                                                
                    
2023-05-18T16:49:25,736 WARN  [Time-limited test {}] 
xerial.TestWALCompressionSnappy(54): Snappy codec cannot be loaded. Test will 
not execute.                                     
{noformat}

> xerial's snappy-java requires GLIBC >= 2.32
> -------------------------------------------
>
>                 Key: HBASE-27872
>                 URL: https://issues.apache.org/jira/browse/HBASE-27872
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.5.4
>            Reporter: Andrew Kyle Purtell
>            Assignee: Andrew Kyle Purtell
>            Priority: Minor
>             Fix For: 2.6.0, 3.0.0-alpha-4, 2.5.5
>
>
> We need to add a native library load check with a helpful error message if it 
> fails to load due to a too old glibc or similar reason, and disable the unit 
> test if the native library fails to load. 
> {noformat}
> TestHFileCompressionSnappy.test:54->HFileTestBase.doTest:72 ยป
> UnsatisfiedLink 
> /home/apurtell/src/hbase/hbase-compression/hbase-compression-snappy/target/snappy-1.1.9-6406bd03-44b4-4586-a91b-79d213c14062-libsnappyjava.so:
> /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.32'
> {noformat}
> In this case a Debian test VM has "Debian GLIBC 2.31-13+deb11u6" installed, 
> which is too old. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to