https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112012-05-02T15:33:28ZRuby Issue Tracking SystemRuby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263672012-05-02T15:33:28Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>comfirmed with "-O1" has the same issued.</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263702012-05-02T17:06:35Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>and Bug <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Ruby 1.9.3 (P0, P125,P194) Segmentation fault when compiled with GCC 4.7.0 (Closed)" href="https://redmine.ruby-lang.org/issues/6333">#6333</a> has been patched.</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263732012-05-02T18:35:06Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>here is the GDB output:</p>
<p>Program received signal SIGSEGV, Segmentation fault.<br>
gc_mark (objspace=objspace@entry=0x524580, ptr=8589934592, lev=lev@entry=1)<br>
at gc.c:1632<br>
1632 if (obj->as.basic.flags == 0) return; /* free cell */<br>
(gdb) list<br>
1627 {<br>
1628 register RVALUE <em>obj;<br>
1629<br>
1630 obj = RANY(ptr);<br>
1631 if (rb_special_const_p(ptr)) return; /</em> special const not marked <em>/<br>
1632 if (obj->as.basic.flags == 0) return; /</em> free cell <em>/<br>
1633 if (obj->as.basic.flags & FL_MARK) return; /</em> already marked */<br>
1634 obj->as.basic.flags |= FL_MARK;<br>
1635 objspace->heap.live_num++;<br>
1636<br>
(gdb) print obj<br>
$1 = (RVALUE *) 0x200000000<br>
(gdb) where<br>
#0 gc_mark (objspace=objspace@entry=0x524580, ptr=8589934592,<br>
lev=lev@entry=1) at gc.c:1632<br>
#1 0x000000000043d18b in gc_mark_children (objspace=objspace@entry=0x524580,<br>
ptr=, ptr@entry=48545120, lev=lev@entry=1) at gc.c:1836<br>
#2 0x000000000043d573 in gc_mark (objspace=0x524580, ptr=48545120, lev=0)<br>
at gc.c:1649<br>
#3 0x000000000043ea12 in rb_gc_mark (ptr=8589934592) at gc.c:1655<br>
#4 0x00000000004f5d0c in iseq_mark (ptr=0x2e63370) at iseq.c:102<br>
#5 0x000000000043d200 in gc_mark_children (objspace=objspace@entry=0x524580,<br>
ptr=ptr@entry=48545160, lev=lev@entry=2) at gc.c:1857<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed behind-schedule" title="Bug: sprintf() of %f on Windows(MSVCRT) (Closed)" href="https://redmine.ruby-lang.org/issues/6">#6</a> 0x000000000043d573 in gc_mark (objspace=objspace@entry=0x524580,<br>
ptr=48545160, lev=lev@entry=1) at gc.c:1649<br>
#7 0x000000000043d18b in gc_mark_children (objspace=objspace@entry=0x524580,<br>
ptr=, ptr@entry=48447440, lev=lev@entry=1) at gc.c:1836<br>
#8 0x000000000043d573 in gc_mark (objspace=0x524580, ptr=48447440, lev=0)<br>
at gc.c:1649<br>
#9 0x000000000043ea12 in rb_gc_mark (ptr=8589934592) at gc.c:1655<br>
#10 0x00000000004f5d0c in iseq_mark (ptr=0x2e389f0) at iseq.c:102<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: prelude.c compilation problem on mswin32 (Closed)" href="https://redmine.ruby-lang.org/issues/11">#11</a> 0x000000000043d200 in gc_mark_children (objspace=objspace@entry=0x524580,<br>
ptr=ptr@entry=48447480, lev=lev@entry=1) at gc.c:1857<br>
#12 0x000000000043d573 in gc_mark (objspace=0x524580, ptr=48447480, lev=0)<br>
at gc.c:1649<br>
#13 0x000000000043ea12 in rb_gc_mark (ptr=8589934592) at gc.c:1655<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: test issue for ruby-1.9 (Closed)" href="https://redmine.ruby-lang.org/issues/14">#14</a> 0x00000000004f9d67 in rb_thread_mark (ptr=0xdbc930) at vm.c:1728<br>
#15 0x000000000043d200 in gc_mark_children (objspace=objspace@entry=0x524580,<br>
ptr=ptr@entry=42920360, lev=lev@entry=1) at gc.c:1857<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: example issue for ruby-1.8 (Closed)" href="https://redmine.ruby-lang.org/issues/16">#16</a> 0x000000000043d573 in gc_mark (objspace=0x524580, ptr=42920360, lev=0)<br>
at gc.c:1649<br>
<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: deadlock detection for 1.9 (Closed)" href="https://redmine.ruby-lang.org/issues/17">#17</a> 0x000000000043ea12 in rb_gc_mark (ptr=8589934592) at gc.c:1655<br>
#18 0x00000000004f9c12 in vm_mark_each_thread_func (key=,<br>
value=, dummy=) at vm.c:1550<br>
#19 0x00000000004bc784 in st_foreach (table=0x2d8e570,<br>
func=func@entry=0x4f9c09 <vm_mark_each_thread_func>, arg=arg@entry=0)<br>
at st.c:747<br>
#20 0x00000000004f9f2c in rb_vm_mark (ptr=0xdbc6a0) at vm.c:1573<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: should terminate @receiver_thread of Net::IMAP safely (Closed)" href="https://redmine.ruby-lang.org/issues/21">#21</a> 0x000000000043d200 in gc_mark_children (objspace=objspace@entry=0x524580,<br>
ptr=ptr@entry=42920400, lev=lev@entry=1) at gc.c:1857<br>
#22 0x000000000043d573 in gc_mark (objspace=0x524580, ptr=42920400, lev=0)<br>
at gc.c:1649<br>
#23 0x000000000043ea12 in rb_gc_mark (ptr=8589934592) at gc.c:1655<br>
#24 0x000000000043ea5e in gc_marks (objspace=objspace@entry=0x524580)<br>
at gc.c:2446<br>
#25 0x000000000043f422 in gc_lazy_sweep (objspace=0x524580) at gc.c:2194<br>
<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: [DOC] Typo in enumerator.c (Enumerator.new) (Closed)" href="https://redmine.ruby-lang.org/issues/26">#26</a> rb_newobj () at gc.c:1183<br>
#27 0x00000000004c0479 in str_alloc (klass=42985080) at string.c:373<br>
#28 str_new (klass=42985080, ptr=0x2ddf6e0 "INSTALL_SCRIPT", len=14)<br>
at string.c:392<br>
#29 0x00000000004c2079 in rb_str_new (ptr=,<br>
len=) at string.c:412<br>
#30 0x00000000004c20e5 in rb_enc_str_new (ptr=,<br>
len=, enc=enc@entry=0xdbf520) at string.c:426<br>
#31 0x000000000047153a in parser_str_new (p=,<br>
n=, enc=0xdbf520, func=func@entry=2, enc0=0xdbf520)<br>
at parse.y:5403<br>
#32 0x0000000000478212 in parser_parse_string (quote=,<br>
parser=0x2ef2e90) at parse.y:6043<br>
#33 parser_yylex (parser=0x2ef2e90) at parse.y:6655<br>
#34 yylex (p=0x2ef2e90, lval=0x22e7c0) at parse.y:7937<br>
#35 ruby_yyparse (parser=parser@entry=0x2ef2e90) at parse.c:4952<br>
#36 0x0000000000484884 in yycompile0 (arg=arg@entry=49229456,<br>
tracing=tracing@entry=0) at parse.y:5215<br>
#37 0x000000000050ec08 in thread_suppress_tracing (th=0xdbc930,<br>
ev=ev@entry=1, func=func@entry=0x484476 ,<br>
arg=arg@entry=49229456, always=always@entry=1) at thread.c:4565<br>
#38 0x0000000000511967 in ruby_suppress_tracing (<br>
func=func@entry=0x484476 , arg=arg@entry=49229456,<br>
always=always@entry=1) at thread.c:4541<br>
#39 0x0000000000471491 in yycompile (parser=parser@entry=0x2ef2e90,<br>
f=f@entry=0x2eea160 "C:/msys/1.0/home/beta/ruby-1.9.3-p194/rbconfig.rb",<br>
line=line@entry=1) at parse.y:5241<br>
#40 0x00000000004745ca in rb_parser_compile_file (<br>
vparser=vparser@entry=49131120,<br>
f=f@entry=0x2eea160 "C:/msys/1.0/home/beta/ruby-1.9.3-p194/rbconfig.rb",<br>
file=file@entry=49131080, start=start@entry=1) at parse.y:5373<br>
#41 0x00000000004b3d8b in load_file_internal (arg=arg@entry=2288944)<br>
at ruby.c:1630<br>
#42 0x000000000042f68a in rb_ensure (<br>
b_proc=b_proc@entry=0x4b38ef <load_file_internal>,<br>
data1=data1@entry=2288944, e_proc=e_proc@entry=0x4b244f <restore_lineno>,<br>
data2=1) at eval.c:744<br>
#43 0x00000000004b244a in load_file (parser=,<br>
fname=fname@entry=0x2eea160 "C:/msys/1.0/home/beta/ruby-1.9.3-p194/rbconfig.<br>
rb", script=script@entry=0, opt=opt@entry=0x22ed80) at ruby.c:1667<br>
#44 0x00000000004b4053 in rb_load_file (<br>
fname=0x2eea160 "C:/msys/1.0/home/beta/ruby-1.9.3-p194/rbconfig.rb")<br>
at ruby.c:1675<br>
#45 0x0000000000430d96 in rb_load_internal (fname=49131280, wrap=wrap@entry=0)<br>
at load.c:306<br>
#46 0x0000000000432021 in rb_require_safe (fname=49131520,<br>
fname@entry=49131560, safe=0) at load.c:619<br>
#47 0x00000000004321cc in rb_f_require (obj=, fname=49131560)<br>
at load.c:465<br>
#48 0x00000000004fa08d in call_cfunc (func=0x4321b5 <rb_f_require>,<br>
recv=recv@entry=42988160, len=, argc=argc@entry=1,<br>
argv=0x26f0138) at vm_insnhelper.c:323<br>
#49 0x0000000000506c51 in vm_call_cfunc (me=0x2d747b0,<br>
blockptr=, recv=, num=1, reg_cfp=0x27efe30,<br>
th=0xdbc930) at vm_insnhelper.c:404<br>
#50 vm_call_method (th=th@entry=0xdbc930, cfp=cfp@entry=0x27efe30,<br>
num=num@entry=1, blockptr=, flag=flag@entry=8,<br>
id=id@entry=8832, me=0x2d747b0, recv=recv@entry=42988160)<br>
at vm_insnhelper.c:534<br>
#51 0x00000000004ff240 in vm_exec_core (th=th@entry=0xdbc930,<br>
initial=initial@entry=0) at insns.def:1015<br>
#52 0x0000000000502abd in vm_exec (th=0xdbc930) at vm.c:1220<br>
#53 0x0000000000508be1 in rb_iseq_eval (iseqval=48447480) at vm.c:1447<br>
#54 0x0000000000430e03 in rb_load_internal (fname=42889480,<br>
wrap=) at load.c:310<br>
#55 0x0000000000430f67 in rb_f_load (argc=,<br>
argv=) at load.c:383<br>
#56 0x00000000004fa074 in call_cfunc (func=0x430ee5 <rb_f_load>,<br>
recv=recv@entry=42988160, len=, argc=argc@entry=1,<br>
argv=0x26f00a8) at vm_insnhelper.c:317<br>
#57 0x0000000000506c51 in vm_call_cfunc (me=0x2d744d0,<br>
blockptr=, recv=, num=1, reg_cfp=0x27eff38,<br>
th=0xdbc930) at vm_insnhelper.c:404<br>
#58 vm_call_method (th=th@entry=0xdbc930, cfp=cfp@entry=0x27eff38,<br>
num=num@entry=1, blockptr=, flag=flag@entry=8,<br>
id=id@entry=6040, me=0x2d744d0, recv=recv@entry=42988160)<br>
at vm_insnhelper.c:534<br>
#59 0x00000000004ff240 in vm_exec_core (th=th@entry=0xdbc930,<br>
initial=initial@entry=0) at insns.def:1015<br>
#60 0x0000000000502abd in vm_exec (th=th@entry=0xdbc930) at vm.c:1220<br>
#61 0x0000000000508c9b in rb_iseq_eval_main (iseqval=iseqval@entry=42892120)<br>
at vm.c:1461<br>
#62 0x000000000042eb66 in ruby_exec_internal (n=0x28e7b58) at eval.c:204<br>
#63 0x000000000042ef49 in ruby_exec_node (n=n@entry=0x28e7b58) at eval.c:251<br>
#64 0x0000000000430781 in ruby_run_node (n=0x28e7b58) at eval.c:244<br>
#65 0x0000000000401547 in main (argc=2, argv=0xdb5ca0) at main.c:38<br>
(gdb)</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263742012-05-02T18:41:33Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>(gdb) print obj<br>
$1 = (RVALUE <em>) 0x200000000<br>
(gdb) print ptr<br>
$2 = 8589934592<br>
(gdb) print RANY(ptr)<br>
No symbol "RANY" in current context.<br>
(gdb) print (RVALUE</em>) ptr<br>
$4 = (RVALUE *) 0x200000000</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263832012-05-02T22:03:50Zluislavena (Luis Lavena)luislavena@gmail.com
<ul><li><strong>Category</strong> set to <i>build</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li><li><strong>Assignee</strong> set to <i>luislavena (Luis Lavena)</i></li></ul><p>Hello,</p>
<p>Are you trying to build trunk? GCC 4.7.0 changes hasn't been backported yet to ruby_1_9_3 branch</p>
<p>There is no mention of revision against you tested it.</p>
<p>Please confirm.</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263972012-05-03T09:40:47Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>Here is the update:</p>
<ol>
<li>I renamed my folder local to local.old, so that any 3rd partt lib will not be linked.</li>
<li>Rolled back GCC from 4.7.0 to 4.6.2.</li>
<li>just use the following command to configure : ./configure --build=x86_64-w64-mingw32 CFLAGS="-Ox" x will be replaced as 2 or 3.</li>
</ol>
<p>after took all these actions, I got the following result:</p>
<ol>
<li>Ruby 1.9.3P0 x=3 passed; x=2 failed</li>
<li>Ruby 1.9.3P194 x=3 passed; x=2 failed</li>
<li>Snapshot {ruby 2.0.0) x=3 passed; x=2 failed.</li>
</ol> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263982012-05-03T09:40:50Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>Sorry for duplicate items since bugs system has some problem last night.</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=263992012-05-03T09:40:51Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>Here is the update:</p>
<ol>
<li>I renamed my folder local to local.old, so that any 3rd partt lib will not be linked.</li>
<li>Rolled back GCC from 4.7.0 to 4.6.2.</li>
<li>just use the following command to configure : ./configure --build=x86_64-w64-mingw32 CFLAGS="-Ox" x will be replaced as 2 or 3.</li>
</ol>
<p>after took all these actions, I got the following result:</p>
<ol>
<li>Ruby 1.9.3P0 x=3 passed; x=2 failed</li>
<li>Ruby 1.9.3P194 x=3 passed; x=2 failed</li>
<li>Snapshot {ruby 2.0.0) x=3 passed; x=2 failed.</li>
</ol> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=264732012-05-05T16:22:48Zphasis68 (Heesob Park)phasis@gmail.com
<ul></ul><p>I can reproduce this issue for trunk with MinGW64 4.7.0 on Windows 7.</p>
<p>I found it is related with inline function optimization.</p>
<p>Here is a workaround:<br>
./configure --build=x86_64-w64-mingw32 CFLAGS="-O2 -finline-functions"</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=264902012-05-06T14:41:39Zraylinn@gmail.com (ray linn)ray_linn@hotmail.com
<ul></ul><p>that means even choose -O0, still could see this issue. could it be duplicated on Linux?</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=266372012-05-15T21:43:52Zluislavena (Luis Lavena)luislavena@gmail.com
<ul><li><strong>Assignee</strong> changed from <i>luislavena (Luis Lavena)</i> to <i>nobu (Nobuyoshi Nakada)</i></li></ul> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=356552013-01-26T06:55:13Zdrbrain (Eric Hodel)drbrain@segment7.net
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Assigned</i></li></ul><p>There is feedback on this issue that has not been addressed. Luis, Nobu can you comment?</p> Ruby master - Bug #6391: Segment Fault while execute make_encmake.rb for Ruby 1.9.3 P194 ( MinGW64)https://redmine.ruby-lang.org/issues/6391?journal_id=915372021-04-14T04:45:28Zhsbt (Hiroshi SHIBATA)hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li></ul><p>Ruby 1.9 is EOL today.</p>