Comments (24)
@ioquatix Thank you for trying and filing the issues!
They seem relatively small problems, and so should be easy to fix :)
from async.
All tests are now passing with TruffleRuby.
from async.
Okay, it's working, I just release falcon v0.19.3
from async.
Also, I'd like to add support for travis testing across the entire eco-system, but we are currently blocking on travis-ci/travis-ci#9803
from async.
—help and —threaded
from async.
I've tried to run a simple rack app on Falcon, but it failed on
D, [2018-11-06T08:24:09.330000 #22009] DEBUG -- Async::IO::Socket: Binding to #<Addrinfo: 127.0.0.1:9292 TCP>
D, [2018-11-06T08:24:09.355000 #22009] DEBUG -- Async::IO::Socket: Binding to #<Addrinfo: [::1]:9292 TCP>
D, [2018-11-06T08:24:09.370000 #22009] DEBUG -- <Async::Reactor:0x6ee stopped=false>: Exiting run-loop because finished.
~/.rubies/truffleruby-1.0.0-rc9/lib/truffle/truffle/cext.rb:221:in `execute_without_conversion': Cannot convert LLVMTypedForeignObject+0x0 to LLVMNativePointer (IllegalStateException) (RuntimeError)
from java.lang.Throwable.<init>(Throwable.java:287)
from java.lang.Exception.<init>(Exception.java:84)
from java.lang.RuntimeException.<init>(RuntimeException.java:80)
from java.lang.IllegalStateException.<init>(IllegalStateException.java:75)
from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNode$LLVMObjectToNativeNode.transitionToNative(LLVMToNativeNode.java:117)
from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen$LLVMObjectToNativeNodeGen.executeAndSpecialize(LLVMToNativeNodeGen.java:301)
from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen$LLVMObjectToNativeNodeGen.executeWithTarget(LLVMToNativeNodeGen.java:201)
from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNode.doOther(LLVMToNativeNode.java:78)
from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen.executeAndSpecialize(LLVMToNativeNodeGen.java:129)
from com.oracle.truffle.llvm.runtime.nodes.api.LLVMToNativeNodeGen.executeWithTarget(LLVMToNativeNodeGen.java:50)
Caused by:
Message not supported: TO_NATIVE (UnsupportedMessageException)
from java.lang.Throwable.<init>(Throwable.java:265)
from java.lang.Exception.<init>(Exception.java:66)
from com.oracle.truffle.api.interop.InteropException.<init>(InteropException.java:52)
from com.oracle.truffle.api.interop.UnsupportedMessageException.<init>(UnsupportedMessageException.java:57)
from com.oracle.truffle.api.interop.UnsupportedMessageException.raise(UnsupportedMessageException.java:84)
from org.truffleruby.interop.RubyMessageResolution$ForeignToNativeNode.access(RubyMessageResolution.java:190)
from org.truffleruby.interop.RubyMessageResolutionForeign$ForeignToNativeSubNode.accessWithTarget(RubyMessageResolutionForeign.java:503)
from org.truffleruby.interop.RubyMessageResolutionForeignFactory$ForeignToNativeSubNodeGen.executeAndSpecialize(RubyMessageResolutionForeignFactory.java:602)
from org.truffleruby.interop.RubyMessageResolutionForeignFactory$ForeignToNativeSubNodeGen.executeWithTarget(RubyMessageResolutionForeignFactory.java:588)
from org.truffleruby.interop.RubyMessageResolutionForeign$ForeignToNativeSubNode$TO_NATIVERootNode.execute(RubyMessageResolutionForeign.java:520)
Translated to internal error
from ~/.rubies/truffleruby-1.0.0-rc9/lib/truffle/truffle/cext.rb:221:in `execute_with_mutex'
from ~/.rubies/truffleruby-1.0.0-rc9/lib/truffle/truffle/cext_ruby.rb:36:in `close'
from ~/.gem/truffleruby/2.4.4/gems/async-1.10.3/lib/async/reactor.rb:208:in `close'
from ~/.gem/truffleruby/2.4.4/gems/async-1.10.3/lib/async/reactor.rb:56:in `run'
from ~/.gem/truffleruby/2.4.4/gems/falcon-0.19.2/lib/falcon/command/serve.rb:97:in `run'
from ~/.gem/truffleruby/2.4.4/gems/falcon-0.19.2/lib/falcon/command/serve.rb:124:in `invoke'
from ~/.gem/truffleruby/2.4.4/gems/falcon-0.19.2/lib/falcon/command.rb:70:in `invoke'
from ~/.gem/truffleruby/2.4.4/gems/falcon-0.19.2/bin/falcon:26:in `<top (required)>'
from ~/.gem/truffleruby/2.4.4/bin/falcon:23:in `load'
from ~/.gem/truffleruby/2.4.4/bin/falcon:23:in `load'
from ~/.gem/truffleruby/2.4.4/bin/falcon:23:in `<main>'
To reproduce:
run lambda {|env| [200, {}, ["Hello World"]]}
Then run it:
falcon --verbose serve -c the-script-above.rb
@eregon it ended up with this issue oracle/truffleruby#1441
from async.
What can I do to help resolve this issue? @eregon
from async.
All specs run well on my machine after upgrade timers to 4.2.0, I'll make a PR after the Travis issue resolved.
from async.
I installed truffle ruby 1.0.0rc9 and tried to run specs for async on my laptop. Some pass, some fail, ran into the same Message not supported: TO_NATIVE (UnsupportedMessageException)
error above.
from async.
@deepj Could you report as a separate issue on the TruffleRuby bug tracker, to make it easier to track?
That TO_NATIVE
error means a C extension is storing a Ruby object in native memory.
I guess that could be nio4r
, which gets installed when installing falcon
.
We'll need to dig deeper to see the actual place and see what can be done about it.
We're also currently investigating a general solution for this TO_NATIVE
issues.
from async.
nio4r seems to have a pure-Ruby backend https://github.com/socketry/nio4r#supported-backends
That should work out of the box.
It looks like it can be used by setting NIO4R_PURE=true
: https://github.com/socketry/nio4r/blob/e84f25ede87dcba8c52c9b86aa9bfbfbff0d9a59/lib/nio.rb#L17
@ioquatix What's the trade-off of using the pure-Ruby backend instead of the C extension? Should TruffleRuby try to support the C extension or there is no much advantage and just using the pure-Ruby backend is fine?
from async.
@ioquatix With NIO4R_PURE=true
I can move futher. But falcon
won't be working since it uses a forking model. So it stopped due this.
from async.
Can we make an extension to nio4r?
from async.
It already supports JRuby natively
from async.
You can start falcon using threaded model too.
from async.
@ioquatix How? I couldn't find anything about like that option in Falcon's README.md
from async.
I could move, it seems no issue from async gems perspective so far but I got this
socketry/falcon#33
from async.
So, even though basic site is working, there are tons of issues.
- oracle/truffleruby#1456
- oracle/truffleruby#1457
- oracle/truffleruby#1459
- oracle/truffleruby#1460
- oracle/truffleruby#1461
Most of these issues are relating to async-io
.
I can't make progress until these issues are resolved.
from async.
Please fix them and I will try again @eregon :)
from async.
@eregon I was just following up on this and noticed travis is broken again.
https://travis-ci.org/socketry/async/jobs/473835428
Is this something we can fix?
from async.
It's caused by https://travis-ci.community/t/new-gpg-key-for-rvm-releases/1521.
It's an issue between RVM and TravisCI, I cannot do much about it unfortunately.
from async.
rvm/rvm#4561 is tracking the issue on RVM.
from async.
Currently TruffleRuby is mostly failing because of #37
from async.
That's awesome @ioquatix 👏
from async.
Related Issues (20)
- Unhandled Exception does not stop program running HOT 10
- [Enhanchment] Make alternate exception reporting (the colorful one) opt in. HOT 3
- [Question] How to stop a fiber? HOT 4
- Strange timeout bug. HOT 10
- Dynamic concurrency limiter / adaptive semaphore HOT 3
- Configure log level specificly for Async HOT 4
- Segmentation fault HOT 5
- ActiveRecord best practices support or documentation HOT 1
- [Question] What difference between `Async` and `Sync` HOT 1
- bundle error HOT 1
- Catch all Async errors and report to Sentry? (or other error reporting)
- How to wait for `.schedule`'d fibers to finish? HOT 7
- Properly managing interrupts (works for async v 1.31, "breaks" for async v 2.5.6) HOT 3
- Tasks signaling Conditions leave suspended Fibers behind HOT 8
- Error reporting difference between Sync{} and Async{}.wait HOT 2
- Understanding the difference of Sync usage within Falcon HOT 3
- macOS: `Errno::EINVAL: Invalid argument - IO_Event_Selector_KQueue_io_wait:IO_Event_Selector_KQueue_Waiting_register` HOT 18
- Stopping remaining tasks upon completion of one task HOT 2
- Blocking subprocess (popen3) HOT 10
- Sleep Hook HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from async.