graal icon indicating copy to clipboard operation
graal copied to clipboard

Native image crash when using Transparent NTLM proxy authentication

Open costi-28 opened this issue 2 years ago • 1 comments

Application using simple URLConnection crashes on Windows AMD64 when using NTLM transparent proxy authentication.

Steps to reproduce the issue

  1. setup/configure HTTP proxy server that requires NTLM transparent authentication
  2. generate config with Tracing Agent: "graalvm-ce-java17-22.3.0-dev\bin\java -agentlib:native-image-agent=config-merge-dir=config -cp lib/* Test --verbose --initialize-at-run-time --enable-all-security-services --no-fallback"
  3. build the native image: "graalvm-ce-java17-22.3.0-dev\bin\native-image --native-image-info --verbose -H:ConfigurationFileDirectories=config -H:+ReportExceptionStackTraces --enable-url-protocols=https,http -cp moduleslib/* -jar lib/test.jar"
  4. run the executable: " \graalvm-poc>test"

Describe GraalVM and your environment:

  • GraalVM version: graalvm-ce-java17-22.3.0-dev (can be reproduced with any java 11 or java 17 build)
  • JDK major version: 17
  • OS: Windows 10 Pro
  • Architecture: AMD64

More details Stacktrace for the failing thread 0x000001e4103af400: SP 0x000000307acfefc0 IP 0x00007ff9706e1651 IP is not within Java code. Trying frame anchor of last Java frame instead. SP 0x000000307acff690 IP 0x00007ff798095593 [image code] sun.net.www.protocol.http.ntlm.NTLMAuthSequence.getNextToken(NTLMAuthSequence.java) SP 0x000000307acff710 IP 0x00007ff79809511f [image code] sun.net.www.protocol.http.ntlm.NTLMAuthSequence.getAuthHeader(NTLMAuthSequence.java:80) SP 0x000000307acff730 IP 0x00007ff798096324 [image code] sun.net.www.protocol.http.ntlm.NTLMAuthentication.setHeaders(NTLMAuthentication.java:261) SP 0x000000307acff770 IP 0x00007ff798084479 [image code] sun.net.www.protocol.http.HttpURLConnection.getHttpProxyAuthentication(HttpURLConnection.java:2522) SP 0x000000307acff810 IP 0x00007ff79808f910 [image code] sun.net.www.protocol.http.HttpURLConnection.resetProxyAuthentication(HttpURLConnection.java:2107) SP 0x000000307acff840 IP 0x00007ff798086552 [image code] sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1753) SP 0x000000307acff9c0 IP 0x00007ff79808557f [image code] sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589) SP 0x000000307acff9e0 IP 0x00007ff798083de0 [image code] sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3236) SP 0x000000307acffa00 IP 0x00007ff797cfb4c0 [image code] java.net.URLConnection.getContentType(URLConnection.java:520) SP 0x000000307acffa10 IP 0x00007ff79790134d [image code] Test.main(Test.java:37)

minimal source code to reproduce the issue: graalvm-poc.zip

build log & execution crash log: logs.zip

costi-28 avatar Jul 18 '22 07:07 costi-28

Hi, Thank you for reporting this, we will take a look into it and get back to you

oubidar-Abderrahim avatar Jul 22 '22 13:07 oubidar-Abderrahim

Any news regarding the issue reported ?

costi-28 avatar Feb 10 '23 12:02 costi-28

If this issue is still relevant in the latest GraalVM versions, please create a new issue for it and follow the template provided. Thank you

oubidar-Abderrahim avatar Jan 16 '24 11:01 oubidar-Abderrahim