| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
- improvements and refactor key creation
- Sync strategies added
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
| |
|
|
|
|
|
|
| |
Prepare daemon to store applications/context information of other ECUs as well. This commit prepares the dlt-daemon to store logs from passive nodes in a logstorage device.
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add dlt-sortbytimestamp utility plus documentation
Add a commandline utility to sort a DLT file by timestamp.
By default a DLT file's messages are in the order they were
received by the logger. This is not ideal for tracing problems on
systems with multi-threaded programmes running on multi-core CPUs
since message reception order will not always (or even often)
correspond to message creation order.
The documentation deals with how to handle the problem case of DLT
files containing messages from multiple boot cycles.
|
|
|
|
|
|
| |
warning: extra tokens at end of #ifdef directive
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
|
|
|
|
| |
Package compilation fails with GLIBC 2.28:
stat.h:56:8: error: redefinition of 'struct statx_timestamp'
stat.h:99:8: error: redefinition of 'struct statx'
Signed-off-by: Oleksandr Kravchuk <oleksandr.kravchuk@pelagicore.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dlt-control-common: Fix build with GCC 8: When the "stringop-truncation" warning is treated as an error, the build fails with the following message:
* dlt-control-common.c:213:29: error: ‘strncpy’ output may be truncated copying 255 bytes from a string of length 1023 [-Werror=stringop-truncation] On this file we want to truncate the string due to the destination buffer size, so fix the above by using memcpy() instead.
* dlt-logstorage-common: Fix build with GCC 8: When the "stringop-truncation" warning is treated as an error, the build fails with the following message:
* dlt-logstorage-common.c:313:5: error: ‘strncpy’ specified bound 1024 equals destination size [-Werror=stringop-truncation] In order to avoid truncating and leaving the '\0' byte out, reduce the
bound by 1 byte.
* systemd/3rdparty: Fix sd-daemon build with GCC 8: When the "stringop-truncation" warning is treated as an error, the build fails with the following message:
* sd-daemon.c:453:9: error: ‘strncpy’ specified bound 108 equals destination size. In order to avoid truncating and leaving the '\0' byte out, reduce the bound by 1 byte.
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
|
| |
|
|
|
|
| |
In dlt_user_log_send_log and dlt_forward_msg API's when writing the data to DLT PIPE is not successful in scenario which returns "DLT_RETURN_PIPE_ERROR"(Non availability of dlt pipe post termination of DLT DAEMON) it ideally starts stores the data in internal buffer, and close the dlt user handle, which is quiet appropriate.
The scenario were dlt application fails in writing data to dlt pipe returns DLT_RETURN_PIPE_ERROR and case were application buffer is full, the return value DLT_RETURN_PIPE_ERROR is over written to "DLT_RETURN_BUFFER_FULL" were dlt user handle will not be reset to -1, it till holds the former data which causes undefined behavior of dlt application(One behavior would be which calls dlt_user_queue_resend and internally allocates memory for segmented data and tries to free it at dlt_user_trace_network_segmented_thread which is not intended behavior, instead return silently when FIFO is not available)
|
|
|
|
|
|
|
| |
When epoll detected error for TCP client connection, no state transition
had been happened. (Only the file descriptor had been closed)
To prevent this, dedicated close function is called according to connection type.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
| |
file parser: Replace hash functions with list
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
| |
To avoid busy loop due to error of mq_receive() which is called
in sub thread, 100ms sleep is added for the error case.
Error log message for mq_receive() is also corrected to have errno.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
|
|
| |
So far, signal number had been output in signal handler.
However this was not so safety. And when syslog was used as log
output destination of dlt_log(), we could not see any info in the
same Life Cycle.
So dlt_log() is removed from signal handler and signal number is
newly output by DLT message and dlt_log() at exit.
This info will help analysis why dlt-daemon exits.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
| |
Error log in case of accept() failure is improved with errno info.
This helps us to analyze dlt-daemon's issue in future.
(e.g.)
Connection request come to wrong socket unexpectedly and this
causes exiting dlt-daemon.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If application tries to send application registration request before
dlt-daemon startup, the request is sent twice as below:
1. Buffered request in user library buffer
2. New request when user app succeeds to attach to dlt-daemon
In previous, dlt-daemon had been output the registration messages
2 times even though these messages were come from same application.
This duplicated output is avoided by this change.
Warning message in case of dlt-runtime-context.cfg exists
is also avoided. This file is created when Control message: "Store Config"
is used. This is not irregular case.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes Context un-/registration message not to output DLT
by default for the purpose of reducing trace messages.
Actually dlt-daemon already sends almost same meaning control message
which can show Context un-/registration([get_log_info] and [unregister_context]).
These are duplicate message and should be suppressed in normal case.
Only if "Verbose = 1" is set in dlt.conf, the messages are output as same as before.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
occurs (#61)
In previous, there was possibility that application could not get
notification from dlt-daemon due to wrong error handling.
(e.g.)
1. App1, App2 and App3 register App/Context
2. App2 crashes without unregistering App/Context
3. Change default log level from DLT Viewer
--> App1 can receive new default log level from dlt-daemon but App3 cannot.
This patch makes processing non-stop even if error occurs in below cases:
- While updating log level of all registered apps
- While updating default log level/ default trace status
- While updating connection status between dlt-daemon and dlt-client
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
| |
* IPC: Unix socket added
The user can select either FIFO or UNIX socket as IPC between user library and daemon through CMakelist option.
Socket path configurable for both FIFO and Unix Socket now configurable in CMake
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dlt-control: Provision to control entire system trace status
1. support for setting trace status using wildcards for both app and context
2. support for setting entire system trace status
*This Logic is as same as for changing log level.
(SHA: a966393ad7003d02870bceffa08df5ddf4bbf864
dlt-control: Provision to control entire system log level)
* dlt-daemon: Fix control entire log level / trace status issue
In previous, dlt-control could send request to set
all log level / trace status with DLT_LOG_DEFAULT / DLT_TRACE_STATUS_DEFAULT(-1).
However, dlt-daemon could not accept these value.
This change fix this issue so that setting log level/trace status of
all registered contexts become possible.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dlt-daemon: Lower log level of several logs not to output unintentional warning
Change log level of several logs from WARNING to INFO.
1. User FIFO cannot be opened because the FIFO does not exist
--> This case can happen if DLT user app is one-shot
2. Runtime configuration file (dlt-runtime-application.cfg / dlt-runtime-context.cfg)
cannot be opened
--> This case can happen in normal use case.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
| |
dlt-daemon entered to infinite loop when set log level request with
wildcards came from dlt-control due to variable size.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
|
|
|
| |
Marker message had been continued to output
if application called dlt_log_marker() due to missing
byte removing processing against marker message.
Therefore the byte removing for marker message processing is added.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
| |
Default trace status could not be set by "-f" option.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
|
| |
Even Forcing log level and trace status of context to not exceed "ContextLogLevel" and "ContextTraceStatus" in dlt.conf file with ForceContextLogLevelAndTraceStatus = 1, the default log level is being overwritten with high value than expected by client(DLT_Viewer when default trace data request is sent ) and by dlt-control application on usage of (dlt-control -d loglevel IP_ADDRESS)
With provided patch/changes in place, when ForceContextLogLevelAndTraceStatus is enabled the requested log level is checked with ContextLogLevel and if it satisfied the daemon default loglevel gets updated.
Added a conditional checks to not to overwrite the individual contextLoglevel and ContextTracesStatus when ForceContextLogLevelAndTraceStatus is enabled in dlt.conf file and taken care of review comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix -Wpointer-compare of compare with null char
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common: fix -Wformat-truncation of snprintf
Avoid snprintf output truncation by handling return value
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_offline_trace: Fix Wformat-truncation of snprintf
Compile with Gcc 7.x has the warning of snprintf buffer length size.
Check return value of snprintf() for avoiding the warning.
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
* dlt_common_test: Fix memleak t_dlt_message_read
some resources were not free after using.
Detected by running
valgrind --leak-check=full ./gtest_dlt_common
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
|
|
|
|
|
|
| |
* improve error reporting in dlt_daemon_socket
* use dlt_vlog
|
|
|
|
|
|
| |
Post enabling and updating “OfflineTraceDirectory” variable default path in dlt.conf file, dlt-daemon resulted in crash with Segmentation fault(SIGSEGV) due to Invalid OfflineTraceDirectory path.
dlt_offline_trace-patch-1 contains an update which verifies “existence of offline trace directory” and its “accessibility issues”. It returns -1 on failure conditions and indicates user with appropriate information instead resulting in APPCRASH.
|
|
|
|
|
|
| |
do not update data_send in case of temporal error
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
| |
Prevention for occasional corrupted messages caused mostly due to system high load.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* dlt_common: Fix resource leak
Close the file before returning from function.
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* dlt-kpi-process: Fix memory leak
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
* dlt-kpi-options: Clean up resources on malloc fail
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
|
|
|
|
| |
character from merge - +
|
|
|
|
|
|
|
|
|
|
|
|
| |
- When dlt_daemon_user_send_log_level() called in
dlt_daemon_process_user_message_register_context() fails -1 was returned
which caused dlt_daemon_process_user_messages() to stop processing
receiver buffer. Remaining data was stuck until new data arrived over
FIFO.
- Make debug output of dlt_daemon_user_send_log_level() more
verbose.
Signed-off-by: Lutz Helwing <lutz_helwing@mentor.com>
|
|
|
|
|
| |
(#19)
Signed-off-by: Pierre N <pierreN@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
| |
By enabling the WITH_SYSTEMD and WITH_DLT_UNIT_TESTS cmake flags
the build will fail with an error due to a linking issue:
../src/daemon/libdlt_daemon.so: undefined reference to `sd_booted'
collect2: error: ld returned 1 exit status
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Update dlt-kpi-process.c
Added input param checking and added return value in non-void functions.
* Update dlt-kpi.c
Added Input param checking and added return values in non-void functions.
* Input parameter check and Error msg modification
Added null pointer checking
Added input parameter checking
Added return values in non-void functions
Added proper error message for debugging purpose
Signed-off-by: amberbhardwaj <amber.bhardwaj10@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
In function ‘daemonize’:
dlt-daemon/src/system/dlt-system-process-handling.c:84:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
for(i = getdtablesize(); i >= 0; i--)
^~~
dlt-daemon/src/system/dlt-system-process-handling.c:87:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’
int fd = open("/dev/null",O_RDWR);
^~~
Singed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
dlt-daemon/src/daemon/dlt_daemon_event_handler.c: In function ‘dlt_daemon_handle_event’:
dlt-daemon/src/daemon/dlt_daemon_event_handler.c:131:30: waring: cast from pointer to integer of different size [-Wpointer-to-int-cast]
DltConnectionId id = (DltConnectionId)ev->data.ptr;
^
dlt-daemon/src/daemon/dlt_daemon_event_handler.c: In function ‘dlt_connection_check_activate’:
dlt-daemon/src/daemon/dlt_daemon_event_handler.c:381:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ev.data.ptr = (void *)con->id;
^
Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
|
|
|
|
|
|
|
|
|
|
|
| |
input (#9)
* dlt-adaptor-udp, dlt-adaptor-stdin: implement get of verbosity level from input, defaulting to INFO when
wrong type or none is provided
Signed-off-by: Gianfranco Costamagna <gianfranco.costamagna@abinsula.com>
* Fix minor typo (from gunnarx)
|
|\
| |
| | |
Added Description in dlt-system.conf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added additional information about how to enable syslog feature properly.
If still facing issue while capturing syslogs through client (e.g. dlt_viewer) after following given steps then install listed packages:
build-essential
build-essential checkinstall
pkg-config libsystemd-journal-dev
Note:
It's is a known issue when you try to capture syslog via dlt_viewer then syslogs wouldn't come in dlt_viewer because of improper configuration (won't route the log to port 47111) of dlt-system.
|
|\ \
| | |
| | | |
dlt-client: fix dlt_client_cleanup memory handling
|
| |/
| |
| |
| |
| |
| |
| | |
Setter function introduced for seting up string parameters which are
free'd in dlt_client_cleanup
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|\ \
| | |
| | | |
CMake Option: Trigger segmentation fault in case of FATAL log
|
| |/
| |
| |
| |
| |
| |
| |
| | |
When the user library receives a log with log level DLT_LOG_FATAL it
triggers a segmentation fault to provide information to the developer
via tools like coredump.
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In dlt_daemon_send_all_multiple, if the connection was broken, we closed
it before getting the next available connection. This must be avoided by
having a temporary next pointer.
The same kind of problem is valid for pointers coming from the epoll
interface. The kernel can provide back connection pointer that are not
valid any longer. Therefore, we need to use an ID instead of the pointer
value to retrieve the connections.
Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|/
|
|
|
|
|
|
|
| |
It might happen that an event is part of the epoll event queue that
belongs to a connection which was destroyed before the event is handled.
Due to this, the event handling main loop might stop and the daemon
exits. This misbehavior is fixed with this patch.
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
| |
Unit tests for DLT Daemon connection and event handling
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
| |
Unit test for DLT MultiNode extension
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|