WIP: fix(alloy): unvendor async-profiler path #109
Loading…
Reference in a new issue
No description provided.
Delete branch "alloy-patch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I know the patch is quite ugly, but I just want to check if this fixes our vendor problem and I don't have the spoons to setup a alloy dev instance.
If the patch works I'll write something nicer, unvendoring as much as possible, and try to upstream it to grafana.
related to #108
Applying the patch causes:
My best guess is that the nixpkgs asprof version is build in a way where it requires a desktop, but I didn't investigate it yet.
(ftr: I already rolled gerrit01 back to main)
fix(alloy): unvendor async-profiler pathto WIP: fix(alloy): unvendor async-profiler pathIs there a reason to still keep this as a WIP or can we merge this?
Ah this patch is non-functional, right.
Yeah, I spent way too much time trying to reproduce this but didn't figure it out and wasn't able to reproduce the behavior outside of alloy.
As far as I understand, alloy basically just shells out and executes the async-profiler binary. The async-profiler crashes somewhere in the openjdk code due to
class java.awt.HeadlessException
.I tried executing the profiler binary on a headless server with a "clean" environment (using env -i) but that worked as expected. I also made sure to use the same cli flags/args alloy passes to async-profiler, but that didn't help either.
Furthermore, I also tried a multitude of different things, from making sure to use the nixpkgs headless-jdk environment, to setting the jdk vars telling an application to run in headless mode, to building an unwrapped async-profiler version (alloy vendors an unwrapped version of the profiler).
I also poked around the alloy vendoring code in general and am pretty sure I can write an upstreamable patch making it configurable, it's just a bit of toil but isn't actually too complicated except for the weird profiler behavior.
However, it's probably not worth it to invest more time into this problem at the moment if the issue doesn't occur more often, so I'll close the pr for now.
Pull request closed