-
Notifications
You must be signed in to change notification settings - Fork 242
Open
Labels
Description
Is your feature request related to a problem? Please describe.
If for some reason, transmission is failed. Therefore, client will not able to receive any response from server. But TransportArbitrator will stuck forever because it is waiting for semaphore.
erpc/erpc_c/infra/erpc_transport_arbitrator.cpp
Lines 165 to 178 in 781fb03
| erpc_status_t TransportArbitrator::clientReceive(client_token_t token) | |
| { | |
| erpc_assert((token != 0) && ("invalid client token" != NULL)); | |
| // Convert token to pointer to info struct for this client receive request. | |
| PendingClientInfo *info = reinterpret_cast<PendingClientInfo *>(token); | |
| // Wait on the semaphore until we're signaled. | |
| info->m_sem.get(Semaphore::kWaitForever); | |
| removePendingClient(info); | |
| return kErpcStatus_Success; | |
| } |
ClientManager do not have this porblem because it doesn't wait for semaphore.
Describe the solution you'd like
I know unreliable transport causes this problem. but it is inefficient to implement a reliable transport for serial and spi. It will need a ack from the other side.
- Maybe add a timeout option for
TransportArbitratorandArbitratedClientManager - do nothing
Describe alternatives you've considered
Steps you didn't forgot to do
- I checked if there is no related issue opened/closed.
Arbitrated client stucks -> dead lock #171 - I checked that there doesn't exist opened PR which is solving this issue.
deadlock fix proposals #121
Additional context