# Error: Ruby 1.8.7 object allocation during garbage collection phase

**URL:** <https://www.ruby-forum.com/t/error-ruby-1-8-7-object-allocation-during-garbage-collection-phase/140787>\
**Category:** Development\
**Created:** [June 18, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/error-ruby-1-8-7-object-allocation-during-garbage-collection-phase/140787 "2008-06-18T15:29:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daigo\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@Daigo\_M](https://www.ruby-forum.com/u/Daigo_M)\
**Post date:** [June 18, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/error-ruby-1-8-7-object-allocation-during-garbage-collection-phase/140787/1 "2008-06-18T15:29:08Z")

</div>

æ£®è„‡ã§ã™ã€‚

Debianã§rubyã‚’ãƒ‘ãƒƒã‚±ãƒ¼ã‚¸åŒ–ã—ã¦ãŠã‚Šã¾ã™ã€‚ãƒ¦ãƒ¼ã‚¶ã‹ã‚‰ã‚¨ãƒ©ãƒ¼å ±å‘ŠãŒã‚ã‚Šã¾ã—ãŸã®ã§ã€ãŠ  
å°‹ã­ã—ã¾ã™ã€‚

LibXml[1]ã‚’æ¬¡ã®ã‚ˆã†ã«ä½¿ã†ã¨ã€  
[BUG] object allocation during garbage collection phase  
ã¨ã„ã†ã‚¨ãƒ©ãƒ¼ã§ã‚¯ãƒ©ãƒƒã‚·ãƒ¥ã—ã¾ã™ã€‚LibXmlã®å•é¡Œãªã®ã‹ã‚‚ã—ã‚Œã¾ã›ã‚“ãŒã€ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‹ã‚‰  
ã™ã‚‹ã¨Rubyã®å•é¡Œã®ã‚ˆã†ã«è¦‹ãˆã‚‹ã®ã§ã™ãŒã€ã„ã‹ãŒã§ã—ã‚‡ã†ã‹ã€‚Ruby 1.8.6ã§ã¯å•é¡Œãª  
ã‹ã£ãŸã®ã§ã™ãŒã€1.8.7ã«ã‚¢ãƒƒãƒ—ã‚°ãƒ¬ãƒ¼ãƒ‰ã™ã‚‹ã¨ã‚¨ãƒ©ãƒ¼ã¨ãªã‚Šã¾ã™ã€‚

ç’°å¢ƒï¼š  
ruby 1.8.7 (2008-05-31 patchlevel 0) [i486-linux]  
LibXml 0.5.2.0

[1] [http://libxml.rubyforge.org/](http://libxml.rubyforge.org/)

===== reproducible =====

require ‘xml/libxml’

i = 0  
while true  
XML::Document.new  
i += 1  
puts “\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* #{i} \*\*\*\*\*\*\*\*\*” if i%100 == 0  
end

===========================

stack trace

(snip)  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 206300 \*\*\*\*\*\*\*\*\*  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 206400 \*\*\*\*\*\*\*\*\*  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 206500 \*\*\*\*\*\*\*\*\*  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 206600 \*\*\*\*\*\*\*\*\*  
./libxml-ruby-bug.rb:7: [BUG] object allocation during garbage  
collection phase  
ruby 1.8.7 (2008-05-31 patchlevel 0) [i486-linux]

Program received signal SIGABRT, Aborted.  
[Switching to Thread 0xb7d1ab60 (LWP 29312)]  
0xffffe410 in \_\_kernel\_vsyscall ()  
(gdb) bt  
#0 0xffffe410 in \_\_kernel\_vsyscall ()  
#1 0xb7d45ef5 in raise () from /lib/i686/cmov/libc.so.6  
#2 0xb7d47871 in abort () from /lib/i686/cmov/libc.so.6  
#3 0xb7f0671b in rb\_bug (  
fmt=0xb7f9409c “object allocation during garbage collection phase”)  
at  
error.c:213  
#4 0xb7f2a2f5 in rb\_newobj () at gc.c:422  
#5 0xb7f2a322 in rb\_data\_object\_alloc (klass=3083878900,  
datap=0x807eb70,  
dmark=0xb7ce2a60 \<ruby\_xml\_state\_mark\>, dfree=0xb7ce2d40  
\<ruby\_xml\_state\_free\>)  
at gc.c:443  
#6 0xb7ce2cba in ruby\_xml\_state\_object ()  
from /usr/lib/ruby/1.8/i486-linux/xml/libxml\_so.so  
#7 0xb7ce2d27 in ruby\_xml\_state\_marker ()  
from /usr/lib/ruby/1.8/i486-linux/xml/libxml\_so.so  
#8 0xb7cd6d47 in ruby\_xml\_document\_mark ()  
from /usr/lib/ruby/1.8/i486-linux/xml/libxml\_so.so  
#9 0xb7f29342 in gc\_mark\_children (ptr=3083763108, lev=1) at gc.c:988  
#10 0xb7f29011 in mark\_locations\_array (x=0xbfcf7960, n=1584) at  
gc.c:672  
#11 0xb7f2982e in garbage\_collect () at gc.c:1408  
#12 0xb7f2a2e5 in rb\_newobj () at gc.c:424  
#13 0xb7f7c877 in str\_alloc (klass=3083953160) at string.c:67  
#14 0xb7f7c8fc in str\_new (klass=0, ptr=0xbfcf70c5 “206700”, len=6) at  
string.c:89  
#15 0xb7f7d552 in rb\_str\_new2 (ptr=0xbfcf70c5 “206700”) at string.c:115  
#16 0xb7f3ebcd in rb\_fix2str (x=413401, base=10) at numeric.c:2029  
#17 0xb7f41097 in fix\_to\_s (argc=0, argv=0x0, x=413401) at  
numeric.c:2060  
#18 0xb7f09c90 in call\_cfunc (func=0xb7f41040 \<fix\_to\_s\>, recv=413401,  
len=6,  
argc=0,  
argv=0x7280) at eval.c:5743  
#19 0xb7f14ffc in rb\_call0 (klass=3083942520, recv=413401, id=3137,  
oid=3137,  
argc=0,  
argv=0x0, body=0xb7d13a00, flags=0) at eval.c:5899  
#20 0xb7f15190 in rb\_call (klass=3083942520, recv=413401, mid=3137,  
argc=0,  
argv=0x0,  
scope=1, self=6) at eval.c:6146  
#21 0xb7f15f34 in vafuncall (recv=413401, mid=3137, n=0, ar=0xbfcf7464)  
at  
eval.c:6223  
#22 0xb7f160a4 in rb\_funcall (recv=413401, mid=3137, n=0) at eval.c:6240  
#23 0xb7f812da in rb\_obj\_as\_string (obj=413401) at string.c:309  
#24 0xb7f111cd in rb\_eval (self=3083958620, n=) at  
eval.c:3858  
#25 0xb7f1134b in rb\_eval (self=3083958620, n=) at  
eval.c:3878  
#26 0xb7f120c6 in rb\_eval (self=3083958620, n=) at  
eval.c:3502  
#27 0xb7f12263 in rb\_eval (self=3083958620, n=) at  
eval.c:3146  
#28 0xb7f21577 in ruby\_exec\_internal () at eval.c:1642  
#29 0xb7f215c2 in ruby\_exec () at eval.c:1662  
#30 0xb7f215ff in ruby\_run () at eval.c:1672  
#31 0x080486ed in main (argc=Cannot access memory at address 0x7280  
) at main.c:48

ã§ã¯ã€‚

---

<div class="post-metadata">

**Author:** ![Daigo\_M](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@Daigo\_M](https://www.ruby-forum.com/u/Daigo_M)\
**Post date:** [June 18, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/error-ruby-1-8-7-object-allocation-during-garbage-collection-phase/140787/2 "2008-06-18T15:45:14Z")

</div>

e$B$3$s$K$A$O!"$J$+$`$ie(B(e$B$&e(B)e$B$G$9!#e(B

In message “[ruby-dev:35156] error: Ruby 1.8.7 object allocation during  
garbage collection phase”  
on Jun.18,2008 22:26:41, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> LibXml[1]e$B$r\<!$N$h$&$K;H$&$H!“e(B  
> [BUG] object allocation during garbage collection phase  
> e$B$H$$$&%(%i!\<$G%/%i%C%7%e$7$^$9!#e(BLibXmle$B$NLdBj$J$N$+$b$7$l$^$;$s$,!”%a%C%;!\<%8$+$ie(B  
> e$B$9$k$He(BRubye$B$NLdBj$N$h$&$K8+$($k$N$G$9$,!"$$$+$,$G$7$g$&$+!#e(BRuby 1.8.6e$B$G$OLdBj$Je(B  
> e$B$+$C$?$N$G$9$,!“e(B1.8.7e$B$K%”%C%W%0%l!\<%I$9$k$H%(%i!\<$H$J$j$^$9!#e(B

e$B%a%C%;!\<%8$NDL$j!“e(BGCe$BCf$Ke(Brubye$B%\*%V%8%'%/%H$N%”%m%1!\<%7%g%s$r9Te(B  
e$B$C$F$$$^$9!#e(B  
LibXmle$B$NLdBj$G$9!#e(B

# e$B%=!\<%98+$^$7$?$1$I!“$J$s$H$$$&$+!”$3$&e(B…

1.8.6e$B0JA0$G$O$=$N%A%‘%C%/$,$J$+$C$?$N$G!“$J$s$H$J$/1?$h$/F0$$e(B  
e$B$?$j$9$k$3$H$b$”$C$?$h$&$G$9$,!"$A$g$C$H1?$,0-$$$He(BSEGVe$B$,5/$-e(B  
e$B$k$O$:$G$9!#e(B  
e$B$H$$$&$o$1$G!"e(B1.8.6e$B$b:G6a$=$N%A%’%C%/$,F~$C$FF1$8$h$&$K$3$&$7e(B  
e$B$?LdBj$r8!=P$7$Fe(B[BUG]e$B$r=P$9$h$&$K$J$C$?$=$&$G$9!#e(B

e$B$=$l$G$O!#e(B
