runtime: WIP: fix infinite loop in lockextra on linux/arm #34979
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit fixes issue #34391, which is due to an incorrect patch
merged in CL 192937.
sigtrampgo is modified to record incoming signals in a globally shared
atomic bitmask when the G register is clobbered. When the execution
exits from vdso it checks if there are pending signals and in that
case it re-raises them to its own process.
Fixes #34391
This PR is work in progress.
Following the discussion in #34391, I implemented a patch to fix signal handling during VDSO on arm.
However, my patch is still incomplete due to the following concerns
os/signal
andTestSIGUSR1InVDSO
inruntime
fail because of stack overflows:Perfomance is pretty bad. As found in the above code snippet, runtime test takes about 4.5 minutes to finish. Overall time of
./all.bash
is more than 1 hour. This should be caused by heavy contention on the new signal pending queue introduced in my patch.Assembly code is incomplete. I am unfamiliar with the calling convention of Go on arm and I think my assembly code to call sigClearPending from vdso callers can be incorrect or at least improvable.
Could you possibly review this and give some comments? (cc: @ianlancetaylor)