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

Issue with BufferedSSLSocket #31

Open
JonathanTron opened this issue Feb 5, 2024 · 0 comments
Open

Issue with BufferedSSLSocket #31

JonathanTron opened this issue Feb 5, 2024 · 0 comments

Comments

@JonathanTron
Copy link

Hi, I'm currently trying to update ftpd to work with recent ruby versions, and I'm having a hard time having the tests pass.

You can see my changes in wconrad/ftpd#59.

To sumarize the problem, there are SSL tests failing 99% of the time on Linux VMs (amd64, Github Action). They never fail on my Mac (arm64) and fail sometimes when ran in docker (arm64, linux/amd64).

You can trigger the error by running bundle exec cucumber features/ftp_server/implicit_tls.feature, the result is always:

550 Connection reset by peer
       (Net::FTPPermError)

I found the issue goes away when I remove the changes from f55e9d5.

As far as I can tell, overriding rbuf_fill when shutdown has been called, prevents the current exchange from finishing properly.

I'm not sure if this change is still relevant today, there was no tests so I'm not even sure what it was supposed to fix exactly.

I found socketry/async-io#61, referencing ruby/openssl#609, and based on the changes applied, I tried to replace the rbuf_fill override with a simpler change in shutdown:

def shutdown(*args)
  @io.__send__(:stop)
end

This fixes the issue and seems to allow the tests to be fast (as opposed to no doing anything in shutdown for example).

Do you find this change reasonable? If you do, then I can submit a PR for it.

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

No branches or pull requests

1 participant