Project

General

Profile

Bug #12396

Compilation crashes with segmentation fault in HP-UX 11.31

Added by michael-o (Michael Osipov) about 3 years ago. Updated about 2 years ago.

Status:
Open
Priority:
Normal
Target version:
-
[ruby-core:75609]

Description

Trying to compile Ruby 2.3.1 from source tarball on "HP-UX blnn724x B.11.31 U ia64 HP-UX" with export CC=/opt/aCC/bin/aCC where aCC is aCC: HP C/aC++ B3910B A.06.25.01 [May 17 2010] and ./configure --prefix=$HOME/ruby. During compilation I receive the following:

compiling ./missing/isinf.c
compiling ./missing/setproctitle.c
compiling ./missing/strlcat.c
compiling ./missing/strlcpy.c
/opt/aCC/bin/aCC -Ae  -g   -c ia64.s
compiling addr2line.c
compiling dmyenc.c
linking miniruby
generating encdb.h
./tool/generic_erb.rb:2: [BUG] Segmentation fault at 0x001000
ruby 2.3.1p112 (2016-04-26 revision 54768) [ia64-hpux11.31]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0025 e:000024 CFUNC  :require
c:0002 p:0008 s:0021 E:001d4c EVAL   ./tool/generic_erb.rb:2 [FINISH]
c:0001 p:0000 s:0002 E:001d98 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
./tool/generic_erb.rb:2:in `<main>'
./tool/generic_erb.rb:2:in `require'

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

* Loaded script: ./tool/generic_erb.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so

