Wasm-pack: wasm-opt exits with signal: 11

Created on 1 Feb 2020  路  2Comments  路  Source: rustwasm/wasm-pack

馃悰 Bug description

The latest 0.9.0 release fails to build with the following error in my scenario:

Error: failed to execute `wasm-opt`: exited with signal: 11
  full command: "/home/travis/.cache/.wasm-pack/wasm-opt-37dc6b0d9960f622/wasm-opt" "wasm/../src/wasm/dprint_rust_printer_bg.wasm" "-o" "wasm/../src/wasm/dprint_rust_printer_bg.wasm-opt.wasm" "-O"
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.

This only happens on my CI. Builds fine locally on my windows machine so this might just be an issue with the CI? Not sure as it's using linux.

Related issue: #696

馃憻 Steps to reproduce

Sorry, I don't have time to submit an MCVE at the moment, but the following will probably reproduce the problem:

git clone https://github.com/dsherret/dprint.git
cd dprint
git reset --hard 11e617fabef70260b46060e5823ff247323e3ba8
yarn install
yarn bootstrap
yarn build

Fails in packages/core/wasm.

https://travis-ci.org/dsherret/dprint/builds/644649601?utm_medium=notification&utm_source=github_status

馃實 Your environment

Ubuntu 16.04.6 LTS
$ rustc --version
rustc 1.41.0 (5e1a79984 2020-01-27)
$ rustup --version
rustup 1.21.1 (7832b2ebe 2019-12-20)
$ cargo --version
cargo 1.41.0 (626f0f40e 2019-12-03)

Workarounds

Either:

  1. Install wasm-pack via npm and specify 0.8.1 as pointed out here: https://github.com/rustwasm/wasm-pack/issues/779#issuecomment-581043019
  2. Update cargo.toml to disable wasm-opt (I didn't try this, but I'm assuming it might work):
    [package.metadata.wasm-pack.profile.release] wasm-opt = false

...so this is not a blocker for me. Anyway, thanks for the great project!

bug

Most helpful comment

really sorry you are running into this! we knew that wasm-opt had some issues on Linux.. many folks seem to be running into issues specifically with CI- i'll be looking into this today to see if we can't improve it! (thanks for the really awesome+detailed bug report by the way<3)

All 2 comments

really sorry you are running into this! we knew that wasm-opt had some issues on Linux.. many folks seem to be running into issues specifically with CI- i'll be looking into this today to see if we can't improve it! (thanks for the really awesome+detailed bug report by the way<3)

I have the same problem, and it takes at least 5 minutes for wasm-opt to fail. See here inside the "run test" step; in our setup, the keepalive line gets printed every 5 minutes.

Was this page helpful?
0 / 5 - 0 ratings