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

GH-356 Work around 07_sslecho.t and 44_sess.t failures with older Perls on Windows. #366

Merged
merged 4 commits into from Feb 2, 2022

Conversation

h-vn
Copy link
Contributor

@h-vn h-vn commented Feb 1, 2022

Tests 07_sslecho.t and 44_sess.t sometimes fail on Windows. This seems to happen with older Perls where the possible cause is this bug described, and fixed, in 5.20.0 changes:

On Windows, perl no longer calls CloseHandle() on a socket handle. This makes debugging easier on Windows by removing certain irrelevant bad handle exceptions. It also fixes a race condition that made socket functions randomly fail in a Perl process with multiple OS threads, and possible test failures in dist/IO/t/cachepropagate-tcp.t. [perl #120091/118059]

Details in: Perl/perl5#12979

The failure described in GH-356 seems to go away with these changes.

Calling 'sleep 1' before each connect to server seems to change something,
simply just timing, so that the tests appear to successfully run each time.
It seems that this is the Perl bug that causes the socket failures:
  Perl/perl5#12979

Also add sleeps to 44_sess.t because it fails similarly to 07_sslecho.t.
@h-vn h-vn merged commit d82b47c into master Feb 2, 2022
h-vn added a commit that referenced this pull request Feb 2, 2022
…ls on Windows. (#366)

Calling a one second sleep before each connect to the server seems fix the
occasionally occurring failures. Sleep is now done when running on Windows and
Perl is earlier than 5.20.0.

For the details, see GH-356 and look for CloseHandle() in Perl 5.20.0 changelog.
It seems that this is the Perl bug that causes the socket failures:
  Perl/perl5#12979
@h-vn h-vn deleted the GH-356-fix-test-07-sslecho branch February 10, 2022 16:35
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 this pull request may close these issues.

Net-SSLeay-1.91_03: Sometimes t/local/07_sslecho.t seems to hang on Strawberry Perl 5.18.4
1 participant