-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add integration test with a static go binary is scoped, and uses tls transport #994
Comments
I added a test case to the existing transport test suite.
This failed as expected, since the "no-threads" build flag is required. The test did not pass. |
I was able to capture a backtrace of the unexpected crash.
This is the output:
|
Digging in some more, I think I understand what the problem is. CONF_parse_list uses isspace(). The code for isspace() was built using libc headers, and we're trying to run with our internal libc that has an incompatible implementation of isspace() in the musl headers. When I look at the disassembly of CONF_parse_list, I can see it doing bitwise operations for the implementation of isspace():
This is consistent with the glibc type.h include file on my machine:
where _ISspace comes from a bit flag implementation (from same glibc type.h include file)
This stack overflow link was helpful when trying to look at this the first time... =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
So what to do about this? After consulting with @michalbiesek, we understand that it should be reasonable to just switch from using __ctype_b_loc to using scopelibc___ctype_b_loc. Originally, I didn't think that musl was binary compatible in this way, but musl does provide a __ctype_b_loc that will work if we switch to use it. bminor/musl@9372655 So the solution here is to switch from using glibc's __ctype_b_loc to instead use our own musl's version of the same. |
The last commit here is to fix the test execution of the new transport test case on ARM. This last commit “just runs” go applications if we’re running on ARM (without running them under ldscope). |
@abetones - from a docs point of view... there are two issues to consider here:
While working on this ticket, we realized that if someone tries to scope Go on ARM before 1.1.0, we'd try to scope it and fail to be able to do so. As a result, the go app wouldn't get executed and scope would return an error code. TLDR for 2); we're handling a case of unsupported applications (Go on ARM) more elegantly than before. |
* add #994 fix to Changelog * almost all the edits * updating to talk about cloud properly * fix double Cribls * fix a fix that was wrong * add missing word * tweak a sentence * corrections per reviews * clarify mute section Co-authored-by: Abe Raher <abe@cribl.io>
(belongs in transport test, maybe?)
This is related to the finding in #992.
The text was updated successfully, but these errors were encountered: