stompgem / stomp

A ruby gem for sending and receiving messages from a Stomp protocol compliant message queue. Includes: failover logic, ssl support.
http://stomp.github.com
Apache License 2.0
152 stars 80 forks source link

EL5 *** buffer overflow detected ***: /usr/bin/ruby terminated #26

Closed sgzijl closed 12 years ago

sgzijl commented 12 years ago

On Red Hat Enterprise Linux 5.7 the installation of stomp-1.2.0 terminates. Older versions do work (1.1.10).

The error:

[root@host~]# gem install stomp-1.2.0.gem * buffer overflow detected *: /usr/bin/ruby terminated ======= Backtrace: ========= /lib64/libc.so.6(__chk_fail+0x2f)[0x33edae807f] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(rb_syck_mktime+0x48e)[0x2b33a61f2c7e] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(yaml_org_handler+0x860)[0x2b33a61f3590] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_defaultresolver_node_import+0x39)[0x2b33a61f3799] /usr/lib64/libruby.so.1.8[0x3183a3492e] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a353f2] /usr/lib64/libruby.so.1.8(rb_funcall+0x85)[0x3183a356c5] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(rb_syck_load_handler+0x47)[0x2b33a61f2727] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_hdlr_add_node+0x39)[0x2b33a61ee4f9] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(syckparse+0xb45)[0x2b33a61e81f5] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_parse+0x19)[0x2b33a61ecc19] /usr/lib64/ruby/1.8/x86_64-linux/syck.so(syck_parser_load+0xed)[0x2b33a61f259d] /usr/lib64/libruby.so.1.8[0x3183a3492e] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bbc6] /usr/lib64/libruby.so.1.8[0x3183a3afb5] /usr/lib64/libruby.so.1.8[0x3183a3494a] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bbc6] /usr/lib64/libruby.so.1.8[0x3183a3afb5] /usr/lib64/libruby.so.1.8[0x3183a3494a] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bbc6] /usr/lib64/libruby.so.1.8[0x3183a3d694] /usr/lib64/libruby.so.1.8[0x3183a3494a] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bcf9] /usr/lib64/libruby.so.1.8[0x3183a3ae99] /usr/lib64/libruby.so.1.8[0x3183a3db45] /usr/lib64/libruby.so.1.8[0x3183a3fb4f] /usr/lib64/libruby.so.1.8[0x3183a3c197] /usr/lib64/libruby.so.1.8[0x3183a3fb4f] /usr/lib64/libruby.so.1.8[0x3183a41059] /usr/lib64/libruby.so.1.8[0x3183a3492e] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bcf9] /usr/lib64/libruby.so.1.8[0x3183a3df9d] /usr/lib64/libruby.so.1.8[0x3183a3494a] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bbc6] /usr/lib64/libruby.so.1.8[0x3183a3df9d] /usr/lib64/libruby.so.1.8[0x3183a3494a] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8(rb_obj_call_init+0x54)[0x3183a35104] /usr/lib64/libruby.so.1.8(rb_class_new_instance+0x32)[0x3183a5f612] /usr/lib64/libruby.so.1.8[0x3183a3492e] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8(rb_call_super+0x8d)[0x3183a35ead] /usr/lib64/libruby.so.1.8[0x3183a341b9] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bcf9] /usr/lib64/libruby.so.1.8[0x3183a3afb5] /usr/lib64/libruby.so.1.8[0x3183a3db45] /usr/lib64/libruby.so.1.8[0x3183a3494a] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bbc6] /usr/lib64/libruby.so.1.8[0x3183a3e7ff] /usr/lib64/libruby.so.1.8[0x3183a3bf75] /usr/lib64/libruby.so.1.8[0x3183a3494a] /usr/lib64/libruby.so.1.8[0x3183a34e48] /usr/lib64/libruby.so.1.8[0x3183a3bbc6] /usr/lib64/libruby.so.1.8[0x3183a3df9d] ======= Memory map: ======== 00400000-00401000 r-xp 00000000 fd:04 426424 /usr/bin/ruby 00600000-00602000 rw-p 00000000 fd:04 426424 /usr/bin/ruby 0cdc4000-0d2f9000 rw-p 0cdc4000 00:00 0 [heap] 3183a00000-3183ad8000 r-xp 00000000 fd:04 364444 /usr/lib64/libruby.so.1.8.5 3183ad8000-3183cd8000 ---p 000d8000 fd:04 364444 /usr/lib64/libruby.so.1.8.5 3183cd8000-3183cdd000 rw-p 000d8000 fd:04 364444 /usr/lib64/libruby.so.1.8.5 3183cdd000-3183cfb000 rw-p 3183cdd000 00:00 0 33ed600000-33ed61c000 r-xp 00000000 fd:00 327938 /lib64/ld-2.5.so 33ed81c000-33ed81d000 r--p 0001c000 fd:00 327938 /lib64/ld-2.5.so 33ed81d000-33ed81e000 rw-p 0001d000 fd:00 327938 /lib64/ld-2.5.so 33eda00000-33edb4e000 r-xp 00000000 fd:00 327939 /lib64/libc-2.5.so 33edb4e000-33edd4e000 ---p 0014e000 fd:00 327939 /lib64/libc-2.5.so 33edd4e000-33edd52000 r--p 0014e000 fd:00 327939 /lib64/libc-2.5.so 33edd52000-33edd53000 rw-p 00152000 fd:00 327939 /lib64/libc-2.5.so 33edd53000-33edd58000 rw-p 33edd53000 00:00 0 33ede00000-33ede02000 r-xp 00000000 fd:00 327940 /lib64/libdl-2.5.so 33ede02000-33ee002000 ---p 00002000 fd:00 327940 /lib64/libdl-2.5.so 33ee002000-33ee003000 r--p 00002000 fd:00 327940 /lib64/libdl-2.5.so 33ee003000-33ee004000 rw-p 00003000 fd:00 327940 /lib64/libdl-2.5.so 33ee200000-33ee23b000 r-xp 00000000 fd:00 327944 /lib64/libsepol.so.1 33ee23b000-33ee43b000 ---p 0003b000 fd:00 327944 /lib64/libsepol.so.1 33ee43b000-33ee43c000 rw-p 0003b000 fd:00 327944 /lib64/libsepol.so.1 33ee43c000-33ee446000 rw-p 33ee43c000 00:00 0 33ee600000-33ee615000 r-xp 00000000 fd:00 327945 /lib64/libselinux.so.1 33ee615000-33ee815000 ---p 00015000 fd:00 327945 /lib64/libselinux.so.1 33ee815000-33ee817000 rw-p 00015000 fd:00 327945 /lib64/libselinux.so.1 33ee817000-33ee818000 rw-p 33ee817000 00:00 0 33eea00000-33eea16000 r-xp 00000000 fd:00 327946 /lib64/libpthread-2.5.so 33eea16000-33eec15000 ---p 00016000 fd:00 327946 /lib64/libpthread-2.5.so 33eec15000-33eec16000 r--p 00015000 fd:00 327946 /lib64/libpthread-2.5.so 33eec16000-33eec17000 rw-p 00016000 fd:00 327946 /lib64/libpthread-2.5.so 33eec17000-33eec1b000 rw-p 33eec17000 00:00 0 33eee00000-33eee82000 r-xp 00000000 fd:00 327951 /lib64/libm-2.5.so 33eee82000-33ef081000 ---p 00082000 fd:00 327951 /lib64/libm-2.5.so 33ef081000-33ef082000 r--p 00081000 fd:00 327951 /lib64/libm-2.5.so 33ef082000-33ef083000 rw-p 00082000 fd:00 327951 /lib64/libm-2.5.so 33ef600000-33ef609000 r-xp 00000000 fd:00 327950 /lib64/libcrypt-2.5.so 33ef609000-33ef808000 ---p 00009000 fd:00 327950 /lib64/libcrypt-2.5.so 33ef808000-33ef809000 r--p 00008000 fd:00 327950 /lib64/libcrypt-2.5.so 33ef809000-33ef80a000 rw-p 00009000 fd:00 327950 /lib64/libcrypt-2.5.so 33ef80a000-33ef838000 rw-p 33ef80a000 00:00 0 33efa00000-33efa14000 r-xp 00000000 fd:00 327953 /lib64/libz.so.1.2.3 33efa14000-33efc13000 ---p 00014000 fd:00 327953 /lib64/libz.so.1.2.3 33efc13000-33efc14000 rw-p 00013000 fd:00 327953 /lib64/libz.so.1.2.3 33efe00000-33efe02000 r-xp 00000000 fd:00 327960 /lib64/libcom_err.so.2.1 33efe02000-33f0001000 ---p 00002000 fd:00 327960 /lib64/libcom_err.so.2.1 33f0001000-33f0002000 rw-p 00001000 fd:00 327960 /lib64/libcom_err.so.2.1 33f0200000-33f0211000 r-xp 00000000 fd:00 327964 /lib64/libresolv-2.5.so 33f0211000-33f0411000 ---p 00011000 fd:00 327964 /lib64/libresolv-2.5.so 33f0411000-33f0412000 r--p 00011000 fd:00 327964 /lib64/libresolv-2.5.so 33f0412000-33f0413000 rw-p 00012000 fd:00 327964 /lib64/libresolv-2.5.so 33f0413000-33f0415000 rw-p 33f0413000 00:00 0 33f0a00000-33f0b2d000 r-xp 00000000 fd:00 327954 /lib64/libcrypto.so.0.9.8e 33f0b2d000-33f0d2c000 ---p 0012d000 fd:00 327954 /lib64/libcrypto.so.0.9.8e 33f0d2c000-33f0d4d000 rw-p 0012c000 fd:00 327954 /lib64/libcrypto.so.0.9.8e 33f0d4d000-33f0d51000 rw-p 33f0d4d000 00:00 0 33f0e00000-33f0e02000 r-xp 00000000 fd:00 327965 /lib64/libkeyutils-1.2.so 33f0e02000-33f1001000 ---p 00002000 fd:00 327965 /lib64/libkeyutils-1.2.so 33f1001000-33f1002000 rw-p 00001000 fd:00 327965 /lib64/libkeyutils-1.2.so 33f1200000-33f122c000 r-xp 00000000 fd:04 363348 /usr/lib64/libgssapi_krb5.so.2.2 33f122c000-33f142c000 ---p 0002c000 fd:04 363348 /usr/lib64/libgssapi_krb5.so.2.2 33f142c000-33f142e000 rw-p 0002c000 fd:04 363348 /usr/lib64/libgssapi_krb5.so.2.2 33f1600000-33f1692000 r-xp 00000000 fd:04 363347 /usr/lib64/libkrb5.so.3.3 33f1692000-33f1891000 ---p 00092000 fd:04 363347 /usr/lib64/libkrb5.so.3.3 33f1891000-33f1895000 rw-p 00091000 fd:04 363347 /usr/lib64/libkrb5.so.3.3 33f1a00000-33f1a08000 r-xp 00000000 fd:04 363345 /usr/lib64/libkrb5support.so.0.1 33f1a08000-33f1c07000 ---p 00008000 fd:04 363345 /usr/lib64/libkrb5support.so.0.1 33f1c07000-33f1c08000 rw-p 00007000 fd:04 363345 /usr/lib64/libkrb5support.so.0.1 33f1e00000-33f1e24000 r-xp 00000000 fd:04 363346 /usr/lib64/libk5crypto.so.3.1 33f1e24000-33f2023000 ---p 00024000 fd:04 363346 /usr/lib64/libk5crypto.so.3.1 33f2023000-33f2025000 rw-p 00023000 fd:04 363346 /usr/lib64/libk5crypto.so.3.1 33f2200000-33f2246000 r-xp 00000000 fd:00 327733 /lib64/libssl.so.0.9.8e 33f2246000-33f2446000 ---p 00046000 fd:00 327733 /lib64/libssl.so.0.9.8e 33f2446000-33f244c000 rw-p 00046000 fd:00 327733 /lib64/libssl.so.0.9.8e 2b33a5ebe000-2b33a5ec0000 rw-p 2b33a5ebe000 00:00 0 2b33a5ec6000-2b33a5f2b000 rw-p 2b33a5ec6000 00:00 0 2b33a5f2c000-2b33a5fdc000 rw-p 2b33a5f2c000 00:00 0 2b33a5fdc000-2b33a5fe0000 r-xp 00000000 fd:04 363401 /usr/lib64/ruby/1.8/x86_64-linux/stringio.so 2b33a5fe0000-2b33a61e0000 ---p 00004000 fd:04 363401 /usr/lib64/ruby/1.8/x86_64-linux/stringio.so 2b33a61e0000-2b33a61e1000 rw-p 00004000 fd:04 363401 /usr/lib64/ruby/1.8/x86_64-linux/stringio.so 2b33a61e1000-2b33a61fd000 r-xp 00000000 fd:04 363403 /usr/lib64/ruby/1.8/x86_64-linux/syck.so 2b33a61fd000-2b33a63fc000 ---p 0001c000 fd:04 363403 /usr/lib64/ruby/1.8/x86_64-linux/syck.so 2b33a63fc000-2b33a63fe000 rw-p 0001b000 fd:04 363403 /usr/lib64/ruby/1.8/x86_64-linux/syck.so 2b33a63ff000-2b33a653c000 rw-p 2b33a63ff000 00:00 0 2b33a653c000-2b33a653e000 r-xp 00000000 fd:04 363388 /usr/lib64/ruby/1.8/x86_64-linux/etc.so 2b33a653e000-2b33a673e000 ---p 00002000 fd:04 363388 /usr/lib64/ruby/1.8/x86_64-linux/etc.so 2b33a673e000-2b33a673f000 rw-p 00002000 fd:04 363388 /usr/lib64/ruby/1.8/x86_64-linux/etc.so 2b33a673f000-2b33a6779000 r-xp 00000000 fd:04 363394 /usr/lib64/ruby/1.8/x86_64-linux/openssl.so 2b33a6779000-2b33a6978000 ---p 0003a000 fd:04 363394 /usr/lib64/ruby/1.8/x86_64-linux/openssl.so 2b33a6978000-2b33a697b000 rw-p 00039000 fd:04 363394 /usr/lib64/ruby/1.8/x86_64-linux/openssl.so 2b33a697c000-2b33a6bb6000 rw-p 2b33a697c000 00:00 0 2b33a6bb6000-2b33a6bb7000 r-xp 00000000 fd:04 363389 /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so 2b33a6bb7000-2b33a6db6000 ---p 00001000 fd:04 363389 /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so 2b33a6db6000-2b33a6db7000 rw-p 00000000 fd:04 363389 /usr/lib64/ruby/1.8/x86_64-linux/fcntl.so 2b33a6db7000-2b33a6dc0000 r-xp 00000000 fd:04 363405 /usr/lib64/ruby/1.8/x86_64-linux/zlib.so 2b33a6dc0000-2b33a6fbf000 ---p 00009000 fd:04 363405 /usr/lib64/ruby/1.8/x86_64-linux/zlib.so 2b33a6fbf000-2b33a6fc0000 rw-p 00008000 fd:04 363405 /usr/lib64/ruby/1.8/x86_64-linux/zlib.so 2b33a6fc0000-2b33a6fc2000 r-xp 00000000 fd:04 363382 /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so 2b33a6fc2000-2b33a71c1000 ---p 00002000 fd:04 363382 /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so 2b33a71c1000-2b33a71c2000 rw-p 00001000 fd:04 363382 /usr/lib64/ruby/1.8/x86_64-linux/digest/md5.so 2b33a71c2000-2b33a71c4000 r-xp 00000000 fd:04 363381 /usr/lib64/ruby/1.8/x86_64-linux/digest.so 2b33a71c4000-2b33a73c3000 ---p 00002000 fd:04 363381 /usr/lib64/ruby/1.8/x86_64-linux/digest.so 2b33a73c3000-2b33a73c4000 rw-p 00001000 fd:04 363381 /usr/lib64/ruby/1.8/x86_64-linux/digest.so 2b33a73c4000-2b33a73cf000 r-xp 00000000 fd:04 363400 /usr/lib64/ruby/1.8/x86_64-linux/socket.so 2b33a73cf000-2b33a75ce000 ---p 0000b000 fd:04 363400 /usr/lib64/ruby/1.8/x86_64-linux/socket.so 2b33a75ce000-2b33a75cf000 rw-p 0000a000 fd:04 363400 /usr/lib64/ruby/1.8/x86_64-linux/socket.so 2b33a75cf000-2b33a75d0000 rw-p 2b33a75cf000 00:00 0 2b33a75d5000-2b33a75df000 r-xp 00000000 fd:00 327707 /lib64/libnss_files-2.5.so 2b33a75df000-2b33a77de000 ---p 0000a000 fd:00 327707 /lib64/libnss_files-2.5.so 2b33a77de000-2b33a77df000 r--p 00009000 fd:00 327707 /lib64/libnss_files-2.5.so 2b33a77df000-2b33a77e0000 rw-p 0000a000 fd:00 327707 /lib64/libnss_files-2.5.so 2b33a77e6000-2b33a77f3000 r-xp 00000000 fd:00 327952 /lib64/libgcc_s-4.1.2-20080825.so.1 2b33a77f3000-2b33a79f3000 ---p 0000d000 fd:00 327952 /lib64/libgcc_s-4.1.2-20080825.so.1 2b33a79f3000-2b33a79f4000 rw-p 0000d000 fd:00 327952 /lib64/libgcc_s-4.1.2-20080825.so.1 7fffb3be9000-7fffb3c19000 rw-p 7ffffffce000 00:00 0 [stack] 7fffb3d87000-7fffb3d8a000 r-xp 7fffb3d87000 00:00 0 [vdso] ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vsyscall] Aborted

