Skip to content
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

fix: plugin verification panics due to missing SA_ONSTACK signal #432

Merged

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented Jul 2, 2024

fixes #269

yak shave and a half, bit of a write up and repro in the pact reference repo

pact-foundation/pact-reference@master...YOU54F:pact-reference:issue/go_signals

tried building the ffi and csv plugin with musl 1.25, as 1.24 has a fix in it, similar to that referenced by Jason in the original issue for glibc.

that didnt seem to solve the issue for me

we cant move to that new a version of glibc as we need to be compatible with older distroes, and i haven’t tested that out to see if it works.

some links from the yak shave

cgo onstack failures

FYI https://git.musl-libc.org/cgit/musl/commit/?id=2e5fff43dd7fc808197744c67cca7908ac19bb4f switched musl to using the alt stack for internal signals and will be present in future releases starting with 1.2.4.

note to self - if we can get this fix applied to purego project as well that would be ace, if not maybe adding the function into the pact_ffi lib so it could be called whether we are using cgo or not 🤔

@coveralls
Copy link

Coverage Status

coverage: 29.134% (+0.08%) from 29.056%
when pulling e41f22b on YOU54F:fix/issue_269_sa_onstack_flag
into 061aaf9 on pact-foundation:master.

@mefellows
Copy link
Member

Wow! Fantastic work Yousaf 👏

I'll do a bit more reading on what you've shared, but for now I'll merge and assume your fix is good (as the build passed)!

@mefellows mefellows merged commit c80e188 into pact-foundation:master Jul 2, 2024
8 checks passed
@YOU54F
Copy link
Member Author

YOU54F commented Jul 3, 2024

Cheers dude!

I'm fairly confident, I've managed to get CI working cross platform with cgo and purego.

cgo - https://github.com/YOU54F/pact-go/actions/runs/9727163895

purego - https://github.com/YOU54F/pact-go/actions/runs/9735707695/job/26865256432

Getting a clean sheet in windows with cgo has two more yak shaves, being able to shutdown plugins properly, and a failing message test but going to be in a far better place :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

random panics when performing provider verification
3 participants