[-- Attachment #1: Type: text/plain, Size: 513 bytes --] Hello dear camlers, I just noticed that in 4.12+effect, in the road to multicore, we have now the nice exception: Failure("Serializing closures is broken in multicore") This is a bit a pity: if you want to use both multicore and multi-machine parallelism, then, marshalling closures was useful for communication between machines in some cases. Is it a final decision or serialization of closures will be lost forever in OCaml ? Remark: Closures is not marked as obsolete in Marshal.mli Cheers, Christophe [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #1: Type: text/plain, Size: 926 bytes --] On 03/06/2021 19:17, Christophe Raffalli wrote: > Hello dear camlers, > > I just noticed that in 4.12+effect, in the road to multicore, we have now the > nice exception: > > Failure("Serializing closures is broken in multicore") > > This is a bit a pity: if you want to use both multicore and multi-machine > parallelism, then, marshalling closures was useful for communication between > machines in some cases. Is it a final decision or serialization of closures will > be lost forever in OCaml ? My guess is that serialization of closures might work in bytecode, and is broken in native, in relation to ASLR <https://en.wikipedia.org/wiki/Address_space_layout_randomization>. Of course, I could be very wrong. Cheers -- Basile Starynkevitch <basile@starynkevitch.net> (only mine opinions / les opinions sont miennes uniquement) 92340 Bourg-la-Reine, France web page: starynkevitch.net/Basile/ [-- Attachment #2: Type: text/html, Size: 1528 bytes --]
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --] On Thu, Jun 3, 2021 at 7:18 PM Christophe Raffalli <christophe@raffalli.eu> wrote: > > Hello dear camlers, > > I just noticed that in 4.12+effect, in the road to multicore, we have now > the > nice exception: > > Failure("Serializing closures is broken in multicore") > > This is a bit a pity: if you want to use both multicore and multi-machine > parallelism, then, marshalling closures was useful for communication > between > machines in some cases. Is it a final decision or serialization of > closures will > be lost forever in OCaml ? > I was not aware of this limitation of Multicore OCaml, and looking at its git history, it looks like it was introduced very early in the development, perhaps to make things simpler initially. Marshalling of function closures has always been sort of experimental and not super reliable, but I was not expecting it to be incompatible with Multicore OCaml. We (the core dev team) will sort it out. Kind regards, - Xavier Leroy > Remark: Closures is not marked as obsolete in Marshal.mli > > Cheers, > Christophe > [-- Attachment #2: Type: text/html, Size: 1648 bytes --]