You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4eae445 debug: Add TypeName() function and log statements for Proxy objects being created and destroyed (Ryan Ofsky)
f326c5b logging: Add better logging on IPC server-side failures (Ryan Ofsky)
Pull request description:
This PR contains some logging and error message improvements I made locally in recent months that seem useful to upstream. Details are in commit messages
ACKs for top commit:
sedited:
ACK 4eae445
Tree-SHA512: 8eaa83df2d9181de56fea315b4cdbf04d5f714862d8c74394b16cd9e8f74cd1bba4846794ae1e29abc0d9df0e7503276a7196cf1d10d49a79bc897264b17906f
// which passes a ThreadMap reference from the client to the server,
227
+
// allowing the server to create threads to run IPC calls on the
228
+
// client, and also returns a ThreadMap reference from the server to
229
+
// the client, allowing the client to create threads on the server.
230
+
// (Typically the latter ThreadMap is used more often because there
231
+
// are more client-to-server calls.)
232
+
//
233
+
// If the other side of the connection did not previously get a
234
+
// ThreadMap reference from this side of the connection, when the
235
+
// other side calls `m_thread_map.makeThreadRequest()` in
236
+
// `BuildField` above, `m_thread_map` will be null, but that call
237
+
// will not fail immediately due to Cap'n Proto's request pipelining
238
+
// and delayed execution. Instead that call will return an invalid
239
+
// Thread reference, and when that reference is passed to this side
240
+
// of the connection as `thread_client` above, the
241
+
// `getLocalServer(thread_client)` call there will be the first
242
+
// thing to overtly fail, leading to an error here.
243
+
//
244
+
// Potentially there are also other things that could cause errors
245
+
// here, but this is the most likely cause.
246
+
//
247
+
// The log statement here is not strictly necessary since the same
248
+
// exception will also be logged in serverInvoke, but this logging
249
+
// may provide extra context that could be helpful for debugging.
250
+
MP_LOG(loop, Log::Info)
251
+
<< "IPC server error request #" << req << " CapabilityServerSet<Thread>::getLocalServer call failed, did you forget to provide a ThreadMap to the client prior to this IPC call?";
252
+
returnkj::mv(e);
219
253
});
220
254
// Use connection m_canceler object to cancel the result promise if the
221
255
// connection is destroyed. (By default Cap'n Proto does not cancel requests
0 commit comments