-
Notifications
You must be signed in to change notification settings - Fork 188
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
Retrieving unknown global symbol in LLVMParserRuntime: _ZN9grpc_core14ReclaimerQueue13kInvalidIndexE (java.lang.IllegalStateException) #2611
Comments
@eregon Is this not something you're encountering on your PR branch? |
@jcoleman Did you try with grpc/grpc#27660? I think this Gemfile should use that branch: source 'https://rubygems.org'
gem 'grpc', github: 'eregon/grpc', branch: 'make-the-gem-build-on-truffleruby', submodules: true |
@eregon My Gemfile has:
Which should be equivalent? |
I can reproduce on Linux with that Gemfile and then:
Retrieving unknown global symbol in LLVMParserRuntime: _ZN9grpc_core14ReclaimerQueue13kInvalidIndexE (java.lang.IllegalStateException) from com.oracle.truffle.llvm.parser.LLVMParserRuntime.lookupGlobal(LLVMParserRuntime.java:113) from com.oracle.truffle.llvm.parser.model.symbols.globals.GlobalVariable.createNode(GlobalVariable.java:75) from com.oracle.truffle.llvm.parser.nodes.LLVMSymbolReadResolver.resolve(LLVMSymbolReadResolver.java:136) from com.oracle.truffle.llvm.ParserDriver.lambda$createDebugInfo$4(ParserDriver.java:428) from java.util.HashMap.forEach(HashMap.java:1337) from com.oracle.truffle.llvm.ParserDriver.createDebugInfo(ParserDriver.java:427) from com.oracle.truffle.llvm.ParserDriver.parseBinary(ParserDriver.java:371) from com.oracle.truffle.llvm.ParserDriver.parseLibraryWithSource(ParserDriver.java:449) from com.oracle.truffle.llvm.ParserDriver.parseWithDependencies(ParserDriver.java:145) from com.oracle.truffle.llvm.ParserDriver.parseWithDependencies(ParserDriver.java:131) from com.oracle.truffle.llvm.ParserDriver.parse(ParserDriver.java:104) from com.oracle.truffle.llvm.DefaultLoader.load(DefaultLoader.java:44) from com.oracle.truffle.llvm.runtime.LLVMLanguage.parse(LLVMLanguage.java:556) from com.oracle.truffle.api.TruffleLanguage$ParsingRequest.parse(TruffleLanguage.java:966) from com.oracle.truffle.api.TruffleLanguage.parse(TruffleLanguage.java:1323) from com.oracle.truffle.api.LanguageAccessor$LanguageImpl.parse(LanguageAccessor.java:295) from com.oracle.truffle.polyglot.PolyglotSourceCache.parseImpl(PolyglotSourceCache.java:94) from com.oracle.truffle.polyglot.PolyglotSourceCache$WeakCache.lookup(PolyglotSourceCache.java:222) from com.oracle.truffle.polyglot.PolyglotSourceCache.parseCached(PolyglotSourceCache.java:80) from com.oracle.truffle.polyglot.PolyglotLanguageContext.parseCached(PolyglotLanguageContext.java:369) from com.oracle.truffle.polyglot.EngineAccessor$EngineImpl.parseForLanguage(EngineAccessor.java:246) from com.oracle.truffle.api.TruffleLanguage$Env.parseInternal(TruffleLanguage.java:2248) from org.truffleruby.language.loader.FeatureLoader.loadCExtLibrary(FeatureLoader.java:503) from org.truffleruby.language.loader.RequireNode.requireCExtension(RequireNode.java:268) from org.truffleruby.language.loader.RequireNode.parseAndCall(RequireNode.java:217) from org.truffleruby.language.loader.RequireNode.doRequire(RequireNode.java:202) from org.truffleruby.language.loader.RequireNode.requireConsideringAutoload(RequireNode.java:126) from org.truffleruby.language.loader.RequireNode.lambda$requireWithMetrics$0(RequireNode.java:79) from org.truffleruby.debug.MetricsProfiler.callWithMetrics(MetricsProfiler.java:42) from org.truffleruby.language.loader.RequireNode.requireWithMetrics(RequireNode.java:76) from org.truffleruby.language.loader.RequireNode.require(RequireNode.java:68) from org.truffleruby.language.loader.RequireNodeGen.executeRequire(RequireNodeGen.java:31) from org.truffleruby.core.kernel.KernelNodes$LoadFeatureNode.loadFeature(KernelNodes.java:331) from org.truffleruby.core.kernel.KernelNodesFactory$LoadFeatureNodeFactory$LoadFeatureNodeGen.execute(KernelNodesFactory.java:829) from org.truffleruby.language.control.IfElseNode.execute(IfElseNode.java:43) from org.truffleruby.language.control.IfElseNode.execute(IfElseNode.java:45) from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:36) from org.truffleruby.language.RubyMethodRootNode.execute(RubyMethodRootNode.java:65) from org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:661) /home/eregon/.rubies/truffleruby-dev/lib/gems/bundler/gems/grpc-b1329700d351/src/ruby/lib/grpc/grpc.rb:22:in `gem_original_require' from /home/eregon/.rubies/truffleruby-dev/lib/gems/bundler/gems/grpc-b1329700d351/src/ruby/lib/grpc/grpc.rb:22:in `' from core/kernel.rb:293:in `require_relative' from /home/eregon/.rubies/truffleruby-dev/lib/gems/bundler/gems/grpc-b1329700d351/src/ruby/lib/grpc.rb:19:in `' from core/kernel.rb:234:in `gem_original_require' from -e:1:in `'
This is an error that didn't happen in previous grpc versions, so I guess some new code/change in grpc is causing this. TBH grpc is about the hardest gem to work with, because they still didn't merge any change after more than 1 year (grpc/grpc#24632), and it's a huge C++ codebase doing lots of low-level tricks which tends to not be supported yet in Sulong. If I may ask, what do you use |
Unfortunately I don't have any ability to remove the reliance on grpc; that decision wasn't mine, but there's heavy usage of it. Do you happen to have a commit/branch that you know is working? Right now I'm trying to spike running an app on TruffleRuby to prove out performance benefits before any larger effort is expended on it, but if I can't even boot the app obviously that can't happen. |
I tried this branch, require 'grpc' works for me with it: gem 'grpc', github: 'Shopify/grpc', branch: 'truffleruby-1.30.1', submodules: true There are some more branches:
and also the gem 'grpc', github: 'eregon/grpc', branch: 'truffleruby-debug', submodules: true |
Closing as "can't reproduce/possibly already fixed". |
Trying to
require 'grpc'
(using this PR branch since otherwise the native extensions don't build properly: grpc/grpc#27660) I get this:The text was updated successfully, but these errors were encountered: