[jruby] A couple of odd JRuby 1.7.24 issues on Windows - REXML bad encoding and EBADF

Thomas E Enebo tom.enebo at gmail.com
Sat Jan 30 01:21:36 JST 2016


We did not have a ton of commits to 1.7.24.  The one which could be
responsible may be updating our jcodings library (which fixed a lot of
unicode data).  Perhaps something else in that library somehow broken
1.7.24?

I recommend opening REXML as one issue and the EBADF as another on our
github project site.  If it is possible for you to build JRuby you could
git bisect on these and try and isolate which commit caused each one.  Like
I said we only resolved about 12 issues for 1.7.24 (and 1/3 of them were
stat() on Windows) so it should not take too many bisection points to
figure out where we broke things.

-Tom


On Fri, Jan 29, 2016 at 12:50 AM, Kimpton, C (Chris) <
Chris.Kimpton at rabobank.com> wrote:

> One other strange thing I forgot to mention, this time with OpenJDK (
> java-1.7.0-openjdk-1.7.0.85.x86_64) on Linux, we see this:
>
>
>
> ArgumentError: invalid byte sequence in US-ASCII
> invalid byte sequence in US-ASCII (ArgumentError)
> org/jruby/RubyRegexp.java:1680:in `match'
>
> /appl/ion/ion_pp/bin/rabowriter09/jruby_scripts/integration_tests/component_test_case.rb:421:in `find_match_lines_in_file'
> org/jruby/RubyArray.java:1613:in `each'
>
> /appl/ion/ion_pp/bin/rabowriter09/jruby_scripts/integration_tests/component_test_case.rb:420:in `find_match_lines_in_file'
> org/jruby/RubyIO.java:3547:in `each_line'
>
> /appl/ion/ion_pp/bin/rabowriter09/jruby_scripts/integration_tests/component_test_case.rb:417:in `find_match_lines_in_file'
> org/jruby/RubyIO.java:1183:in `open'
> org/jruby/RubyKernel.java:325:in `open'
>
> /appl/ion/ion_pp/bin/rabowriter09/jruby_scripts/integration_tests/component_test_case.rb:416:in `find_match_lines_in_file'
>
> /appl/ion/ion_pp/bin/rabowriter09/jruby_scripts/integration_tests/component_test_case.rb:410:in `count_match_lines_in_file'
>
>
>
> Cheers,
>
> Chris
>
>
>
> *From:* Kimpton, C (Chris)
> *Sent:* 28 January 2016 11:14
> *To:* JRuby project mailing list
> *Subject:* A couple of odd JRuby 1.7.24 issues on Windows - REXML bad
> encoding and EBADF
>
>
>
> Hi,
>
>
>
> Since switching to 1.7.24 (from 1.7.23), I am seeing a couple of odd
> issues.
>
>
>
> Running on Windows with JDK 1.7.0_80-b15.
>
>
>
> ISSUE 1: REXML Bad encoding issue
>
>
>
> Getting intermittent (1 out of 10) failures on this line.
>
>
>
> *xml *= *REXML*::*Document*.new(*req*.body)
>
>
>
>
>
> 10:50:58:115|2047-00060:TH21 ERROR: #<ArgumentError: Bad encoding name
> utf-8>
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/rexml/encoding.rb:11:in
> `encoding='
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/rexml/source.rb:55:in
> `encoding='
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/rexml/parsers/baseparser.rb:215:in
> `pull_event'
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/rexml/parsers/baseparser.rb:183:in
> `pull'
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/rexml/parsers/treeparser.rb:22:in
> `parse'
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/rexml/document.rb:249:in
> `build'
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/rexml/document.rb:43:in
> `initialize'
>
> C:/rbidev/IonPlatformPostMerge/config/RaboWriter/integration_tests/tests/mock_shareco/mock_shareco_webservice.rb:94:in
> `handle_bond'
>
> C:/rbidev/IonPlatformPostMerge/config/RaboWriter/integration_tests/tests/mock_shareco/mock_shareco_webservice.rb:20:in
> `service'
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/webrick/httpserver.rb:138:in
> `service'
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/webrick/httpserver.rb:94:in
> `run'
>
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/1.9/webrick/server.rb:191:in
> `start_thread'
>
> ...
>
> Bad encoding name utf-8
>
> Line: 1
>
> Position: 40
>
> Last 80 unconsumed characters:
>
>
>
> This is the XML sent – largely the same as the other 9 times when it does
> work ok.
>
>
>
> 10:50:58:115|0313-00060:TH21 INFO: <?xml version="1.0" encoding="utf-8" ?>
>
>
> <bond><exchange>186</exchange><isin>XSA3</isin><sequenceNumber>1453978215004</sequenceNumber><ohlc><high>102.03</high><close>102.03</close><recentPrice>102.03</recentPrice><recentPriceDatetime>2016-01-28T12:12:03Z</recentPriceDatetime></ohlc></bond>
>
>
>
>
>
> ISSUE 2: EBADF Bad file descriptor issue.
>
>
>
> On this line – a global constant is defined via the call to a function
> that returns a string.  There is an identical call to the same method that
> is done in the parent class (run_integration_tests.rb, line 112)
>
>
>
> *FIX_MESSAGE_FILE *= *EmarketsCheckAdaptor*::*EmarketsFixConfig*::fix_data_dictionary_file
>
>
>
> If I move the constant into a class, it does not have a problem.  Looks
> like I am no longer allowed to redefine constants L.
>
>
>
> 10:53:38:332|0091-00038:TH3 ERROR: RunIntegrationTests:Errno::EBADF:Bad
> file descriptor - Bad file descriptor
>
> 10:53:38:333|0053-00038:TH3 INFO: org/jruby/RubyIO.java:1411:in `write'
>
> 10:53:38:333|0134-00038:TH3 INFO:
> C:/rbidev/IonPlatformPostMerge/config/RaboWriter/integration_tests/tests/test_emarkets_check_adaptor.rb:23:in
> `(root)'
>
> 10:53:38:333|0059-00038:TH3 INFO: org/jruby/RubyKernel.java:1040:in
> `require'
>
> 10:53:38:333|0196-00038:TH3 INFO:
> /C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54:in
> `require'
>
> 10:53:38:333|0152-00038:TH3 INFO:
> file:/C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/jruby/kernel19/kernel.rb:1:in
> `(root)'
>
> 10:53:38:333|0163-00038:TH3 INFO:
> file:/C:/Users/kimptonc/.m2/repository/org/jruby/jruby-complete/1.7.24/jruby-complete-1.7.24.jar!/jruby/kernel19/kernel.rb:13:in
> `require_relative'
>
> 10:53:38:333|0053-00038:TH3 INFO: org/jruby/RubyProc.java:281:in `call'
>
> 10:53:38:333|0123-00038:TH3 INFO:
> C:/rbidev/IonPlatformPostMerge/config/RaboWriter/integration_tests/run_integration_tests.rb:113:in
> `(root)'
>
>
>
> ------------------------------
> This email (including any attachments to it) is confidential, legally
> privileged, subject to copyright and is sent for the personal attention of
> the intended recipient only. If you have received this email in error,
> please advise us immediately and delete it. You are notified that
> disclosing, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited. Although we have taken
> reasonable precautions to ensure no viruses are present in this email, we
> cannot accept responsibility for any loss or damage arising from the
> viruses in this email or attachments. We exclude any liability for the
> content of this email, or for the consequences of any actions taken on the
> basis of the information provided in this email or its attachments, unless
> that information is subsequently confirmed in writing.
> ------------------------------
>
>


-- 
blog: http://blog.enebo.com       twitter: tom_enebo
mail: tom.enebo at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ruby-lang.org/pipermail/jruby/attachments/20160129/211cadca/attachment-0001.html>


More information about the JRuby mailing list