[Ace-users] [ace-users] Data corruption using sockets/IPC
dwh at ovro.caltech.edu
Tue Oct 30 15:48:09 CDT 2007
>> In a project, we’re using ACE’s sockets/IPC calls to send data. We
>> were using an older version with an old compiler(on a 2.4 linux
>> kernel), but have recently updated to GCC 4/2.6 kernel and ACE 5.6
>> (the latest released version).
>> The issue I’m having is that data seems to be getting corrupted when
>> its being sent. As in, values in the buffer I pass in to send_n aren’t
>> the same values I get after the recv_n. Has anyone seen this before?
>> Searching the list, bugzilla, and google hasn’t found me much. Any
>> help is appreciated.
Check whether you have multiple threads accessing the same socket
descriptor. ACE send_n/recv_n routines are not setup to be accessed
by multiple threads (without adding some form of locking).
Perhaps the code always had this type of bug, but the change
in threading between the 2.4 and 2.6 kernels is exposing the issue.
Another thing you could try is building the old code and
running it under 2.6. You might find the same failures.
More information about the Ace-users