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

Debian build failures #87

Closed
firefart opened this issue Aug 14, 2023 · 5 comments · Fixed by #92
Closed

Debian build failures #87

firefart opened this issue Aug 14, 2023 · 5 comments · Fixed by #92

Comments

@firefart
Copy link

firefart commented Aug 14, 2023

It looks like some of the tests are currently failing on the debian build infrastructure:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036256

@pin maybe you could have a look if you can reproduce them?

The traces maybe hint to one of the time.sleep calls which might add up

@elboulangero
Copy link

elboulangero commented Sep 20, 2023

Let me be a bit more specific. I just updated the package in Debian to latest version (3.0.0). Then I ran the unit tests for all architectures, 2 times (page is https://ci.debian.net/packages/g/golang-github-pin-tftp/). We have 8 architectures in Debian CI, so it means that the tests ran 16 times.

The test TestHookSuccess failed twice, as can be seen at:

Failure is:

591s === RUN   TestHookSuccess
591s     tftp_test.go:201: unexpected completed transfers count: 0
591s --- FAIL: TestHookSuccess (0.00s)

Note that the 2 failures were on different architectures, meaning that it's not really a hard failure that is architecture specific, but it seems more like the test is flaky.

From the top of your head, do you see any reason why the test TestHookSuccess would be flaky? The test command is go test -vet=off -v -p 4 github.com/pin/tftp github.com/pin/tftp/netascii, do you think it could be due to -p 4?

Thanks!

@pin
Copy link
Owner

pin commented Oct 28, 2023

Thank you for the report and for detailed repro steps. I was able to repro on amd64 using

time while true; do go test -vet=off -v -run TestHookSuccess || break; done

Takes only a few seconds on my computer :)

It is indeed a race. #92 is potential fix, going to sleep on it and let anyone opportunity to review and complain.

@elboulangero
Copy link

let anyone opportunity to review and complain

I definitely won't complain :D Happy to see that it was easy to reproduce, and apparently easy to fix.

I didn't even know how to run a particular test so far, thanks for sharing this one-liner, I'll re-use it for sure.

@firefart
Copy link
Author

Looks good for me thanks!

@pin pin closed this as completed in #92 Nov 12, 2023
@pin
Copy link
Owner

pin commented Nov 12, 2023

Just added v.3.1.0 release that includes #92

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 a pull request may close this issue.

3 participants