<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>Spread on Linux question</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">I've just started working with spread and have set up a network which consists of 4 spread daemons talking to each other.&nbsp; Every so often the spread daemon crashes or just hangs and although it accepts connections it doesn't do anything further.&nbsp; We are running on Linux (2.4.21-20.0.2.ELsmp #1 SMP Thu Apr 21 15:17:44 EDT 2005 i686 athlon i386 GNU/Linux) and are running spread 3.17.3.&nbsp; In one instance we generated the core dump and this is what we see:</FONT></P>
<UL><UL><UL><UL><UL><UL>
<P><I><FONT SIZE=2 FACE="Arial">(gdb) bt</FONT></I>
<BR><FONT SIZE=2 FACE="Arial">#0&nbsp; 0xb750852a in _int_realloc () from /lib/tls/libc.so.6</FONT>
<BR><FONT SIZE=2 FACE="Arial">#1&nbsp; 0xb7507ad9 in _int_malloc () from /lib/tls/libc.so.6</FONT>
<BR><FONT SIZE=2 FACE="Arial">#2&nbsp; 0xb7507580 in calloc () from /lib/tls/libc.so.6</FONT>
<BR><FONT SIZE=2 FACE="Arial">#3&nbsp; 0x08053c66 in new (obj_type=50) at memory.c:433</FONT>
<BR><FONT SIZE=2 FACE="Arial">#4&nbsp; 0x0804b11a in Deliver_packet (pack_entry=112, to_copy=1) at protocol.c:948</FONT>
<BR><FONT SIZE=2 FACE="Arial">#5&nbsp; 0x0804b2a2 in Deliver_agreed_packets () at protocol.c:1010</FONT>
<BR><FONT SIZE=2 FACE="Arial">#6&nbsp; 0x0804a220 in Prot_handle_bcast (fd=3, dummy=0, dummy_p=0x0) at protocol.c:396</FONT>
<BR><FONT SIZE=2 FACE="Arial">#7&nbsp; 0x080537ad in E_handle_events () at events.c:673</FONT>
<BR><FONT SIZE=2 FACE="Arial">#8&nbsp; 0x080497b1 in main (argc=5, argv=0xbfffedd4) at spread.c:193</FONT>
</P>

<P><I><FONT SIZE=2 FACE="Arial">(gdb) frame 4</FONT></I>
<BR><FONT SIZE=2 FACE="Arial">#4&nbsp; 0x0804b11a in Deliver_packet (pack_entry=112, to_copy=1) at protocol.c:948</FONT>
<BR><FONT SIZE=2 FACE="Arial">948&nbsp;&nbsp;&nbsp;&nbsp; Packets[pack_entry].body = new(PACKET_BODY);</FONT>
</P>

<P><I><FONT SIZE=2 FACE="Arial">(gdb) info locals</FONT></I>
<BR><FONT SIZE=2 FACE="Arial">proc_index = 1</FONT>
<BR><FONT SIZE=2 FACE="Arial">up_ptr = (up_queue *) 0x8eb8718</FONT>
<BR><FONT SIZE=2 FACE="Arial">pack_ptr = (packet_header *) 0x9d74310</FONT>
<BR><FONT SIZE=2 FACE="Arial">mess_link = (message_link *) 0x1</FONT>
<BR><FONT SIZE=2 FACE="Arial">index = 2</FONT>
<BR><I><FONT SIZE=2 FACE="Arial">(gdb) print *pack_ptr</FONT></I>
<BR><FONT SIZE=2 FACE="Arial">$6 = {type = -2147483512, transmiter_id = -1710970210, proc_id = -1710970210, memb_id = {proc_id = -1806277334, time = 1118954489}, seq = 7, fifo_seq = 2, packet_index = -2, data_len = 216}<BR>
<BR>
We think that this is related to the Linux glibc issue raised in&nbsp; </FONT><A HREF="http://groups-beta.google.com/group/linux.debian.bugs.dist/browse_thread/thread/ebd50c447c23eba9/199fcd078c5e100b?q=malloc_consolidate&amp;rnum=5&amp;hl=en#199fcd078c5e100b"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://groups-beta.google.com/group/linux.debian.bugs.dist/browse_thread/thread/ebd50c447c23eba9/199fcd078c5e100b?q=malloc_consolidate&amp;rnum=5&amp;hl=en#199fcd078c5e100b</FONT></U></A><FONT SIZE=2 FACE="Arial">.&nbsp; In a related post we found:</FONT> <A HREF="http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/RELEASE-NOTES-en.html#id850584"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/RELEASE-NOTES-en.html#id850584</FONT></U></A><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">.&nbsp;</FONT> <FONT SIZE=2 FACE="Arial">Based on the last post we added MALLOC_CHECK_=1 to the start script and during execution we found:&nbsp; &quot;free(): invalid pointer 0x9d876a8!&quot; in the log, which seems to imply that there is indeed a double free occurring.&nbsp; We can't figure out exactly what's happening, but we believe that this is being triggered by this spread daemon responding to another spread daemon being shut down (this seemed to occur when 1 or 2 of the machines running the spread daemons were rebooted).&nbsp; I was wondering if anyone has seen anything similar and if this known and if there is a patch/workaround for this.</FONT></P>
<BR>
</UL></UL></UL></UL></UL></UL>
<P><FONT SIZE=2 FACE="Arial">TIA,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Mayer</FONT>
<BR><FONT SIZE=2 FACE="Arial"></FONT>&nbsp;
</P>
<BR>

</BODY>
</HTML>