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

Flaky tests #30591

Open
3 tasks
holiman opened this issue Oct 13, 2024 · 4 comments
Open
3 tasks

Flaky tests #30591

holiman opened this issue Oct 13, 2024 · 4 comments
Labels

Comments

@holiman
Copy link
Contributor

holiman commented Oct 13, 2024

Another round of flaky tests

  • TestUDPv5_lookup log
  • TestUDPv4_Lookup log
  • TestEth2PrepareAndGetPayload log
    • api_test.go:225: invalid number of transactions 0 != 1
@holiman
Copy link
Contributor Author

holiman commented Oct 14, 2024

From the v4 log

[00:27:16]     v4_udp.go:525: TRACE[10-12|17:54:22.059] >> PING/v4                                id=fb701727441d6fd5 addr=127.0.255.7:5000 err=<nil>
[00:27:16]     v4_udp.go:576: TRACE[10-12|17:54:22.060] << PONG/v4                                id=fb701727441d6fd5 addr=127.0.255.7:5000 err="unsolicited reply"
[00:27:16]     v4_lookup_test.go:161: error mismatch: got "unsolicited reply", want %!q(<nil>)

That's odd. We send a PING, then when we get the PONG, we deem it unsolicited reply

@holiman
Copy link
Contributor Author

holiman commented Oct 14, 2024

The v4 lookup test can be reproed locally with the following little change, simulating a bit of lag in the loop which handles adding the reply matcher

diff --git a/p2p/discover/v4_udp.go b/p2p/discover/v4_udp.go
index 29ae5f2c08..228175f6c8 100644
--- a/p2p/discover/v4_udp.go
+++ b/p2p/discover/v4_udp.go
@@ -466,6 +466,7 @@ func (t *UDPv4) loop() {
 			return
 
 		case p := <-t.addReplyMatcher:
+			time.Sleep(200 * time.Millisecond)
 			p.deadline = time.Now().Add(respTimeout)
 			plist.PushBack(p)
 

@holiman
Copy link
Contributor Author

holiman commented Oct 14, 2024

I wonder if maybe the respTimeout is too small, at 500ms, but OTOH the logs says 17:54:22.059] >> PING/v4 and 17:54:22.060] << PONG/v4 - that's only 10ms elapsed, so should not be removed in-between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants
@holiman and others