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

Threading Issues #1732

Closed
sschepens opened this Issue Aug 5, 2014 · 4 comments

Comments

Projects
None yet
2 participants
@sschepens

sschepens commented Aug 5, 2014

I'm having issues with a Padrino application when using puma with 4 workers and more than 2 threads, I start getting a LOT of these errors:

NameError: undefined method 'original_call' for class 'App'

And:

NoMethodError: undefined method 'call' for #<App:0x007fc5a50adc60>

Using 2 threads per worker does not produce this problem.

I searched the code and found this:
https://github.com/padrino/padrino-framework/blob/master/padrino-core/lib/padrino-core/application.rb#L30-L38
It seems it has to do with a thread-unsafe http router, is this still valid?
I commented everything except the call to "super", removing method aliasing and undefs and this seems to work, at least on my case using MRI 2.1.0 i don't get any more stack traces of this type.

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Aug 6, 2014

Member

Can't reproduce this. Could you please put together a failing project with a locked Gemfile and tell how you run puma server? What platform are you on?

Member

ujifgc commented Aug 6, 2014

Can't reproduce this. Could you please put together a failing project with a locked Gemfile and tell how you run puma server? What platform are you on?

@sschepens

This comment has been minimized.

Show comment
Hide comment
@sschepens

sschepens Aug 6, 2014

Sure: https://github.com/sschepens/demo
You can start the app with bundle exec pumactl -F puma.rb start to start it with the parameters i use.
I'm using https://github.com/rakyll/boom to generate load: boom -n 30000 -c 200 http://127.0.0.1:8080/ping

This produces tons of 500s and a few 200s responses.

Adding this on padrino before_load fixes the issue:

  module Padrino
    class Application < Sinatra::Base
      def call(*args)
        super(*args)
      end
    end
  end

I'm having this issue in Archlinux and Ubuntu 12.04

sschepens commented Aug 6, 2014

Sure: https://github.com/sschepens/demo
You can start the app with bundle exec pumactl -F puma.rb start to start it with the parameters i use.
I'm using https://github.com/rakyll/boom to generate load: boom -n 30000 -c 200 http://127.0.0.1:8080/ping

This produces tons of 500s and a few 200s responses.

Adding this on padrino before_load fixes the issue:

  module Padrino
    class Application < Sinatra::Base
      def call(*args)
        super(*args)
      end
    end
  end

I'm having this issue in Archlinux and Ubuntu 12.04

@ujifgc ujifgc added bug and removed revalidate labels Aug 6, 2014

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Aug 6, 2014

Member

Yeah. Confirmed, it's broken. I will look into it.

Member

ujifgc commented Aug 6, 2014

Yeah. Confirmed, it's broken. I will look into it.

@ujifgc ujifgc added the blocker label Aug 6, 2014

@ujifgc ujifgc added this to the 0.12.3 milestone Aug 6, 2014

@ujifgc ujifgc self-assigned this Aug 6, 2014

@ujifgc ujifgc closed this in 6358252 Aug 6, 2014

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Aug 6, 2014

Member

That patch was intended for #863 and the problem never manifested itself on other platforms, so it's better to apply it only for JRuby.

Member

ujifgc commented Aug 6, 2014

That patch was intended for #863 and the problem never manifested itself on other platforms, so it's better to apply it only for JRuby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment