Skip to content

Fix initial outbound sync infinite loop #550

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

Conversation

TheBlueMatt
Copy link
Collaborator

Observed in testing as 100% CPU usage just sending the routing table over the wire. This would be a great opportunity to add some much-needed testing for this area of the code, so tagging as such - writing such tests is totally up for grabs, anyone is welcome to do so.

@TheBlueMatt TheBlueMatt added good first issue Good for newcomers MOAR TEST PLZ NEEDS MOAR TEST labels Mar 18, 2020
@TheBlueMatt TheBlueMatt added this to the 0.0.11 milestone Mar 18, 2020
@codecov
Copy link

codecov bot commented Mar 18, 2020

Codecov Report

Merging #550 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #550      +/-   ##
==========================================
+ Coverage   90.23%   90.31%   +0.07%     
==========================================
  Files          34       34              
  Lines       19182    19182              
==========================================
+ Hits        17309    17324      +15     
+ Misses       1873     1858      -15     
Impacted Files Coverage Δ
lightning/src/ln/peer_handler.rs 48.70% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 96.64% <0.00%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33b7c90...211ca8a. Read the comment docs.

@valentinewallace
Copy link
Contributor

Are you thinking tests that could've discovered the CPU usage somehow, or just ones that hit this LoC/function in general?

@TheBlueMatt
Copy link
Collaborator Author

I assume it should be possible to write a test which would have identified the fact that we'd never have finished syncing the full routing table (as long as there are more than a handful of entries).

@valentinewallace valentinewallace self-assigned this Mar 19, 2020
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 20, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 20, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 23, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 23, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 23, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 26, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 26, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 26, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 27, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 27, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 27, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 27, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 27, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
valentinewallace added a commit to valentinewallace/rust-lightning that referenced this pull request Mar 27, 2020
when all the channel messages can't fit into the buffer.

Adds a test for PR lightningdevkit#550.
@TheBlueMatt
Copy link
Collaborator Author

Merged via 556.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers MOAR TEST PLZ NEEDS MOAR TEST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants