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

racob throws EXCEPTION_ACCESS_VIOLATION and crashes JRuby #1

Open
jsvd opened this issue May 19, 2015 · 8 comments
Open

racob throws EXCEPTION_ACCESS_VIOLATION and crashes JRuby #1

jsvd opened this issue May 19, 2015 · 8 comments

Comments

@jsvd
Copy link

jsvd commented May 19, 2015

When using win32ole inside of logstash-input-eventlog the following made jruby crash:

# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fef4ec1aa4, pid=4160, tid=4756
#
# JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)

# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.31-b07 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [racob-x64.dll+0x1aa4]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\logstash-1.5.0\hs_err_pid4160.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

contents of the file in this gist

@enebo any idea on what this might be?

@enebo
Copy link
Owner

enebo commented May 19, 2015

@jsvd not offhand no. It is entering racob trying to call something and no doubt doing it wrong. It could be an unanticipated VT_* type or I just made some bad native code. Is this plugin hard to set up?

@jsvd
Copy link
Author

jsvd commented May 19, 2015

@enebo

  1. on windows
  2. download logstash-1.5.0
  3. replace file "vendor/bundle/jruby/1.9/gems/logstash-input-eventlog-0.1.5-java/lib/logstash/inputs/eventlog.rb" with this one
  4. create a "logstash.conf" file with:
    input { eventlog { logfile => [ 'Application', 'System' ] } } output { stdout { codec => dots } }
  5. run logstash with bin\logstash -f logstash.conf
  6. generate eventlog spam with a bat script such as
@echo off

:loop
eventcreate /ID 1 /L APPLICATION /T INFORMATION  /SO MYEVENTSOURCE /D "My first log"
goto loop

or powershell loop:

while($true)
{
write-eventlog -logname Application -source MyApp -eventID 3001 -entrytype Information -message "MyApp added a user-requested feature to the display."
sleep -m 50
}

@pkr1234
Copy link

pkr1234 commented Dec 16, 2015

Hi,

I'm getting this on 2.0.0 logstash on windows. Can you let us know a workaround?

@jsvd
Copy link
Author

jsvd commented Dec 16, 2015

@pkr1234 the newer version of the logstash plugin uses a different library.
so can you please update the logstash-input-eventlog plugin using bin/plugin update logstash-input-eventlog ?

@pkr1234
Copy link

pkr1234 commented Dec 16, 2015

@jsvd I've just updated it. Will wait and see if the issue is resolved.

Note: It did complain about the plugin may or may not be compatible but I did it anyway 2.0.3 -> 3.0.2 if I remember correctly.

@jsvd
Copy link
Author

jsvd commented Dec 16, 2015

since the underlying library changed we bumped the major version.We did some effort to keep it bwc..so..hopefuly it is :)

@pkr1234
Copy link

pkr1234 commented Dec 29, 2015

@jsvd Just wanted to drop a note to mention that upgrading the version using bin/plugin update logstash-input-eventlog worked. I have not had it crash ever since.

Thanks.

@jsvd
Copy link
Author

jsvd commented Dec 29, 2015

@pkr1234 thank you for testing it :) happy holidays!

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

3 participants