caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] serialization of closures
@ 2021-06-03 17:17 Christophe Raffalli
  2021-06-03 17:20 ` Basile Starynkevitch
  2021-06-04 17:14 ` Xavier Leroy
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe Raffalli @ 2021-06-03 17:17 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] serialization of closures
  2021-06-03 17:17 [Caml-list] serialization of closures Christophe Raffalli
@ 2021-06-03 17:20 ` Basile Starynkevitch
  2021-06-04 17:14 ` Xavier Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Basile Starynkevitch @ 2021-06-03 17:20 UTC (permalink / raw)
  To: caml-list

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] serialization of closures
  2021-06-03 17:17 [Caml-list] serialization of closures Christophe Raffalli
  2021-06-03 17:20 ` Basile Starynkevitch
@ 2021-06-04 17:14 ` Xavier Leroy
  1 sibling, 0 replies; 3+ messages in thread
From: Xavier Leroy @ 2021-06-04 17:14 UTC (permalink / raw)
  To: Christophe Raffalli; +Cc: caml users

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-04 17:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 17:17 [Caml-list] serialization of closures Christophe Raffalli
2021-06-03 17:20 ` Basile Starynkevitch
2021-06-04 17:14 ` Xavier Leroy

caml-list - the Caml user's mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.vuxu.org/caml-list
	git clone --mirror https://inbox.ocaml.org/caml-list

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 caml-list caml-list/ https://inbox.vuxu.org/caml-list \
		caml-list@inria.fr
	public-inbox-index caml-list

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.caml-list


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git