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

macOS: ngscopeclient tries to dlopen all of /opt/homebrew #623

Open
rgov opened this issue Oct 29, 2023 · 6 comments
Open

macOS: ngscopeclient tries to dlopen all of /opt/homebrew #623

rgov opened this issue Oct 29, 2023 · 6 comments
Labels
bug Something isn't working portability Stuff that doesn't work on some OS

Comments

@rgov
Copy link

rgov commented Oct 29, 2023

On macOS 14.0, I built ngscopeclient 6056adc and got it running with the workarounds covered in other issues plus the environment variables from ngscopeclient/scopehal-docs#58.

When starting up, I get several complaints from Tensorflow, then the program aborts.

2023-10-29 14:14:13.425505: W tensorflow/core/common_runtime/input_colocation_exemption_registry.cc:33] Input colocation exemption for op: IdentityN already registered
2023-10-29 14:14:13.430134: E tensorflow/tsl/lib/monitoring/collection_registry.cc:81] Cannot register 2 metrics with the same name: /tensorflow/serving/batching/enable_large_batch_splitting
2023-10-29 14:14:13.433836: E tensorflow/tsl/lib/monitoring/collection_registry.cc:81] Cannot register 2 metrics with the same name: /tensorflow/api/op/using_fake_quantization
2023-10-29 14:14:13.442854: F tensorflow/core/framework/function.cc:2027] Check failed: GetOpGradFactory()->insert({op, func}).second Duplicated gradient for Softmax
zsh: abort      ngscopeclient

... are you using Tensorflow?

@rgov
Copy link
Author

rgov commented Oct 29, 2023

No, it looks like somehow it is loading ... every single binary in /opt/homebrew. Impressive.

Is there a plugin auto discovery and loading mechanism perhaps?

@rgov rgov closed this as completed Oct 29, 2023
@azonenberg
Copy link
Collaborator

I think what might be happening is something funky happening with the plugin loading code, where it thinks /opt/homebrew is the plugin search directory so it's trying to dlopen() everything there?

Like I said, system wide installation on macos has never been tested.

@azonenberg azonenberg reopened this Oct 29, 2023
@azonenberg azonenberg changed the title macOS: Tensorflow assertion failures on startup macOS: ngscopeclient tries to dlopen all of /opt/homebrew Oct 29, 2023
@azonenberg
Copy link
Collaborator

  • @lainy as well since I don't have a mac to test on

@azonenberg azonenberg added bug Something isn't working portability Stuff that doesn't work on some OS labels Oct 29, 2023
@rgov
Copy link
Author

rgov commented Oct 29, 2023

Could you point me to the plugin loading code and what the install paths look like on Linux?

@azonenberg
Copy link
Collaborator

It looks like we have a workaround for this exact issue but /opt/homebrew isn't included.

https://github.com/ngscopeclient/scopehal/blob/master/scopehal/scopehal.cpp?ts=4#L299

@rgov
Copy link
Author

rgov commented Oct 29, 2023

#393

Workaround:

    # Patch plugin enumeration code to fix #393, #623
    inreplace "lib/scopehal/scopehal.cpp",
      'if(binDir.find("/usr") != 0)',
      "if(binDir.find(\"#{HOMEBREW_PREFIX}\") != 0)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working portability Stuff that doesn't work on some OS
Projects
None yet
Development

No branches or pull requests

2 participants