Project

General

Profile

Actions

Bug #10419

closed

ruby 2.1.3 kackes during IO.readlines of huge file

Added by tjlsmith (Terry Smith) over 9 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
uby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]
[ruby-core:65857]

Description

Trying to read massive text file - here's the one line program with all info included

a = IO.readlines('sentences.txt')

=begin
D:\sentences>dir
Volume in drive D is DATA
Volume Serial Number is BE2F-06B2

Directory of D:\sentences

10/22/2014 14:15

.
10/22/2014 14:15 ..
10/22/2014 14:15 2,389 s.rb
10/10/2014 09:56 1,425,731,345 sentences.txt
2 File(s) 1,425,733,734 bytes
2 Dir(s) 425,943,310,336 bytes free

D:\sentences>ruby -v
ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]

D:\sentences>ruby s.rb
s.rb:1: [BUG] object allocation during garbage collection phase
ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0009 e:000008 CFUNC :readlines
c:0002 p:0013 s:0005 E:000d28 EVAL s.rb:1 [FINISH]
c:0001 p:0000 s:0002 E:0009d4 TOP [FINISH]

s.rb:1:in <main>' s.rb:1:in readlines'

-- C level backtrace information -------------------------------------------

-- Other runtime information -----------------------------------------------

  • Loaded script: s.rb

  • Loaded features:

    0 enumerator.so
    1 C:/Ruby21/lib/ruby/2.1.0/i386-mingw32/enc/encdb.so
    2 C:/Ruby21/lib/ruby/2.1.0/i386-mingw32/enc/iso_8859_1.so
    3 C:/Ruby21/lib/ruby/2.1.0/i386-mingw32/enc/trans/transdb.so
    4 C:/Ruby21/lib/ruby/2.1.0/i386-mingw32/rbconfig.rb
    5 C:/Ruby21/lib/ruby/2.1.0/rubygems/compatibility.rb
    6 C:/Ruby21/lib/ruby/2.1.0/rubygems/defaults.rb
    7 C:/Ruby21/lib/ruby/2.1.0/rubygems/deprecate.rb
    8 C:/Ruby21/lib/ruby/2.1.0/rubygems/errors.rb
    9 C:/Ruby21/lib/ruby/2.1.0/rubygems/version.rb
    10 C:/Ruby21/lib/ruby/2.1.0/rubygems/requirement.rb
    11 C:/Ruby21/lib/ruby/2.1.0/rubygems/platform.rb
    12 C:/Ruby21/lib/ruby/2.1.0/rubygems/basic_specification.rb
    13 C:/Ruby21/lib/ruby/2.1.0/rubygems/stub_specification.rb
    14 C:/Ruby21/lib/ruby/2.1.0/rubygems/util/stringio.rb
    15 C:/Ruby21/lib/ruby/2.1.0/rubygems/specification.rb
    16 C:/Ruby21/lib/ruby/2.1.0/rubygems/exceptions.rb
    17 C:/Ruby21/lib/ruby/2.1.0/rubygems/defaults/operating_system.rb
    18 C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb
    19 thread.rb
    20 C:/Ruby21/lib/ruby/2.1.0/i386-mingw32/thread.so
    21 C:/Ruby21/lib/ruby/2.1.0/monitor.rb
    22 C:/Ruby21/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb
    23 C:/Ruby21/lib/ruby/2.1.0/rubygems.rb

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
=end

Actions #1

Updated by naruse (Yui NARUSE) over 6 years ago

  • Target version deleted (2.6)

Updated by hsbt (Hiroshi SHIBATA) over 5 years ago

  • Assignee deleted (tjlsmith (Terry Smith))

Updated by jeremyevans0 (Jeremy Evans) over 4 years ago

  • Status changed from Open to Closed

I was able to reproduce this on ruby 1.9.3p551 (2014-11-13) [i386-mingw32], but not on any [x64-mingw32] compiled Ruby. I installed ruby 2.6.3p62 (2019-04-16 revision 67580) [i386-mingw32] and was no longer able to reproduce the error, instead getting [FATAL] failed to allocate memory. Since I think that error is reasonable given the 32-bit constraints, I'm going to close this.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0