<div dir="ltr">We have some SPARC and some Intel hosts running spread-4.1. Everything was working fine with spread-4.1 in that mixed endian environment.<br><br>After upgrading from spread-4.1 to spread 4.4.0 we observed problems when spread-4.4 daemons are started on both SPARC(Solaris) and Intel(RHEL). Everything is working fine as long as the spread-4.4 daemons are started *only* on SPARC hosts or *only* on Intel hosts.<br><br>Now we first start all spread daemons on Intel. When the first daemon of the “other endian” architecture is run up problems begin. We found the following alarm message in a spread logfile. And a spread daemon was crashing with core dump.<br><br>2014-09-08 17:43:59 GMT Prot_handle_bcast: invalid packet with seq -1062731160 from 21, processed bytes not equal data_len 16905 1395<br><br>The program code emitting that alarm is new since spread-4.3. It is only relevant in mixed endian environments.<br><br>Obviously something is wrong with the length calculation. The length reported in the alarm message (16905) is far away from the desired value 1395.<br><br>We believe there is a bug in the pointer calculation of the frag_ptr in protocol.c. Below a proposed patch for that.<br>Can you confirm this?<br>We would be glad if that could be included in a future release of spread. <br><br>Kind regards,<br>Martin <br><br><span style="font-family:courier new,monospace">--- daemon/protocol.c.orig         2014-05-15 17:04:35.000000000 +0200<br>+++ daemon/protocol.c 2014-09-09 14:37:40.845240310 +0200<br>@@ -409,7 +409,7 @@<br>                                        pack_ptr-&gt;transmiter_id, pack_ptr-&gt;seq, processed_bytes, pack_ptr-&gt;data_len );<br>                                 break;<br>                         }<br>-                        frag_ptr = (fragment_header *) &amp;pack_body_ptr[processed_bytes];<br>+                        frag_ptr = (fragment_header *) (((char*)pack_body_ptr) + processed_bytes);<br>                         Flip_frag(frag_ptr);<br>                         processed_bytes += sizeof(fragment_header) + frag_ptr-&gt;fragment_len;<br>                 }<br><br></span></div>