-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
os/linux/ld: harden brewed_ld_so_diagnostics
against TypeError
#18333
Conversation
Hmm definitely a hack alright, but at least we're getting closer by narrowing it down to this so thanks for finding it! I wonder if it's something specific to this or if it's just from this having a higher hit rate from the lack of caching. Good to know it's reproducible in Codespaces. How consistently are you seeing this? What commands are you running that give a reasonable hit rate? I'm willing to spend some time this afternoon to track down the precise (potentially Ruby) bug here. |
0cc59d7
to
b3948b0
Compare
I've seen it twice in the past two days (but that's also the number of times I've tried using a codespace to test something). I definitely triggered it with a
to test out Homebrew/discussions#5607.
|
1519b0d
to
65b76ed
Compare
65b76ed
to
ac86e68
Compare
I think this is a bug in Ruby, but I've no idea how to track it down. I can reproduce it intermittently in a codespace when `brew install`ing a large number of formulae. To work around this: - cache the return value of `brewed_ld_so_diagnostics` so that we can limit the number of calls to `IO.popen` - retry once when we see a `TypeError` Closes #17828.
ac86e68
to
bb20b3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @carlocab, looks good so far!
Haven't managed to even hit this once yet. I even did: With that said, this isn't even the only call site that triggers a I will still try to track down the |
This backtrace suggests that the call site is close by (or possibly even refactored into Not sure about the first one. But I'll drop the |
This is a hack, so let's see if we can get away with skipping it for now.
Initial backtrace in that issue mentioned GCC post-install which also has several popen calls. |
Yup, but the second backtrace references
Wonder if we should just stop passing |
Possibly. A piece of information I'd love to know is if the |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?I think this is a bug in Ruby, but I've no idea how to track it down. I
can reproduce it intermittently in a codespace when
brew install
ing alarge number of formulae.
To work around this:
brewed_ld_so_diagnostics
so that we canlimit the number of calls to
IO.popen
TypeError
Closes #17828.