Git Product home page Git Product logo

Comments (24)

eregon avatar eregon commented on May 21, 2024 3

@ioquatix Thank you for trying and filing the issues!
They seem relatively small problems, and so should be easy to fix :)

from async.

ioquatix avatar ioquatix commented on May 21, 2024 3

All tests are now passing with TruffleRuby.

from async.

ioquatix avatar ioquatix commented on May 21, 2024 2

screen shot 2018-11-07 at 10 13 35 am

Okay, it's working, I just release falcon v0.19.3

from async.

ioquatix avatar ioquatix commented on May 21, 2024 1

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.

ioquatix avatar ioquatix commented on May 21, 2024 1

—help and —threaded

from async.

deepj avatar deepj commented on May 21, 2024

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.

ioquatix avatar ioquatix commented on May 21, 2024

What can I do to help resolve this issue? @eregon

from async.

jjyr avatar jjyr commented on May 21, 2024

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.

ioquatix avatar ioquatix commented on May 21, 2024

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.

eregon avatar eregon commented on May 21, 2024

@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.

eregon avatar eregon commented on May 21, 2024

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.

deepj avatar deepj commented on May 21, 2024

@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.

ioquatix avatar ioquatix commented on May 21, 2024

Can we make an extension to nio4r?

from async.

ioquatix avatar ioquatix commented on May 21, 2024

It already supports JRuby natively

from async.

ioquatix avatar ioquatix commented on May 21, 2024

You can start falcon using threaded model too.

from async.

deepj avatar deepj commented on May 21, 2024

@ioquatix How? I couldn't find anything about like that option in Falcon's README.md

from async.

deepj avatar deepj commented on May 21, 2024

I could move, it seems no issue from async gems perspective so far but I got this
socketry/falcon#33

from async.

ioquatix avatar ioquatix commented on May 21, 2024

So, even though basic site is working, there are tons of issues.

Most of these issues are relating to async-io.

I can't make progress until these issues are resolved.

from async.

ioquatix avatar ioquatix commented on May 21, 2024

Please fix them and I will try again @eregon :)

from async.

ioquatix avatar ioquatix commented on May 21, 2024

@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.

eregon avatar eregon commented on May 21, 2024

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.

ioquatix avatar ioquatix commented on May 21, 2024

rvm/rvm#4561 is tracking the issue on RVM.

from async.

ioquatix avatar ioquatix commented on May 21, 2024

Currently TruffleRuby is mostly failing because of #37

from async.

picatz avatar picatz commented on May 21, 2024

That's awesome @ioquatix 👏

from async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.