Csaba Ringhofer created IMPALA-13702:
----------------------------------------

             Summary: Webserver.StartWithPasswordFileTest fails with JDK 17
                 Key: IMPALA-13702
                 URL: https://issues.apache.org/jira/browse/IMPALA-13702
             Project: IMPALA
          Issue Type: Bug
          Components: Backend, Frontend
            Reporter: Csaba Ringhofer


The test was modified recently to use full curl output instead of just the 
status code. The test fails with jdk 17 because the output contains the 
following warning:
""OpenJDK VM warning: the use of signal() and sigset() for signal chaining was 
deprecated in version 16.0 and will be removed in a future release. Use 
sigaction() instead."
This comes is JDK deprecation warning which is printed to stdout instead of 
stderr by mistake.  The bug about printing to stdout is already solved 
(https://bugs.openjdk.org/browse/JDK-8344646) but not yet released in open jdk 
17.

https://bugs.openjdk.org/browse/JDK-8257572 contains detailed description on 
why signal() was deprecated. This is supposed to come up only in rare 
circumstances, but Impala happens to tick all the boxes:
from 
https://bugs.openjdk.org/browse/JDK-8257572?focusedId=14387439&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14387439
 :
"To clarify the scope of impact here, this change requires the following 
conditions to be met:
- A custom launcher process that directly loads the JVM
- The custom launcher needs to install signal handlers after the VM is loaded 
(there is no issue with installing before by any mechanism as libjsig is not 
involved)
- The custom launcher uses the archaic signal/sigset functions to install their 
handler"

Impala's debug webserver uses signal() during startup to avoid the side-effect  
of squeasel startup, which also uses signal(). So to really avoid using 
signal(), it is not enough to change Impala, squeasel also needs to be modified.

https://github.com/apache/impala/blob/b1a985be5eb49db6f23912a1439eeb59d74a278e/be/src/util/webserver.cc#L538
https://github.com/cloudera/squeasel/blob/d83cf6d9af0e2c98c16467a6a035ae0d7ca21cb1/squeasel.h#L183
https://github.com/cloudera/squeasel/blob/d83cf6d9af0e2c98c16467a6a035ae0d7ca21cb1/squeasel.c#L4608

The short term solution could be simply to filter out this warning from the 
curl output, but on the long run it would be better to avoid using signal(), as 
newer JDKs may become incompatible with it.



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

Reply via email to