All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with cyclictest
       [not found] <CGME20191030012837epcas1p46e9ef2156d4d609aa4b913d13374a4f6@epcas1p4.samsung.com>
@ 2019-10-30  1:32 ` Joonyoung Shim
  2019-10-30  9:10   ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Joonyoung Shim @ 2019-10-30  1:32 UTC (permalink / raw)
  To: xenomai

Hi all,

I have a problem from cyclictest. The cyclictest is killed with below messages
and i cannot see result of cyclictest when it is terminated, after the commit
5750102b4725 ("demo/cyclictest: turn on FIFO mode by default, detecting
spurious relaxes") is applied.

invoked syscall, aborting.
(enabling CONFIG_XENO_OPT_DEBUG_TRACE_RELAX may help)
CPU time limit exceeded (core dumped)

When the cyclictest is terminated by ctrl-c or -D option, below codes in
timerthread() are executed,

        /* switch to normal */
        schedp.sched_priority = 0;
        sched_setscheduler(0, SCHED_OTHER, &schedp);

and next, cyclictest is killed by sigdebug().

Because the sched_setscheduler() is linux system call, the signal reason is
printed "invoked syscall" in sigdebug(). I think this is normal case, so i
wonder why this is spurious relaxes and cyclictest should be killed abnormally.

I tested it on x64 target using the kernel 4.14.111 that ipipe is patched with
xenomai stable/v3.0.x latest branch.

Thanks.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with cyclictest
  2019-10-30  1:32 ` Problem with cyclictest Joonyoung Shim
@ 2019-10-30  9:10   ` Philippe Gerum
  2019-10-31  0:51     ` Joonyoung Shim
  2019-11-01 10:12     ` Jan Kiszka
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Gerum @ 2019-10-30  9:10 UTC (permalink / raw)
  To: Joonyoung Shim, xenomai

On 10/30/19 2:32 AM, Joonyoung Shim via Xenomai wrote:
> Hi all,
> 
> I have a problem from cyclictest. The cyclictest is killed with below messages
> and i cannot see result of cyclictest when it is terminated, after the commit
> 5750102b4725 ("demo/cyclictest: turn on FIFO mode by default, detecting
> spurious relaxes") is applied.
> 
> invoked syscall, aborting.
> (enabling CONFIG_XENO_OPT_DEBUG_TRACE_RELAX may help)
> CPU time limit exceeded (core dumped)
> 
> When the cyclictest is terminated by ctrl-c or -D option, below codes in
> timerthread() are executed,
> 
>         /* switch to normal */
>         schedp.sched_priority = 0;
>         sched_setscheduler(0, SCHED_OTHER, &schedp);
> 
> and next, cyclictest is killed by sigdebug().
> 
> Because the sched_setscheduler() is linux system call, the signal reason is
> printed "invoked syscall" in sigdebug(). I think this is normal case, so i
> wonder why this is spurious relaxes and cyclictest should be killed abnormally.
> 

No valid reason for this, WARNSW should be disabled in a cleanup section.

>From 5a640014bce0aecd55079b1e7cf8d2e1fc07ccd7 Mon Sep 17 00:00:00 2001
From: Philippe Gerum <rpm@xenomai.org>
Date: Wed, 30 Oct 2019 10:03:26 +0100
Subject: [PATCH] demo/posix: cyclictest: prevent spurious WARNSW events on
 exit

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 demo/posix/cyclictest/cyclictest.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/demo/posix/cyclictest/cyclictest.c b/demo/posix/cyclictest/cyclictest.c
index 76983bd02..cddc8dda8 100644
--- a/demo/posix/cyclictest/cyclictest.c
+++ b/demo/posix/cyclictest/cyclictest.c
@@ -989,6 +989,10 @@ void *timerthread(void *param)
 	}
 
 out:
+#ifdef CONFIG_XENO_COBALT
+	if (pthread_setmode_np(PTHREAD_WARNSW, 0, NULL))
+		fatal("pthread_setmode_np()");
+#endif
 	if (par->mode == MODE_CYCLIC)
 		timer_delete(timer);
 
-- 
2.21.0

-- 
Philippe.


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: Problem with cyclictest
  2019-10-30  9:10   ` Philippe Gerum
@ 2019-10-31  0:51     ` Joonyoung Shim
  2019-11-01 10:12     ` Jan Kiszka
  1 sibling, 0 replies; 4+ messages in thread
From: Joonyoung Shim @ 2019-10-31  0:51 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

On 19. 10. 30. 오후 6:10, Philippe Gerum wrote:
> On 10/30/19 2:32 AM, Joonyoung Shim via Xenomai wrote:
>> Hi all,
>>
>> I have a problem from cyclictest. The cyclictest is killed with below messages
>> and i cannot see result of cyclictest when it is terminated, after the commit
>> 5750102b4725 ("demo/cyclictest: turn on FIFO mode by default, detecting
>> spurious relaxes") is applied.
>>
>> invoked syscall, aborting.
>> (enabling CONFIG_XENO_OPT_DEBUG_TRACE_RELAX may help)
>> CPU time limit exceeded (core dumped)
>>
>> When the cyclictest is terminated by ctrl-c or -D option, below codes in
>> timerthread() are executed,
>>
>>         /* switch to normal */
>>         schedp.sched_priority = 0;
>>         sched_setscheduler(0, SCHED_OTHER, &schedp);
>>
>> and next, cyclictest is killed by sigdebug().
>>
>> Because the sched_setscheduler() is linux system call, the signal reason is
>> printed "invoked syscall" in sigdebug(). I think this is normal case, so i
>> wonder why this is spurious relaxes and cyclictest should be killed abnormally.
>>
> 
> No valid reason for this, WARNSW should be disabled in a cleanup section.
> 
>>From 5a640014bce0aecd55079b1e7cf8d2e1fc07ccd7 Mon Sep 17 00:00:00 2001
> From: Philippe Gerum <rpm@xenomai.org>
> Date: Wed, 30 Oct 2019 10:03:26 +0100
> Subject: [PATCH] demo/posix: cyclictest: prevent spurious WARNSW events on
>  exit
> 
> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
> ---
>  demo/posix/cyclictest/cyclictest.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/demo/posix/cyclictest/cyclictest.c b/demo/posix/cyclictest/cyclictest.c
> index 76983bd02..cddc8dda8 100644
> --- a/demo/posix/cyclictest/cyclictest.c
> +++ b/demo/posix/cyclictest/cyclictest.c
> @@ -989,6 +989,10 @@ void *timerthread(void *param)
>  	}
>  
>  out:
> +#ifdef CONFIG_XENO_COBALT
> +	if (pthread_setmode_np(PTHREAD_WARNSW, 0, NULL))
> +		fatal("pthread_setmode_np()");
> +#endif
>  	if (par->mode == MODE_CYCLIC)
>  		timer_delete(timer);
>  
> 

Looks good to me, thanks for patch.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with cyclictest
  2019-10-30  9:10   ` Philippe Gerum
  2019-10-31  0:51     ` Joonyoung Shim
@ 2019-11-01 10:12     ` Jan Kiszka
  1 sibling, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2019-11-01 10:12 UTC (permalink / raw)
  To: Philippe Gerum, Joonyoung Shim, xenomai

On 30.10.19 10:10, Philippe Gerum via Xenomai wrote:
> On 10/30/19 2:32 AM, Joonyoung Shim via Xenomai wrote:
>> Hi all,
>>
>> I have a problem from cyclictest. The cyclictest is killed with below messages
>> and i cannot see result of cyclictest when it is terminated, after the commit
>> 5750102b4725 ("demo/cyclictest: turn on FIFO mode by default, detecting
>> spurious relaxes") is applied.
>>
>> invoked syscall, aborting.
>> (enabling CONFIG_XENO_OPT_DEBUG_TRACE_RELAX may help)
>> CPU time limit exceeded (core dumped)
>>
>> When the cyclictest is terminated by ctrl-c or -D option, below codes in
>> timerthread() are executed,
>>
>>         /* switch to normal */
>>         schedp.sched_priority = 0;
>>         sched_setscheduler(0, SCHED_OTHER, &schedp);
>>
>> and next, cyclictest is killed by sigdebug().
>>
>> Because the sched_setscheduler() is linux system call, the signal reason is
>> printed "invoked syscall" in sigdebug(). I think this is normal case, so i
>> wonder why this is spurious relaxes and cyclictest should be killed abnormally.
>>
> 
> No valid reason for this, WARNSW should be disabled in a cleanup section.
> 
> From 5a640014bce0aecd55079b1e7cf8d2e1fc07ccd7 Mon Sep 17 00:00:00 2001
> From: Philippe Gerum <rpm@xenomai.org>
> Date: Wed, 30 Oct 2019 10:03:26 +0100
> Subject: [PATCH] demo/posix: cyclictest: prevent spurious WARNSW events on
>  exit
> 
> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
> ---
>  demo/posix/cyclictest/cyclictest.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/demo/posix/cyclictest/cyclictest.c b/demo/posix/cyclictest/cyclictest.c
> index 76983bd02..cddc8dda8 100644
> --- a/demo/posix/cyclictest/cyclictest.c
> +++ b/demo/posix/cyclictest/cyclictest.c
> @@ -989,6 +989,10 @@ void *timerthread(void *param)
>  	}
>  
>  out:
> +#ifdef CONFIG_XENO_COBALT
> +	if (pthread_setmode_np(PTHREAD_WARNSW, 0, NULL))
> +		fatal("pthread_setmode_np()");
> +#endif
>  	if (par->mode == MODE_CYCLIC)
>  		timer_delete(timer);
>  
> 

Thanks, applied to next.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-01 10:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20191030012837epcas1p46e9ef2156d4d609aa4b913d13374a4f6@epcas1p4.samsung.com>
2019-10-30  1:32 ` Problem with cyclictest Joonyoung Shim
2019-10-30  9:10   ` Philippe Gerum
2019-10-31  0:51     ` Joonyoung Shim
2019-11-01 10:12     ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.