[GH-ISSUE #1939] HTTP response code 400 when run command "sed" to replace charecter on S3 #976

Closed
opened 2026-03-04 01:50:23 +03:00 by kerem · 4 comments
Owner

Originally created by @sontt710 on GitHub (Apr 29, 2022).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1939

Version of s3fs being used (s3fs --version)

s3fs-fuse-1.89-1.el7.x86_64

Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)

V1.89

Kernel information (uname -r)

3.10.0-957.10.1.el7.x86_64

GNU/Linux Distribution, if applicable (cat /etc/os-release)

CentOS Linux release 7.6.1810 (Core)

s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)

[ERR] curl.cpp:RequestPerform(2318): HTTP response code 400, returning EIO. Body Text: <Error><Code>Inval
idArgument</Code><Message>Range specified is not valid for source object of size: 42896152</Message><ArgumentName>x-amz-copy-sourc
e-range</ArgumentName><ArgumentValue>bytes=0-42896263</ArgumentValue><RequestId>1J7SFVMWTWM7077P</RequestId><HostId>lDmsZSLaelUXyL
Zin52vIY3yg4j9RuEXD58do1LYa1iAnTS23b9ClihF5KSCNbphHUGM/68lUTM=</HostId></Error>

Details about issue

  • I have the file on S3, and I want to replace a character on this file, file size is ~45 MB, but I got the unexpected error, and the log show like that.
  • I send a support email to AWS Team to get more, and the answers like an attachment. Does anyone have experience on this issue?
Screenshot at Apr 29 15-40-32

Thanks.

Originally created by @sontt710 on GitHub (Apr 29, 2022). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1939 #### Version of s3fs being used (s3fs --version) s3fs-fuse-1.89-1.el7.x86_64 #### Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse) V1.89 #### Kernel information (uname -r) 3.10.0-957.10.1.el7.x86_64 #### GNU/Linux Distribution, if applicable (cat /etc/os-release) CentOS Linux release 7.6.1810 (Core) #### s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs) ``` [ERR] curl.cpp:RequestPerform(2318): HTTP response code 400, returning EIO. Body Text: <Error><Code>Inval idArgument</Code><Message>Range specified is not valid for source object of size: 42896152</Message><ArgumentName>x-amz-copy-sourc e-range</ArgumentName><ArgumentValue>bytes=0-42896263</ArgumentValue><RequestId>1J7SFVMWTWM7077P</RequestId><HostId>lDmsZSLaelUXyL Zin52vIY3yg4j9RuEXD58do1LYa1iAnTS23b9ClihF5KSCNbphHUGM/68lUTM=</HostId></Error> ``` ### Details about issue - I have the file on S3, and I want to replace a character on this file, file size is ~45 MB, but I got the unexpected error, and the log show like that. - I send a support email to AWS Team to get more, and the answers like an attachment. Does anyone have experience on this issue? <img width="1049" alt="Screenshot at Apr 29 15-40-32" src="https://user-images.githubusercontent.com/31494976/165911949-017ca4ec-a777-4e5a-b192-6fce33081e3c.png"> Thanks.
kerem closed this issue 2026-03-04 01:50:23 +03:00
Author
Owner

@ggtakec commented on GitHub (May 22, 2022):

@sontt710 Thank you for contacting us about the problem.

I would appreciate it if you could give me a little more information to investigate this issue.

  • s3fs options
  • The options of the sed command(Are you using the --in-place ( -i) option?)
  • Is the target file in the directory mounted by s3fs?
  • Original file size and modified file size(Since the upload has failed, please let me know if you know the file size assuming that it will not fail)

From the content of the error, it seems that there was a problem with the file size when using the S3 - Copy API.

If possible, is it possible to try it with the latest version v1.91 (or master code)?

While investigating this case, we also detected another problem #1947 (although the relationship with this issue is unknown), so it would be helpful if you could provide the above information.

<!-- gh-comment-id:1133854850 --> @ggtakec commented on GitHub (May 22, 2022): @sontt710 Thank you for contacting us about the problem. I would appreciate it if you could give me a little more information to investigate this issue. - s3fs options - The options of the `sed` command(Are you using the `--in-place` (` -i`) option?) - Is the target file in the directory mounted by s3fs? - Original file size and modified file size(Since the upload has failed, please let me know if you know the file size assuming that it will not fail) From the content of the error, it seems that there was a problem with the file size when using the S3 - Copy API. If possible, is it possible to try it with the latest version v1.91 (or master code)? While investigating this case, we also detected another problem #1947 (although the relationship with this issue is unknown), so it would be helpful if you could provide the above information.
Author
Owner

@sontt710 commented on GitHub (May 23, 2022):

Hello @ggtakec

  • s3fs options
    allow_other,umask=000,mp_umask=000,multireq_max=10,max_dirty_data=102400,endpoint=ap-southeast-1,dbglevel=warn
  • The options of the sed command(Are you using the --in-place ( -i) option?)

Yes

  • Is the target file in the directory mounted by s3fs?

Yes

  • Original file size and modified file size(Since the upload has failed, please let me know if you know the file size assuming that it will not fail)

Original file size ~45MB
modified file size ~40MB. We tried to remove some character on original file.

I see it is a different issue, not relevant.

Thanks.

<!-- gh-comment-id:1134449053 --> @sontt710 commented on GitHub (May 23, 2022): Hello @ggtakec - s3fs options allow_other,umask=000,mp_umask=000,multireq_max=10,max_dirty_data=102400,endpoint=ap-southeast-1,dbglevel=warn - The options of the sed command(Are you using the --in-place ( -i) option?) > Yes - Is the target file in the directory mounted by s3fs? > Yes - Original file size and modified file size(Since the upload has failed, please let me know if you know the file size assuming that it will not fail) > Original file size ~45MB > modified file size ~40MB. We tried to remove some character on original file. - While investigating this case, we also detected another problem https://github.com/s3fs-fuse/s3fs-fuse/issues/1947 (although the relationship with this issue is unknown), so it would be helpful if you could provide the above information. > I see it is a different issue, not relevant. Thanks.
Author
Owner

@ggtakec commented on GitHub (May 31, 2022):

@sontt710
I'm sorry, I notice that you are using s3fs v1.89.
This issue occurred in v1.89 and it has been fixed in v1.90.

To solve this issue, you can use the latest version v1.91 or the binaries built from the master branch.

FYI.
Issue #1947 had nothing to do with this issue.
However, I think you don't have to specify the umask and mp_umask options when using sed(with --in-place).

<!-- gh-comment-id:1141975405 --> @ggtakec commented on GitHub (May 31, 2022): @sontt710 I'm sorry, I notice that you are using s3fs v1.89. This issue occurred in v1.89 and it has been fixed in v1.90. To solve this issue, you can use the latest version v1.91 or the binaries built from the master branch. FYI. Issue #1947 had nothing to do with this issue. However, I think you don't have to specify the `umask` and `mp_umask` options when using sed(with `--in-place`).
Author
Owner

@sontt710 commented on GitHub (Jun 1, 2022):

Hello @ggtakec,

Thanks so much. I tried to with version v1.91, issue was resolved.

<!-- gh-comment-id:1143364192 --> @sontt710 commented on GitHub (Jun 1, 2022): Hello @ggtakec, Thanks so much. I tried to with version v1.91, issue was resolved.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#976
No description provided.