diff host transport, block at the write function

4 posts / 0 new
Last post
Offline
Last seen: 1 year 6 months ago
Joined: 06/09/2022
Posts: 15
diff host transport, block at the write function

hi, we encount a problem that blocked at the `plain_types_UnderlayMessageDataWriter_write` function about 2 minute.

it will occur when we do the diff host transport, whatever the Udp and Tcp,

after the remote peer leave(be killed), continue to using `plain_types_UnderlayMessageDataWriter_write` to write msg, it will block.

rtidds version: 6.1.1

our code:

plain_types_UnderlayMessage m;
int64_t message_byte_size = message::ByteSize(msg);
DDS_UInt8Seq_ensure_length(&m.data, message_byte_size, message_byte_size);
RETURN_VAL_IF(
!message::SerializeToArray(msg, DDS_UInt8Seq_get_reference(&m.data, 0),
message_byte_size),
false);
{
std::lock_guard<std::mutex> lg(lock_);
if (data_writer_ != NULL) {
DDS_InstanceHandle_t instance_handle = DDS_HANDLE_NIL;
DDS_ReturnCode_t retcode = plain_types_UnderlayMessageDataWriter_write(
data_writer_, &m, &instance_handle);
if (retcode != DDS_RETCODE_OK) {
AERROR << "data_writer failed to write";
return false;
}
}
}
 
Best Regards.
 

Tang from xiaomi Company

 

Organization:
Keywords:
Offline
Last seen: 1 year 6 months ago
Joined: 06/09/2022
Posts: 15

and i have doing the same test in the same host with shm transport, it will not occur.

Offline
Last seen: 1 year 6 months ago
Joined: 06/09/2022
Posts: 15

hi, we use the Asynchronous PublishMode to write

Offline
Last seen: 1 year 6 months ago
Joined: 07/08/2021
Posts: 6

Hi,

Could you kindly contact me at zklim@rti.com? 

There could be many reasons for blocking, we need to know more details about the situation to help you.

Thank you