Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid pointer with Ruby Enterprise #1

Open
slnc opened this issue Feb 13, 2010 · 0 comments
Open

Invalid pointer with Ruby Enterprise #1

slnc opened this issue Feb 13, 2010 · 0 comments

Comments

@slnc
Copy link

slnc commented Feb 13, 2010

With ruby enterprise 1.8.7.2009.10 and tcmalloc installed I get this:

src/tcmalloc.cc:353] Attempt to free invalid pointer: 0x7fdf9da37960
Aborted

Without tcmalloc I get this:

*** glibc detected *** /usr/local/hosting/bin/ruby: free(): invalid pointer: 0x00007fbcd0a2a960 ***
======= Backtrace: =========
/lib/libc.so.6[0x7fbcd7a97dd6]
/lib/libc.so.6(cfree+0x6c)[0x7fbcd7a9c74c]
/usr/local/hosting/bin/ruby(ruby_xfree+0x1b)[0x42b6e4]
/usr/lib/libxml2.so.2(xmlFreeParserCtxt+0xc7)[0x7fbcd411db77]
/usr/local/hosting/bin/ruby[0x42b754]
/usr/local/hosting/bin/ruby(rb_gc_finalize_deferred+0x22)[0x42bade]
/usr/local/hosting/bin/ruby(rb_thread_schedule+0x20)[0x41be75]
/usr/local/hosting/bin/ruby[0x415f6a]
/usr/local/hosting/bin/ruby[0x417265]
/usr/local/hosting/bin/ruby[0x47602a]
/usr/local/hosting/bin/ruby[0x417f46]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x42078c]
/usr/local/hosting/bin/ruby[0x41fb77]
/usr/local/hosting/bin/ruby[0x420629]
/usr/local/hosting/bin/ruby[0x42003a]
/usr/local/hosting/bin/ruby[0x4162f1]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x42078c]
/usr/local/hosting/bin/ruby[0x416574]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x420967]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x41f352]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x420967]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby(rb_call_super+0xab)[0x41e234]
/usr/local/hosting/bin/ruby[0x420ba6]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x420967]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x42078c]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x42078c]
/usr/local/hosting/bin/ruby[0x416574]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x418559]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x42078c]
/usr/local/hosting/bin/ruby[0x41659c]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x417265]
/usr/local/hosting/bin/ruby[0x417943]
/usr/local/hosting/bin/ruby[0x417f46]
/usr/local/hosting/bin/ruby[0x41898e]
/usr/local/hosting/bin/ruby[0x42078c]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x415fba]
/usr/local/hosting/bin/ruby[0x41f352]
/usr/local/hosting/bin/ruby[0x417265]
/usr/local/hosting/bin/ruby(rb_ensure+0xa9)[0x411f41]
/usr/local/hosting/bin/ruby[0x417f46]
======= Memory map: ========
00400000-004b7000 r-xp 00000000 08:01 657251 /usr/local/hosting/bin/ruby
006b6000-006b7000 r--p 000b6000 08:01 657251 /usr/local/hosting/bin/ruby
006b7000-006b9000 rw-p 000b7000 08:01 657251 /usr/local/hosting/bin/ruby
006b9000-006d7000 rw-p 00000000 00:00 0
01bd9000-043f4000 rw-p 00000000 00:00 0 [heap]
7fbccbde9000-7fbccbdff000 r-xp 00000000 08:01 417 /lib/libgcc_s.so.1
7fbccbdff000-7fbccbffe000 ---p 00016000 08:01 417 /lib/libgcc_s.so.1
7fbccbffe000-7fbccbfff000 r--p 00015000 08:01 417 /lib/libgcc_s.so.1
7fbccbfff000-7fbccc000000 rw-p 00016000 08:01 417 /lib/libgcc_s.so.1
7fbccc000000-7fbccc021000 rw-p 00000000 00:00 0
7fbccc021000-7fbcd0000000 ---p 00000000 00:00 0
7fbcd01e6000-7fbcd01fc000 r-xp 00000000 08:01 136 /lib/libresolv-2.10.1.so
7fbcd01fc000-7fbcd03fb000 ---p 00016000 08:01 136 /lib/libresolv-2.10.1.so
7fbcd03fb000-7fbcd03fc000 r--p 00015000 08:01 136 /lib/libresolv-2.10.1.so
7fbcd03fc000-7fbcd03fd000 rw-p 00016000 08:01 136 /lib/libresolv-2.10.1.so
7fbcd03fd000-7fbcd03ff000 rw-p 00000000 00:00 0
7fbcd03ff000-7fbcd0404000 r-xp 00000000 08:01 129 /lib/libnss_dns-2.10.1.so
7fbcd0404000-7fbcd0603000 ---p 00005000 08:01 129 /lib/libnss_dns-2.10.1.so
7fbcd0603000-7fbcd0604000 r--p 00004000 08:01 129 /lib/libnss_dns-2.10.1.so
7fbcd0604000-7fbcd0605000 rw-p 00005000 08:01 129 /lib/libnss_dns-2.10.1.so
7fbcd0605000-7fbcd0607000 r-xp 00000000 08:01 2647 /lib/libnss_mdns4_minimal.so.2
7fbcd0607000-7fbcd0806000 ---p 00002000 08:01 2647 /lib/libnss_mdns4_minimal.so.2
7fbcd0806000-7fbcd0807000 r--p 00001000 08:01 2647 /lib/libnss_mdns4_minimal.so.2
7fbcd0807000-7fbcd0808000 rw-p 00002000 08:01 2647 /lib/libnss_mdns4_minimal.so.2
7fbcd0808000-7fbcd082a000 r-xp 00000000 08:01 526214 /usr/local/hosting/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so
7fbcd082a000-7fbcd0a29000 ---p 00022000 08:01 526214 /usr/local/hosting/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so
7fbcd0a29000-7fbcd0a2a000 r--p 00021000 08:01 526214 /usr/local/hosting/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so
7fbcd0a2a000-7fbcd0a2b000 rw-p 00022000 08:01 526214 /usr/local/hosting/lib/ruby/gems/1.8/gems/libxml-ruby-1.1.3/lib/libxml_ruby.so
7fbcd0a2b000-7fbcd0a35000 r-xp 00000000 08:01 1185921 /usr/local/hosting/lib/ruby/gems/1.8/gems/hpricot-0.6/lib/i686-linux/hpricot_scan.so
7fbcd0a35000-7fbcd0c34000 ---p 0000a000 08:01 1185921 /usr/local/hosting/lib/ruby/gems/1.8/gems/hpricot-0.6/lib/i686-linux/hpricot_scan.so
7fbcd0c34000-7fbcd0c35000 r--p 00009000 08:01 1185921 /usr/local/hosting/lib/ruby/gems/1.8/gems/hpricot-0.6/lib/i686-linux/hpricot_scan.so
7fbcd0c35000-7fbcd0c36000 rw-p 0000a000 08:01 1185921 /usr/local/hosting/lib/ruby/gems/1.8/gems/hpricot-0.6/lib/i686-linux/hpricot_scan.so
7fbcd0c36000-7fbcd0c6f000 r-xp 00000000 08:01 657224 /usr/local/hosting/lib/ruby/gems/1.8/gems/character-encodings-0.4.1/lib/encoding/character/utf-8/utf8.soAborted

Besides that I had to manually edit the gem and remove the Werror flags because it character-encoding 0.4.1 wouldn't compile with them in. I know it's another gem but I mention it in case it helps. This is the error I got when gem install character-encodings before removing the flags:

[...]
make
gcc -I. -I/usr/local/hosting/lib/ruby/1.8/x86_64-linux -I/usr/local/hosting/lib/ruby/1.8/x86_64-linux -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -fPIC -g -Os -fno-strict-aliasing -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -c rb_utf_chop.c
gcc -I. -I/usr/local/hosting/lib/ruby/1.8/x86_64-linux -I/usr/local/hosting/lib/ruby/1.8/x86_64-linux -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -fPIC -g -Os -fno-strict-aliasing -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -c rb_utf_each_char.c
gcc -I. -I/usr/local/hosting/lib/ruby/1.8/x86_64-linux -I/usr/local/hosting/lib/ruby/1.8/x86_64-linux -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -fPIC -g -Os -fno-strict-aliasing -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -c utf.c
cc1: warnings being treated as errors
utf.c: In function ‘utf_collate_key_impl’:
utf.c:482: error: inlining failed in call to ‘_utf_encode’: optimizing for size and code size would grow
utf.c:530: error: called from here
utf.c:482: error: inlining failed in call to ‘_utf_encode’: optimizing for size and code size would grow
utf.c:535: error: called from here
make: *** [utf.o] Error 1

ubuntu karmic koala

/usr/src# gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant