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(notary): implement timeout for notarization #639

Merged
merged 8 commits into from
Oct 22, 2024
Merged

Conversation

yuroitaki
Copy link
Member

Putting a timeout for each notarization task to prevent it from hanging when prover doesn't notify notary to stop or err; else it might lead to unreleased memory piling up

@yuroitaki yuroitaki requested review from heeckhau and sinui0 October 16, 2024 02:52
@yuroitaki yuroitaki requested a review from themighty1 October 16, 2024 02:57
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 54.35%. Comparing base (38104bc) to head (15ef8b8).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
crates/notary/server/src/service.rs 0.00% 10 Missing ⚠️
crates/notary/server/src/service/tcp.rs 0.00% 1 Missing ⚠️
crates/notary/server/src/service/websocket.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #639      +/-   ##
==========================================
+ Coverage   54.32%   54.35%   +0.03%     
==========================================
  Files         192      192              
  Lines       20486    20474      -12     
==========================================
  Hits        11129    11129              
+ Misses       9357     9345      -12     

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

@yuroitaki
Copy link
Member Author

For a series of hung notarizations, the memory profiles before and after the fix are shown below:

Below the fix:
image

After the fix:
image

Copy link
Member

@sinui0 sinui0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but lets move this timeout into config

crates/notary/server/src/service.rs Outdated Show resolved Hide resolved
@yuroitaki yuroitaki requested a review from sinui0 October 21, 2024 09:06
@yuroitaki yuroitaki merged commit 2c045e5 into dev Oct 22, 2024
7 of 8 checks passed
@heeckhau heeckhau deleted the fix/notarize-timeout branch October 22, 2024 08:20
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