# Munmap\_chunk(): invalid pointer

**URL:** <https://www.ruby-forum.com/t/munmap-chunk-invalid-pointer/69884>\
**Category:** Ruby-Gnome 2\
**Created:** [September 25, 2006, 9:27am UTC](https://www.ruby-forum.com/t/munmap-chunk-invalid-pointer/69884 "2006-09-25T09:27:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 25, 2006, 9:27am UTC](https://www.ruby-forum.com/t/munmap-chunk-invalid-pointer/69884/1 "2006-09-25T09:27:35Z")

</div>

i had a working script in 0.14.1, i upgraded to 0.15.0, and my script  
produces the following:

\*\*\* glibc detected \*\*\* /usr/bin/ruby: munmap\_chunk(): invalid pointer:  
0x0838f61f \*\*\*  
======= Backtrace: =========  
/lib/libc.so.6[0xb7da1ae2]  
/usr/lib/libglib-2.0.so.0(g\_free+0x31)[0xb7a249e1]  
/usr/lib/libgtk-x11-2.0.so.0(gtk\_tree\_path\_free+0x29)[0xb723eed9]  
/usr/lib/libgobject-2.0.so.0(g\_boxed\_free+0x11d)[0xb7a8978d]  
/usr/lib/ruby/site\_ruby/1.8/i686-linux/glib2.so[0xb7ad2da7]  
/usr/lib/libruby18.so.1.8[0xb7f0d254]  
/usr/lib/libruby18.so.1.8(rb\_gc+0x17)[0xb7f0d317]  
/usr/lib/ruby/site\_ruby/1.8/i686-linux/mysql.so[0xb6d84858]  
/usr/lib/libruby18.so.1.8[0xb7eefc52]  
/usr/lib/libruby18.so.1.8[0xb7ef984e]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8(rb\_call\_super+0xa0)[0xb7efbc30]  
/usr/lib/libruby18.so.1.8[0xb7ef7381]  
/usr/lib/libruby18.so.1.8[0xb7ef5c12]  
/usr/lib/libruby18.so.1.8[0xb7ef80a3]  
/usr/lib/libruby18.so.1.8[0xb7ef9864]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef672c]  
/usr/lib/libruby18.so.1.8[0xb7ef5c12]  
/usr/lib/libruby18.so.1.8[0xb7ef79c1]  
/usr/lib/libruby18.so.1.8[0xb7ef9864]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef672c]  
/usr/lib/libruby18.so.1.8[0xb7ef9864]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef672c]  
/usr/lib/libruby18.so.1.8[0xb7ef4de5]  
/usr/lib/libruby18.so.1.8(rb\_yield+0x21)[0xb7ef5391]  
/usr/lib/libruby18.so.1.8(rb\_ary\_each+0x2f)[0xb7edd23f]  
/usr/lib/libruby18.so.1.8[0xb7eefc60]  
/usr/lib/libruby18.so.1.8[0xb7ef984e]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef7c99]  
/usr/lib/libruby18.so.1.8[0xb7ef9864]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef6846]  
/usr/lib/libruby18.so.1.8[0xb7ef9864]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef672c]  
/usr/lib/libruby18.so.1.8[0xb7ef4de5]  
/usr/lib/libruby18.so.1.8(rb\_yield+0x21)[0xb7ef5391]  
/usr/lib/libruby18.so.1.8(rb\_ary\_each+0x2f)[0xb7edd23f]  
/usr/lib/libruby18.so.1.8[0xb7eefc60]  
/usr/lib/libruby18.so.1.8[0xb7ef984e]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef7c99]  
/usr/lib/libruby18.so.1.8[0xb7ef9864]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8[0xb7ef6846]  
/usr/lib/libruby18.so.1.8[0xb7ef4de5]  
/usr/lib/libruby18.so.1.8[0xb7efeb6f]  
/usr/lib/libruby18.so.1.8[0xb7eef844]  
/usr/lib/libruby18.so.1.8[0xb7ef984e]  
/usr/lib/libruby18.so.1.8[0xb7ef9d6c]  
/usr/lib/libruby18.so.1.8(rb\_apply+0x79)[0xb7f02ab9]  
/usr/lib/ruby/site\_ruby/1.8/i686-linux/glib2.so[0xb7ace826]  
/usr/lib/libruby18.so.1.8(rb\_protect+0xee)[0xb7ef1b3e]  
/usr/lib/ruby/site\_ruby/1.8/i686-linux/glib2.so(rbgutil\_protect+0x33)[0xb7ada593]  
/usr/lib/ruby/site\_ruby/1.8/i686-linux/glib2.so[0xb7ace736]  
/usr/lib/libgobject-2.0.so.0(g\_closure\_invoke+0x129)[0xb7a8bf79]  
/usr/lib/libgobject-2.0.so.0[0xb7a9c301]  
/usr/lib/libgobject-2.0.so.0(g\_signal\_emit\_valist+0x8c7)[0xb7a9d647]  
/usr/lib/libgobject-2.0.so.0(g\_signal\_emit+0x29)[0xb7a9d7f9]  
======= Memory map: ========  
08048000-08049000 r-xp 00000000 09:00 4211438 /usr/bin/ruby18  
08049000-0804a000 rw-p 00000000 09:00 4211438 /usr/bin/ruby18  
0804a000-08927000 rw-p 0804a000 00:00 0 [heap]  
b6566000-b656f000 r-xp 00000000 09:00 6247025  
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc\_s.so.1  
b656f000-b6570000 rw-p 00009000 09:00 6247025  
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/libgcc\_s.so.1  
b6586000-b6595000 r-xp 00000000 09:00 15761607 /lib/libbz2.so.1.0.3  
b6595000-b6596000 rw-p 0000f000 09:00 15761607 /lib/libbz2.so.1.0.3  
b6596000-b6598000 r-xp 00000000 09:00 18352175 /lib/libutil-2.4.so  
b6598000-b659a000 rw-p 00001000 09:00 18352175 /lib/libutil-2.4.so  
b659a000-b659d000 r-xp 00000000 09:00 13441496  
/usr/lib/libgpg-error.so.0.2.1  
b659d000-b659e000 rw-p 00002000 09:00 13441496  
/usr/lib/libgpg-error.so.0.2.1  
b659e000-b65f2000 r-xp 00000000 09:00 13439579  
/usr/lib/libgcrypt.so.11.2.1  
b65f2000-b65f4000 rw-p 00053000 09:00 13439579  
/usr/lib/libgcrypt.so.11.2.1  
b65f4000-b6606000 r-xp 00000000 09:00 18487494  
/usr/lib/libtasn1.so.3.0.5  
b6606000-b6607000 rw-pAborted

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 25, 2006, 9:29am UTC](https://www.ruby-forum.com/t/munmap-chunk-invalid-pointer/69884/2 "2006-09-25T09:29:35Z")

</div>

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys – and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 25, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/munmap-chunk-invalid-pointer/69884/3 "2006-09-25T16:10:35Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] munmap\_chunk(): invalid pointer” on Mon, 25  
Sep 2006 10:26:13 +0300,  
Dobai-Pataky B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i had a working script in 0.14.1, i upgraded to 0.15.0, and my script  
> produces the following:

I modified GRClosure handling in CVS. Could you try CVS  
version?

## Thanks,

kou

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys – and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 27, 2006, 2:32pm UTC](https://www.ruby-forum.com/t/munmap-chunk-invalid-pointer/69884/4 "2006-09-27T14:32:48Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] munmap\_chunk(): invalid pointer” on Tue,  
26 Sep 2006 20:56:14 +0300,  
Dobai-Pataky B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> i got today’s cvs, and it looks, that problem is disappeared, thanks.  
> But there still are segfaults, which i don’t know how to debug.  
> Can you point me to the right direction on finding these kinds of bugs?

It seems that this GC related debugging is too  
difficult. Some ways to debug those bugs are difference in  
each case.

> I not always get this detailed report from ruby, is there i way i can post more  
> info about a specific crash?

I want to get a script to be able to reproduce the bug.  
I hope the script is as small as possible.

For example, I used the following script to debug this bug:

require “gdk\_pixbuf2”

1000.times do |i|  
loader = Gdk::PixbufLoader.new  
id = loader.signal\_connect(“size\_prepared”) do |l, width, height|  
end  
loader.last\_write(File.read(ARGV.first))  
loader.signal\_handler\_disconnect(id)  
loader = nil  
GC.start  
end

## Thanks,

kou

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys – and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)

---

<div class="post-metadata">

**Author:** ![Dobai-Pataky\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@Dobai-Pataky\_B](https://www.ruby-forum.com/u/Dobai-Pataky_B)\
**Post date:** [September 26, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/munmap-chunk-invalid-pointer/69884/5 "2006-09-26T19:57:46Z")

</div>

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys – and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)
