Skip to content

A lot of Init<SignalException> are being raised after upgrading lambda to ruby 3.3 native runtime #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wildodecisiv opened this issue Oct 4, 2024 · 0 comments

Comments

@wildodecisiv
Copy link

Recently we have upgraded many or our lambda functions from ruby3.2 to ruby3.3 and we started seeing a lot of this SIGTERM exception

2024-10-04T10:05:14.769-04:00
Init error when loading handler
2024-10-04T10:05:14.769-04:00
{
    "errorMessage": "SIGTERM",
    "errorType": "Init<SignalException>",
    "stackTrace": [
        "/var/lang/lib/ruby/3.3.0/net/protocol.rb:229:in `wait_readable'",
        "/var/lang/lib/ruby/3.3.0/net/protocol.rb:229:in `rbuf_fill'",
        "/var/lang/lib/ruby/3.3.0/net/protocol.rb:199:in `readuntil'",
        "/var/lang/lib/ruby/3.3.0/net/protocol.rb:209:in `readline'",
        "/var/lang/lib/ruby/3.3.0/net/http/response.rb:158:in `read_status_line'",
        "/var/lang/lib/ruby/3.3.0/net/http/response.rb:147:in `read_new'",
        "/var/lang/lib/ruby/3.3.0/net/http.rb:2342:in `block in transport_request'",
        "/var/lang/lib/ruby/3.3.0/net/http.rb:2333:in `catch'",
        "/var/lang/lib/ruby/3.3.0/net/http.rb:2333:in `transport_request'",
        "/var/lang/lib/ruby/3.3.0/net/http.rb:2306:in `request'",
        "/var/lang/lib/ruby/3.3.0/net/http.rb:1917:in `get'",
        "/var/runtime/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric/lambda_server.rb:28:in `block in next_invocation'",
        "/var/lang/lib/ruby/3.3.0/net/http.rb:1570:in `start'",
        "/var/runtime/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric/lambda_server.rb:27:in `next_invocation'",
        "/var/runtime/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:71:in `wait_for_invocation'",
        "/var/runtime/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:65:in `start_runtime_loop'",
        "/var/runtime/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:49:in `run'",
        "/var/runtime/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:221:in `bootstrap_handler'",
        "/var/runtime/gems/aws_lambda_ric-3.0.0/lib/aws_lambda_ric.rb:203:in `start'",
        "/var/runtime/index.rb:4:in `<main>'"
    ]
}

The lambdas are being deployed using aws sam and they are definied in the template.yaml as follow

Globals:
  Function:
    Architectures:
      - arm64
    Layers:
      - !Ref CommonLayer
    MemorySize: 256
    Runtime: ruby3.3
    Tracing: Active
    Timeout: 15
    
CommonLayer:
  Type: AWS::Serverless::LayerVersion
  Properties:
    LayerName: common
    Description: Layer to share code and dependencies
    ContentUri: app/layers/common/common.zip
    CompatibleRuntimes:
      - ruby3.3
    RetentionPolicy: Delete
    CompatibleArchitectures:
      - arm64
      
 # and below the normal handler path

Have you experienced the same issue?
Do you know what could cause this exception to be raised by the lambda service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant