aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

SIGSEGV when using CRT Http Client on alpine Linux

Open rmennes opened this issue 3 years ago • 6 comments

Describe the bug

When using the AWS CRT Http Client on an alpine Linux docker container (such as openjdk:17-alpine3.14) an SIGSEGV error occurs.

Expected behavior

After installing the required libraries on an alpine linux container, the aws-crt-client should be able to execute http requests.

Current behavior

When using the AWS CRT Http Client on an alpine Linux docker container (such as openjdk:17-alpine3.14) an SIGSEGV error occurs.

The output and the corresponding log could be found in out.txt and hs_err_pid1 (1).log

Steps to Reproduce

  1. Create a docker base image using alpine linux (such as openjdk:17-alpine3.14) where all required libraries are installed (gcompat)
  2. Create actual service using the AWS-CRT-Http-client on top of the base image created in step 1.
  3. Run the service.

A minimal example could be found here: aws-crt-example.zip

Possible Solution

No response

Context

No response

AWS Java SDK version used

2.17.44

JDK version used

openjdk 17-ea 2021-09-14

Operating System and version

openjdk:17-alpine3.14

rmennes avatar Nov 23 '21 11:11 rmennes

Hi @rmennes, thank you for reporting the issue. We will take a look

zoewangg avatar Nov 23 '21 18:11 zoewangg

Hi, thanks for reporting the issue. The alpine linux is not currently supported by CRT for now. It's in our plan to support it in the future. For now, can you use HTTP client other than CRT as workaround? And we will throw a proper exception instead of crashing as a short-term solution.

TingDaoK avatar Nov 23 '21 20:11 TingDaoK

Thanks for the information. For now I will use another HTTP client. I understand this decision. I'm looking forward to the moment CRT will be supported within the alpine linux. :)

rmennes avatar Nov 24 '21 09:11 rmennes

I did a little experimentation today. If you're willing to build the CRT yourself on an alpine/musl based system, it appears to work. You'll need cmake and build-base.

Obviously, the long-term solutioon is for us to support musl in the maven-published packages, but in the meantime you do seem to have the option of self-build.

bretambrose avatar Dec 01 '21 00:12 bretambrose

Hi @bretambrose , Thanks for your remark. We tried to do that but unfortunately we are still unable to make it work. We are able to compile the library without any problem. Anyhow the moment we try to run our accpliceation we still get a stack overflow exception. (Log output could be found in attachment)

Could you guide us to setup our application?

Thanks in advanced log.txt .

rmennes avatar Dec 09 '21 15:12 rmennes

Hello everyony,When will this bug be fixed?

LIANGQI0811 avatar Jun 13 '22 06:06 LIANGQI0811

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Aug 02 '23 23:08 github-actions[bot]