Skip to content
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

Open
tesaki opened this issue May 14, 2024 · 0 comments
Open

Message is lost in dlt-daemon. #631

tesaki opened this issue May 14, 2024 · 0 comments
Assignees
Labels

Comments

@tesaki
Copy link

tesaki commented May 14, 2024

The message is lost if more than 65536 bytes of data accumulates in the receive buffer in the dlt-daemon.
The dlt-daemon reads up to 65535 bytes when retrieving a message from the receive buffer if the message is APP_MSG. (ref. dlt_receiver_init_global_buffer() function)
At this time, if there are more than 65536 bytes of data in the receive buffer, dlt-daemon usually cuts off the last message data read. As a result, the message data is error, and the message is discarded.(ref. commit: dlt-daemon: Handle partial message parsing in receiver buffer
Since this message data is being sent and received without problems (not a rare case as commented in dlt-daemon.c: ll.3561-3567), it is not retransmitted. In other words, this message is lost.
For this problem, it seems to me that it would be better to make the read size of message data in dlt-daemon the size of the receive buffer, rather than a fixed value of up to 65535.

To confirm this phenomenon, DaemonFIFOSize is set to 1MiB in dlt.conf and the following log sending program is used.

#include <stdio.h>
#include <stdlib.h>
#include <dlt.h>

DLT_DECLARE_CONTEXT(con_exa1);

int main()
{
    DLT_REGISTER_APP("TAPP", "Test App");

    DLT_REGISTER_CONTEXT(con_exa1, "TAPP", "Test Context");

    int i;
    for (i = 0; i < 5000; i++) {
        DLT_LOG(con_exa1, DLT_LOG_INFO, DLT_UINT32(i),
         DLT_STRING("TEST ################################################"));
    }

    DLT_UNREGISTER_CONTEXT(con_exa1);

    DLT_UNREGISTER_APP();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants