[PR #2103] [MERGED] Fixed a deadlock bug when specifying iam role(IAMv2) #2337

Closed
opened 2026-03-04 02:05:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/s3fs-fuse/s3fs-fuse/pull/2103
Author: @ggtakec
Created: 1/29/2023
Status: Merged
Merged: 1/31/2023
Merged by: @gaul

Base: masterHead: fix_iamv2


📝 Commits (1)

  • 3665e9d Fixed a deadlock bug when specifying iam role(IAMv2)

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 src/curl.cpp (+3 -0)

📄 Description

Relevant Issue (if applicable)

#2098

Details

When IAM role was specified(IAMv2), there was a deadlock in token acquisition.

This logic is communicating with the HTTP PUT method, but since Content-Length=0 was not specified (Transfer-Encoding: chunked is specified), it was deadlocked while waiting for a response.

  • Before fixing(deadlocked)
PUT /latest/api/token HTTP/1.1
Host: 169.254.169.254
User-Agent: s3fs/1.91 (commit hash 16bc449; OpenSSL)
Accept: */*
Transfer-Encoding: chunked
X-aws-ec2-metadata-token-ttl-seconds: 21600
  • After fixing
PUT /latest/api/token HTTP/1.1
Host: 169.254.169.254
User-Agent: s3fs/1.91 (commit hash b5ffcac; OpenSSL)
Accept: */*
X-aws-ec2-metadata-token-ttl-seconds: 21600
Content-Length: 0

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/s3fs-fuse/s3fs-fuse/pull/2103 **Author:** [@ggtakec](https://github.com/ggtakec) **Created:** 1/29/2023 **Status:** ✅ Merged **Merged:** 1/31/2023 **Merged by:** [@gaul](https://github.com/gaul) **Base:** `master` ← **Head:** `fix_iamv2` --- ### 📝 Commits (1) - [`3665e9d`](https://github.com/s3fs-fuse/s3fs-fuse/commit/3665e9d0704eecd181f22bebd3e97fdbdc90584c) Fixed a deadlock bug when specifying iam role(IAMv2) ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/curl.cpp` (+3 -0) </details> ### 📄 Description ### Relevant Issue (if applicable) #2098 ### Details When IAM role was specified(IAMv2), there was a deadlock in token acquisition. This logic is communicating with the HTTP PUT method, but since `Content-Length=0` was not specified (`Transfer-Encoding: chunked` is specified), it was deadlocked while waiting for a response. - Before fixing(deadlocked) ``` PUT /latest/api/token HTTP/1.1 Host: 169.254.169.254 User-Agent: s3fs/1.91 (commit hash 16bc449; OpenSSL) Accept: */* Transfer-Encoding: chunked X-aws-ec2-metadata-token-ttl-seconds: 21600 ``` - After fixing ``` PUT /latest/api/token HTTP/1.1 Host: 169.254.169.254 User-Agent: s3fs/1.91 (commit hash b5ffcac; OpenSSL) Accept: */* X-aws-ec2-metadata-token-ttl-seconds: 21600 Content-Length: 0 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 02:05:00 +03:00
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#2337
No description provided.