Skip to content
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

h2o mruby hello example leaks memory #699

Closed
mingodad opened this issue Jan 13, 2016 · 3 comments
Closed

h2o mruby hello example leaks memory #699

mingodad opened this issue Jan 13, 2016 · 3 comments

Comments

@mingodad
Copy link
Contributor

Hello !
I just did a fresh build of h2o and tested it with httpress/ab and the memory usage only gorws at each request, till I kill it to not freeze my computer.

Probably the problem is with mruby module, the hello.rb example only show it.

Cheers !

examples/h2o_mruby/h2o.conf with logs redirected to /dev/null

# to find out the configuration commands, run: h2o --help

listen: 8080
listen:
  port: 8081
  ssl:
    certificate-file: examples/h2o/server.crt
    key-file: examples/h2o/server.key
hosts:
  "127.0.0.1.xip.io:8080":
    paths:
      /:
        file.dir: examples/doc_root
        mruby.handler-file: examples/h2o_mruby/hello.rb
    access-log: /dev/null
  "alternate.127.0.0.1.xip.io:8081":
    listen:
      port: 8081
      ssl:
        certificate-file: examples/h2o/alternate.crt
        key-file: examples/h2o/alternate.key
    paths:
      /:
        file.dir: examples/doc_root.alternate
    access-log: /dev/null
./h2o --conf=examples/h2o_mruby/h2o.conf

httpress -t 2 -n 500000 -c 50 -k http://127.0.0.1:8080/hello
ab -n 500000 -c 50 -k http://127.0.0.1:8080/hello

@kazuho
Copy link
Member

kazuho commented Jan 14, 2016

Thank you for noticing the issue.

It seems like a regression in 1.7.0-beta series (reproducible on master but not on v1.6.x branch).

@kazuho
Copy link
Member

kazuho commented Jan 14, 2016

It has been identified that there was a case GC arena was not released. https://gist.github.com/kazuho/3df214c80b1d0404ab94 fixes the issue, but I will adjust how the arena is maintained to make leaks less likely to happen.

@kazuho
Copy link
Member

kazuho commented Jan 18, 2016

Closing as fixed. Please reopen if the problem persists.

@kazuho kazuho closed this as completed Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants