[libxml-devel] More crashes, in malloc...

Luc Heinrich luc at honk-honk.com
Sat Feb 9 12:37:34 EST 2008


Greetings,

So my last posts about crashes in 'ruby_xml_xpath_object_mark' turned  
out to be a non-issue since the problem is already fixed. However,  
I'm still getting *lots* of random crashes which prevent my web  
application to stay up for more than 10mn, which is of course  
unacceptable.

The strange thing is that those crashes have different code paths but  
all end up in the system malloc. Here are four examples...

Example 1:

0   libSystem.B.dylib       	0x90003cf4 szone_malloc + 956
1   libSystem.B.dylib       	0x90003600 malloc + 632
2   libxml2.2.dylib         	0x015615e8 xmlXPathNodeSetCreate + 56
3   libxml2.2.dylib         	0x01561764 xmlXPathNewNodeSet + 116
4   libxml2.2.dylib         	0x01572b14 xmlXPathRunStreamEval + 148
5   libxml2.2.dylib         	0x01572f28 xmlXPathRunEval + 248
6   libxml2.2.dylib         	0x015737fc xmlXPathCompiledEvalInternal  
+ 364
7   libxml2.2.dylib         	0x01573950 xmlXPathCompiledEval + 32
8   libxml_so.bundle        	0x01132c38 ruby_xml_xpath_find + 472
9   libxml_so.bundle        	0x01132d58 ruby_xml_xpath_find2 + 56
10  libxml_so.bundle        	0x0112978c ruby_xml_node_find + 96
11  libxml_so.bundle        	0x011297b0 ruby_xml_node_find_first + 16
12  libruby.dylib           	0x002254dc call_cfunc + 256
13  libruby.dylib           	0x00224b20 rb_call0 + 1168
....

Example 2:

0   libSystem.B.dylib       	0x90003cf4 szone_malloc + 956
1   libSystem.B.dylib       	0x90003600 malloc + 632
2   libxml2.2.dylib         	0x01561728 xmlXPathNewNodeSet + 56
3   libxml2.2.dylib         	0x01570b54 xmlXPathCompOpEvalPredicate +  
260
4   libxml2.2.dylib         	0x015719c4 xmlXPathNodeCollectAndTest +  
3380
5   libxml2.2.dylib         	0x0156fa28 xmlXPathCompOpEval + 2072
6   libxml2.2.dylib         	0x015703a0 xmlXPathCompOpEval + 4496
7   libxml2.2.dylib         	0x01572fe8 xmlXPathRunEval + 440
8   libxml2.2.dylib         	0x015737fc xmlXPathCompiledEvalInternal  
+ 364
9   libxml2.2.dylib         	0x01573950 xmlXPathCompiledEval + 32
10  libxml_so.bundle        	0x01132c38 ruby_xml_xpath_find + 472
11  libxml_so.bundle        	0x01132d58 ruby_xml_xpath_find2 + 56
12  libxml_so.bundle        	0x0112978c ruby_xml_node_find + 96
13  libxml_so.bundle        	0x011297b0 ruby_xml_node_find_first + 16
14  libruby.dylib           	0x002254dc call_cfunc + 256
15  libruby.dylib           	0x00224b20 rb_call0 + 1168
....

Example 3:

0   libSystem.B.dylib       	0x90003cf4 szone_malloc + 956
1   libSystem.B.dylib       	0x90003600 malloc + 632
2   libruby.dylib           	0x002379d8 ruby_xmalloc + 136
3   libruby.dylib           	0x0021f268 rb_eval + 6780
4   libruby.dylib           	0x0021dd44 rb_eval + 1368
5   libruby.dylib           	0x00225148 rb_call0 + 2744
6   libruby.dylib           	0x00225b18 rb_call + 600
7   libruby.dylib           	0x0021f41c rb_eval + 7216
8   libruby.dylib           	0x0021dd44 rb_eval + 1368
9   libruby.dylib           	0x0021f220 rb_eval + 6708
10  libruby.dylib           	0x0021f298 rb_eval + 6828
11  libruby.dylib           	0x00222c24 rb_yield_0 + 1368
12  libruby.dylib           	0x00223070 rb_yield_values + 180
13  libruby.dylib           	0x00215b2c each_with_index_i + 48
....

Example 4:

0   libSystem.B.dylib       	0x90003cf4 szone_malloc + 956
1   libSystem.B.dylib       	0x90003600 malloc + 632
2   libxml2.2.dylib         	0x0158a918 xmlStrndup + 72
3   libxml2.2.dylib         	0x01530fc4 xmlNewPropInternal + 340
4   libxml2.2.dylib         	0x015e2fbc xmlSAX2StartElementNs + 1468
5   libxml2.2.dylib         	0x0151bbbc xmlParseStartTag2 + 3612
6   libxml2.2.dylib         	0x015282cc xmlParseElement + 220
7   libxml2.2.dylib         	0x01526ae8 xmlParseContent + 312
8   libxml2.2.dylib         	0x015284d8 xmlParseElement + 744
9   libxml2.2.dylib         	0x01526ae8 xmlParseContent + 312
10  libxml2.2.dylib         	0x015284d8 xmlParseElement + 744
11  libxml2.2.dylib         	0x01526ae8 xmlParseContent + 312
12  libxml2.2.dylib         	0x015284d8 xmlParseElement + 744
13  libxml2.2.dylib         	0x01526ae8 xmlParseContent + 312
14  libxml2.2.dylib         	0x015284d8 xmlParseElement + 744
15  libxml2.2.dylib         	0x01528c38 xmlParseDocument + 1096
16  libxml_so.bundle        	0x0112de60 ruby_xml_parser_parse + 96
17  libruby.dylib           	0x002254f0 call_cfunc + 276
....

I have a bad feeling about these problems, I don't see why malloc  
would crash.

Anyone have an idea ? This is on OS X by the way.

-- 
Luc Heinrich




More information about the libxml-devel mailing list