Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix panic when dealing with crashing discoveries#50

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
cmaglie merged 4 commits intomainfromfix_crashing_disc_handling
Sep 18, 2024

Conversation

cmaglie
Copy link
Member

@cmagliecmaglie commentedSep 13, 2024
edited
Loading

Previously, a pluggable discovery that crashed at startup would cause the client library to panic.

goroutine 11 [running]:testing.tRunner.func1.2({0x5eaae0, 0x7db1f0})/home/cmaglie/Software/go1.22.3/src/testing/testing.go:1631 +0x24atesting.tRunner.func1()/home/cmaglie/Software/go1.22.3/src/testing/testing.go:1634 +0x377panic({0x5eaae0?, 0x7db1f0?})/home/cmaglie/Software/go1.22.3/src/runtime/panic.go:770 +0x132github.com/arduino/pluggable-discovery-protocol-handler/v2.(*Client).Run(0xc0000fa090)/home/cmaglie/Workspace/pluggable-discovery-protocol-handler/client.go:281 +0x16egithub.com/arduino/pluggable-discovery-protocol-handler/v2.TestClient.func1(0xc0000b31e0)/home/cmaglie/Workspace/pluggable-discovery-protocol-handler/client_test.go:108 +0xcctesting.tRunner(0xc0000b31e0, 0x64c850)/home/cmaglie/Software/go1.22.3/src/testing/testing.go:1689 +0xfbcreated by testing.(*T).Run in goroutine 9/home/cmaglie/Software/go1.22.3/src/testing/testing.go:1742 +0x390exit status 2

This PR fixes this problem and cleans up the mutex usage in the library.

Related toarduino/arduino-cli#2665.

per1234 reacted with thumbs up emoji
Otherwise the call to:   msg, err := disc.waitMessage(..)may return both msg and err as nil, breaking the contract.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 32.79%. Comparing base(c563e77) to head(cc38790).
Report is 4 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@##             main      #50       +/-   ##===========================================+ Coverage   16.84%   32.79%   +15.95%===========================================  Files           4        4                 Lines         374      372        -2     ===========================================+ Hits           63      122       +59+ Misses        294      228       -66- Partials       17       22        +5
FlagCoverage Δ
unit32.79% <100.00%> (+15.95%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report?Share it here.

@cmagliecmaglie added type: imperfectionPerceived defect in any part of project topic: codeRelated to content of the project itself labelsSep 13, 2024
@cmagliecmaglie merged commitfbec7bc intomainSep 18, 2024
32 checks passed
@cmagliecmaglie deleted the fix_crashing_disc_handling branchSeptember 18, 2024 14:22
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@umbynosumbynosAwaiting requested review from umbynos

@MatteoPologrutoMatteoPologrutoAwaiting requested review from MatteoPologruto

1 more reviewer

@alessio-peruginialessio-peruginialessio-perugini approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@cmagliecmaglie

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@cmaglie@codecov-commenter@alessio-perugini

[8]ページ先頭

©2009-2025 Movatter.jp