-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message is lost in dlt-daemon. #631
Comments
I initially proposed increasing the dlt-daemon read size, but I realized this was incorrect. Therefore, I have updated the issue description accordingly. Hello @minminlittleshrimp and @Suprathik-N Could you kindly provide details on the environment in which this patch was tested? Based on our findings, this issue does not appear to occur in practice, leading me to believe that the patch may not be necessary. *1: Investigation Findings
|
Hello @lti9hc @Bichdao021195 |
@tesaki @minminlittleshrimp The issue was observed on QNX, and with FIFO as the IPC mechanism. The error flow is as follows -
Here's a small snippet that you can add in line 166 of dlt_user_shared.c to reproduce the error scenario -
|
Hello @Suprathik-N Thank you for your response. I see, the issue occurred on QNX. However, based on the QNX documentation, it does not seem likely that partial messages would be sent. According to the QNX documentation, the behavior of 'write()' is described as follows:
Since the FIFO is set to O_NONBLOCK, and 1424 < PIPE_BUF = 4k, it appears to satisfy the above conditions, meaning that partial writes should not occur. As a result, the third message write should result in an error. I think that unless the application is attempting to pack multiple messages to fully occupy the PIPE_BUF size, it seems unlikely that a message would be partially sent. How does the application send message? |
The message is lost if more than 65536 bytes of data accumulates in the kernel's receive buffer, when the dlt-daemon receives message data.
When the message type is APP_MSG, the dlt-daemon reads up to 65,535 bytes from the kernel's receive buffer. (ref. dlt_receiver_init_global_buffer() function)
At this time, the last message created from the read data is often incomplete. As a result, this incomplete message is detected as an error and discarded.
The following patch introduced a change to discard incomplete messages:
commit: dlt-daemon: Handle partial message parsing in receiver buffer
Reverting this patch resolves this issue.
To confirm this phenomenon, DaemonFIFOSize is set to 1MiB in dlt.conf and the following log sending program is used.
The text was updated successfully, but these errors were encountered: