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

Windows ARM64 build crashes inside openssl #23811

Closed
jdm opened this issue Jul 19, 2019 · 5 comments
Closed

Windows ARM64 build crashes inside openssl #23811

jdm opened this issue Jul 19, 2019 · 5 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Jul 19, 2019

Exception thrown at 0x00007FFA7A08C53C (KernelBase.dll) in ServoApp.exe: 0x00000005: Access is denied.
KernelBase.dll!00007ffa7a08c53c()
rpcrt4.dll!00007ffa7cab4188()
rpcrt4.dll!00007ffa7cab413c()
rpcrt4.dll!00007ffa7cb4a73c()
rpcrt4.dll!00007ffa7cb49c24()
wkscli.dll!00007ffa72bc1f90()
netapi32.dll!00007ffa619e168c()
libeay32.dll!00007ffa504793ac()
libeay32.dll!00007ffa50478394()
libeay32.dll!00007ffa50478dc8()
ssleay32.dll!00007ffa526640e8()
simpleservo.dll!_ZN7openssl3ssl17SslContextBuilder3new17h2d90da9de40e369dE�()
simpleservo.dll!_ZN7openssl3ssl9connector12SslConnector7builder17h7937d5c35f57c72eE�()
simpleservo.dll!_ZN3net9connector28create_ssl_connector_builder17h01c6b2a5866a8ce1E�()
simpleservo.dll!_ZN3net15resource_thread22ResourceChannelManager5start17h0c137320736d6f60E�()
simpleservo.dll!_ZN14profile_traits3mem12ProfilerChan25run_with_memory_reporting17h7eb7d79e83edaf14E�()
simpleservo.dll!_ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h4f72dd9aab6bb33cE�()
simpleservo.dll!_ZN3std9panicking3try7do_call17h0d45d3e4658c9141E.llvm.3219183524764233067�()
simpleservo.dll!panic_abort::__rust_maybe_catch_panic() Line 31
	at /rustc/088b987307b91612ab164026e1dcdd0129fdb62b\/src\libpanic_abort\lib.rs(31)
simpleservo.dll!_ZN44_$LT$$RF$T$u20$as$u20$core..fmt..Display$GT$3fmt17hcf30c7f7c0723cc6E�()
simpleservo.dll!alloc::boxed::{{impl}}::call_once<(),FnOnce<()>>() Line 759
	at /rustc/088b987307b91612ab164026e1dcdd0129fdb62b\src\liballoc\boxed.rs(759)
simpleservo.dll!std::sys::windows::thread::{{impl}}::new::thread_start() Line 47
	at /rustc/088b987307b91612ab164026e1dcdd0129fdb62b\/src\libstd\sys\windows\thread.rs(47)
kernel32.dll!00007ffa7c754974()
ntdll.dll!00007ffa7cc89694()
@jdm jdm added this to To do in UWP port via automation Jul 19, 2019
@jdm
Copy link
Member Author

@jdm jdm commented Jul 19, 2019

I see two paths forward:

I'm leaning towards the second option.

@jdm
Copy link
Member Author

@jdm jdm commented Jul 19, 2019

Current plan:

  • rely on https://github.com/alexcrichton/openssl-src-rs/ for a straightforward openssl build
  • create a crate that depends on openssl-src and builds it for aarch64-pc-windows-msvc and x86_64-pc-windows-msvc
  • take those binaries, zip them up, put them on s3 and update the build system to use the new zip

This requires making a change to the openssl build system to generate DLLs that have the expected filename that openssl-sys requires, so I'll probably make a fork with the change so it's easy to upgrade openssl and generate new binaries in the future.

@ras0219-msft
Copy link

@ras0219-msft ras0219-msft commented Jul 20, 2019

get the source for https://github.com/microsoft/vcpkg/tree/77cfd20b83e71a0c513658e7c4d049d4039905af/ports/openssl-windows, make a local debug build, figure out how to get openssl-sys to link against it, try and figure out the source of the crash, fix it, create new binaries with the resulting fix

I'm not sure about how to make openssl-sys to link against it, but I will note that vcpkg will always create a debug build by default in addition to the release build; so extracting the sources should hopefully not be needed.

Additionally, we would greatly appreciate an issue describing the root cause because we definitely want this fixed in upstream vcpkg :)

@jdm jdm added this to To do in Windows ARM64 Jul 22, 2019
@jdm
Copy link
Member Author

@jdm jdm commented Jul 22, 2019

Using a more recent openssl made the crash disappear. I will try to find time to investigate the crash in the vcpkg version at some point, but it's no longer a high priority for me given the other parts of this project competing for my attention.

@jdm jdm moved this from To do to In progress in Windows ARM64 Jul 22, 2019
@jdm jdm mentioned this issue Jul 23, 2019
4 of 4 tasks complete
bors-servo added a commit that referenced this issue Jul 24, 2019
Use openssl dependency that works on arm64.

This uses binaries that I generated with https://github.com/servo/openssl-src-rs/tree/servo and https://github.com/servo/openssl/tree/servo that don't crash on arm64.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23811
- [x] These changes do not require tests can't run automated tests for arm64 windows.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23835)
<!-- Reviewable:end -->
UWP port automation moved this from To do to Done Jul 24, 2019
Windows ARM64 automation moved this from In progress to Done Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
UWP port
  
Done
Windows ARM64
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.