-
Notifications
You must be signed in to change notification settings - Fork 8.3k
SIGSEGV while uploading to S3 for part > INT_MAX #47679
Copy link
Copy link
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-object-storageObject storage connectivity (S3/GCS/Azure) including credentials, retries, multipart, etc.Object storage connectivity (S3/GCS/Azure) including credentials, retries, multipart, etc.crashCrash / segfault / abortCrash / segfault / abort
Description
Reproducer:
INSERT INTO FUNCTION s3('https://test.s3.us-east-1.amazonaws.com/clickhouse/test.csv', '', '', 'TSV')
SETTINGS s3_truncate_on_insert = 1, s3_max_single_part_upload_size = '10Gi'
SELECT repeat('a', 1024)
FROM numbers((pow(2, 30) * 5) / 1024)
SETTINGS s3_truncate_on_insert = 1, s3_max_single_part_upload_size = '10Gi'Note, that usually it is not a problem since multi part upload is used, but when you turn it OFF you can see the problem.
And the problem is the stringstream::gcount breaks stringstream when it holds more the INT_MAX
Here is a patch in llvm-project - https://reviews.llvm.org/D146294
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-object-storageObject storage connectivity (S3/GCS/Azure) including credentials, retries, multipart, etc.Object storage connectivity (S3/GCS/Azure) including credentials, retries, multipart, etc.crashCrash / segfault / abortCrash / segfault / abort