Package: ruby1.9.1 Version: 1.9.2.0-2 Severity: normal Tags: squeeze
-- System Information: Debian Release: 6.0.5 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages ruby1.9.1 depends on: ii libc6 2.11.3-3 Embedded GNU C Library: Shared lib ii libruby1.9.1 1.9.2.0-2 Libraries necessary to run Ruby 1. ruby1.9.1 recommends no packages. Versions of packages ruby1.9.1 suggests: pn graphviz <none> (no description available) ii ri1.9.1 1.9.2.0-2 Ruby Interactive reference (for Ru ii ruby1.9.1-dev 1.9.2.0-2 Header files for compiling extensi ii ruby1.9.1-examples 1.9.2.0-2 Examples for Ruby 1.9 -- no debconf information Hello, everybody. The submitted problem showed itself when I tried to use irb1.9.1 to replace, in an 2GB SQL file, simple quotes by \' and double quotes by simple ones. Here comes the commands which leaded to the segfault : root@Arcturus:/var/lib/postgresql# irb1.9.1 irb(main):001:0> out = File.new("out.sql", "w") => #<File:out.sql> irb(main):002:0> File.new("franceprospects.sql", "r").each{|ligne| out.write(ligne.chomp+";")} ^CIRB::Abort: abort then interrupt!! from (irb):2:in `call' from (irb):2:in `block in irb_binding' from (irb):2:in `each' from (irb):2 from /usr/bin/irb1.9.1:12:in `<main>' irb(main):003:0> File.new("franceprospects.sql", "r").each{|ligne| out.write(ligne.chomp+";\n")} ^CIRB::Abort: abort then interrupt!! from (irb):3:in `call' from (irb):3:in `write' from (irb):3:in `block in irb_binding' from (irb):3:in `each' from (irb):3 from /usr/bin/irb1.9.1:12:in `<main>' irb(main):004:0> File.new("franceprospects.sql", "r").each{|ligne| out.write(ligne.chomp+";\n")} ^CIRB::Abort: abort then interrupt!! from (irb):4:in `call' from (irb):4:in `block in irb_binding' from (irb):4:in `each' from (irb):4 from /usr/bin/irb1.9.1:12:in `<main>' irb(main):005:0> out.close => nil irb(main):006:0> out = File.new("out.sql", "w") => #<File:out.sql> irb(main):007:0> File.new("franceprospects.sql", "r").each{|ligne| out.write(ligne.chomp+";\n")} => #<File:franceprospects.sql> irb(main):008:0> out = File.new("quotes.sql", "w") => #<File:quotes.sql> irb(main):009:0> File.new("out.sql", "r").each{|ligne| out.write(ligne.chomp.gsub("\'","\\\'").gsub("\"","\'")+";\n")} /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:180: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] -- control frame ---------- c:0024 p:0010 s:0088 b:0088 l:000087 d:000087 METHOD /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:180 c:0023 p:0019 s:0084 b:0084 l:000083 d:000083 METHOD /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:766 c:0022 p:0092 s:0075 b:0075 l:0011c8 d:000074 BLOCK /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:731 c:0021 p:---- s:0070 b:0070 l:000069 d:000069 FINISH c:0020 p:---- s:0068 b:0068 l:000067 d:000067 CFUNC :call c:0019 p:0349 s:0063 b:0063 l:000062 d:000062 METHOD /usr/lib/ruby/1.9.1/irb/slex.rb:236 c:0018 p:0056 s:0055 b:0055 l:000054 d:000054 METHOD /usr/lib/ruby/1.9.1/irb/slex.rb:75 c:0017 p:0048 s:0050 b:0050 l:000049 d:000049 METHOD /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:286 c:0016 p:0017 s:0046 b:0046 l:000045 d:000045 METHOD /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:262 c:0015 p:0028 s:0041 b:0041 l:000024 d:000040 BLOCK /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:233 c:0014 p:---- s:0038 b:0038 l:000037 d:000037 FINISH c:0013 p:---- s:0036 b:0036 l:000035 d:000035 CFUNC :loop c:0012 p:0009 s:0033 b:0033 l:000024 d:000032 BLOCK /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229 c:0011 p:---- s:0031 b:0031 l:000030 d:000030 FINISH c:0010 p:---- s:0029 b:0029 l:000028 d:000028 CFUNC :catch c:0009 p:0023 s:0025 b:0025 l:000024 d:000024 METHOD /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228 c:0008 p:0046 s:0022 b:0022 l:001f68 d:001f68 METHOD /usr/lib/ruby/1.9.1/irb.rb:155 c:0007 p:0011 s:0019 b:0019 l:0014c8 d:000018 BLOCK /usr/lib/ruby/1.9.1/irb.rb:70 c:0006 p:---- s:0017 b:0017 l:000016 d:000016 FINISH c:0005 p:---- s:0015 b:0015 l:000014 d:000014 CFUNC :catch c:0004 p:0183 s:0011 b:0011 l:0014c8 d:0014c8 METHOD /usr/lib/ruby/1.9.1/irb.rb:69 c:0003 p:0039 s:0006 b:0006 l:0016e8 d:0003d8 EVAL /usr/bin/irb1.9.1:12 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:0016e8 d:0016e8 TOP --------------------------- -- Ruby level backtrace information ---------------------------------------- /usr/bin/irb1.9.1:12:in `<main>' /usr/lib/ruby/1.9.1/irb.rb:69:in `start' /usr/lib/ruby/1.9.1/irb.rb:69:in `catch' /usr/lib/ruby/1.9.1/irb.rb:70:in `block in start' /usr/lib/ruby/1.9.1/irb.rb:155:in `eval_input' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `each_top_level_statement' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in `catch' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `block in each_top_level_statement' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in `loop' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:233:in `block (2 levels) in each_top_level_statement' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:262:in `lex' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:286:in `token' /usr/lib/ruby/1.9.1/irb/slex.rb:75:in `match' /usr/lib/ruby/1.9.1/irb/slex.rb:236:in `match_io' /usr/lib/ruby/1.9.1/irb/slex.rb:236:in `call' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:731:in `block in lex_int2' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:766:in `identify_identifier' /usr/lib/ruby/1.9.1/irb/ruby-lex.rb:180:in `peek' -- C level backtrace information ------------------------------------------- /usr/lib/libruby-1.9.1.so.1.9(rb_vm_bugreport+0x5f) [0x7f36ab935b1f] /usr/lib/libruby-1.9.1.so.1.9(+0x5b304) [0x7f36ab841304] /usr/lib/libruby-1.9.1.so.1.9(rb_bug+0xb3) [0x7f36ab841473] /usr/lib/libruby-1.9.1.so.1.9(+0xefb35) [0x7f36ab8d5b35] /lib/libpthread.so.0(+0xeff0) [0x7f36ab5d8ff0] /usr/lib/libruby-1.9.1.so.1.9(st_lookup+0x88) [0x7f36ab8dc938] /usr/lib/libruby-1.9.1.so.1.9(+0x12660f) [0x7f36ab90c60f] /usr/lib/libruby-1.9.1.so.1.9(rb_class_path+0x16) [0x7f36ab90c9e6] /usr/lib/libruby-1.9.1.so.1.9(rb_class2name+0x9) [0x7f36ab90cb69] /usr/lib/libruby-1.9.1.so.1.9(rb_check_type+0xf6) [0x7f36ab8427c6] /usr/lib/libruby-1.9.1.so.1.9(rb_check_typeddata+0x30) [0x7f36ab8428e0] /usr/lib/libruby-1.9.1.so.1.9(rb_mutex_trylock+0x22) [0x7f36ab937572] /usr/lib/libruby-1.9.1.so.1.9(rb_mutex_lock+0x16) [0x7f36ab939bd6] /usr/lib/libruby-1.9.1.so.1.9(rb_mutex_synchronize+0x21) [0x7f36ab939fb1] /usr/lib/libruby-1.9.1.so.1.9(+0x774a7) [0x7f36ab85d4a7] /usr/lib/libruby-1.9.1.so.1.9(+0x7eaf0) [0x7f36ab864af0] /usr/lib/libruby-1.9.1.so.1.9(rb_io_fptr_finalize+0x25) [0x7f36ab864c25] /usr/lib/libruby-1.9.1.so.1.9(+0x6d93c) [0x7f36ab85393c] /usr/lib/libruby-1.9.1.so.1.9(+0x6d9da) [0x7f36ab8539da] /usr/lib/libruby-1.9.1.so.1.9(+0x153245) [0x7f36ab939245] /usr/lib/libruby-1.9.1.so.1.9(+0x144b04) [0x7f36ab92ab04] /usr/lib/libruby-1.9.1.so.1.9(+0x1457f1) [0x7f36ab92b7f1] /usr/lib/libruby-1.9.1.so.1.9(rb_vm_invoke_proc+0x2f2) [0x7f36ab92d6c2] /usr/lib/libruby-1.9.1.so.1.9(+0x148be8) [0x7f36ab92ebe8] /usr/lib/libruby-1.9.1.so.1.9(+0x140dd0) [0x7f36ab926dd0] /usr/lib/libruby-1.9.1.so.1.9(+0x1457f1) [0x7f36ab92b7f1] /usr/lib/libruby-1.9.1.so.1.9(+0x14668e) [0x7f36ab92c68e] /usr/lib/libruby-1.9.1.so.1.9(rb_rescue2+0x16b) [0x7f36ab84399b] /usr/lib/libruby-1.9.1.so.1.9(+0x13c1ce) [0x7f36ab9221ce] /usr/lib/libruby-1.9.1.so.1.9(+0x148be8) [0x7f36ab92ebe8] /usr/lib/libruby-1.9.1.so.1.9(+0x140dd0) [0x7f36ab926dd0] /usr/lib/libruby-1.9.1.so.1.9(+0x1457f1) [0x7f36ab92b7f1] /usr/lib/libruby-1.9.1.so.1.9(+0x14d3b8) [0x7f36ab9333b8] /usr/lib/libruby-1.9.1.so.1.9(rb_catch_obj+0xde) [0x7f36ab92081e] /usr/lib/libruby-1.9.1.so.1.9(+0x13c07e) [0x7f36ab92207e] /usr/lib/libruby-1.9.1.so.1.9(+0x148be8) [0x7f36ab92ebe8] /usr/lib/libruby-1.9.1.so.1.9(+0x140dd0) [0x7f36ab926dd0] /usr/lib/libruby-1.9.1.so.1.9(+0x1457f1) [0x7f36ab92b7f1] /usr/lib/libruby-1.9.1.so.1.9(+0x14d3b8) [0x7f36ab9333b8] /usr/lib/libruby-1.9.1.so.1.9(rb_catch_obj+0xde) [0x7f36ab92081e] /usr/lib/libruby-1.9.1.so.1.9(+0x13c07e) [0x7f36ab92207e] /usr/lib/libruby-1.9.1.so.1.9(+0x148be8) [0x7f36ab92ebe8] /usr/lib/libruby-1.9.1.so.1.9(+0x140dd0) [0x7f36ab926dd0] /usr/lib/libruby-1.9.1.so.1.9(+0x1457f1) [0x7f36ab92b7f1] /usr/lib/libruby-1.9.1.so.1.9(rb_iseq_eval_main+0xb2) [0x7f36ab92ba42] /usr/lib/libruby-1.9.1.so.1.9(+0x5e4c2) [0x7f36ab8444c2] /usr/lib/libruby-1.9.1.so.1.9(ruby_exec_node+0x1d) [0x7f36ab8444ed] /usr/lib/libruby-1.9.1.so.1.9(ruby_run_node+0x1e) [0x7f36ab845dae] irb1.9.1(main+0x4b) [0x40099b] /lib/libc.so.6(__libc_start_main+0xfd) [0x7f36aa9c1c8d] irb1.9.1() [0x400889] [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 Abandon root@Arcturus:/var/lib/postgresql# The out.sql file contains SQL queries such as : root@Arcturus:/var/lib/postgresql# head out.sql INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("01","AIN",22); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("02","AISNE",19); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("03","ALLIER",3); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("04","ALPES DE HAUTE PROVENCE",21); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("05","HAUTES ALPES",21); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("06","ALPES MARITIMES",21); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("07","ARDÈCHE",22); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("08","ARDENNES",8); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("09","ARIÈGE",16); INSERT INTO Departements (ID_DEPT, LIBELLE, ID_REGION) VALUES ("10","AUBE",8); There is nothing but one-line non interleaved INSERT requests in this file. It seems obvious that I typed wrong the Ruby line which caused this segfault, but I'm not convinced that Ruby should crash like this with a simple syntax error. In my opinion, it should display an error message, perhaps with some explanation, but not crash. If you need any extra details, feel free to ask me. Kind regards. PS : I'm unsure about this being the right place to post such bug, but, since the package comes from Debian repos, I assume that it should be reviewed by Debian developers before being submitted to Ruby developers, if necessary. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org