COVESA / dlt-daemon

Diagnostic Log and Trace.
https://covesa.github.io/dlt-daemon/
Mozilla Public License 2.0
373 stars 292 forks source link

dlt-receive command makes dlt crash. #201

Closed hkabra closed 4 years ago

hkabra commented 4 years ago

I am using the dlt-receive command with a filter as well but when some dlt log line which is enormously huge than normal, it crashes.

Is there a way to increase the buffer size for the streaming of logs.

hkabra commented 4 years ago

Gives an error Segmentation fault (core dumped)

thanhbnq commented 4 years ago

Hi @hkabra , There is an environment variable which could help in this case: "DLT_LOG_MSG_BUF_LEN" You can read more information in "dlt_user.cfg.h":

/* Name of environment variable to change the dlt log message buffer size */
#define DLT_USER_ENV_LOG_MSG_BUF_LEN "DLT_LOG_MSG_BUF_LEN"

Please be aware that:

/* Maximum msg size as per autosar standard */
#define DLT_LOG_MSG_BUF_MAX_SIZE 65535

I hope it could answer your concern.

thanhbnq commented 4 years ago

Gives an error Segmentation fault (core dumped)

It would be better for both of us if you could give us the use case/test step which can help to reproduce the crash. Thanks!

hkabra commented 4 years ago

Thank you very much for the support but it still doesn't work. I am not able to edit the file to increase the buffer size.

I try to run some voice commands on the ECU and the log that it generates gets so huge that it crashes the dlt-receive stream.

thanhbnq commented 4 years ago

Hi @hkabra

Thank you very much for the support but it still doesn't work. I am not able to edit the file to increase the buffer size.

Sorry but I am afraid I can't get what you meant. Let me give a little bit more details.

If we want to adjust the buffer size of dlt message, try to set environment variable "DLT_LOG_MSG_BUF_LEN" Example: In Ubuntu, with the "dlt-example-user" binary, we run command: DLT_LOG_MSG_BUF_LEN=60000 dlt-example-user -n 100 -r 2000 This will set environment variable "DLT_LOG_MSG_BUF_LEN" to 60000 and the example application tries to send 100 messages and 2000 bytes/message in raw format to dlt-daemon.

I try to run some voice commands on the ECU and the log that it generates gets so huge that it crashes the dlt-receive stream.

Could you please provide the back traces? Is dlt-receive itself crashed or dlt-daemon?

ssugiura commented 4 years ago

@hkabra Any update on this? As @thanhbnq suggested, any backtrace would be helpful.

ssugiura commented 4 years ago

Closing this issue since there's no update for long time. @hkabra Please reopen the issue if it's not solved yet and you need any help from us. As added in previous comment, any backtrace would be helpful to understand the behavior. Thank you!