Bug #6616

MinGW: cannot build extensions or run tests due changes in exec_arg?

Added by Luis Lavena about 3 years ago. Updated about 3 years ago.

[ruby-core:45735]
Status:Closed
Priority:Normal
Assignee:Akira Tanaka
ruby -v:trunk r36158 Backport:

Description

Hello,

Originally reported in due Redmine being down.

Latest trunk revision (r36154) is failing on me:
https://gist.github.com/2959908

Decided to attempt a Git bisect to determine the commit that
introduced this and which doing it found another error at r36148:
https://gist.github.com/2960374

Worker machine as 4GB of RAM (Windows 7 x64) and memory was no
exhausted during tests (monitored memory usage)

Git bisect didn't tell me precisely which commit failed since the
error happens randomly except for last commit, which happens always.

Build was made on a separate directory (build32) inside Ruby's source.

MinGW GCC 4.6.3 was used (mingw-w64) which has build successfully
everything in the past.

Entire work tree is reset on every build.

I can attribute this issue to support libraries or compiler since
those have been the same and work properly in the past revisions and
also against ruby_1_9_3 branch.

Further investigation shows the following:

configuring digest/md5
wrong argument type false (expected exec_arg)
Failed to configure digest/md5. It will not be installed.
configuring digest/rmd160
wrong argument type false (expected exec_arg)
Failed to configure digest/rmd160. It will not be installed.
configuring digest/sha1
wrong argument type false (expected exec_arg)
Failed to configure digest/sha1. It will not be installed.
configuring digest/sha2
wrong argument type false (expected exec_arg)
Failed to configure digest/sha2. It will not be installed.
configuring dl
wrong argument type false (expected exec_arg)
Failed to configure dl. It will not be installed.

Which might indicate an incompatible change with exec?

History

#1 Updated by Luis Lavena about 3 years ago

  • Status changed from Open to Assigned

#2 Updated by Heesob Park about 3 years ago

Here is a simple code for the cause of this issue.

C:\work>ruby -ve "system('dir')"
ruby 2.0.0dev (2012-06-21 trunk 36156) [i386-mingw32]
-e:1:in system': wrong argument type Object (expected exec_arg) (TypeError)
from -e:1:in
'

This bug is due to the revision r36152.
I guess the revision r36152 is untested or unfinished.

#3 Updated by Akira Tanaka about 3 years ago

2012/6/21 luislavena (Luis Lavena) luislavena@gmail.com:

Bug #6616: MinGW: cannot build extensions or run tests due changes in exec_arg?

Latest trunk revision (r36154) is failing on me:
https://gist.github.com/2959908

I doubt this is a GC problem.

At least current trunk has a problem as follows.

boron% ./ruby -e 'GC.stress = true; eval("def m(k: 0) end")'
-e:1: [BUG] iseq_compile_each: unknown node: NODE_ARGS
ruby 2.0.0dev (2012-06-21 trunk 36158) [i686-linux]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0008 b:0008 e:000007 CFUNC :eval
c:0002 p:0029 s:0004 b:0004 e:ffffd98c EVAL -e:1 [FINISH]
c:0001 p:0000 s:0002 b:0002 e:fffff3a4 TOP [FINISH]

-e:1:in <main>'
-e:1:in
eval'

-- C level backtrace information -------------------------------------------
./ruby(+0x11577e) [0x8011577e]
./ruby(+0x157a5f) [0x80157a5f]
./ruby(rb_bug+0x49) [0x80157b09]
./ruby(+0xeb1d6) [0x800eb1d6]
./ruby(rb_iseq_compile_node+0x495) [0x800f52e5]
./ruby(+0xfb4f6) [0x800fb4f6]
./ruby(+0xea2d9) [0x800ea2d9]
./ruby(+0xeea64) [0x800eea64]
./ruby(rb_iseq_compile_node+0x6dd) [0x800f552d]
./ruby(+0xfb4f6) [0x800fb4f6]
./ruby(rb_iseq_compile_with_option+0xc9) [0x800fb7b9]
./ruby(rb_iseq_compile+0x2f) [0x800fb96f]
./ruby(+0x10ca35) [0x8010ca35]
./ruby(+0x10d0ec) [0x8010d0ec]
./ruby(+0x100b00) [0x80100b00]
./ruby(+0x103e9d) [0x80103e9d]
./ruby(+0x106a77) [0x80106a77]
./ruby(+0x10c52f) [0x8010c52f]
./ruby(rb_iseq_eval_main+0x9b) [0x8010c7cb]
./ruby(+0x19382) [0x80019382]
./ruby(ruby_exec_node+0x28) [0x800193d8]
./ruby(ruby_run_node+0x25) [0x8001a575]
./ruby(+0x175be) [0x800175be]
/lib/i686/nosegneg/libc.so.6(__libc_start_main+0xe6) [0xb7dc1ca6]
libc-start.c:228
./ruby(+0x17471) [0x80017471]

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

  • Loaded script: -e

  • Loaded features:

    0 enumerator.so
    1 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/i686-linux/enc/encdb.so
    2 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
    3 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/rubygems/defaults.rb
    4 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/i686-linux/rbconfig.rb
    5 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/rubygems/deprecate.rb
    6 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/rubygems/exceptions.rb
    7 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/rubygems/custom_require.rb
    8 /extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/rubygems.rb

  • Process memory map:

80000000-801de000 r-xp 00000000 ca:05 10988445
/extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/ruby/ruby
801de000-801e2000 rw-p 001de000 ca:05 10988445
/extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/ruby/ruby
801e2000-80388000 rw-p 801e2000 00:00 0 [heap]
b7cfd000-b7cfe000 rw-p b7cfd000 00:00 0
b7cfe000-b7d1b000 r-xp 00000000 ca:02 278530 /lib/libgcc_s.so.1
b7d1b000-b7d1c000 rw-p 0001c000 ca:02 278530 /lib/libgcc_s.so.1
b7d28000-b7dab000 rw-p b7d28000 00:00 0
b7dab000-b7eef000 r-xp 00000000 ca:02 83311
/lib/i686/nosegneg/libc-2.11.3.so
b7eef000-b7ef1000 r--p 00144000 ca:02 83311
/lib/i686/nosegneg/libc-2.11.3.so
b7ef1000-b7ef2000 rw-p 00146000 ca:02 83311
/lib/i686/nosegneg/libc-2.11.3.so
b7ef2000-b7ef5000 rw-p b7ef2000 00:00 0
b7ef5000-b7f19000 r-xp 00000000 ca:02 82853
/lib/i686/nosegneg/libm-2.11.3.so
b7f19000-b7f1a000 r--p 00023000 ca:02 82853
/lib/i686/nosegneg/libm-2.11.3.so
b7f1a000-b7f1b000 rw-p 00024000 ca:02 82853
/lib/i686/nosegneg/libm-2.11.3.so
b7f1b000-b7f24000 r-xp 00000000 ca:02 83009
/lib/i686/nosegneg/libcrypt-2.11.3.so
b7f24000-b7f25000 r--p 00008000 ca:02 83009
/lib/i686/nosegneg/libcrypt-2.11.3.so
b7f25000-b7f26000 rw-p 00009000 ca:02 83009
/lib/i686/nosegneg/libcrypt-2.11.3.so
b7f26000-b7f4d000 rw-p b7f26000 00:00 0
b7f4d000-b7f4f000 r-xp 00000000 ca:02 82776
/lib/i686/nosegneg/libdl-2.11.3.so
b7f4f000-b7f50000 r--p 00001000 ca:02 82776
/lib/i686/nosegneg/libdl-2.11.3.so
b7f50000-b7f51000 rw-p 00002000 ca:02 82776
/lib/i686/nosegneg/libdl-2.11.3.so
b7f51000-b7f52000 rw-p b7f51000 00:00 0
b7f52000-b7f59000 r-xp 00000000 ca:02 83310
/lib/i686/nosegneg/librt-2.11.3.so
b7f59000-b7f5a000 r--p 00006000 ca:02 83310
/lib/i686/nosegneg/librt-2.11.3.so
b7f5a000-b7f5b000 rw-p 00007000 ca:02 83310
/lib/i686/nosegneg/librt-2.11.3.so
b7f5b000-b7f70000 r-xp 00000000 ca:02 83016
/lib/i686/nosegneg/libpthread-2.11.3.so
b7f70000-b7f71000 r--p 00014000 ca:02 83016
/lib/i686/nosegneg/libpthread-2.11.3.so
b7f71000-b7f72000 rw-p 00015000 ca:02 83016
/lib/i686/nosegneg/libpthread-2.11.3.so
b7f72000-b7f74000 rw-p b7f72000 00:00 0
b7f76000-b7f78000 r-xp 00000000 ca:05 12797104
/extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b7f78000-b7f79000 rw-p 00001000 ca:05 12797104
/extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/i686-linux/enc/trans/transdb.so
b7f79000-b7f7b000 r-xp 00000000 ca:05 12797068
/extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b7f7b000-b7f7c000 rw-p 00001000 ca:05 12797068
/extdisk/chkbuild/chkbuild/tmp/build/20120621T020500Z/lib/ruby/2.0.0/i686-linux/enc/encdb.so
b7f7c000-b7f7d000 ---p b7f7c000 00:00 0
b7f7d000-b7f84000 rw-p b7f7d000 00:00 0
b7f84000-b7f85000 r-xp b7f84000 00:00 0 [vdso]
b7f85000-b7fa0000 r-xp 00000000 ca:02 278675 /lib/ld-2.11.3.so
b7fa0000-b7fa1000 r--p 0001b000 ca:02 278675 /lib/ld-2.11.3.so
b7fa1000-b7fa2000 rw-p 0001c000 ca:02 278675 /lib/ld-2.11.3.so
bfb77000-bfb8d000 rw-p bfb77000 00:00 0 [stack]