[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

Makefile:1374: recipe for target 'encdb.h' failed
gmake: *** [encdb.h] IOT trap (core dumped)

Loading the core dump says:

Reading symbols from miniruby...done.
Core was generated by `miniruby'.
Program terminated with signal 6, Aborted.

#0  0x60000000c020f6d0:0 in _lwp_kill+0x30 ()
   from /usr/lib/hpux32/libpthread.so.1
(gdb) where
#0  0x60000000c020f6d0:0 in _lwp_kill+0x30 ()
   from /usr/lib/hpux32/libpthread.so.1
#1  0x60000000c0174be0:0 in pthread_kill+0x9f0 ()
   from /usr/lib/hpux32/libpthread.so.1
#2  0x60000000c0403460:0 in raise+0xe0 () from /usr/lib/hpux32/libc.so.1
#3  0x60000000c05277b0:0 in abort+0x170 () from /usr/lib/hpux32/libc.so.1
#4  0x42379b0:0 in die () at error.c:407
#5  0x4237ce0:0 in rb_bug_context (ctx=0x20000000401afc00,
    fmt=0x411f760 "Segmentation fault at %p") at error.c:437
#6  0x446ab60:0 in sigsegv (sig=11, info=0x20000000401afa10,
    ctx=0x20000000401afc00) at signal.c:890
#7  <signal handler called>
#8  0x4294a60:1 in mark_locations_array (objspace=0x2000000040036a10,
    x=0x1000, n=532675795) at gc.c:3909
#9  0x4294c30:0 in gc_mark_locations (objspace=0x2000000040036a10, start=0x0,
    end=0x200000007f000350) at gc.c:3922
#10 0x4295850:0 in mark_current_machine_context (objspace=0x2000000040036a10,
    th=0x2000000040035de0) at gc.c:4110
#11 0x42987c0:0 in gc_mark_roots (objspace=0x2000000040036a10, categoryp=0x0)
    at gc.c:4651
#12 0x4299d50:0 in gc_marks_start (objspace=0x2000000040036a10, full_mark=0)
    at gc.c:5204
#13 0x429b3d0:0 in gc_marks (objspace=0x2000000040036a10, full_mark=0)
#14 0x428a130:0 in gc_start (objspace=0x2000000040036a10, full_mark=0,
    immediate_mark=0, immediate_sweep=0, reason=256) at gc.c:6242
#15 0x4289360:0 in heap_prepare (objspace=0x2000000040036a10,
    heap=0x2000000040036a24) at gc.c:1631
#16 0x428a1e0:0 in heap_get_freeobj_from_next_freepage (
    objspace=0x2000000040036a10, heap=0x2000000040036a24) at gc.c:1645
#17 0x428a3f0:0 in heap_get_freeobj (objspace=0x2000000040036a10,
    heap=0x2000000040036a24) at gc.c:1679
#18 0x428aa40:0 in newobj_slowpath (klass=0, flags=27, v1=0, v2=0,
    v3=1076481296, objspace=0x2000000040036a10, wb_protected=0) at gc.c:1808
#19 0x428ac50:0 in newobj_slowpath_wb_unprotected (klass=0, flags=27, v1=0,
    v2=0, v3=1076481296, objspace=0x2000000040036a10) at gc.c:1826
#20 0x428ae50:0 in newobj_of (klass=0, flags=27, v1=0, v2=0, v3=1076481296,
    wb_protected=0) at gc.c:1851
#21 0x428b170:0 in rb_node_newnode (type=NODE_ARGS, a0=0, a1=0, a2=1076481296)
    at gc.c:1888
#22 0x436eaa0:0 in node_newnode (parser=0x2000000040225410, type=NODE_ARGS,
    a0=0, a1=0, a2=1076481296) at parse.y:8798
#23 0x43734a0:0 in new_args_tail_gen (parser=0x2000000040225410, k=0x0, kr=0,
    b=0) at parse.y:10071
#24 0x436b530:0 in ruby_yyparse (parser=0x2000000040225410) at parse.y:4574
#25 0x43773b0:0 in yycompile0 (arg=1075991568) at parse.y:5542
#26 0x45e4830:0 in rb_suppress_tracing (func=0x4377180:0 <yycompile0>,
    arg=1075991568) at vm_trace.c:407
#27 0x43779b0:0 in yycompile (parser=0x2000000040225410, fname=1074887136,
    line=1) at parse.y:5572
#28 0x4378630:0 in rb_parser_compile_file_path (vparser=1074887016,
    fname=1074887136, file=1074886992, start=1) at parse.y:5712
#29 0x445f0a0:0 in load_file_internal (argp_v=2147470080) at ruby.c:1758
#30 0x424b290:0 in rb_ensure (b_proc=0x445e240:0 <load_file_internal>,
    data1=2147470080, e_proc=0x445f7c0:0 <restore_load_file>, data2=2147470080)
    at eval.c:901
#31 0x445e220:0 in load_file (parser=1074887016, fname=1074887136, script=0,
    opt=0x200000007fffcb20) at ruby.c:1878
#32 0x445f9f0:0 in rb_load_file_str (fname_v=1074887136) at ruby.c:1894
#33 0x4256120:0 in rb_load_internal0 (th=0x2000000040035de0, fname=1074887136,
    wrap=0) at load.c:615
#34 0x4258ab0:0 in rb_require_internal (fname=1074887520, safe=0) at load.c:998
#35 0x42572a0:0 in rb_require_safe (fname=1074887568, safe=0) at load.c:1043
#36 0x4257250:0 in rb_f_require (obj=1075366488, fname=1074887568)
    at load.c:824
#37 0x4599070:0 in call_cfunc_1 (func=0x4257200:0 <rb_f_require>,
    recv=1075366488, argc=1, argv=0x200000004005e798) at vm_insnhelper.c:1471
#38 0x459a1a0:0 in vm_call_cfunc_with_frame (th=0x2000000040035de0,
    reg_cfp=0x20000000400de700, calling=0x200000007fffd6d0,
    ci=0x200000004027a470, cc=0x2000000040285380) at vm_insnhelper.c:1638
#39 0x459a950:0 in vm_call_cfunc (th=0x2000000040035de0,
    reg_cfp=0x20000000400de700, calling=0x200000007fffd6d0,
    ci=0x200000004027a470, cc=0x2000000040285380) at vm_insnhelper.c:1733
#40 0x459c560:0 in vm_call_method_each_type (th=0x2000000040035de0,
    cfp=0x20000000400de700, calling=0x200000007fffd6d0, ci=0x200000004027a470,
    cc=0x2000000040285380) at vm_insnhelper.c:2022
#41 0x459b8b0:0 in vm_call_method (th=0x2000000040035de0,
    cfp=0x20000000400de700, calling=0x200000007fffd6d0, ci=0x200000004027a470,
    cc=0x2000000040285380) at vm_insnhelper.c:2157
#42 0x4593030:0 in vm_call_general (th=0x2000000040035de0,
    reg_cfp=0x20000000400de700, calling=0x200000007fffd6d0,
    ci=0x200000004027a470, cc=0x2000000040285380) at vm_insnhelper.c:2189
#43 0x45a6430:0 in vm_exec_core (th=0x2000000040035de0, initial=0)
    at insns.def:995
#44 0x45bb0d0:0 in vm_exec (th=0x2000000040035de0) at vm.c:1650
#45 0x45cab90:0 in rb_iseq_eval_main (iseq=0x20000000401206e0) at vm.c:1893
#46 0x4247df0:0 in ruby_exec_internal (n=0x20000000401206e0) at eval.c:245
#47 0x42480f0:0 in ruby_exec_node (n=0x20000000401206e0) at eval.c:310
#48 0x4248040:0 in ruby_run_node (n=0x20000000401206e0) at eval.c:302
#49 0x418fe50:0 in main (argc=11, argv=0x200000007ffff210) at main.c:36

Ideas welcome..

History

Updated by Carla_C (Carla Curtis) almost 3 years ago

I am also having this issue.

Ruby 2.1.9
HP-UX B.11.31 U ia64 4067183464
cc: HP C/aC++ B3910B A.06.28 [Nov 21 2013]

I rebuilt replacing +O2 with -g, and gdb tells me:

#0 0x423b1f0:1 in mark_locations_array (objspace=0x40046500, x=0x1000, n=499120527) at gc.c:3297

3293 mark_locations_array(rb_objspace_t *objspace, register VALUE *x, register long n)
3294 {
3295 VALUE v;
3296 while (n--) {
3297 v = *x;
3298 gc_mark_maybe(objspace, v);
3299 x++;
3300 }
3301 }

Updated by michael-o (Michael Osipov) almost 3 years ago

Just retried with a stable snapshot:

compiling ./missing/strlcpy.c
/opt/aCC/bin/aCC -Ae  -g   -c ia64.s
compiling addr2line.c
compiling dmyenc.c
linking miniruby
generating encdb.h
./tool/generic_erb.rb:2: [BUG] Segmentation fault at 0x001000
ruby 2.3.2p182 (2016-08-30 revision 56032) [ia64-hpux11.31]

-- Control frame information -----------------------------------------------
c:0003 p:---- s:0025 e:000024 CFUNC  :require
c:0002 p:0008 s:0021 E:001d4c EVAL   ./tool/generic_erb.rb:2 [FINISH]
c:0001 p:0000 s:0002 E:001d98 (none) [FINISH]

-- Ruby level backtrace information ----------------------------------------
./tool/generic_erb.rb:2:in `<main>'
./tool/generic_erb.rb:2:in `require'

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

* Loaded script: ./tool/generic_erb.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 rational.so
    3 complex.so

[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

Makefile:1374: recipe for target 'encdb.h' failed
gmake: *** [encdb.h] IOT trap (core dumped)

Same issue. Anyone some smart idea? I need Ruby for Asciidoctor.

Updated by michael-o (Michael Osipov) almost 3 years ago

I have removed the asterisk from the x and got a bit further to:

gmake[3]: Entering directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1'
gmake 'AR_FLAGS=' 'CC_FOR_BUILD=' 'CFLAGS=-g  -warn all' 'CXXFLAGS=-g ' 'CFLAGS_FOR_BUILD=' 'CFLAGS_FOR_TARGET=' 'INSTALL=/usr/local/coreutils/bin/install -c' 'INSTALL_DATA=/usr/local/coreutils/bin/install -c -m 644' 'INSTALL_PROGRAM=/usr/local/coreutils/bin/install -c' 'INSTALL_SCRIPT=/usr/local/coreutils/bin/install -c' 'JC1FLAGS=' 'LDFLAGS=-L.   -L../../.. ' 'LIBCFLAGS=' 'LIBCFLAGS_FOR_TARGET=' 'MAKE=gmake' 'MAKEINFO=/bin/sh /tmp/stable-snapshot/ext/fiddle/libffi-3.2.1/missing makeinfo ' 'PICFLAG=' 'PICFLAG_FOR_TARGET=' 'RUNTESTFLAGS=' 'SHELL=/bin/sh' 'exec_prefix=/usr/local' 'infodir=/usr/local/share/info' 'libdir=/tmp/ruby/lib' 'mandir=/usr/local/share/man' 'prefix=/usr/local' 'AR=ar' 'AS=as' 'CC=/opt/aCC/bin/aCC -Ae' 'CXX=aCC' 'LD=ld' 'NM=/usr/bin/nm -p' 'RANLIB=ranlib' 'DESTDIR=' all-recursive
gmake[4]: Entering directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1'
Making all in include
gmake[5]: Entering directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1/include'
gmake[5]: Nothing to be done for 'all'.
gmake[5]: Leaving directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1/include'
Making all in testsuite
gmake[5]: Entering directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1/testsuite'
gmake[5]: Nothing to be done for 'all'.
gmake[5]: Leaving directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1/testsuite'
Making all in man
gmake[5]: Entering directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1/man'
gmake[5]: Nothing to be done for 'all'.
gmake[5]: Leaving directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1/man'
gmake[5]: Entering directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1'
  CC       src/prep_cif.lo
aCC: warning 901: unknown option: `-arn': use +help for online documentation.
aCC: warning 1913: `all' does not exist or cannot be read
  CC       src/types.lo
aCC: warning 901: unknown option: `-arn': use +help for online documentation.
aCC: warning 1913: `all' does not exist or cannot be read
  CC       src/raw_api.lo
aCC: warning 901: unknown option: `-arn': use +help for online documentation.
aCC: warning 1913: `all' does not exist or cannot be read
  CC       src/java_raw_api.lo
aCC: warning 901: unknown option: `-arn': use +help for online documentation.
aCC: warning 1913: `all' does not exist or cannot be read
  CC       src/closures.lo
aCC: warning 901: unknown option: `-arn': use +help for online documentation.
aCC: warning 1913: `all' does not exist or cannot be read
  CC       src/ia64/ffi.lo
aCC: warning 901: unknown option: `-arn': use +help for online documentation.
aCC: warning 1913: `all' does not exist or cannot be read
"src/ia64/ffi.c", line 41: error #3088: an attribute specifies a mode
          incompatible with "void *"
  typedef void *PTR64 __attribute__((mode(DI)));
                                     ^

"src/ia64/ffi.c", line 116: error #2018: expected a ")"
        stf_spill (fpaddr, *(float *) addr);
        ^

"src/ia64/ffi.c", line 119: error #2018: expected a ")"
        stf_spill (fpaddr, *(double *) addr);
        ^

"src/ia64/ffi.c", line 122: error #2018: expected a ")"
        stf_spill (fpaddr, *(__float80 *) addr);
        ^

"src/ia64/ffi.c", line 140: error #2018: expected a ")"
        ldf_fill (result, fpaddr);
        ^

"src/ia64/ffi.c", line 147: error #2018: expected a ")"
        ldf_fill (result, fpaddr);
        ^

"src/ia64/ffi.c", line 154: error #2018: expected a ")"
        ldf_fill (result, fpaddr);
        ^

"src/ia64/ffi.c", line 187: error #3578: case label value has already appeared
          in this switch at line 181
      case FFI_TYPE_LONGDOUBLE:
           ^

"src/ia64/ffi.c", line 327: error #2018: expected a ")"
            stf_spill (&stack->fp_regs[fpcount++], *(float *)avalue[i]);
            ^

"src/ia64/ffi.c", line 337: error #2018: expected a ")"
            stf_spill (&stack->fp_regs[fpcount++], *(double *)avalue[i]);
            ^

"src/ia64/ffi.c", line 341: error #3578: case label value has already appeared
          in this switch at line 335
        case FFI_TYPE_LONGDOUBLE:
             ^

"src/ia64/ffi.c", line 345: error #2018: expected a ")"
            stf_spill (&stack->fp_regs[fpcount++], *(__float80 *)avalue[i]);
            ^

"src/ia64/ffi.c", line 371: error #3143: arithmetic on pointer to void or
          function type
                                   avalue[i] + offset);
                                             ^

"src/ia64/ffi.c", line 499: error #2018: expected a ")"
              ldf_fill (result, addr);
              ^

"src/ia64/ffi.c", line 513: error #2018: expected a ")"
              ldf_fill (result, addr);
              ^

"src/ia64/ffi.c", line 521: error #3578: case label value has already appeared
          in this switch at line 507
        case FFI_TYPE_LONGDOUBLE:
             ^

"src/ia64/ffi.c", line 529: error #2018: expected a ")"
              ldf_fill (result, addr);
              ^

"src/ia64/ffi.c", line 560: error #3143: arithmetic on pointer to void or
          function type
                    hfa_type_store (hfa_type, addr + offset,
                                                   ^

"src/ia64/ffi.c", line 568: error #3143: arithmetic on pointer to void or
          function type
                  memcpy (addr + offset, (char *)stack->gp_regs + gp_offset,
                               ^

19 errors detected in the compilation of "src/ia64/ffi.c".
Makefile:1362: recipe for target 'src/ia64/ffi.lo' failed
gmake[5]: *** [src/ia64/ffi.lo] Error 1
gmake[5]: Leaving directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1'
Makefile:1596: recipe for target 'all-recursive' failed
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1'
Makefile:730: recipe for target 'all' failed
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory '/tmp/stable-snapshot/ext/fiddle/libffi-3.2.1'
Makefile:373: recipe for target 'libffi-3.2.1/.libs/libffi_convenience.a' failed
gmake[2]: *** [libffi-3.2.1/.libs/libffi_convenience.a] Error 2
gmake[2]: Leaving directory '/tmp/stable-snapshot/ext/fiddle'
exts.mk:185: recipe for target 'ext/fiddle/all' failed
gmake[1]: *** [ext/fiddle/all] Error 2
gmake[1]: Leaving directory '/tmp/stable-snapshot'
Makefile:760: recipe for target 'build-ext' failed
gmake: *** [build-ext] Error 2

Updated by naruse (Yui NARUSE) about 2 years ago

  • Assignee set to takano32 (Mitsuhiro TAKANO)

Also available in: Atom PDF