-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
hitting unimplemented code in SnapshotWriter when sending message over SendPort #466
Comments
Messages over ports are sent by constructing a partial snapshot of an object and sending it over. That is why the SnapshotWriter is involved. We don't yet support sending of closure objects over in a message, I am not sure if we are supposed to allow closure objects in a message. |
This comment was originally written by mattsh@google.com I think we should not allow sending closures over SendPort, at least not in v1. So throwing a MessageSerializationException would probably be good. (At some point we'll want to give more refined error messages explaining exactly what can't be serialized, but simply throwing MessageSerializationException would be good for now, at least then we don't hit the assert.) |
Question for the libraries team: What should happen when we attempt to send data over a port that is not serializable? Added area-library label. |
cc @kasperl. |
This issue was originally filed by mattsh@google.com
I'm hitting this unimplemented code when I'm using SendPort, in what I think is a pretty normal way. (Unfortunately my setup is a bit complicated so can't paste in the exact code I'm running, but let me know if you need it).
I'm really wondering why the SnapshotWriter is even involved when sending messages over ports.
../runtime/vm/raw_object_snapshot.cc:1236: error: unimplemented code
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xf15bfb70 (LWP 31525)]
0xf7fdf430 in __kernel_vsyscall ()
(gdb) backtrace
0 0xf7fdf430 in __kernel_vsyscall ()
1 0xf7bdc921 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
2 0xf7bdfd52 in abort () at abort.c:92
3 0x0806485c in dart::DynamicAssertionHelper::Fail (this=0xf15bd0f4, format=0x821aa4b "%s") at ../runtime/vm/assert.cc:39
4 0x0811c456 in dart::RawClosure::WriteTo (this=0xf175aac5, writer=0xf15bd510, object_id=62, serialize_classes=false)
at ../runtime/vm/raw_object_snapshot.cc:1236
5 0x080de400 in dart::SnapshotWriter::WriteInlinedObject (this=0xf15bd510, raw=0xf175aac5) at ../runtime/vm/snapshot.cc:402
6 0x080dd583 in dart::SnapshotWriter::WriteObject (this=0xf15bd510, rawobj=0xf175aac5) at ../runtime/vm/snapshot.cc:298
7 0x080ddaad in dart::SnapshotWriter::WriteInlinedObject (this=0xf15bd510, raw=0xf175a835) at ../runtime/vm/snapshot.cc:389
8 0x080dd583 in dart::SnapshotWriter::WriteObject (this=0xf15bd510, rawobj=0xf175a835) at ../runtime/vm/snapshot.cc:298
9 0x080ddaad in dart::SnapshotWriter::WriteInlinedObject (this=0xf15bd510, raw=0xf175a715) at ../runtime/vm/snapshot.cc:389
10 0x080dd583 in dart::SnapshotWriter::WriteObject (this=0xf15bd510, rawobj=0xf175a715) at ../runtime/vm/snapshot.cc:298
11 0x0812c4e4 in dart::SerializeObject (obj=...) at ../runtime/lib/isolate.cc:49
12 0x0812e287 in dart::DN_HelperSendPortImpl_sendInternal_ (isolate=0x82bfb78, arguments=0xf15bdc54)
at ../runtime/lib/isolate.cc:350
13 0x0812e1a7 in dart::DN_SendPortImpl_sendInternal_ (args=0xf15bdc54) at ../runtime/lib/isolate.cc:346
14 0xf5ac0136 in _stub_CallNativeCFunction ()
15 0xf1344fbc in dart:coreimpl_SendPortImpl__sendInternal@924b4b8 ()
16 0xf1344f38 in dart:coreimpl_SendPortImpl__sendNow@924b4b8 ()
17 0xf1344e4d in dart:coreimpl_SendPortImpl_send ()
18 0xf13439a4 in dart:core_RpcReceiver_RpcReceiver._function ()
19 0xf1343453 in dart:coreimpl_ReceivePortImpl_handleMessage_ ()
20 0xf134006d in _stub_InvokeDartCode ()
21 0x080708e8 in dart::DartEntry::InvokeStatic (function=..., arguments=..., optional_arguments_names=...)
at ../runtime/vm/dart_entry.cc:83
22 0x0804d8d3 in dart::Dart_HandleMessage (dest_port=7111, reply_port=7112, dart_message=0x83c0220)
at ../runtime/vm/dart_api_impl.cc:327
23 0x0807e1c6 in dart::Isolate::StandardRunLoop (this=0x82bfb78) at ../runtime/vm/isolate.cc:252
24 0x0812d044 in dart::RunIsolate (parameter=137226712) at ../runtime/lib/isolate.cc:206
25 0x080e86da in dart::ThreadStart (data_ptr=0x831b180) at ../runtime/vm/thread_linux.cc:67
26 0xf7fa996e in start_thread (arg=0xf15bfb70) at pthread_create.c:300
27 0xf7c81b5e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
The text was updated successfully, but these errors were encountered: