S3 upload of empty files fails

Bug #1696800 reported by Lienhart Woitok
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
python-s3transfer (Ubuntu)
Fix Released
Undecided
Kamal Mostafa
Xenial
Won't Fix
Undecided
Kamal Mostafa
Yakkety
Won't Fix
Undecided
Kamal Mostafa
Zesty
Won't Fix
Undecided
Kamal Mostafa
Artful
Won't Fix
Undecided
Kamal Mostafa
Bionic
New
Undecided
Unassigned
Focal
New
Undecided
Unassigned
Hirsute
Won't Fix
Undecided
Unassigned
Impish
Won't Fix
Undecided
Kamal Mostafa

Bug Description

Trying to use awscli to upload files to S3 fails on empty files. The developers of awscli claim that this is a bug in ubuntus packaging, therefore I'm reporting it here since noone seems to have done before.

Details can be found in the following github issue:
https://github.com/aws/aws-cli/issues/2403

I'm currently affected by this bug and can test a new version, but I can not give any more insights into the issue or what needs to be done.

Tags: patch
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks Lienhart for the report, I must admit I don't know the backgrounds what might have happened here in regard to the packaging that was referred to in the discussions of the issue you linked.

Subscribing Kamal as he worked on the packaging to get his expertise on this.

Changed in awscli (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in awscli (Ubuntu Xenial):
status: New → Confirmed
Changed in awscli (Ubuntu Zesty):
status: New → Confirmed
Changed in awscli (Ubuntu Yakkety):
status: New → Confirmed
Changed in awscli (Ubuntu Xenial):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in awscli (Ubuntu Yakkety):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in awscli (Ubuntu Zesty):
assignee: nobody → Kamal Mostafa (kamalmostafa)
importance: Undecided → High
Changed in awscli (Ubuntu Yakkety):
importance: Undecided → High
Changed in awscli (Ubuntu Xenial):
importance: Undecided → High
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

This regression occurs in Xenial/Yakkety (1.11.13-1ubuntu1~16.*.0) and also in Zesty/Artful (1.11.44-1):

$ aws --version
aws-cli/1.11.44 Python/3.5.3 Linux/4.10.0-19-generic botocore/1.5.7

$ touch emptyfile

$ aws s3 cp emptyfile s3://kamal-test-1
upload failed: ./emptyfile to s3://kamal-test-1/emptyfile seek() takes 2 positional arguments but 3 were given

Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

The failure appears to be due to the incomplete implementation of seek() -- missing the optional 'whence' argument -- in python-s3transfer's ReadFileChunk method.

The attached patch to python-s3transfer fixes it in my testing. Before submitting the patch to the Ubuntu and upstream, I'd like an additional verification that it resolves the problem. Here's a PPA for Xenial which provides python-s3tranfer with the patch applied:

https://launchpad.net/~kamalmostafa/+archive/ubuntu/lp1696800

Please confirm that this PPA (installed along with the stock Ubuntu awscli package) fixes the problem for you.

tags: added: patch
Revision history for this message
Lienhart Woitok (lienhart-woitok) wrote :

Hello Kamal,

I can confirm that your proposed fix actually fixes the issue.

Thank you for your fast response.

Regards,
Lienhart

no longer affects: awscli (Ubuntu)
no longer affects: awscli (Ubuntu Xenial)
no longer affects: awscli (Ubuntu Yakkety)
no longer affects: awscli (Ubuntu Zesty)
no longer affects: awscli (Ubuntu Artful)
Changed in python-s3transfer (Ubuntu Xenial):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Yakkety):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Zesty):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Artful):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Xenial):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in python-s3transfer (Ubuntu Yakkety):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in python-s3transfer (Ubuntu Zesty):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in python-s3transfer (Ubuntu Artful):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This is still hanging on the GH review since ~a month.
@Kamal are you still driving this actively or just waiting on upstream in this case?

Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

@Christian, indeed I'm also just waiting on upstream. I've just added another comment to the github PR to ping the maintainer, kyleknap.

Revision history for this message
Peter C Baughman (pbaughman) wrote :
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

This has been fixed in https://github.com/boto/s3transfer/pull/102 and released upstream in s3transfer 0.3.7.

Note that Debian currently has version 0.5.0-1 in unstable. Therefore, once JJ is open for development and the syncs start, this should be fixed there.

I am also updating the affected series to include the new ones and closing the ones whose standard support no longer applies.

Changed in python-s3transfer (Ubuntu Xenial):
status: Confirmed → Won't Fix
Changed in python-s3transfer (Ubuntu Yakkety):
status: Confirmed → Won't Fix
Changed in python-s3transfer (Ubuntu Zesty):
status: Confirmed → Won't Fix
Changed in python-s3transfer (Ubuntu Artful):
status: Confirmed → Won't Fix
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Finally, the patch in https://github.com/boto/s3transfer/pull/102 should be backported to the affected series

Changed in python-s3transfer (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

The Hirsute Hippo has reached End of Life, so this bug will not be fixed for that release.

Changed in python-s3transfer (Ubuntu Hirsute):
status: New → Won't Fix
Revision history for this message
Lena Voytek (lvoytek) wrote :

Are we still planning on backporting the fix to bionic, focal, and impish?

Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Bumping this.

tags: added: server-todo
tags: removed: server-todo
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 21.10 (Impish Indri) has reached end of life, so this bug will not be fixed for that specific release.

Changed in python-s3transfer (Ubuntu Impish):
status: Confirmed → Won't Fix
Revision history for this message
Bryce Harrington (bryce) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.