I think this fixes a symptom (test failing), not the actual bug (VM deadlocking trying to safepoint?).
bool isHelperInThreadMainWaitingLatchRunning = false;This should not be possible according to the newest spec. All shared variables are supposed to be `final`. Sounds like we are missing some checks :)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
I think this fixes a symptom (test failing), not the actual bug (VM deadlocking trying to safepoint?).
When spawned thread catches unexpected exception it stops responding, resulting in a timeout. The change in test ensures there are no unexpected exceptions thrown.
bool isHelperInThreadMainWaitingLatchRunning = false;This should not be possible according to the newest spec. All shared variables are supposed to be `final`. Sounds like we are missing some checks :)
Somehow I missed that. There are multiple such variables in this and other tests that do communicate between isolates using `vm:shared` fields.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Alexander AprelevI think this fixes a symptom (test failing), not the actual bug (VM deadlocking trying to safepoint?).
When spawned thread catches unexpected exception it stops responding, resulting in a timeout. The change in test ensures there are no unexpected exceptions thrown.
I am speaking about this output from the test:
```
Attempt:11 waiting for isolate helper to check in
Attempt:12 waiting for isolate helper to check in
Attempt:13 waiting for isolate helper to check in
Attempt:14 waiting for isolate helper to check in
Attempt:15 waiting for isolate helper to check in
```
This is timeout in safepointing - which indicates some sort of deadlock in the machinery we have added. This should not happen - so I think the test right now is revealing some actual bug.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Alexander AprelevI think this fixes a symptom (test failing), not the actual bug (VM deadlocking trying to safepoint?).
Slava EgorovWhen spawned thread catches unexpected exception it stops responding, resulting in a timeout. The change in test ensures there are no unexpected exceptions thrown.
I am speaking about this output from the test:
```
Attempt:11 waiting for isolate helper to check in
Attempt:12 waiting for isolate helper to check in
Attempt:13 waiting for isolate helper to check in
Attempt:14 waiting for isolate helper to check in
Attempt:15 waiting for isolate helper to check in
```This is timeout in safepointing - which indicates some sort of deadlock in the machinery we have added. This should not happen - so I think the test right now is revealing some actual bug.
I believe this is test's `waitLatch` in `threadMainWaitingLatch` that blocks isolate execution. Doesn't look like a bug in the vm.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Alexander AprelevI think this fixes a symptom (test failing), not the actual bug (VM deadlocking trying to safepoint?).
Slava EgorovWhen spawned thread catches unexpected exception it stops responding, resulting in a timeout. The change in test ensures there are no unexpected exceptions thrown.
Alexander AprelevI am speaking about this output from the test:
```
Attempt:11 waiting for isolate helper to check in
Attempt:12 waiting for isolate helper to check in
Attempt:13 waiting for isolate helper to check in
Attempt:14 waiting for isolate helper to check in
Attempt:15 waiting for isolate helper to check in
```This is timeout in safepointing - which indicates some sort of deadlock in the machinery we have added. This should not happen - so I think the test right now is revealing some actual bug.
I believe this is test's `waitLatch` in `threadMainWaitingLatch` that blocks isolate execution. Doesn't look like a bug in the vm.
Ah, it is not safepointing but VM shutdown, which is blocked by isolate being stuck (Maybe we should update the message to make it clear).
I think it is worth considering if we should introduce a way to gracefully shutdown in such situations (e.g. whether we should make it possible to interrupt such wait).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
thank you Slava!
Alexander AprelevI think this fixes a symptom (test failing), not the actual bug (VM deadlocking trying to safepoint?).
Slava EgorovWhen spawned thread catches unexpected exception it stops responding, resulting in a timeout. The change in test ensures there are no unexpected exceptions thrown.
Alexander AprelevI am speaking about this output from the test:
```
Attempt:11 waiting for isolate helper to check in
Attempt:12 waiting for isolate helper to check in
Attempt:13 waiting for isolate helper to check in
Attempt:14 waiting for isolate helper to check in
Attempt:15 waiting for isolate helper to check in
```This is timeout in safepointing - which indicates some sort of deadlock in the machinery we have added. This should not happen - so I think the test right now is revealing some actual bug.
Slava EgorovI believe this is test's `waitLatch` in `threadMainWaitingLatch` that blocks isolate execution. Doesn't look like a bug in the vm.
Ah, it is not safepointing but VM shutdown, which is blocked by isolate being stuck (Maybe we should update the message to make it clear).
I think it is worth considering if we should introduce a way to gracefully shutdown in such situations (e.g. whether we should make it possible to interrupt such wait).
bool isHelperInThreadMainWaitingLatchRunning = false;Alexander AprelevThis should not be possible according to the newest spec. All shared variables are supposed to be `final`. Sounds like we are missing some checks :)
Somehow I missed that. There are multiple such variables in this and other tests that do communicate between isolates using `vm:shared` fields.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[vm/isolate_api] Fix thread-starting race in threading_test.
Fixes https://github.com/dart-lang/sdk/issues/63526
TEST=ci
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |