Subject: Re: RT thread seems blocked References: From: Jan Kiszka Message-ID: Date: Tue, 24 Mar 2020 12:53:15 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Bradley Valdenebro Peter (DC-AE/ESW52)" , "xenomai@xenomai.org" On 24.03.20 12:43, Bradley Valdenebro Peter (DC-AE/ESW52) wrote: > Hello, > > We run some tests during the weekend and although we have less occurrences we still indeed see them. > > One interesting thing we see besides the 1ms stalling is that sometimes we see over 100us between IRQ and ISR start. > At this point we do not know how to proceed further. Any help or suggestion is greatly appreciated. > That is usually where you should start to look into tracing. Option A is event-level tracing via standard ftrace. Use trace-cmd record -e "cobalt*" -e sched -e signal to record such a trace. Ideally instrument the point where the latency is off in your application via xnftrace_printf() (will leave a mark in that recorded trace). Check via "trace-cmd report" if the schedule around that peak is what you would expect. For digging even deeper, down to function level: https://gitlab.denx.de/Xenomai/xenomai/-/wikis/Using_The_I_Pipe_Tracer, specifically look into xntrace_user_freeze(), calling that from your application when you spot an excessive latency to stop the trace. If the result is not clear to you, share it to get a community inspection. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux