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

GC corruption when used with either Async or Lwt #15

Open
mbacarella opened this issue Oct 27, 2021 · 0 comments
Open

GC corruption when used with either Async or Lwt #15

mbacarella opened this issue Oct 27, 2021 · 0 comments

Comments

@mbacarella
Copy link

mbacarella commented Oct 27, 2021

I've used Fftw3 on two separate projects now, one with Async and one with Lwt where I end up with heap corruption and had to move the FFT code into a separate sub-process to protect my runtime.

The Fftw3 C library uses threads internally so I'm guessing it has to do with tripping over Async/Lwt thread manipulations though they should theoretically be able to co-exist.

I'm aware of this https://www.fftw.org/fftw3_doc/Thread-safety.html but I'm pretty sure I'm not doing the things it's warning about. I'm creating and executing my Fftw3 calls all from the same thread.

Sorry I don't have a good repro here, I only need FFT to help me with an algorithm design right now and I resorted to dropping this simpler, possibly slower pure-OCaml implementation to make progress: https://github.com/ColinShaw/ocaml-simple-fft

If I use Fftw3 in shipping Lwt/Async code I'll circle back and try to hammer this out. Wanted to raise the possibility since I struggled with this alone for awhile first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant