Project

General

Profile

Actions

Bug #14073

closed

Crash on boot sice Ruby 2.4.0

Added by okkez (okkez _) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
[ruby-dev:50309]

Description

milter managerというソフトウェアにRubyを組み込んで利用しているのですが、Ruby2.4を組込むとmilter-manager起動時にクラッシュするようになってしまいました。
Ruby2.3.5など過去のバージョンでは問題ありませんでした。

gdb でバックトレースを取ってみたら以下のようになっていました。

(gdb) r
Starting program: /tmp/local/sbin/milter-manager --help
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7f662cc4b700 (LWP 10107)]
*** Error in `/tmp/local/sbin/milter-manager': realloc(): invalid old size: 0x000055555588acf0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bfb)[0x7f662b8d1bfb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76fc6)[0x7f662b8d7fc6]
/lib/x86_64-linux-gnu/libc.so.6(+0x7a13c)[0x7f662b8db13c]
/lib/x86_64-linux-gnu/libc.so.6(realloc+0x159)[0x7f662b8dc719]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(rb_encdb_replicate+0x268)[0x7f662a1ed628]
/home/kenji/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/encdb.so(Init_encdb+0x629)[0x7f66299a0eb9]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(dln_load+0xfb)[0x7f662a18e98b]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(+0x208f66)[0x7f662a368f66]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(+0xee090)[0x7f662a24e090]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(+0xee75f)[0x7f662a24e75f]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(+0x228ee5)[0x7f662a388ee5]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(+0x19321f)[0x7f662a2f321f]
/home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4(ruby_process_options+0xd8)[0x7f662a2f4058]
/tmp/local/lib/milter-manager/module/configuration/milter-manager-ruby-configuration.so(milter_manager_module_impl_init+0x1d7)[0x7f662a671747]
/tmp/local/lib/libmilter-manager.so.0(+0x21a1d)[0x7f662c140a1d]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_type_module_use+0x53)[0x7f662b644a03]
/tmp/local/lib/libmilter-manager.so.0(+0x15bfc)[0x7f662c134bfc]
/tmp/local/lib/libmilter-manager.so.0(milter_manager_configuration_new+0x96)[0x7f662c136656]
/tmp/local/lib/libmilter-manager.so.0(milter_manager_init+0xe0)[0x7f662c132910]
/tmp/local/sbin/milter-manager(+0x7b4)[0x5555555547b4]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f662b8812e1]
/tmp/local/sbin/milter-manager(+0x7fa)[0x5555555547fa]
======= Memory map: ========
555555554000-555555555000 r-xp 00000000 fe:00 13930598                   /tmp/local/sbin/milter-manager
555555754000-555555755000 r--p 00000000 fe:00 13930598                   /tmp/local/sbin/milter-manager
555555755000-555555756000 rw-p 00001000 fe:00 13930598                   /tmp/local/sbin/milter-manager
555555756000-5555558a7000 rw-p 00000000 00:00 0                          [heap]
7f6624000000-7f6624021000 rw-p 00000000 00:00 0
7f6624021000-7f6628000000 ---p 00000000 00:00 0
7f6629789000-7f662979f000 r-xp 00000000 fe:00 9175116                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f662979f000-7f662999e000 ---p 00016000 fe:00 9175116                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f662999e000-7f662999f000 r--p 00015000 fe:00 9175116                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f662999f000-7f66299a0000 rw-p 00016000 fe:00 9175116                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f66299a0000-7f66299a2000 r-xp 00000000 fe:00 7483560                    /home/kenji/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/encdb.so
7f66299a2000-7f6629ba1000 ---p 00002000 fe:00 7483560                    /home/kenji/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/encdb.so
7f6629ba1000-7f6629ba2000 r--p 00001000 fe:00 7483560                    /home/kenji/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/encdb.so
7f6629ba2000-7f6629ba3000 rw-p 00002000 fe:00 7483560                    /home/kenji/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/encdb.so
7f6629ba3000-7f6629ca4000 rw-p 00000000 00:00 0
7f6629ca4000-7f6629cac000 r-xp 00000000 fe:00 9183798                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
7f6629cac000-7f6629eac000 ---p 00008000 fe:00 9183798                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
7f6629eac000-7f6629ead000 r--p 00008000 fe:00 9183798                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
7f6629ead000-7f6629eae000 rw-p 00009000 fe:00 9183798                    /lib/x86_64-linux-gnu/libcrypt-2.24.so
7f6629eae000-7f6629edc000 rw-p 00000000 00:00 0
7f6629edc000-7f6629f5e000 r-xp 00000000 fe:00 1181766                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.2
7f6629f5e000-7f662a15e000 ---p 00082000 fe:00 1181766                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.2
7f662a15e000-7f662a15f000 r--p 00082000 fe:00 1181766                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.2
7f662a15f000-7f662a160000 rw-p 00083000 fe:00 1181766                    /usr/lib/x86_64-linux-gnu/libgmp.so.10.3.2
7f662a160000-7f662a456000 r-xp 00000000 fe:00 7482727                    /home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4.2
7f662a456000-7f662a656000 ---p 002f6000 fe:00 7482727                    /home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4.2
7f662a656000-7f662a65c000 r--p 002f6000 fe:00 7482727                    /home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4.2
7f662a65c000-7f662a65f000 rw-p 002fc000 fe:00 7482727                    /home/kenji/.rbenv/versions/2.4.2/lib/libruby.so.2.4.2
7f662a65f000-7f662a66f000 rw-p 00000000 00:00 0
7f662a66f000-7f662a672000 r-xp 00000000 fe:00 13930596                   /tmp/local/lib/milter-manager/module/configuration/milter-manager-ruby-configuration.so
7f662a672000-7f662a872000 ---p 00003000 fe:00 13930596                   /tmp/local/lib/milter-manager/module/configuration/milter-manager-ruby-configuration.so
7f662a872000-7f662a873000 r--p 00003000 fe:00 13930596                   /tmp/local/lib/milter-manager/module/configuration/milter-manager-ruby-configuration.so
7f662a873000-7f662a874000 rw-p 00004000 fe:00 13930596                   /tmp/local/lib/milter-manager/module/configuration/milter-manager-ruby-configuration.so
7f662a874000-7f662a8e4000 r-xp 00000000 fe:00 9175091                    /lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f662a8e4000-7f662aae4000 ---p 00070000 fe:00 9175091                    /lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f662aae4000-7f662aae5000 r--p 00070000 fe:00 9175091                    /lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f662aae5000-7f662aae6000 rw-p 00071000 fe:00 9175091                    /lib/x86_64-linux-gnu/libpcre.so.3.13.3
7f662aae6000-7f662aae8000 r-xp 00000000 fe:00 9184000                    /lib/x86_64-linux-gnu/libdl-2.24.so
7f662aae8000-7f662ace8000 ---p 00002000 fe:00 9184000                    /lib/x86_64-linux-gnu/libdl-2.24.so
7f662ace8000-7f662ace9000 r--p 00002000 fe:00 9184000                    /lib/x86_64-linux-gnu/libdl-2.24.so
7f662ace9000-7f662acea000 rw-p 00003000 fe:00 9184000                    /lib/x86_64-linux-gnu/libdl-2.24.so
7f662acea000-7f662acf1000 r-xp 00000000 fe:00 1190770                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f662acf1000-7f662aef1000 ---p 00007000 fe:00 1190770                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f662aef1000-7f662aef2000 r--p 00007000 fe:00 1190770                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f662aef2000-7f662aef3000 rw-p 00008000 fe:00 1190770                    /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4
7f662aef3000-7f662b004000 r-xp 00000000 fe:00 9176492                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.2
7f662b004000-7f662b204000 ---p 00111000 fe:00 9176492                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.2
7f662b204000-7f662b205000 r--p 00111000 fe:00 9176492                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.2
7f662b205000-7f662b206000 rw-p 00112000 fe:00 9176492                    /lib/x86_64-linux-gnu/libglib-2.0.so.0.5400.2
7f662b206000-7f662b207000 rw-p 00000000 00:00 0
7f662b207000-7f662b208000 r-xp 00000000 fe:00 1188111                    /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0.5400.2
7f662b208000-7f662b407000 ---p 00001000 fe:00 1188111                    /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0.5400.2
7f662b407000-7f662b408000 r--p 00000000 fe:00 1188111                    /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0.5400.2
7f662b408000-7f662b409000 rw-p 00001000 fe:00 1188111                    /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0.5400.2
7f662b409000-7f662b40c000 r-xp 00000000 fe:00 1188109                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.5400.2
7f662b40c000-7f662b60b000 ---p 00003000 fe:00 1188109                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.5400.2
7f662b60b000-7f662b60c000 r--p 00002000 fe:00 1188109                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.5400.2
7f662b60c000-7f662b60d000 rw-p 00003000 fe:00 1188109                    /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0.5400.2
7f662b60d000-7f662b65f000 r-xp 00000000 fe:00 1188110                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5400.2
7f662b65f000-7f662b85f000 ---p 00052000 fe:00 1188110                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5400.2
7f662b85f000-7f662b860000 r--p 00052000 fe:00 1188110                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5400.2
7f662b860000-7f662b861000 rw-p 00053000 fe:00 1188110                    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.5400.2
7f662b861000-7f662b9f4000 r-xp 00000000 fe:00 9179729                    /lib/x86_64-linux-gnu/libc-2.24.so
7f662b9f4000-7f662bbf4000 ---p 00193000 fe:00 9179729                    /lib/x86_64-linux-gnu/libc-2.24.so
7f662bbf4000-7f662bbf8000 r--p 00193000 fe:00 9179729                    /lib/x86_64-linux-gnu/libc-2.24.so
7f662bbf8000-7f662bbfa000 rw-p 00197000 fe:00 9179729                    /lib/x86_64-linux-gnu/libc-2.24.so
7f662bbfa000-7f662bbfe000 rw-p 00000000 00:00 0
7f662bbfe000-7f662bc16000 r-xp 00000000 fe:00 9184017                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7f662bc16000-7f662be15000 ---p 00018000 fe:00 9184017                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7f662be15000-7f662be16000 r--p 00017000 fe:00 9184017                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7f662be16000-7f662be17000 rw-p 00018000 fe:00 9184017                    /lib/x86_64-linux-gnu/libpthread-2.24.so
7f662be17000-7f662be1b000 rw-p 00000000 00:00 0
7f662be1b000-7f662bf1e000 r-xp 00000000 fe:00 9184001                    /lib/x86_64-linux-gnu/libm-2.24.so
7f662bf1e000-7f662c11d000 ---p 00103000 fe:00 9184001                    /lib/x86_64-linux-gnu/libm-2.24.so
7f662c11d000-7f662c11e000 r--p 00102000 fe:00 9184001                    /lib/x86_64-linux-gnu/libm-2.24.so
7f662c11e000-7f662c11f000 rw-p 00103000 fe:00 9184001                    /lib/x86_64-linux-gnu/libm-2.24.so
7f662c11f000-7f662c15a000 r-xp 00000000 fe:00 13904863                   /tmp/local/lib/libmilter-manager.so.0.0.0
7f662c15a000-7f662c35a000 ---p 0003b000 fe:00 13904863                   /tmp/local/lib/libmilter-manager.so.0.0.0
7f662c35a000-7f662c35b000 r--p 0003b000 fe:00 13904863                   /tmp/local/lib/libmilter-manager.so.0.0.0
7f662c35b000-7f662c35d000 rw-p 0003c000 fe:00 13904863                   /tmp/local/lib/libmilter-manager.so.0.0.0
7f662c35d000-7f662c371000 r-xp 00000000 fe:00 13904857                   /tmp/local/lib/libmilter-server.so.0.0.0
7f662c371000-7f662c570000 ---p 00014000 fe:00 13904857                   /tmp/local/lib/libmilter-server.so.0.0.0
7f662c570000-7f662c571000 r--p 00013000 fe:00 13904857                   /tmp/local/lib/libmilter-server.so.0.0.0
7f662c571000-7f662c572000 rw-p 00014000 fe:00 13904857                   /tmp/local/lib/libmilter-server.so.0.0.0
7f662c572000-7f662c590000 r-xp 00000000 fe:00 13904846                   /tmp/local/lib/libmilter-client.so.0.0.0
7f662c590000-7f662c790000 ---p 0001e000 fe:00 13904846                   /tmp/local/lib/libmilter-client.so.0.0.0
7f662c790000-7f662c791000 r--p 0001e000 fe:00 13904846                   /tmp/local/lib/libmilter-client.so.0.0.0
7f662c791000-7f662c792000 rw-p 0001f000 fe:00 13904846                   /tmp/local/lib/libmilter-client.so.0.0.0
7f662c792000-7f662c7d3000 r-xp 00000000 fe:00 13893668                   /tmp/local/lib/libmilter-core.so.0.0.0
7f662c7d3000-7f662c9d3000 ---p 00041000 fe:00 13893668                   /tmp/local/lib/libmilter-core.so.0.0.0
7f662c9d3000-7f662c9d5000 r--p 00041000 fe:00 13893668                   /tmp/local/lib/libmilter-core.so.0.0.0
7f662c9d5000-7f662c9d6000 rw-p 00043000 fe:00 13893668                   /tmp/local/lib/libmilter-core.so.0.0.0
7f662c9d6000-7f662ca57000 rw-p 00000000 00:00 0
7f662ca57000-7f662ca7a000 r-xp 00000000 fe:00 9175609                    /lib/x86_64-linux-gnu/ld-2.24.so
7f662cb1f000-7f662cc38000 r--p 00000000 fe:00 1187503                    /usr/lib/locale/locale-archive
7f662cc38000-7f662cc3e000 rw-p 00000000 00:00 0
7f662cc40000-7f662cc41000 rw-p 00000000 00:00 0
7f662cc41000-7f662cc48000 r--s 00000000 fe:00 1215302                    /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7f662cc48000-7f662cc49000 ---p 00000000 00:00 0
7f662cc49000-7f662cc4c000 rw-p 00000000 00:00 0
7f662cc4c000-7f662cc72000 r--p 00000000 fe:00 1189825                    /usr/share/locale/ja/LC_MESSAGES/libc.mo
7f662cc72000-7f662cc75000 rw-p 00000000 00:00 0
7f662cc75000-7f662cc78000 r--p 00000000 00:00 0                          [vvar]
7f662cc78000-7f662cc7a000 r-xp 00000000 00:00 0                          [vdso]
7f662cc7a000-7f662cc7b000 r--p 00023000 fe:00 9175609                    /lib/x86_64-linux-gnu/ld-2.24.so
7f662cc7b000-7f662cc7c000 rw-p 00024000 fe:00 9175609                    /lib/x86_64-linux-gnu/ld-2.24.so
7f662cc7c000-7f662cc7d000 rw-p 00000000 00:00 0
7fffff800000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]

Thread 1 "milter-manager" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: そのようなファイルやディレクトリはありません.
(gdb) bt
#0  0x00007f662b893fff in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007f662b89542a in __GI_abort () at abort.c:89
#2  0x00007f662b8d1c00 in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7f662b9c6d78 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007f662b8d7fc6 in malloc_printerr (action=3, str=0x7f662b9c39ad "realloc(): invalid old size", ptr=<optimized out>, ar_ptr=<optimized out>) at malloc.c:5049
#4  0x00007f662b8db13c in _int_realloc (av=av@entry=0x7f662bbf8b00 <main_arena>, oldp=oldp@entry=0x55555588ace0, oldsize=oldsize@entry=93824995577248, nb=nb@entry=2128) at malloc.c:4290
#5  0x00007f662b8dc719 in __GI___libc_realloc (oldmem=0x55555588acf0, bytes=2112) at malloc.c:3083
#6  0x00007f662a1ed628 in enc_table_expand (newsize=88) at encoding.c:275
#7  0x00007f662a1ed628 in enc_register (encoding=0x5555557d3ed0, name=0x7f66299a1774 "CP51932") at encoding.c:324
#8  0x00007f662a1ed628 in enc_replicate_with_index (idx=<optimized out>, origenc=0x5555557d3ed0, name=0x7f66299a1774 "CP51932")
    at encoding.c:441
#9  0x00007f662a1ed628 in rb_encdb_replicate (name=name@entry=0x7f66299a1774 "CP51932", orig=orig@entry=0x7f66299a145d "EUC-JP")
    at encoding.c:462
#10 0x00007f66299a0eb9 in Init_encdb () at ./encdb.h:99
#11 0x00007f662a18e98b in dln_load (file=0x555555884380 "/home/kenji/.rbenv/versions/2.4.2/lib/ruby/2.4.0/x86_64-linux/enc/encdb.so")
    at dln.c:1357
#12 0x00007f662a368f66 in rb_vm_call_cfunc (recv=93824994829480, func=func@entry=0x7f662a24be10 <load_ext>, arg=arg@entry=93824994598560, block_handler=block_handler@entry=0, filename=filename@entry=93824994598560) at vm.c:2090
#13 0x00007f662a24e090 in rb_require_internal (fname=<optimized out>, safe=safe@entry=0) at load.c:1001
#14 0x00007f662a24e75f in ruby_require_internal (fname=fname@entry=0x7f662a411d03 "enc/encdb.so", len=len@entry=12) at load.c:1034
#15 0x00007f662a388ee5 in Init_enc () at dmyenc.c:7
#16 0x00007f662a2f321f in process_options (argc=0, argc@entry=2, argv=0x7fffffffd0a0,
    argv@entry=0x7fffffffd090, opt=opt@entry=0x7fffffffcfb0) at ruby.c:1530
#17 0x00007f662a2f4058 in ruby_process_options (argc=argc@entry=2, argv=argv@entry=0x7fffffffd090) at ruby.c:2210
#18 0x00007f662a671747 in init_ruby () at milter-manager-ruby-configuration.c:361
#19 0x00007f662a671747 in milter_manager_module_impl_init (type_module=<optimized out>) at milter-manager-ruby-configuration.c:380
#20 0x00007f662c140a1d in load (module=0x555555767c40) at milter-manager-module.c:127
#21 0x00007f662b644a03 in g_type_module_use () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#22 0x00007f662c134bfc in milter_manager_configuration_load_module (name=0x7f662c14c962 "ruby") at milter-manager-configuration.c:850
#23 0x00007f662c134bfc in milter_manager_configuration_instantiate_va_list (first_property=0x0, var_args=0x7fffffffd198)
    at milter-manager-configuration.c:904
#24 0x00007f662c136656 in milter_manager_configuration_new (first_property=first_property@entry=0x0) at milter-manager-configuration.c:937
#25 0x00007f662c132910 in milter_manager_init (argc=0x7fffffffd2cc, argv=0x7fffffffd2c0) at milter-manager-main.c:142
#26 0x00005555555547b4 in main (argc=<optimized out>, argv=<optimized out>) at milter-manager.c:32

また git bisect で調べてみると以下のような結果でした。

commit 75775157ea68efdd0b71345a37a6930e5bf1d2ef
Author: ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date:   Mon Nov 7 00:45:00 2016 +0000

            Introduce table improvement by Vladimir Makarov <vmakarov@redhat.com>.
            [Feature #12142]
            See header of st.c for improvment details.
    
            You can see all of code history here:
            <https://github.com/vnmakarov/ruby/tree/hash_tables_with_open_addressing>
    
            This improvement is discussed at
            <https://bugs.ruby-lang.org/issues/12142>
            with many people, especially with Yura Sokolov.
    
            * st.c: improve st_table.
    
            * include/ruby/st.h: ditto.
    
            * internal.h, numeric.c, hash.c (rb_dbl_long_hash): extract a function.
    
            * ext/-test-/st/foreach/foreach.c: catch up this change.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

:100644 100644 addaf2d6c9a8b22da5088428f76b398eacd54d28 37b4b5337f79c48181396f9378f7a1ed3fddc26b M      NEWS
:040000 040000 8fc4d8cc3b66054b9794945ec6ba2f4284b10fd6 c588e1cb48008bc06da8788630de75b56513ca0c M      ext
:100644 100644 8ed8c48ebb8a3a6fd382b13e9e27582793fd56c0 4615c47b82067dccfe5814034ce1596fa285be51 M      hash.c
:040000 040000 48712a487dcca98624d11a900d40dccb91e0b4fe b5aaae5881f58f977022e800045ded751fb8ea66 M      include
:100644 100644 41e6f2ac66ec86c42859a5f1ec924c3db274cbf4 83883daf463b207b7e8131d30a7fd30d8e3682ea M      internal.h
:100644 100644 3620f1f3b81cd72c329f8bbef2016f505566ae22 6ab3593cfce88ed2882226b3124e6387532dba6a M      numeric.c
:100644 100644 07b57d906ec738590082b5bdcd56e54e3de08883 7bf5e132844f938c77335946922711b9dbcb1629 M      st.c

再現手順は以下の通りです。

$ git clone https://github.com/ruby/ruby.git
$ cd ruby
$ git checkout ruby_2_4
$ autoreconf
$ ./configure --prefix=/tmp/local-ruby --enable-shared --without-X11 --without-tk --disable-install-doc
$ make -j
$ make install
$ cd ..
$ git clone https://github.com/milter-manager/milter-manager.git
$ cd milter-manager
$ export LD_LIBRARY_PATH=/tmp/local-ruby/lib
$ ./autogen.sh
$ ./configure --prefix=/tmp/local --enable-ruby-milter --with-bundled-ruby-glib2 --with-ruby=/tmp/local-ruby/bin/ruby
$ make -j
$ make install
$ /tmp/local/sbin/milter-manager --version

自分の手元ではCentOS7, Debian sid, Debian stretchで試して同様の結果でした。
git bisect はstretchで実行しました。

Updated by okkez (okkez _) over 6 years ago

trunk はどうだろうと思って調べてみたら trunk だと問題なさそうでした。

git bisect で調べてみると以下のコミットで直ったみたいなので、ruby_2_4 ブランチにもバックポートしていただけると嬉しいです。
ruby_2_4ブランチにあてて、milter-managerに組み込んでみたところmilter-manager --versionでSEGVすることはなくなりました。

813ffb8b53c6a0c0f34cbd0255c7fa481991fc77 is the first fixed commit
commit 813ffb8b53c6a0c0f34cbd0255c7fa481991fc77
Author: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date:   Tue Sep 5 07:52:08 2017 +0000

    st.c: fix num_entries
    
    * st.c (st_insert2): should manage num_entries when the key is
      undefined, as well as st_insert().
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

:100644 100644 976bcf4648d67566f4455142b64c467e9c195877 a465de4ae5555d7d4861138bc37947684c76b24e M      st.c
Actions #2

Updated by nobu (Nobuyoshi Nakada) over 6 years ago

  • Status changed from Open to Closed
  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN to 2.3: DONTNEED, 2.4: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago

  • Backport changed from 2.3: DONTNEED, 2.4: REQUIRED to 2.3: DONTNEED, 2.4: DONE

ruby_2_4 r61328 merged revision(s) 59748.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0