Code Monkey home page Code Monkey logo

Comments (38)

SamSaffron avatar SamSaffron commented on August 15, 2024 4

new version is out !! @wk8 @darix @seanmakesgames @ignisf

🎊

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024 1

ok I am ready for a release ... try out prerelease this week if no complaints will be releasing stable next

gem install mini_racer --pre

from mini_racer.

wk8 avatar wk8 commented on August 15, 2024

That'd be great indeed :)

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

I want to do a release, but I am uneasy to do so with the open segfault. I want that fixed first.

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

@darix @wk8 if you can test latest it would help, let me know if it looks good to you and I will bump

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

ran full test suite against latest and I'm getting strange hangs (have to kill -9) in random test cases. It's probably my fault, but I should probably check it out it the morning because it's late here

here're the callstacks from my gdb attach. lmk if you see anything weird.
https://gist.github.com/seanmakesgames/e93830060acfb0e07ce232d072d81fc4

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

I lied, I tried one thing, now I'm going to bed. Rolling back to one behind latest commit solved the hangs.
(sync'd to 31ec118)
bedtime for me-

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

ouch, if you have a proper repro let me know I will have a look, not going
to release anything unstable.

On Wed, Jul 27, 2016 at 4:25 PM, seanmakesgames [email protected]
wrote:

I lied, I tried one thing, now I'm going to bed. Rolling back to one
behind latest commit solved the hangs.
(sync'd to 31ec118
31ec118
)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAUXdEbT3Qxlazikoi-fFp_761UgsrWks5qZvnwgaJpZM4JJL2A
.

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

filed #30 for tracking

from mini_racer.

wk8 avatar wk8 commented on August 15, 2024

@SamSaffron : I'm on vacation for another couple of weeks, but happy to help after that, if it can do any good? thanks!

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

@wk8 I will try to get out a release earlier, have a great time on your holiday, feel free to check back in when you are back :)

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

Ran the full test suite against latest with latest libv8. All checks out. :)

from mini_racer.

darix avatar darix commented on August 15, 2024

So time for a release now?

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

@darix I really want to release, but @seanmakesgames has been saying the latest still segfaults in some conditions and I want to sort that out before doing a release, I need a consistent repro of segfaults

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

@SamSaffron This segfault undoubtedly was in previous releases. It is a relatively 'low repro rate' for most user cases. I just happen to be hitting them frequently because I create hundreds of thousands of contexts a day.
I'm going to set up valgrind and see if we can get more clarity on uninitialized memory instances, hopefully that will get us a more consistent repro.

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

@darix Not sure how you're referencing the library, but if you're using a gemfile, then you could just ref the github@specific version until we get a release out.

gem 'mini_racer', github: 'discourse/mini_racer', ref: 'dbb4cef'

from mini_racer.

darix avatar darix commented on August 15, 2024

while this would definitely work .... I prefer to package my gems as rpms for various reasons. among other things i package discourse and my discourse package is stuck because i cant upgrade mini_racer, because i want to use the system copy of v8.

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

makes 100% sense. :)

from mini_racer.

ignisf avatar ignisf commented on August 15, 2024

i want to use the system copy of v8

Glad to hear that's working at least for somebody

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

@seanmakesgames just to confirm, you are not able to make segfaults happen in latest?

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

Not confirmed.
Just had 2 segfaults on production in the last 30 minutes.
I'm not able to make segfaults happen in test cases, but I haven't set up valgrind yet. Pretty sure at least some of them are coming out of uninitialized memory.

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

@wk8 if you feel like helping test this for segfaults it would be awesome, I don't want to release till we are very solid.

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

@ignisf I feel stuff is a bit more stable following my work yesterday ... perhaps you can do a build with v8 5.3 and then we can push a new mini_racer with that.

Once you have it ready I will push a pre-release and then 1 week later push stable.

from mini_racer.

ignisf avatar ignisf commented on August 15, 2024

Will look into it.

from mini_racer.

ignisf avatar ignisf commented on August 15, 2024

@SamSaffron @seanmakesgames beta libv8 up on rubygems

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

@ignisf awesome, I will set a hard dependency on it in the upcoming release

@seanmakesgames any new on the segfaulting?

from mini_racer.

ignisf avatar ignisf commented on August 15, 2024

Just run some tests to check if everything is OK and ping me and I'll make a non-prerelease

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

@SamSaffron oof. I totally updated my fork and my lockfile, but that never got pushed up to production. :(
It's been a busy week though with pax, so makes sense that I missed something. :
However! I'm currently creating a framework for load testing (to find max concurrency numbers), and that will surely be able to quickly tell if the other segfaults are fixed or not. I'll keep you posted.

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

@SamSaffron got a c-level exception. Potentially uninit memory or the utf-8 / utf-16 border.

https://gist.github.com/seanmakesgames/fa4e610029cbced26da7e3a587717c30

haven't set up the load tests yet either. Will keep you posted.

from mini_racer.

SamSaffron avatar SamSaffron commented on August 15, 2024

Dealing with junk strings in Ruby is annoying, that is actually a legit
error, perhaps you should be running #scrub on strings you are sending in?

On Tue, Sep 6, 2016 at 8:10 AM, seanmakesgames [email protected]
wrote:

@SamSaffron https://github.com/SamSaffron got a c-level exception.
Potentially uninit memory or the utf-8 / utf-16 border.

https://gist.github.com/seanmakesgames/fa4e610029cbced26da7e3a587717c30

haven't set up the load tests yet either. Will keep you posted.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAUXV8YhLO4me2heRn9loyfvKejEm7-ks5qnJNUgaJpZM4JJL2A
.

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

Can do. Not sure why it's failing in c-extension-land, and not raising inside of ruby where I would have caught it and returned it to players. :\

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

made another issue for the most common segfault (I'm sure it shows up in other gitissues, too, but figured I'd pull it out into its own)
#39

Can someone tell me why the junk strings are causing c-land exceptions instead of raising in ruby?

from mini_racer.

darix avatar darix commented on August 15, 2024

well what you actually want is having the JS exception handled and converted into a ruby exception?

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

Oh @darix! The "String String ��� is not valid UTF-8." is a JS exception?
Also welcome back. Hope your vacation was good :)

from mini_racer.

darix avatar darix commented on August 15, 2024

well it would be interesting to see with some debug prints if it is still ruby or already in JS. in general i would see

  1. make sure your web app sets all encodings to UTF-8 so that you can hopefully treat all strings as UTF-8
  2. scrub anything that isnt valid UTF-8. having a common safe encoding when mixing languages is a good idea. e.g. i really wonder why it says ASCII-8BIT there.

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

haha @darix. :\ :P I wish.
This exception is coming from inside JS code which is natively utf-16. That code is being run on the server, which is calling into a ruby function.
I can't scrub this out on the way to the server from the client, as it is entirely 'server code,' and valid javascript.

I could scrub the code in the barrier between JS and ruby, but- that would probably have to happen in the translation layer between JS -> Ruby. Or maybe right after.
I'll see if I can put together a test case for this in mini_racer.

I'm also curious why it says ascii-8bit now. I'll look into it. Hard to know where those messages are coming from, b/c this is just stderr / stdout piped to a logfile.

from mini_racer.

seanmakesgames avatar seanmakesgames commented on August 15, 2024

I've figured out to a very strong degree of confidence the segfaults and other memory related errors. They are 100% related to garbage collection happening in attached procs during execution.
I think you are good to update versions here. As long as it's shown as a 'known issue' w/ a workaround.
#41

from mini_racer.

darix avatar darix commented on August 15, 2024

thank you \o/

from mini_racer.

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.