Hermanverschooten

Hermanverschooten

Rustler precompiled segfaults in GH action

My typst package was recently updated, and I wanted to release a new version. I am using rustler precompiled to precompile the rust bindings to typst.

although the change to the code was minimal, the compilation for 2 targets fails with a segfault.

Compiling typst_nif v0.1.1 (/home/runner/work/typst/typst/native/typst_nif)
error: rustc interrupted by SIGSEGV, printing backtrace
...
help: you can increase rustc's stack size by setting RUST_MIN_STACK=16777216
error: could not compile `typst_nif` (lib)
Caused by:
  process didn't exit successfully: `rustc --crate-name typst_nif --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type cdylib --emit=dep-info,link -C opt-level=3 -C lto --cfg 'feature="default"' --cfg 'feature="nif_version_2_15"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("default", "nif_version_2_15", "nif_version_2_16", "nif_version_2_17"))' -C metadata=684f38727e91bcf8 --out-dir /target/aarch64-unknown-linux-gnu/release/deps --target aarch64-unknown-linux-gnu -C linker=aarch64-linux-gnu-gcc -C strip=debuginfo -L dependency=/target/aarch64-unknown-linux-gnu/release/deps -L dependency=/target/release/deps --extern comemo=/target/aarch64-unknown-linux-gnu/release/deps/libcomemo-c278774ab144f6c8.rlib --extern rustler=/target/aarch64-unknown-linux-gnu/release/deps/librustler-c7f63b2eafc93dbf.rlib --extern tar=/target/aarch64-unknown-linux-gnu/release/deps/libtar-5166b6795e27638f.rlib --extern time=/target/aarch64-unknown-linux-
Done.

Full log

I followed the directions and added a step to the workflow to set the RUST_MIN_STACK env var,

- name: Set Rust stack size
  shell: bash
  run: |
    echo "RUST_MIN_STACK=16777216" >> $GITHUB_ENV

But alas this doesn’t make a difference.

Has anyone encountered something similar and know how to resolve this?

Thanks,

Herman

Marked As Solved

Hermanverschooten

Hermanverschooten

I changed the workflow to use:

- name: Install Rust
  uses: dtolnay/rust-toolchain@stable
  with:
    toolchain: 1.86.0  # Specify your desired Rust version
    targets: ${{ matrix.job.target }}

instead of

- name: Add target
  shell: bash
  run: |
    rustup target add ${{ matrix.job.target }}

Now it uses rust 1.86 and that works!

Thanks for the assist!

Last Post!

dimitarvp

dimitarvp

Whoa, that would be pretty nasty if they broke it in Rust 1.87. :confused:

Glad you fixed it!

Where Next?

Popular in Questions Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement