jnr / jnr-netdb

Network services database access for java
Other
12 stars 4 forks source link

JRuby/JVM crash while calling LinuxServicesDB.getServiceByPort on com.kenai.jffi.Foreign.mmap #2

Closed andrenpaes closed 8 years ago

andrenpaes commented 10 years ago

We're having some production issues while running resque workers. While this seems related to issue #1, it has a different stack trace.

The specific job that triggers the crash just opens and closes Net::SFTP connection for connectivity testing:

  class SftpConnectivityTestWorker
    def self.perform
      Net::SFTP.start(host, user, :password => password).start do |connection|
        # OK
        ...
      end
    rescue Exception => e
      # NOT OK
      ...
      raise e
    end
  end

It doesn't happen every time, only after the worker has processed around 800 jobs.

OS: CentOS release 5.6 (Final) uname: Linux 2.6.18-308.1.1.el5 # 1 SMP Wed Mar 7 04:16:51 EST 2012 x86_64 libc: glibc 2.5 NPTL 2.5 VM Arguments: jvm_args: -XX:MaxPermSize=256m -Xmx1g -Xms1g -Xss2048k -Djffi.boot.library.path=/opt/torquebox/jruby/lib/native/arm-Linux:/opt/torquebox/jruby/lib/native/i386-Linux:/opt/torquebox/jruby/lib/native/x86_64-Linux -Xbootclasspath/a:/opt/torquebox/jruby/lib/jruby.jar -Djruby.home=/opt/torquebox/jruby -Djruby.lib=/opt/torquebox/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh

Here's the crash log: https://gist.github.com/andrenpaes/8055567

andrenpaes commented 10 years ago

Btw, we're using JRuby 1.7.2

headius commented 8 years ago

We have not seen these issues reported again, so I'm closing. If these are still a problem, please reopen with reproduction.