gmallard commented 12 years ago

I doubt we are going to be much help with that. The gem is pure Ruby, no C involved.

We are not the only gem that fails to install in exactly this way on RHEL/CentOS 5 systems, see below.

But please show me the output of:

ruby -v

gem -v

ruby -r rbconfig -e 'puts Config::CONFIG["configure_args"]'

For background, see:

https://github.com/brianmario/yajl-ruby/issues/89

https://github.com/auxesis/visage/issues/84

https://raw.github.com/gist/1186912/325a3eae7cad43a56c39ad05e8237edf821b44a4/capistrano_install_install_buffer_overflow

http://pastebin.com/mLDxkBcF

And there are numerous others.....

sgzijl commented 12 years ago

Will supply the requested information when I'm at work, next tuesday.

On Jan 13, 2012, at 8:33 PM, Guy M. Allard wrote:

I doubt we are going to be much help with that. The gem is pure Ruby, no C involved.

We are not the only gem that fails to install in exactly this way on RHEL/CentOS 5 systems, see below.

But please show me the output of:

ruby -v

gem -v

ruby -r rbconfig -e 'puts Config::CONFIG["configure_args"]'

For background, see:

https://github.com/brianmario/yajl-ruby/issues/89

https://github.com/auxesis/visage/issues/84

https://raw.github.com/gist/1186912/325a3eae7cad43a56c39ad05e8237edf821b44a4/capistrano_install_install_buffer_overflow

http://pastebin.com/mLDxkBcF

And there are numerous others.....


Reply to this email directly or view it on GitHub: https://github.com/morellon/stomp/issues/26#issuecomment-3484922

gmallard commented 12 years ago

I will add several notes, and a proposed solution. This actually has absolutely nothing to do with stomp.

I can recreate this in a CentOS 5.6 VM.

The root cause is that in your Redhat environment, there are bug(s) in your current 'tar' / 'zip' functionality. I suggest you eventually address that with maintenance from the package management system.

Experiments

Using that CentOS with:

I attempted to install that gem file, and received the same results as you, a lovely stack trace.

Stomp 1.2.0 was built with a very current version of the gem command, probably 1.8.x (I do not remember which Ruby version I was using when I built the gem).

You are running gem version in the range 1.3.1 - 1.3.5 I would guess.

I experimented: on my Debian box, I used Ruby 1.8.5 (2008-06-20 patchlevel 231) and gem command version 1.3.5 to rebuild the stomp 1.2.0 gem, and copied that gem to the CentOS VM.

In CentOS I then re-attempted install of the new gem file. This succeeds!!

Proposed Solution

Proposed solution: send me an email address or point me to a free file share system you have access to. I will provide you with a new 'stomp-1.2.0.gem' file that should hopefully install.

gmallard commented 12 years ago

I am going to close this because of the lack of a response.

If you need further assistance, please let us know. Reopen this or create a new issue if necessary.