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

Segmentation Fault when multi-part upload through proxy #4300

Open
1 task
hjia97 opened this issue Oct 12, 2024 · 0 comments
Open
1 task

Segmentation Fault when multi-part upload through proxy #4300

hjia97 opened this issue Oct 12, 2024 · 0 comments
Assignees
Labels
bug This issue is a confirmed bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue s3

Comments

@hjia97
Copy link

hjia97 commented Oct 12, 2024

Describe the bug

Hello! I want to ask and report an issue I encountered during multi-thread upload of Boto3.

I can reproduce the crash consistently on my Mac environment, and also an Alpine 3.20 Docker container.

I have an individual Python script that tries to multi-part upload a large file to S3 THROUGH a proxy. The thread count is set to be 40, or any large number.

Regression Issue

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

Expected Behavior

My python program would crash instantly.

zsh: segmentation fault  python3 upload.py

Current Behavior

I used lldb to track down to the exact broken point. It looks like OPENSSL library that's used by Boto3 is freeing a memory location that has already be freed.
Crash Screenshot

Reproduction Steps

The code I used:


boto_session = boto3.Session(aws_session_token=aws_session_token, aws_access_key_id=aws_access_key_id,
                             aws_secret_access_key=aws_secret_access_key)

transfer_config = {
    'multipart_threshold': THRESHOLD,
    'multipart_chunksize': CHUNKSIZE,
    'max_concurrency': 40,
    'use_threads': True}

tc = TransferConfig(max_bandwidth=MAX_BANDWITDTH, **transfer_config)

client_config = Config(endpoint_discovery_enabled=True,
                       proxies={'https': 'https://' + proxy},
                       proxies_config={
                           'proxy_client_cert': 'cert.pem',
                           'proxy_use_forwarding_for_https': True,
                           'proxy_ca_bundle': 'bundle.crt'
                       },
                       client_cert='cert.pem')

client = boto_session.client('s3', use_ssl=True, verify='ion_dev_certificate.pem',
                             config=client_config,
                             region_name=region_name)

client.upload_file(file_path, bucket, dest_path, Config=tc)

Possible Solution

No response

Additional Information/Context

The crash could be recreated consistently at my Mac, and a clean Alpine 3.20 Docker container.

SDK version used

[email protected],

Environment details (OS name and version, etc.)

Alpine3.20, Mac

@hjia97 hjia97 added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Oct 12, 2024
@adev-code adev-code self-assigned this Oct 18, 2024
@adev-code adev-code added s3 investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue s3
Projects
None yet
Development

No branches or pull requests

2 participants