quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.76k stars 2.68k forks source link

Add a clarification to the documentation for AWS Lambda about the DISABLE_SIGNAL_HANDLERS env variable #29331

Open StFS opened 1 year ago

StFS commented 1 year ago

Description

The documentation for how to deploy a Quarkus based AWS Lambda mentions that when deploying a lambda, the DISABLE_SIGNAL_HANDLERS=true environment variable needs to be set.

However, it doesn't explain anything about why this is needed or reference any documentation about what this does exactly. It's in the section about deploying a custom (native) runtime, so I'm wondering whether this env variable is only needed in case of native executables? Will it do harm if set in lambdas that are using the JVM runtime? Also, I'm unclear on what, exactly, this env variable is effecting. Is Quarkus itself reacting to it or is it something in the aws-lambda-java-runtime-interface-client or maybe even GraalVM? Linking to some documentation about this thing would be very helpful.

A discussion about this on Zulip even suggested that this environment variable might perhaps be outdated and not having any effect anymore.

A clarification on this in the documentation (or simply removing it if the env variable has no effect) would be appreciated.

Implementation ideas

No response

quarkus-bot[bot] commented 1 year ago

You added a link to a Zulip discussion, please make sure the description of the issue is comprehensive and doesn't require accessing Zulip.

This message is automatically generated by a bot.

quarkus-bot[bot] commented 1 year ago

/cc @matejvasek, @patriot1burke

geoand commented 1 year ago

It seems like the env var was added long ago in c8ba30fda793913d468db43ff55bce04aa8be696. And yes, it's only relevant for native-image.

Can anyone test and see if a native application on AWS behaves properly without the environment variable? We probably want to remove it..,

StFS commented 1 year ago

I could possibly help with that but it would help to know what behavior to look for as undesirable. Do you have any idea why installing the signal handler (which executes a System.exit()) was undesirable to begin with in a native executable?

geoand commented 1 year ago

I am not privy to why that was done at the time. @dmlloyd @evanchooly do you remember?

dmlloyd commented 1 year ago

The zulip thread has what I remember but there might be more in the commit log (bug #, etc).

geoand commented 1 year ago

might be more in the commit log (bug #, etc)

I checked and didn't see much :)

patriot1burke commented 1 year ago

It also might have been related to SSL as well. I don't remember why its there, but I remember that it was required to run things. Would be great if it could be removed.

dmlloyd commented 1 year ago

+1, if it works now then we can just drop it and we can remove the confusing documentation at the same time.