Skip to content
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

TypeError: superclass mismatch for class AbortIncompleteMultipartUpload #3119

Closed
1 task
enescakir opened this issue Sep 26, 2024 · 7 comments
Closed
1 task
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@enescakir
Copy link

enescakir commented Sep 26, 2024

Describe the bug

abort_multipart_upload fails with the following error time to time.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Not raising an exception

Current Behavior

It raises an exception. It started with the new version

gp09d7q5a36j0m9kqkpht9wazf TypeError | superclass mismatch for class AbortIncompleteMultipartUpload

app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:31:in `<module:Types>'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:11:in `<module:S3>'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:10:in `<top (required)>'
internal:/app/vendor/ruby-3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
internal:/app/vendor/ruby-3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:626:in `<module:ClientApi>'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:13:in `<module:S3>'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:11:in `<top (required)>'
internal:/app/vendor/ruby-3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
internal:/app/vendor/ruby-3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:79:in `<class:Client>'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:73:in `<module:S3>'
app/vendor/bundle/ruby/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:60:in `<top (required)>'
internal:/app/vendor/ruby-3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
internal:/app/vendor/ruby-3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
app/model/github/github_repository.rb:31:in `blob_storage_client'

Reproduction Steps

Possible Solution

No response

Additional Information/Context

No response

Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version

aws-sdk-s3

Environment details (Version of Ruby, OS environment)

Ruby 3.2.5, Ubuntu 22.04

@enescakir enescakir added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 26, 2024
@mullermp
Copy link
Contributor

Thanks for opening an issue. I'm not sure how I could reproduce this, but if I recall, that TypeError superclass mismatch is an error that Struct (which all types inherit from) could throw if you've defined and initialized that class twice. I think it just so happens that AbortIncompleteMultipartUpload is the first struct defined in types.rb. I see you're also using a vendor folder with the SDK in it? Quite possibly you have two versions of the SDK on your load path.

@RanVaknin RanVaknin self-assigned this Sep 26, 2024
@RanVaknin
Copy link

Hi @enescakir,

If @mullermp's advice did not work out for you, please share with us the following:

  1. minimal code needed to reproduce the issue
  2. output of gem list
  3. contents of your Gemfile and perhaps the lock file

Since you mentioned it happens intermittently it lowers the probability of chances to reproduce but I'll try regardless if you can provide us with the requested info.

Thanks,
Ran~

@RanVaknin RanVaknin added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Sep 26, 2024
@enescakir
Copy link
Author

enescakir commented Oct 1, 2024

Thanks for the swift reply and advice. I've investigated it more. It seems this error message might just be a side effect. The root cause is different.

The initial request failed due to the following exception:

web.1       | FrozenError: can't modify frozen #<Class:Struct>: Struct
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.209.1/lib/aws-sdk-core/structure.rb:88:in `new'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.209.1/lib/aws-sdk-core/structure.rb:88:in `<module:Aws>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.209.1/lib/aws-sdk-core/structure.rb:3:in `<top (required)>'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:33:in `<class:AbortIncompleteMultipartUpload>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:31:in `<module:Types>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:11:in `<module:S3>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:10:in `<top (required)>'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:626:in `<module:ClientApi>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:13:in `<module:S3>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:11:in `<top (required)>'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:79:in `<class:Client>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:73:in `<module:S3>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:60:in `<top (required)>'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/model/github/github_repository.rb:31:in `blob_storage_client'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/routes/runtime/github.rb:92:in `block (4 levels) in <class:CloverRuntime>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/database/transactions.rb:264:in `_transaction'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/database/transactions.rb:239:in `block in transaction'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/connection_pool/threaded.rb:92:in `hold'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/database/connecting.rb:283:in `synchronize'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/database/transactions.rb:197:in `transaction'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/routes/runtime/github.rb:90:in `block (3 levels) in <class:CloverRuntime>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:603:in `if_match'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:530:in `_verb'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:273:in `post'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/routes/runtime/github.rb:69:in `block (2 levels) in <class:CloverRuntime>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:603:in `if_match'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:241:in `on'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/routes/runtime/github.rb:44:in `block in <class:CloverRuntime>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/plugins/hash_branches.rb:132:in `block in hash_branches'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:536:in `always'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/plugins/hash_branches.rb:132:in `hash_branches'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/clover_runtime.rb:37:in `block in <class:CloverRuntime>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:522:in `_roda_run_main_route'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/plugins/_before_hook.rb:27:in `_roda_run_main_route'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:500:in `block in _roda_handle_main_route'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:498:in `catch'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:498:in `_roda_handle_main_route'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/plugins/error_handler.rb:88:in `_roda_handle_main_route'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:384:in `block in base_rack_app_callable'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:53:in `call'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:393:in `run'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/clover.rb:34:in `block (2 levels) in <class:Clover>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/plugins/_optimized_matching.rb:41:in `block in on'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/request.rb:536:in `always'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/plugins/_optimized_matching.rb:41:in `on'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/clover.rb:33:in `block in <class:Clover>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:500:in `block in _roda_handle_main_route'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:498:in `catch'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda.rb:498:in `_roda_handle_main_route'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/roda-3.84.0/lib/roda/plugins/direct_call.rb:18:in `call'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib/puma/configuration.rb:272:in `call'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib/puma/request.rb:100:in `block in handle_request'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib/puma/thread_pool.rb:378:in `with_force_shutdown'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib/puma/request.rb:99:in `handle_request'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib/puma/server.rb:464:in `process_client'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib/puma/server.rb:245:in `block in run'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib/puma/thread_pool.rb:155:in `block in spawn_thread'

Then, consecutive requests fail due to a superclass mismatch exception. As you suggested, it has indeed already initialized warnings.

web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:615: warning: already initialized constant Aws::S3::ClientApi::UserMetadata
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:615: warning: previous definition of UserMetadata was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:616: warning: already initialized constant Aws::S3::ClientApi::Value
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:616: warning: previous definition of Value was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:617: warning: already initialized constant Aws::S3::ClientApi::VersionCount
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:617: warning: previous definition of VersionCount was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:618: warning: already initialized constant Aws::S3::ClientApi::VersionIdMarker
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:618: warning: previous definition of VersionIdMarker was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:619: warning: already initialized constant Aws::S3::ClientApi::VersioningConfiguration
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:619: warning: previous definition of VersioningConfiguration was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:620: warning: already initialized constant Aws::S3::ClientApi::WebsiteConfiguration
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:620: warning: previous definition of WebsiteConfiguration was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:621: warning: already initialized constant Aws::S3::ClientApi::WebsiteRedirectLocation
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:621: warning: previous definition of WebsiteRedirectLocation was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:622: warning: already initialized constant Aws::S3::ClientApi::WriteGetObjectResponseRequest
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:622: warning: previous definition of WriteGetObjectResponseRequest was here
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:623: warning: already initialized constant Aws::S3::ClientApi::Years
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:623: warning: previous definition of Years was here
web.1       | TypeError: superclass mismatch for class AbortIncompleteMultipartUpload
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:31:in `<module:Types>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:11:in `<module:S3>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/types.rb:10:in `<top (required)>'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:626:in `<module:ClientApi>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:13:in `<module:S3>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client_api.rb:11:in `<top (required)>'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:79:in `<class:Client>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:73:in `<module:S3>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.166.0/lib/aws-sdk-s3/client.rb:60:in `<top (required)>'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | <internal:/Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/model/github/github_repository.rb:31:in `blob_storage_client'
web.1       | /Users/enescakir/dev/ubicloud/ubicloud/routes/runtime/github.rb:92:in `block (4 levels) in <class:CloverRuntime>'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/database/transactions.rb:264:in `_transaction'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/database/transactions.rb:239:in `block in transaction'
web.1       | /Users/enescakir/.asdf/installs/ruby/3.2.5/lib/ruby/gems/3.2.0/gems/sequel-5.84.0/lib/sequel/connection_pool/threaded.rb:92:in `hold'
.
.
.

So, the main question is: why does it start to fail when freezing for the new version? The second exception likely arose because the first exception caused corruption, and it tried to reload the package.

@enescakir
Copy link
Author

It works fine at 1.163, but fails at 1.166

@mullermp
Copy link
Contributor

mullermp commented Oct 1, 2024

In aws-sdk-core 3.208.0 we merged an autoloading strategy for performance optimizations. It's likely the setup you have was just happen to be working prior to this and after autoloading the symptoms are showing. I still think that you are somehow requiring and loading the SDK twice, somehow, in your environment. This is probably a question best answered by you since you are familiar with your own setup however with more details about how you are loading and requiring the SDK, we could possibly help there.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 2, 2024
@enescakir
Copy link
Author

Thanks for the information on autoloading. It seems that was the issue for us.

We freeze everything to detect malicious self-modifying code from user input, so autoloading conflicts with it.

We need to load S3 module before freezing.
https://github.com/ubicloud/ubicloud/blob/db54ff9ded3c107823e89f59f4f6b8bc0145fa2f/loader.rb#L133

Copy link

github-actions bot commented Oct 2, 2024

This issue is now closed. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants