Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Segfault at start of build while performing version check #1281

Closed
raggi opened this issue May 7, 2023 · 1 comment · Fixed by #1290
Closed

Segfault at start of build while performing version check #1281

raggi opened this issue May 7, 2023 · 1 comment · Fixed by #1290

Comments

@raggi
Copy link

raggi commented May 7, 2023

🐛 Bug description

I'm trying to build str4d/wage, which documents using wasm-pack.

I did cargo install wasm-pack and then wasm-pack build which immediately segfaulted.

Under rust-lldb I get the following backtrace:

(lldb) settings set -- target.run-args  "build"
(lldb) run
Process 12789 launched: '/home/raggi/.cargo/bin/wasm-pack' (x86_64)
Process 12789 stopped
* thread #2, name = 'wasm-pack', stop reason = signal SIGSEGV: invalid address (fault address: 0x4d)
    frame #0: 0x00007ffff7c79cc0 libc.so.6`___pthread_rwlock_wrlock [inlined] __pthread_rwlock_wrlock_full64 at pthread_rwlock_common.c:603:7
(lldb) bt
* thread #2, name = 'wasm-pack', stop reason = signal SIGSEGV: invalid address (fault address: 0x4d)
  * frame #0: 0x00007ffff7c79cc0 libc.so.6`___pthread_rwlock_wrlock [inlined] __pthread_rwlock_wrlock_full64 at pthread_rwlock_common.c:603:7
    frame #1: 0x00007ffff7c79cc0 libc.so.6`___pthread_rwlock_wrlock at pthread_rwlock_wrlock.c:26:16
    frame #2: 0x00007ffff783cf36 libcrypto.so.3`CRYPTO_THREAD_write_lock at threads_pthread.c:112
    frame #3: 0x00007ffff77e0b24 libcrypto.so.3`get_cert_by_subject_ex at by_dir.c:351
    frame #4: 0x00005555558c2c7c wasm-pack`X509_STORE_CTX_get_by_subject + 140
    frame #5: 0x00005555558c3352 wasm-pack`X509_STORE_CTX_get1_issuer + 82
    frame #6: 0x00005555558c7d78 wasm-pack`verify_chain + 504
    frame #7: 0x00005555558c93b0 wasm-pack`X509_verify_cert + 208
    frame #8: 0x00005555557dae88 wasm-pack`ssl_verify_cert_chain + 584
    frame #9: 0x00005555557fb1c6 wasm-pack`tls_process_server_certificate + 630
    frame #10: 0x00005555557f743d wasm-pack`state_machine + 1533
    frame #11: 0x00007ffff7f65276 libcurl.so.4`ossl_connect_step2 at openssl.c:3807
    frame #12: 0x00007ffff7f6565a libcurl.so.4`ossl_connect_common at openssl.c:4336
    frame #13: 0x00007ffff7f65e94 libcurl.so.4`ssl_cf_connect [inlined] ssl_connect_nonblocking at vtls.c:348
    frame #14: 0x00007ffff7f65e71 libcurl.so.4`ssl_cf_connect at vtls.c:1534
    frame #15: 0x00007ffff7f206f2 libcurl.so.4`cf_setup_connect at connect.c:1195
    frame #16: 0x00007ffff7f1bce2 libcurl.so.4`cf_hc_connect [inlined] cf_hc_baller_connect at cf-https-connect.c:135
    frame #17: 0x00007ffff7f1bcc8 libcurl.so.4`cf_hc_connect at cf-https-connect.c:290
    frame #18: 0x00007ffff7f1e751 libcurl.so.4`Curl_conn_connect at cfilters.c:371
    frame #19: 0x00007ffff7f471c7 libcurl.so.4`multi_runsingle at multi.c:2101
    frame #20: 0x00007ffff7f47f61 libcurl.so.4`curl_multi_perform at multi.c:2729
    frame #21: 0x00007ffff7f2737f libcurl.so.4`curl_easy_perform [inlined] easy_transfer at easy.c:668
    frame #22: 0x00007ffff7f27354 libcurl.so.4`curl_easy_perform [inlined] easy_perform at easy.c:758
    frame #23: 0x00007ffff7f27270 libcurl.so.4`curl_easy_perform at easy.c:777
    frame #24: 0x00005555556dabc0 wasm-pack`wasm_pack::manifest::Crate::return_api_call_result::hef6d063e1086d254 + 592
    frame #25: 0x00005555556da7d8 wasm-pack`wasm_pack::manifest::Crate::return_wasm_pack_latest_version::h1673ab4f5d4ea3c0 + 520
    frame #26: 0x0000555555681d63 wasm-pack`wasm_pack::build::check_wasm_pack_versions::h2bf8da02ce12df71 + 83
    frame #27: 0x0000555555654299 wasm-pack`std::sys_common::backtrace::__rust_begin_short_backtrace::hc956eb58be91208f + 41
    frame #28: 0x000055555565c892 wasm-pack`core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hbef2a4d6919f9f7d + 146
    frame #29: 0x0000555555cab523 wasm-pack`std::sys::unix::thread::Thread::new::thread_start::ha4f1cdd9c25884ba [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h39990b24eedef2ab at boxed.rs:1987:9
    frame #30: 0x0000555555cab51d wasm-pack`std::sys::unix::thread::Thread::new::thread_start::ha4f1cdd9c25884ba [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h01a027258444143b at boxed.rs:1987:9
    frame #31: 0x0000555555cab516 wasm-pack`std::sys::unix::thread::Thread::new::thread_start::ha4f1cdd9c25884ba at thread.rs:108:17
    frame #32: 0x00007ffff7c73bda libc.so.6`start_thread at pthread_create.c:444:8
    frame #33: 0x00007ffff7d01ab0 libc.so.6`__clone + 64

I looked for some flags to disable this version check as it's fairly superfluous after I've just installed it, but it appears there isn't an option.

🤔 Expected Behavior

Local builds should complete.

👟 Steps to reproduce

git clone git@github.com:str4d/wage.git
cd wage
cargo install wasm-pack
wasm-pack build
--> zsh: segmentation fault  wasm-pack build

🌍 Your environment

% rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/raggi/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.69.0 (84c898d65 **2023-04-16)**
 % cargo version
cargo 1.69.0 (6e9a83356 2023-04-12)
% wasm-pack --version
wasm-pack 0.11.0
@accerqueira
Copy link

Had the same problem. Found workaround here: #1203 (comment)

cargo install wasm-pack --no-default-features

@ranile ranile mentioned this issue May 30, 2023
3 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants