Networking Forums

Networking Forums > Computer Networking > Linux Networking > Can't get the exact message using sockets in 64-bit Linux?

Reply
Thread Tools Display Modes

Can't get the exact message using sockets in 64-bit Linux?

 
 
LaBird
Guest
Posts: n/a

 
      03-12-2006, 04:18 PM
Hi all,

I am trying to port a parallel program running from 32-bit
Linux to 64-bit one. The program is using Berkeley sockets
(asynchronous) as data communication.

Things go alright, except that after successful compilation,
the executable cannot run to completion. I find that the
problem is that the source message before sent and the
received message at the other party are different. One of
the data items (at the end of message) should be 1, but
the receiver gets it as 0. As the program's execution flow
has to be decided by this value, the wrong value suggests
the program's failure to execute to completion.

Just before the problem exists, the OS gives some warnings
like this:
"sor254-2(2525): unaligned access to 0x60000000258da666,
ip=0x4000000000042611"

I belive the "misalignment" happens at the memory for the
message received. And, the message has 32-byte header +
7208 bytes of data, and it is the last 4 bytes that shows error.
I'd like to ask if this is the "misalignment" that causes the
message received to be different from the source? If so,
what is the correct alignment to avoid this error (16 bytes?
32 bytes?) then? And, why such problem does not occur
in 32-bit Linux?

Many thanks in advance.

Best Regards,
LaBird (Benny).
[Email: Remove all numerals to get the correct email address.]



 
Reply With Quote
 
 
 
 
Robert Harris
Guest
Posts: n/a

 
      03-12-2006, 07:12 PM
LaBird wrote:
> Hi all,
>
> I am trying to port a parallel program running from 32-bit
> Linux to 64-bit one. The program is using Berkeley sockets
> (asynchronous) as data communication.
>
> Things go alright, except that after successful compilation,
> the executable cannot run to completion. I find that the
> problem is that the source message before sent and the
> received message at the other party are different. One of
> the data items (at the end of message) should be 1, but
> the receiver gets it as 0. As the program's execution flow
> has to be decided by this value, the wrong value suggests
> the program's failure to execute to completion.
>
> Just before the problem exists, the OS gives some warnings
> like this:
> "sor254-2(2525): unaligned access to 0x60000000258da666,
> ip=0x4000000000042611"
>
> I belive the "misalignment" happens at the memory for the
> message received. And, the message has 32-byte header +
> 7208 bytes of data, and it is the last 4 bytes that shows error.
> I'd like to ask if this is the "misalignment" that causes the
> message received to be different from the source? If so,
> what is the correct alignment to avoid this error (16 bytes?
> 32 bytes?) then? And, why such problem does not occur
> in 32-bit Linux?
>
> Many thanks in advance.
>
> Best Regards,
> LaBird (Benny).
> [Email: Remove all numerals to get the correct email address.]


If you want help finding bugs, you will have to post a little code!

Robert
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some C language examples of linux raw sockets for IPv4 and IPv6 pdbuchan@yahoo.com Linux Networking 0 12-17-2011 03:30 AM
What is the exact term and how is it spelled? ThunderMusic Windows Networking 4 08-27-2007 09:08 PM
linux sockets - connect() Bilgehan.Balban@gmail.com Linux Networking 7 02-03-2006 09:47 PM
checking the exact distance JB Wireless Internet 32 12-11-2005 10:11 PM
Real-Time UDP non-blocking sockets in Linux Michael Drew Linux Networking 14 02-18-2004 11:56 PM



1 2 3 4 5 6 7 8 9 10 11