Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few deadlock in tcp/iob #4257

Merged
merged 3 commits into from
Aug 2, 2021
Merged

Fix a few deadlock in tcp/iob #4257

merged 3 commits into from
Aug 2, 2021

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Jul 30, 2021

Summary

Fix a few deadlock in tcp/iob.
see the commit messages for details.

Impact

tcp/iob

Testing

tested with some of the other patches in #4184

yamt added 3 commits July 30, 2021 12:56
If threads are blocking for throttled allocation,
g_throttle_sem.semcount doesn't represent the number of
usable IOBs well.

Note: For non-throttled allocations, the g_iob_committed mechanism
is a rescue. But there is no equivalent for throttled allocations.
Ensure to put the wrb back onto the write_q when blocking
on iob allocation. Otherwise, it can deadlock with other
threads doing the same thing.
@yamt
Copy link
Contributor Author

yamt commented Jul 30, 2021

i will restart jobs as the failure looks unrelated to this PR.

curl: (6) Could not resolve host: github.com

@xiaoxiang781216 xiaoxiang781216 merged commit 98ec46d into apache:master Aug 2, 2021
yamt added a commit to yamt/incubator-nuttx that referenced this pull request Aug 6, 2021
Fix a wrong assertion in:

```
commit 98ec46d
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Tue Jul 20 09:10:43 2021 +0900

    tcp_send_buffered.c: fix iob allocation deadlock

    Ensure to put the wrb back onto the write_q when blocking
    on iob allocation. Otherwise, it can deadlock with other
    threads doing the same thing.
```

I forget to submit this with apache#4257
yamt added a commit to yamt/incubator-nuttx that referenced this pull request Aug 6, 2021
Fix a wrong assertion in:

```
commit 98ec46d
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Tue Jul 20 09:10:43 2021 +0900

    tcp_send_buffered.c: fix iob allocation deadlock

    Ensure to put the wrb back onto the write_q when blocking
    on iob allocation. Otherwise, it can deadlock with other
    threads doing the same thing.
```

I forget to submit this with apache#4257
xiaoxiang781216 pushed a commit that referenced this pull request Aug 6, 2021
Fix a wrong assertion in:

```
commit 98ec46d
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Tue Jul 20 09:10:43 2021 +0900

    tcp_send_buffered.c: fix iob allocation deadlock

    Ensure to put the wrb back onto the write_q when blocking
    on iob allocation. Otherwise, it can deadlock with other
    threads doing the same thing.
```

I forget to submit this with #4257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants