| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Allow building as a subproject of another
cmake project (CMAKE_* vs PROJECT_* variables)
2. Do not generate header files within source – bad practice, use build
directory for that(e.g. change location where dlt_version.h is being generated)
3. Use add_compile_options() instead of *_C/CXX_FLAGS variables for proper
compile environment definition, also bad practice, also see p.2
4. Add WITH_DLT_PKGCONFIG – add generate pkgconfig .pc files as switchable
option, should probably be part of headers install routine.
Signed-off-by: Radoslaw Kaczorowski <external.radoslaw.kaczorowski@bosch-softtec.com>
|
|
|
|
|
|
|
| |
There were a couple of places which used snprintf-dlt_log. It is
now replaced with dlt_vlog().
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In dlt_daemon_client_send_all_multiple(), while in the loop,
the connection to client may be destroyed by recursive call to
dlt_daemon_close_socket(). So in some scenario we still use the removed
connection, which is unexpected behavior.
Solution: loop on the fds array and find the client connection
corresponds to.
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When it fails to send a log message to connected client, daemon
tries to store the remaining partial message to internal ring
buffer and send again later. When calculating the number of bytes
which were sent to client, it had a bug which it keeps on
incrementing instead of initializing the variable on every message,
which never reached to the condition mentioned above and had a
possibility to overflow and access invalid memory. On the other hand,
daemon doesn't need to store the unsent partial message, as the socket
to the client will be closed on failure and the sent partial message
will be dropped anyways.
This commit removes the lines where the daemon tries to store the
partial message to ring buffer. With this, variable bytes_sent is
now removed.
Related commit: 2262f8b Made socket send reliable
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
If a context is defined and loaded from runtime context config file,
that context won't be deleted/removed from dlt-daemon database
until its parent application is unregistered.
Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com>
|
|
|
|
|
|
| |
Do not assign fd after destroying receiver pointer
Signed-off-by: Bui Nguyen Quoc Thanh <Thanh.BuiNguyenQuoc@vn.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes couple of unexpected behavior on Logstorage sync behavior.
- A log file is created only if necessary to avoid creating an empty log file.
- The cache is synced with the condition:
1) When the ring buffer is not wrapped around, the cache is synced from
last sync offset to current offset
2) When the ring buffer is wrapped around for first time and current offset
is smaller than last sync offset, the cache is synced from last sync
offset to end sync offset, and then from beginning to current offset
3) Otherwise, the cache is synced from offset where the log message starts
to end sync offset, and then from beginning to current offset
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
| |
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix compiler warnings about socket usage
Correct the data types used for the socket declaration. We use AF_UNIX
sockets so we use struct sockaddr_un, but we need to cast to struct
sockaddr for the socket API.
Fix compiler warnings about sign-compare
Fix two occurences of signed - unsigned comparison by casting the values
accordingly. Note that the cast is legal as the first parts of both
conditional statements make sure the value is not negative before
casting to unsigned.
While at it, add strtol error checking.
Fix compiler warnings about string functions
Add string.h to src/daemon/dlt_daemon_unix_socket.c, because it was
unaware of memcpy and strerror. While at it, change unsafe use of
sprintf to proper dlt_vlog and remove the char buffer.
Fix compiler warnings about unused-*
Fix two unused-variable and one unused-parameter warning. While at it,
change the #ifdef to not run into an empty block. Simply reverse the
condition and enclose the complete else with the #ifdef.
POSIX: Use memset instead of bzero
"The bzero() function is deprecated (marked as LEGACY in POSIX.1-2001);
use memset(3) in new programs."
Use memset instead of bzero and remove any occurrence from DLT. Include
of header "strings.h" that has bzero is also removed.
Signed-off-by: Simon Herkenhoff <sherkenhoff@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
|
|
|
|
| |
sem_wait may return an error if a signal is received while waiting for
the lock,and therefore not take the lock before returning.
Changed to have a while loop.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
| |
Including net/if.h leads to duplicate definition of DLT_RAW.
However the header itself is not required in dlt_daemon_socket.c.
So it is now removed from the file.
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rootcause:
The dlt-daemon rotates files for each key, but not for each [FILTER] because
dlt-daemon creates the DltLogStorageFilterConfig for each key (CTXT: or APPID: or APPID:CTXTID)
then added to the DltLogStorageFilterList.
And each DltLogStorageFilterConfig has it's own records (The list of files
that was recorded in the offline logstorage directory), that's why one [FILTER] might be
has multiple records and then its lead to the problem.
Solution:
Instead of creating the DltLogStorageFilterConfig for each key, dlt-daemon will create
the DltLogStorageFilterConfig for each [FILTER] and DltLogStorageFilterConfig has an information
of all the keys in this [FILTER].
Signed-off-by: Vo Trung Chi <Chi.VoTrung@vn.bosch.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
| |
In previous, number of connections was output only if verbose mode
in dlt.conf was enabled. This information is basically useful
and is not output frequently. Therefore number of connections information
is made to output as default when new connection is established or
the connection is lost.
Signed-off-by: Yusuke Sato <yusuke-sato@apn.alpine.co.jp>
|
|
|
|
| |
Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
|
|
|
|
|
|
|
| |
If /dev/null fails to open during DLT daemon's fork handling,
it is treated as an error and DLT daemon exits.
Signed-off-by: Jeevan Ramakant Nagvekar <jeevan.nagvekar1@wipro.com>
|
|
|
|
|
|
|
|
|
|
|
| |
1> While daemonizing DLT, for connecting I/O file descriptors to
/dev/NULL POSIX call dup() is used. dup2() POSIX call is now used
where explicit standard I/O descriptor number is mentioned.
2>After fork() directory changed to root in place of FIFO Base
directory - "/tmp"
Signed-off-by: Jeevan Ramakant Nagvekar <jeevan.nagvekar1@wipro.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes DLT's "one-instance-lock" mechanism.
In daemonized mode, on first instance, a file is created (if not
already created) and locked. If second instance is attempted
file locking fails since the file is already locked by first instance.
This prevents new instance of the DLT daemon. After analysis
its found that there is no need of any mechanism for prevention
of another instance. The same is already taken care by socket
mechanism. Since main socket is created by first instance, attempt
to create it again with same port number fails.
Signed-off-by: Jeevan Ramakant Nagvekar <jeevan.nagvekar1@wipro.com>
|
|
|
|
|
| |
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gateway
Logstorage
Event Handler
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: S. Hameed <shameed@jp.adit-jv.com>
Signed-off-by: Aditya Paluri <venkataaditya.paluri@in.bosch.com>
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
| |
Made TCP socket send reliable by storing the unsent/partial message
in the ring buffer. This will avoid the corrupted messages/Gaps in
Viewer side
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
| |
with ll_ts API
Signed-off-by: Ravi Sankar P <ponnurangamravi.sankar@in.bosch.com>
|
|
|
|
| |
Signed-off-by: Manikandan C <mchockalingam@de.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is possible to change the default buffer size for log message creation via
environment variable:
export DLT_LOG_MSG_BUF_LEN=<value>
Instead of using a static buffer with size of 1390 bytes, the buffer is
allocated dynamically with the specified value.The max size is restricted to approx 65k.
Signed-off-by: Christoph Lipka <clipka@de.adit-jv.com>
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
| |
Signed-off-by: ManikandanC <Manikandan.Chockalingam@in.bosch.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The poll system call is now used in the daemon to enable DLT use in
POSIX compliant systems. Also added introduced new unregister_app macro
to avoid missing of logs in startup buffer.
Signed-off-by: Frederic Berat <fberat@de.adit-jv.com>
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>
|
|
|
|
|
|
|
|
|
|
|
| |
- dlt-control couldn't receive all the GET_LOG_INFO response message
when many applications and contexts are registered.
Therefore the receiver buffer size was extended to 65K.
Also the receive buffer size macros are reduced to one variable.
- Code cleanup and improvements
Signed-off-by: Saya Sugiura <ssugiura@jp.adit-jv.com>
|
|
|
|
| |
Signed-off-by: Christoph Lipka <clipka@jp.adit-jv.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Support to send and parse periodic control messages
-add application/contexts to passive ECU list
-Refactor dlt_gateway_send_control_message
-Gateway issues with corrupted data and on demand connection
-Unit Test update
Signed-off-by: Saya Sugiura ssugiura@jp.adit-jv.com
Signed-off-by: Christoph Lipka clipka@jp.adit-jv.com
Signed-off-by: S. Hameed shameed@jp.adit-jv.com
Signed-off-by: ManikandanC Manikandan.Chockalingam@in.bosch.com
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
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.
|