[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
--
Tanaka Akira

#4 Updated by Akira Tanaka about 3 years ago

2012/6/21 Tanaka Akira akr@fsij.org:

2012/6/21 luislavena (Luis Lavena) luislavena@gmail.com:

Bug #6616: MinGW: cannot build extensions or run tests due changes in exec_arg?

Latest trunk revision (r36154) is failing on me:
https://gist.github.com/2959908

I doubt this is a GC problem.

At least current trunk has a problem as follows.

boron% ./ruby -e 'GC.stress = true; eval("def m(k: 0) end")'
-e:1: [BUG] iseq_compile_each: unknown node: NODE_ARGS
ruby 2.0.0dev (2012-06-21 trunk 36158) [i686-linux]

nobu fixed the GC problem at r36161.

I hope that the revision also fix this issue.
--
Tanaka Akira

#5 Updated by Heesob Park about 3 years ago

I think r36161 is not related with this issue.
After applying r36161, this issue is not fixed.

C:\work\snapshot>miniruby -e "system('dir')"
-e:1:in system': wrong argument type Object (expected exec_arg) (TypeError)
from -e:1:in
'

Also, I can see many warning during building.

process.c: In function 'proc_exec_cmd':
process.c:1138:9: warning: passing argument 2 of 'execve' from incompatible pointer type
c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/process.h:119:42: note: expected 'const char * const*' but argument is of type 'char *'
process.c:1138:9: warning: passing argument 3 of 'execve' from incompatible pointer type
c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/process.h:119:42: note: expected 'const char * const
' but argument is of type 'char **'
process.c: In function 'rb_exec_async_signal_safe':
process.c:2876:5: warning: 'rb_run_exec_options_err' is deprecated (declared at process.c:2839)
process.c:2876:5: warning: passing argument 1 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'const struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'
process.c: In function 'rb_spawn_process':
process.c:3502:5: warning: 'rb_run_exec_options_err' is deprecated (declared at process.c:2839)
process.c:3502:5: warning: passing argument 1 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'const struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'
process.c:3502:5: warning: passing argument 2 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'
process.c:3532:5: warning: 'rb_run_exec_options_err' is deprecated (declared at process.c:2839)
process.c:3532:5: warning: passing argument 1 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'const struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'

#6 Updated by Akira Tanaka about 3 years ago

2012/6/21 phasis68 (Heesob Park) phasis@gmail.com:

Issue #6616 has been updated by phasis68 (Heesob Park).

Also, I can see many warning during building.

process.c: In function 'proc_exec_cmd':
process.c:1138:9: warning: passing argument 2 of 'execve' from incompatible pointer type
c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/process.h:119:42: note: expected 'const char * const*' but argument is of type 'char *'
process.c:1138:9: warning: passing argument 3 of 'execve' from incompatible pointer type
c:\devkit\mingw\bin../lib/gcc/mingw32/4.5.2/../../../../include/process.h:119:42: note: expected 'const char * const
' but argument is of type 'char **'
process.c: In function 'rb_exec_async_signal_safe':
process.c:2876:5: warning: 'rb_run_exec_options_err' is deprecated (declared at process.c:2839)
process.c:2876:5: warning: passing argument 1 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'const struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'
process.c: In function 'rb_spawn_process':
process.c:3502:5: warning: 'rb_run_exec_options_err' is deprecated (declared at process.c:2839)
process.c:3502:5: warning: passing argument 1 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'const struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'
process.c:3502:5: warning: passing argument 2 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'
process.c:3532:5: warning: 'rb_run_exec_options_err' is deprecated (declared at process.c:2839)
process.c:3532:5: warning: passing argument 1 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'const struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'

This compile time message is very helpful.

I hope r36165 fixes this issue.
--
Tanaka Akira

#7 Updated by Luis Lavena about 3 years ago

On Thu, Jun 21, 2012 at 7:49 AM, Tanaka Akira akr@fsij.org wrote:

2012/6/21 phasis68 (Heesob Park) phasis@gmail.com:

process.c:3502:5: warning: passing argument 2 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'
process.c:3532:5: warning: 'rb_run_exec_options_err' is deprecated (declared at process.c:2839)
process.c:3532:5: warning: passing argument 1 of 'rb_run_exec_options_err' from incompatible pointer type
process.c:2839:1: note: expected 'const struct rb_exec_arg *' but argument is of type 'struct rb_execarg *'

This compile time message is very helpful.

Apologies, I missed the compilation warnings from the worker computer.

I hope r36165 fixes this issue.

Seems to have fixed it, will close the bug report.

Thank you.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

#8 Updated by Luis Lavena about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Assigned to Closed

Thank you Park for the details.

Thank you Akira Tanaka for solving this.

Closing this out.

Also available in: Atom PDF