Opened 2 months ago

Closed 2 months ago

Last modified 8 weeks ago

#33643 closed defect (fixed)

Appveyor: OpenSSL version mismatch in unit tests, 2020 edition

Reported by: teor Owned by: nickm
Priority: Medium Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version: Tor: 0.3.4.2-alpha
Severity: Normal Keywords: tor-ci-fail, appveyor, windows, 035-backport, 041-backport, 042-backport, 043-backport, consider-backport-after-ci-passes
Cc: catalyst, ahf Actual Points: 0.3
Parent ID: Points: 0.5
Reviewer: Sponsor:

Description (last modified by teor)

It's happened again:

OpenSSL library version 1.1.1d did not begin with header version 1.1.1e.

https://ci.appveyor.com/project/torproject/tor/builds/31549942/job/v0i9svtg78gqln1v#L6380

Just like #32449, #28574, #28399 and #25942.

We think our tests are fragile, because they are not copying the necessary libraries into ${env:build}/src/test from C:/mingw32/lib:

ssl
crypto
lzma
event
zstd

We already copy zlib and ssp at https://github.com/ahf/tor/blob/master/.appveyor.yml#L98-L99 .

These libraries might have different dll prefixes or suffixes, for example, OpenSSL is:

/mingw32/bin/libcrypto-1_1.dll
/mingw32/bin/libssl-1_1.dll

https://packages.msys2.org/package/mingw-w64-i686-openssl

We might also want to copy these libraries into the same directory as the tor executable ${env:build}/src/app, before we run the tests that launch tor.

Child Tickets

Change History (12)

comment:1 Changed 2 months ago by teor

Description: modified (diff)

comment:2 Changed 2 months ago by teor

Actual Points: 0.3
Cc: catalyst ahf added
Status: newneeds_information
Version: Tor: 0.3.4.2-alpha

Honestly, I'm a bit stuck here. I copied the files, and set PKG_CONFIG_PATH, but we're still getting the OpenSSL error (on i686 only).

I wonder if the package is broken?

I wonder if the previous tickets might help us solve this issue?
#32449, #28574, #28399, #25942

See my (broken) PR:

comment:3 Changed 2 months ago by teor

Status: needs_informationneeds_revision

Hmm actually CI is still running on the latest version of my PR, so maybe there's hope.

comment:4 Changed 2 months ago by nickm

No, it seems to be failing still. My guess is that the package is simply installed wrong, with a header version that doesn't match the library version.

One possibility is for us to disable this test on Appveyor, since they seem not to have a reliable process for keeping this library in sync with the headers.

comment:5 Changed 2 months ago by nickm

Owner: set to nickm
Status: needs_revisionaccepted

comment:6 Changed 2 months ago by nickm

Status: acceptedneeds_review

If we're willing to skip this test, then...

Possible fix: ticket33643_skip_035
PR: https://github.com/torproject/tor/pull/1813

(appveyor hasn't passed yet, so i might be messing this up.)

comment:7 Changed 2 months ago by nickm

Appveyor is passing with this patch.

comment:8 Changed 2 months ago by nickm

Squashed and force-pushed.

comment:9 Changed 2 months ago by nickm

I've made merge-forward branches as ticket33643_skip_{041,042,043,master}. There was a conflict on 041 but nowhere else.

Here is an example PR on master: https://github.com/torproject/tor/pull/1815

comment:10 Changed 2 months ago by teor

Resolution: fixed
Status: needs_reviewclosed

Just a reminder that backports generally need:

  • a PR for the earliest maint branch
  • a PR for any conflicts
  • a test PR to master

I made a PR for the 0.4.1 conflict:

And merged to 0.3.5 and later.

comment:11 in reply to:  4 Changed 2 months ago by teor

Replying to nickm:

No, it seems to be failing still. My guess is that the package is simply installed wrong, with a header version that doesn't match the library version.

Yes, I think you're right. The last two times we've fixed this issue (#32449, #28574) we have toggled installing openssl via pacman. So pacman (or the appveyor image) is likely to be the issue.

Toggling library installs is not really sustainable, so I like your solution.

I opened #33673 to merge the robustness fixes in my first PR.

comment:12 Changed 8 weeks ago by teor

Milestone: Tor: 0.4.4.x-finalTor: 0.3.5.x-final
Note: See TracTickets for help on using tickets.