-
Notifications
You must be signed in to change notification settings - Fork 440
wasm-pack build segfaults #1203
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
Comments
I think it should be or maybe |
That gives the same error with the same stack trace unfortunately. IIUC, wasm-pack is attempting to download something with libcurl, which is using OpenSSL, which then crashes for some reason. My |
I get a segfault too.
Stacktrace:
|
As a workaround, I compiled wasm-pack with non-optional openssl crate and disabled all features. This effectively disables the vendored build. I no longer get segfaults. |
Have the same issue. Seems like something gone wrong with openSSL rustc 1.68.0-nightly #0 ___pthread_rwlock_wrlock (rwlock=0x35) at pthread_rwlock_wrlock.c:26 #1 0x00007ffff77c98fe in CRYPTO_THREAD_write_lock () from /usr/lib/libcrypto.so.3 #2 0x00007ffff7836e15 in ?? () from /usr/lib/libcrypto.so.3 #3 0x00007ffff7836eb1 in X509_STORE_add_cert () from /usr/lib/libcrypto.so.3 #4 0x00007ffff781b500 in X509_load_cert_crl_file_ex () from /usr/lib/libcrypto.so.3 #5 0x00007ffff781b656 in ?? () from /usr/lib/libcrypto.so.3 #6 0x00007ffff783697a in X509_STORE_load_file_ex () from /usr/lib/libcrypto.so.3 #7 0x00007ffff7f62fe2 in populate_x509_store (store=0x7ffff0000ba0, data=0x7ffff0001910, cf=0x7ffff0009ea0) at /usr/src/debug/curl/curl-7.87.0/lib/vtls/openssl.c:3262 #8 set_up_x509_store (backend=0x7ffff0009e70, data=0x7ffff0001910, cf=0x7ffff0009ea0) at /usr/src/debug/curl/curl-7.87.0/lib/vtls/openssl.c:3454 #9 ossl_connect_step1 (cf=cf@entry=0x7ffff0009ea0, data=data@entry=0x7ffff0001910) at /usr/src/debug/curl/curl-7.87.0/lib/vtls/openssl.c:3776 #10 0x00007ffff7f64327 in ossl_connect_common (cf=0x7ffff0009ea0, data=0x7ffff0001910, nonblocking=true, done=0x7ffff722f56c) at /usr/src/debug/curl/curl-7.87.0/lib/vtls/openssl.c:4385 #11 0x00007ffff7f5bbdc in ssl_connect_nonblocking (done=0x7ffff722f56c, data=0x7ffff0001910, cf=0x7ffff0009ea0) at /usr/src/debug/curl/curl-7.87.0/lib/vtls/vtls.c:357 #12 ssl_cf_connect (done=0x7ffff722f56c, blocking=false, data=0x7ffff0001910, cf=0x7ffff0009ea0) at /usr/src/debug/curl/curl-7.87.0/lib/vtls/vtls.c:1526 #13 ssl_cf_connect (cf=0x7ffff0009ea0, data=0x7ffff0001910, blocking=, done=0x7ffff722f56c) at /usr/src/debug/curl/curl-7.87.0/lib/vtls/vtls.c:1493 #14 0x00007ffff7f373eb in Curl_conn_connect (done=0x7ffff722f56c, blocking=false, sockindex=0, data=0x7ffff0001910) at /usr/src/debug/curl/curl-7.87.0/lib/cfilters.c:367 #15 multi_runsingle (multi=multi@entry=0x7ffff0002f50, nowp=nowp@entry=0x7ffff722f620, data=data@entry=0x7ffff0001910) at /usr/src/debug/curl/curl-7.87.0/lib/multi.c:2070 #16 0x00007ffff7f3a41e in curl_multi_perform (multi=0x7ffff0002f50, running_handles=0x7ffff722f728) at /usr/src/debug/curl/curl-7.87.0/lib/multi.c:2690 #17 0x00007ffff7f0fa84 in easy_transfer (multi=) at /usr/src/debug/curl/curl-7.87.0/lib/easy.c:662 #18 easy_perform (events=false, data=0x7ffff0001910) at /usr/src/debug/curl/curl-7.87.0/lib/easy.c:752 #19 curl_easy_perform (data=0x7ffff0001910) at /usr/src/debug/curl/curl-7.87.0/lib/easy.c:771 #20 0x00005555556e6dd1 in wasm_pack::manifest::Crate::return_api_call_result () #21 0x00005555556e69f1 in wasm_pack::manifest::Crate::return_wasm_pack_latest_version () #22 0x0000555555689d43 in wasm_pack::build::check_wasm_pack_versions () #23 0x0000555555660045 in _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17hbf0be45c875f1426E.llvm.15065180575710948936 () #24 0x0000555555667b73 in core::ops::function::FnOnce::call_once{{vtable.shim}} () #25 0x0000555555b99213 in alloc::boxed::{impl#45}::call_once<(), dyn core::ops::function::FnOnce<(), Output=()>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1988 #26 alloc::boxed::{impl#45}::call_once<(), alloc::boxed::Box, alloc::alloc::Global>, alloc::alloc::Global> () at library/alloc/src/boxed.rs:1988 #27 std::sys::unix::thread::{impl#2}::new::thread_start () at library/std/src/sys/unix/thread.rs:108 #28 0x00007ffff7d8f8fd in start_thread (arg=) at pthread_create.c:442 #29 0x00007ffff7e11a60 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81 |
tldr: install wasm-pack with cargo install wasm-pack --no-default-features Why does this work? wasm-pack Cargo.toml has this flag: [features]
# OpenSSL is vendored by default, can use system OpenSSL through feature flag.
default = ['openssl/vendored'] Here is a strace if that helps? I also tried upgrading OpenSSL in the project to see if that helped (if a backwards incompatible happened recently?), it did not. I know it uses a vendored OpenSSL, but here's my versions: $ openssl version
OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.0.7 1 Nov 2022)
$ uname -a
Linux kit 6.1.3-1-cachyos-cfs #1 SMP PREEMPT_DYNAMIC Thu, 05 Jan 2023 06:34:32 +0000 x86_64 GNU/Linux
$ rustc --version
rustc 1.68.0-nightly (0fb8b72ce 2023-01-06)
$ cargo 1.68.0-nightly (8c460b223 2023-01-04) |
I get this on basically any command:
When I use
I have openssl 3.0.8 on my Fedora system. |
I only have this issue when running wasm-pack on a domcloud server. Here's steps to reproduce:
Core dump: --no-default-features fixes it |
🐛 Bug description
Running
wasm-pack build
in https://github.com/Boddlnagg/midir/tree/master/examples/browser gives a segmentation fault.🤔 Expected Behavior
It should have built a pack.
👟 Steps to reproduce
A stack trace from GDB (
RUST_BACKTRACE=1
didn’t print anything):🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.10.3 (installed via cargo)
rustc version: 1.65.0 (897e37553 2022-11-02)
The text was updated successfully, but these errors were encountered: