-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[tools] add Stdio to AppContext created by daemon AppInstance #15268
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
Conversation
|
But when it's not in the Can you set up the code to force it to lose the race in order to verify this theory? |
|
I thought this was the parent context, but let me test this theory. Also, I'll check if I can reliably reproduce this. I only get this in 20% cases on one of the devicelab machines. |
If this is being run via
|
|
This happens when running |
|
|
|
@tvolkert and I just had a offline conversation. The issue seems to be in the |
tvolkert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Full issue described here: #15352 |
Fixes #14636 ... hopefully. My understanding after some debugging is that
ResidentRunnerattempts to print "Service protocol connection closed." when the device-side VM service closes the connection. Simultaneously, the resident process itself is attempting to shutdown. Hence the race: if the resident process shuts down first, it never gets the notification about the severed connection and makes no attempt to print the aforementioned string. However, if it loses the race it attempts to useStdiofrom theAppContextin the currentZone. Unfortunately, the daemon never addsStdioto theAppContextand so it crashes withNoSuchMethodError.The fix seems to be to simply add
Stdioto theAppContext🤞/cc @DanTup @tvolkert