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

Audit usage of unwraps #1528

Closed
Frando opened this issue Sep 26, 2023 · 2 comments · Fixed by #1529 or #2046
Closed

Audit usage of unwraps #1528

Frando opened this issue Sep 26, 2023 · 2 comments · Fixed by #1529 or #2046
Assignees
Labels
bug Something isn't working c-iroh-net
Milestone

Comments

@Frando
Copy link
Member

Frando commented Sep 26, 2023

thread 'sync_big' panicked at 'called Result::unwrap() on an Err value: ()', iroh/iroh-net/src/magicsock.rs:1175:28. This happened at the end of the test, after calling node.shutdown()

@github-project-automation github-project-automation bot moved this to 📋 Backlog - unassigned issues in iroh Sep 26, 2023
flub added a commit that referenced this issue Sep 26, 2023
This response is not critical.  If someone dropped the receiver it's
just fine, it meant they didn't care about the response anymore.

This has occurred during shutdown.

Part of #1528
@divagant-martian divagant-martian changed the title Runtime panics unwrap on sending a message Sep 27, 2023
@divagant-martian divagant-martian linked a pull request Sep 27, 2023 that will close this issue
3 tasks
@divagant-martian
Copy link
Contributor

I'm splitting this as they are unrelated and closed by different solutions #1531

@dignifiedquire dignifiedquire added the bug Something isn't working label Sep 27, 2023
github-merge-queue bot pushed a commit that referenced this issue Sep 27, 2023
## Description

This response is not critical.  If someone dropped the receiver it's
just fine, it meant they didn't care about the response anymore.

This has occurred during shutdown.

Part of #1528

## Notes & open questions

## Change checklist

- [x] Self-review.
- [x] ~~Documentation updates if relevant.~~
- [x] ~~Tests if relevant.~~
@github-project-automation github-project-automation bot moved this from 📋 Backlog - unassigned issues to ✅ Done in iroh Sep 27, 2023
@flub flub reopened this Sep 28, 2023
@github-project-automation github-project-automation bot moved this from ✅ Done to 📋 Backlog - unassigned issues in iroh Sep 28, 2023
@flub
Copy link
Contributor

flub commented Sep 28, 2023

We should still audit other places for this. But it's painfully manual and error-prone.

@dignifiedquire dignifiedquire changed the title unwrap on sending a message Audit usage of unwraps Sep 28, 2023
@ramfox ramfox moved this from 📋 Backlog to 🔖 Ready in iroh Feb 6, 2024
@ramfox ramfox added this to the v0.13.0 milestone Feb 6, 2024
@dignifiedquire dignifiedquire modified the milestones: v0.13.0, v0.14.0 Feb 12, 2024
@flub flub moved this from 🔖 Ready to 🏗 In progress in iroh Feb 28, 2024
flub added a commit that referenced this issue Feb 28, 2024
This is an attempt at an audit of all the .unwrap() calls in iroh-net.
A few are replaced by .expect() with clear reasons why they're
reasonable.  Some are replaces by non-panicking versions which will
never take the failure branch because of the invariants that are
supposed to be upheld.

Closes #1528
github-merge-queue bot pushed a commit that referenced this issue Feb 29, 2024
## Description

This is an attempt at an audit of all the .unwrap() calls in iroh-net.
A few are replaced by .expect() with clear reasons why they're
reasonable.  Some are replaces by non-panicking versions which will
never take the failure branch because of the invariants that are
supposed to be upheld.

Closes #1528

## Notes & open questions

This was surprisingly horrible and long to do.  Oh well.
Worth reviewing in detail I'm afraid.

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- [x] Tests if relevant.
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working c-iroh-net
Projects
Archived in project
5 participants