Skip to content
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

Segfault running example-1 with ocaml-multicore #191

Closed
talex5 opened this issue Jan 10, 2022 · 4 comments
Closed

Segfault running example-1 with ocaml-multicore #191

talex5 opened this issue Jan 10, 2022 · 4 comments

Comments

@talex5
Copy link

talex5 commented Jan 10, 2022

Hi, I just tried running the dream tutorials on ocaml.4.12+domains and it segfaulted after a minute or so. I can reproduce it with the first example using siege (though when it originally happened it was idle).

Here's the test-case as a Dockerfile:

FROM ocaml/opam:debian-11-ocaml-4.12-domains
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends siege
RUN git clone https://github.com/aantron/dream.git --recursive
WORKDIR dream
RUN opam-2.1 install --deps-only -t .
RUN opam-2.1 exec -- dune build ./example/1-hello/hello.exe
RUN (./_build/default/example/1-hello/hello.exe || echo CRASH &); sleep 1; siege http://127.0.0.1:8080/ 2> /dev/null

I get a crash within a second or so:

$ docker build .
[...]
Step 7/7 : RUN (./_build/default/example/1-hello/hello.exe || echo CRASH &); sleep 1; siege http://127.0.0.1:8080/ 2> /dev/nl
 ---> Running in efdb276b969f
10.01.22 13:57:03.735                       Running at http://localhost:8080
10.01.22 13:57:03.735                       Type Ctrl+C to stop
New configuration template added to /home/opam/.siege
Run siege -C to view the current settings in that file
Segmentation fault (core dumped)
CRASH

The crash is in caml_darken. Is Dream expected to work on multicore?

@aantron
Copy link
Owner

aantron commented Jan 10, 2022

Dream is expected to work on multicore. cc @yawaramin, who observed a similar failure. I haven't had time to look into this yet.

@talex5
Copy link
Author

talex5 commented Jan 11, 2022

Looks like this is a bug in Ssl's C stubs: savonet/ocaml-ssl#76

@aantron
Copy link
Owner

aantron commented Jan 12, 2022

@talex5, many thanks for tracking that down!

@aantron aantron added this to the alpha6 milestone Apr 17, 2023
@aantron
Copy link
Owner

aantron commented Apr 22, 2023

This has been fixed upstream. Thanks again!

@aantron aantron closed this as completed Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants