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

net/smtp: TestTLSClient failures with "connection reset by peer" on freebsd #19229

Open
dr2chase opened this issue Feb 21, 2017 · 10 comments
Open
Labels
ExpertNeeded OS-FreeBSD Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@dr2chase
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.8+ (development)

What operating system and processor architecture are you using (go env)?

freebsd-amd64-gce101

What did you do?

Tried to run Trybots for an unrelated change:
https://go-review.googlesource.com/c/37333/#message-ae31a67c5f6927959d8d507bc5ae951e01fbc4e7

Observed failure, followed instructions to check https://build.golang.org

In the first column for freebsd-x64 (the left-hand one), I clicked through some of the failures in that column, and noticed the repeated occurrence of

--- FAIL: TestTLSClient (0.00s)
	smtp_test.go:610: client error: close tcp 127.0.0.1:46828->127.0.0.1:46827: connection reset by peer
FAIL
FAIL	net/smtp	0.016s

which is also what besmirched my otherwise-clean TryBot run.

@bradfitz bradfitz changed the title net/smtp/TestTLSClient is flaky on freebsd-amd64-gce101 net/smtp: TestTLSClient is flaky on freebsd-amd64-gce101 Feb 24, 2017
@bradfitz bradfitz added help wanted Testing An issue that has been verified to require only test changes, not just a test failure. OS-FreeBSD labels Feb 24, 2017
@bradfitz bradfitz added this to the Go1.9 milestone Feb 24, 2017
@josharian
Copy link
Contributor

Happened again: https://storage.googleapis.com/go-build-log/82d5c3e9/freebsd-amd64-gce101_318ec227.log. Going to mail a CL disabling the test for now.

josharian added a commit to josharian/go that referenced this issue Mar 1, 2017
Updates golang#19229

Change-Id: Ibe1ea090ac064c7eb5abd225214ab43744bafbc4
@gopherbot
Copy link

CL https://golang.org/cl/37653 mentions this issue.

gopherbot pushed a commit that referenced this issue Mar 1, 2017
Updates #19229

Change-Id: Ibe1ea090ac064c7eb5abd225214ab43744bafbc4
Reviewed-on: https://go-review.googlesource.com/37653
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@bradfitz bradfitz modified the milestones: Go1.10, Go1.9 Jul 6, 2017
@ianlancetaylor ianlancetaylor modified the milestones: Go1.10, Go1.11 Jan 3, 2018
@neelance
Copy link
Member

This test is failing with my fake networking for js/wasm. It might be flaky on freebsd/amd64 for the same reason. Here is what I found:

  1. client sends SMTP "QUIT"
  2. server receives "QUIT", closes TLS connection and socket
  3. socket "close" propagates to client, also closes the socket at the client
  4. client wants to close TLS connection, which wants to send a TLS "close notify", but the socket got already closed
  5. the error bubbles up and smtp.SendMail returns it

@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018
@gopherbot
Copy link

Change https://golang.org/cl/120958 mentions this issue: net: re-implement built-in simulated network on JS and NaCl

@bcmills
Copy link
Contributor

bcmills commented Dec 13, 2018

Another failure, this time on freebsd-386-11_2: https://build.golang.org/log/f96ab0392ed0c683f8649fbb3686e9d74e3b30bb

--- FAIL: TestTLSClient (0.01s)
    smtp_test.go:746: client error: close tcp 127.0.0.1:46749->127.0.0.1:46748: connection reset by peer
FAIL
FAIL	net/smtp	0.049s

@bcmills bcmills changed the title net/smtp: TestTLSClient is flaky on freebsd-amd64-gce101 net/smtp: TestTLSClient is flaky on freebsd Dec 8, 2020
@bcmills bcmills changed the title net/smtp: TestTLSClient is flaky on freebsd net/smtp: TestTLSClient failures with "connection reset by peer" on freebsd Feb 19, 2021
@gopherbot
Copy link

Change https://golang.org/cl/370137 mentions this issue: net/smtp: skip TestTLSSClient on all freebsd platforms

gopherbot pushed a commit that referenced this issue Dec 8, 2021
This test seems like it needs attention from a TLS and/or FreeBSD
expert. In the meantime, it needs to stop causing noise on the build
dashboard.

For #19229

Change-Id: If7e9e3533ae7cb29006a670c3e9df90512dcf9f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/370137
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@bcmills
Copy link
Contributor

bcmills commented Dec 8, 2021

A proper fix for this will likely need someone with at least some expertise in the TLS protocol and/or the FreeBSD network stack (i.e. not me 😅).

@bcmills bcmills modified the milestones: Unplanned, Backlog Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExpertNeeded OS-FreeBSD Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

7 participants