[genivi-dlt] DLT function interface shows strange behaviour

Helwing, Lutz Lutz_Helwing at mentor.com
Thu Jul 27 11:11:48 EDT 2017


Hello,

thanks for your quick reply. It looks like you're right i was not aware
of this. When adding a sleep(1) at the end of the application after
doing the logging 10 times in a loop everything looks fine.

Isn't this kind of a weird and unexpected behaviour? This could mean if
I write a short running application I need to be aware of this because
else some messages could probably be lost?

What I don't understand: when the first run of the application I see no
output at some point. When running it the second time the output is
there together with the new output. Does that mean the dlt-daemon is
buffering the messages until some other message from any application
arrives? What exactly is happening here? Could it be said that DLT
misses some "flush" mechanism? Or am I just not aware of one?

I have cross-checked this with another application:

1. Repeatedly  the test application without sleep() at the end until
   output to DLT log incomplete

2. Run dlt-example-user -n 1 "Hello" -> output from 1. appears in DLT
   log followed by output from 2.

Kind regards
Lutz


On 27.07.2017 15:19, Yusuke Sato wrote:
> Hello, Lutz,
> 
> I guess you terminated the 1st application soon before the 2nd start.
> Then log message buffered into user library buffer was outout at exit of 1st application.
> 
> As far as I know, currently there is no automatic trigger to output messages in usr library buffer.
> Normally these message is output when new message is logged.
> In current case, only 2 messages are output and after that no message is logged from test application.
> 
> So, maybe below senario happened.
> 
> (1). Start 1st application
> (2). Somehow the application cannot not send message to dlt-daemon
> (3). Message is stored to own library buffer
> (4). Interval (Timestamp 81948.xxx - 81975.xxx)
>     --> here no trigger to output buffer
> (5). Kill 1st application
>     --> Buffer is output to dlt-daemon
> (6). Start 2nd application
>     --> Normally succeed to send log to dlt-daemon
> 
> Thanks
> Best regards.
> Yusuke Sato
> 
> Alpine Electronics, Inc.
> yusuke-sato at apn.alpine.co.jp
> 
> -----Original Message-----
> From: genivi-diagnostic-log-and-trace [mailto:genivi-diagnostic-log-and-trace-bounces at lists.genivi.org] On Behalf Of Helwing, Lutz
> Sent: Thursday, July 27, 2017 9:23 PM
> To: DLT Mailing List <genivi-diagnostic-log-and-trace at lists.genivi.org>
> Subject: [genivi-dlt] DLT function interface shows strange behaviour
> 
> Hi DLT community,
> 
> I have found a problem while writing a simple DLT test programme using the function interface.
> 
> When I run a tiny test application once the output stops at some point.
> When I run it the second time the missing output from the last run is logged before the output of the current run. Notice the "rewinded"
> timestamps. None of the used DLT functions return an error.
> This happens just occasionally when repeatedly running the programme. No other application logs to DLT.
> 
> See the test application's source code attached. Also attached are snippets from the DLT log that illustrate the problem and the cmake flags used for building DLT. Also attached is a snippet taken from the journal which shows dlt-daemon output with Debug information. Skip the first two successful tries here. When the error occurs the journal contains this entry:
> 
> "Jul 27 14:10:24 dem-lhelwing-ubuntu DLT[7967]: [81948.963456]~DLT~ 7967~WARNING  ~Can't send current log level as response to dlt_daemon_process_user_message_register_context for (ABCD;CTX1)"
> 
> The dlt-daemon is running on my local machine.
> Output of "dlt-receive -a localhost" and DLT Viewer is the same.
> 
> DLT version: 2.16.0
> DLT Viewer version: 2.18.0 STABLE
> 
> Am I doing something wrong when using the DLT library or is it a problem in DLT itself? It would be great to hear your ideas.
> 
> Thank you very much.
> 
> Kind regards
> Lutz
> 
> --
> Mentor A Siemens Business
> 
> Lutz Helwing, Senior Engineer, Mentor Embedded Mentor Graphics Development (Deutschland) GmbH, Arnulfstrasse 201, 80634 Muenchen, Germany Lutz_Helwing at mentor.com | office: +49(89)57096-297
> 
> http://www.mentor.com
> 
> Mentor Graphics Development (Deutschland) GmbH
> Geschaeftsfuehrung: Daniel Trebes, Hanns Windele
> 
> Handelsregister: Amtsgericht Freiburg i.Br., HRB 705237 Sitz der Gesellschaft: Peterzeller Strasse 8, 78048 Villingen-Schwenningen USt-Id Nummer: DE268786819
> 
> Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
> 
> ________________________________
> ATTENTION:This e-mail and any files transmitted with it are the property of Alpine Electronics,Inc and/or its affiliates, may be privileged and/or confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipients or otherwise have reason to believe that you have received this e-mail in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited.
> 
> 注意:このEメールおよび添付ファイルはアルパイン株式会社および関連子会社の資産であり、法的特権を持つ情報および秘密情報を含んでいる可能性があります。また、宛先とした特定の個人もしくは団体、あるいは、それらが指定する人によってのみ、読まれることを意図しています。もし、あなたがこのEメールの意図された受信者でないなら、または、誤って送信されたものを受領したと思われる場合は、速やかに送信者へ通知の上、このEメールを削除してください。また、他の目的への利用、配布、転送、印刷、コピーは固く禁止されています。
> ________________________________
> 

-- 
Mentor A Siemens Business

Lutz Helwing, Senior Engineer, Mentor Embedded
Mentor Graphics Development (Deutschland) GmbH, Arnulfstrasse 201, 80634
Muenchen, Germany
Lutz_Helwing at mentor.com | office: +49(89)57096-297

http://www.mentor.com

Mentor Graphics Development (Deutschland) GmbH
Geschaeftsfuehrung: Daniel Trebes, Hanns Windele

Handelsregister: Amtsgericht Freiburg i.Br., HRB 705237
Sitz der Gesellschaft: Peterzeller Strasse 8, 78048 Villingen-Schwenningen
USt-Id Nummer: DE268786819
	
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by return e-mail and destroy all
copies of the original message. 	


More information about the genivi-diagnostic-log-and-trace mailing list