HigherOrderCO / Bend

A massively parallel, high-level programming language
https://higherorderco.com
Apache License 2.0
17.44k stars 426 forks source link

Segmentation fault on AWS EC2 #418

Open lucabrunox opened 5 months ago

lucabrunox commented 5 months ago

Describe the bug

Bend hvm crashes on EC2 instances with Amazon Linux 2023.4.20240513.

CPU: Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz

I did not debug the core dump yet, or whether other distros or EC2 instances work.

To Reproduce

Steps to reproduce the behavior:

Spin up an EC2 instance. SSH into it and create a Dockerfile:

FROM rustlang/rust:nightly

RUN cargo +nightly install hvm && \
    cargo +nightly install bend-lang

RUN echo '(Main) = 123' > /test.bend

ENTRYPOINT [ "/usr/local/cargo/bin/bend", "run-c", "/test.bend" ]

Then:

docker build . -t bend
docker run --rm bend

The output is:

$ docker run --rm bend
Errors:
Error reading result from hvm. Output :
signal: 11 (SIGSEGV) (core dumped)

Expected behavior

On my laptop it works correctly (Ubuntu 20.04.6 LTS):

$ docker run --rm bend
Result: 123
Liberxue commented 1 month ago
image

@lucabrunox @developedby

I've tested and verified that the HVM runtime environment requires at least 6 GB of memory.

This is based on my personal testing experience. I've confirmed this for HVM, and the current issue is similar to the one discussed in HVM issues