apache / apache/opendal

bug: opendal python could hang while file.write

Open
#6,855 10 comments 1 reaction 1 assignee Claimed by @yihong0618 View on GitHub
bindings/python bug services/s3
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

### Describe the bug

When calling file.write (upload file to tencent cos by s3 scheme), there is a very slight chance that it hangs or does not return.
`strace -p ` output:
```
futex(0x7ff1bc73fe54, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=72667171, tv_nsec=27695447}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
futex(0x7ff1bc73fe58, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7ff1bc73fe54, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=72667171, tv_nsec=32828162}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
futex(0x7ff1bc73fe58, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7ff1bc73fe54, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=72667171, tv_nsec=37962838}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
futex(0x7ff1bc73fe58, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7ff1bc73fe54, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=72667171, tv_nsec=43111763}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
futex(0x7ff1bc73fe58, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x7ff1bc73fe54, FUTEX_WAIT_BITSET_PRIVATE, 0, {tv_sec=72667171, tv_nsec=48237693}, FUTEX_BITSET_MATCH_ANY) = -1 ETIMEDOUT (Connection timed out)
......
futex(0x7ff1bc73fe58, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
....
```
maybe file.write had not release GIL, all python's threads is hang.

### Steps to Reproduce

no

### Expected Behavior

no

### Additional Context

_No response_

### Are you willing to submit a PR to fix this bug?

- [ ] Yes, I would like to submit a PR.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.