All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [git pull] Fix bogus lock stealing case
@ 2010-04-25 14:40 Jan Kiszka
  2010-04-25 14:54 ` Gilles Chanteperdrix
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jan Kiszka @ 2010-04-25 14:40 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

The following changes since commit fbc3b858ee728c1a6b03996e3285198caa7053c6:
  Gilles Chanteperdrix (1):
        debug: fix CONFIG_XENO_OPT_DEBUG_* issues

are available in the git repository at:

  git://git.xenomai.org/xenomai-jki.git for-upstream

I'm starting to believe that once our customer stops reporting weird
Xenomai behavior, we have reached the ultimate level of zero bugs. For
now this is just another "bugs--".

Jan Kiszka (2):
      mutex-torture: Add test for disallowed lock stealing
      nucleus: Fix bogus lock stealing case

 ksrc/nucleus/synch.c               |    6 ++--
 src/testsuite/unit/mutex-torture.c |   62 ++++++++++++++++++++++++++++++++++++
 2 files changed, 65 insertions(+), 3 deletions(-)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [Xenomai-core] [git pull] Fix bogus lock stealing case
  2010-04-25 14:40 [Xenomai-core] [git pull] Fix bogus lock stealing case Jan Kiszka
@ 2010-04-25 14:54 ` Gilles Chanteperdrix
  2010-04-25 15:04 ` Philippe Gerum
  2010-04-25 19:05 ` Gilles Chanteperdrix
  2 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2010-04-25 14:54 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
> The following changes since commit fbc3b858ee728c1a6b03996e3285198caa7053c6:
>   Gilles Chanteperdrix (1):
>         debug: fix CONFIG_XENO_OPT_DEBUG_* issues
> 
> are available in the git repository at:
> 
>   git://git.xenomai.org/xenomai-jki.git for-upstream
> 
> I'm starting to believe that once our customer stops reporting weird
> Xenomai behavior, we have reached the ultimate level of zero bugs. For
> now this is just another "bugs--".

There is no such thing as a "zero bugs" level. Having a look now.

-- 
					    Gilles.


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

* Re: [Xenomai-core] [git pull] Fix bogus lock stealing case
  2010-04-25 14:40 [Xenomai-core] [git pull] Fix bogus lock stealing case Jan Kiszka
  2010-04-25 14:54 ` Gilles Chanteperdrix
@ 2010-04-25 15:04 ` Philippe Gerum
  2010-04-25 15:19   ` Jan Kiszka
  2010-04-25 19:05 ` Gilles Chanteperdrix
  2 siblings, 1 reply; 7+ messages in thread
From: Philippe Gerum @ 2010-04-25 15:04 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On Sun, 2010-04-25 at 16:40 +0200, Jan Kiszka wrote:
> The following changes since commit fbc3b858ee728c1a6b03996e3285198caa7053c6:
>   Gilles Chanteperdrix (1):
>         debug: fix CONFIG_XENO_OPT_DEBUG_* issues
> 
> are available in the git repository at:
> 
>   git://git.xenomai.org/xenomai-jki.git for-upstream
> 
> I'm starting to believe that once our customer stops reporting weird
> Xenomai behavior, we have reached the ultimate level of zero bugs. For
> now this is just another "bugs--".

Are you feeling better now?

> 
> Jan Kiszka (2):
>       mutex-torture: Add test for disallowed lock stealing
>       nucleus: Fix bogus lock stealing case
> 
>  ksrc/nucleus/synch.c               |    6 ++--
>  src/testsuite/unit/mutex-torture.c |   62 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 65 insertions(+), 3 deletions(-)
> 


-- 
Philippe.




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

* Re: [Xenomai-core] [git pull] Fix bogus lock stealing case
  2010-04-25 15:04 ` Philippe Gerum
@ 2010-04-25 15:19   ` Jan Kiszka
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Kiszka @ 2010-04-25 15:19 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]

Philippe Gerum wrote:
> On Sun, 2010-04-25 at 16:40 +0200, Jan Kiszka wrote:
>> The following changes since commit fbc3b858ee728c1a6b03996e3285198caa7053c6:
>>   Gilles Chanteperdrix (1):
>>         debug: fix CONFIG_XENO_OPT_DEBUG_* issues
>>
>> are available in the git repository at:
>>
>>   git://git.xenomai.org/xenomai-jki.git for-upstream
>>
>> I'm starting to believe that once our customer stops reporting weird
>> Xenomai behavior, we have reached the ultimate level of zero bugs. For
>> now this is just another "bugs--".
> 
> Are you feeling better now?

Yeah. :) (Specifically as reproducing it was not that simple even after
I was sure to have found it in the code.)

> 
>> Jan Kiszka (2):
>>       mutex-torture: Add test for disallowed lock stealing
>>       nucleus: Fix bogus lock stealing case
>>
>>  ksrc/nucleus/synch.c               |    6 ++--
>>  src/testsuite/unit/mutex-torture.c |   62 ++++++++++++++++++++++++++++++++++++
>>  2 files changed, 65 insertions(+), 3 deletions(-)
>>
> 
> 

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [Xenomai-core] [git pull] Fix bogus lock stealing case
  2010-04-25 14:40 [Xenomai-core] [git pull] Fix bogus lock stealing case Jan Kiszka
  2010-04-25 14:54 ` Gilles Chanteperdrix
  2010-04-25 15:04 ` Philippe Gerum
@ 2010-04-25 19:05 ` Gilles Chanteperdrix
  2010-04-25 19:13   ` Jan Kiszka
  2 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2010-04-25 19:05 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

Jan Kiszka wrote:
> The following changes since commit fbc3b858ee728c1a6b03996e3285198caa7053c6:
>   Gilles Chanteperdrix (1):
>         debug: fix CONFIG_XENO_OPT_DEBUG_* issues
> 
> are available in the git repository at:
> 
>   git://git.xenomai.org/xenomai-jki.git for-upstream

Something wrong here, the logs on your branch appear as:

13ee2a1 nucleus: Fix bogus lock stealing case
d0d95bf mutex-torture: Add test for disallowed lock stealing
9ef976e RTDM: Restrict use of rtdm_rt_capable
6b75977 uitron: Fix skin debug option
bc3fefd Move schedule_delayed_work into wrapping header
41b1eca RTDM: Drop __exit from rtdm_dev_cleanup
4f3d3f2 bootstrap
78acd8c Merge commit 'jan'
700a9fd arm: add a generic-vfp architecture, which enables vfp and
compiles for armv5
8337fc5 RTDM: Use non-atomic bitops for used_fildes

Seems you forgot to rebase?

-- 
					    Gilles.


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

* Re: [Xenomai-core] [git pull] Fix bogus lock stealing case
  2010-04-25 19:05 ` Gilles Chanteperdrix
@ 2010-04-25 19:13   ` Jan Kiszka
  2010-04-26 15:21     ` Philippe Gerum
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2010-04-25 19:13 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai-core

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

Gilles Chanteperdrix wrote:
> Jan Kiszka wrote:
>> The following changes since commit fbc3b858ee728c1a6b03996e3285198caa7053c6:
>>   Gilles Chanteperdrix (1):
>>         debug: fix CONFIG_XENO_OPT_DEBUG_* issues
>>
>> are available in the git repository at:
>>
>>   git://git.xenomai.org/xenomai-jki.git for-upstream
> 
> Something wrong here, the logs on your branch appear as:
> 
> 13ee2a1 nucleus: Fix bogus lock stealing case
> d0d95bf mutex-torture: Add test for disallowed lock stealing
> 9ef976e RTDM: Restrict use of rtdm_rt_capable
> 6b75977 uitron: Fix skin debug option
> bc3fefd Move schedule_delayed_work into wrapping header
> 41b1eca RTDM: Drop __exit from rtdm_dev_cleanup
> 4f3d3f2 bootstrap
> 78acd8c Merge commit 'jan'
> 700a9fd arm: add a generic-vfp architecture, which enables vfp and
> compiles for armv5
> 8337fc5 RTDM: Use non-atomic bitops for used_fildes
> 
> Seems you forgot to rebase?
> 

Oops, incomplete rebase. Fixed.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

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

* Re: [Xenomai-core] [git pull] Fix bogus lock stealing case
  2010-04-25 19:13   ` Jan Kiszka
@ 2010-04-26 15:21     ` Philippe Gerum
  0 siblings, 0 replies; 7+ messages in thread
From: Philippe Gerum @ 2010-04-26 15:21 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai-core

On Sun, 2010-04-25 at 21:13 +0200, Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
> > Jan Kiszka wrote:
> >> The following changes since commit fbc3b858ee728c1a6b03996e3285198caa7053c6:
> >>   Gilles Chanteperdrix (1):
> >>         debug: fix CONFIG_XENO_OPT_DEBUG_* issues
> >>
> >> are available in the git repository at:
> >>
> >>   git://git.xenomai.org/xenomai-jki.git for-upstream
> > 
> > Something wrong here, the logs on your branch appear as:
> > 
> > 13ee2a1 nucleus: Fix bogus lock stealing case
> > d0d95bf mutex-torture: Add test for disallowed lock stealing
> > 9ef976e RTDM: Restrict use of rtdm_rt_capable
> > 6b75977 uitron: Fix skin debug option
> > bc3fefd Move schedule_delayed_work into wrapping header
> > 41b1eca RTDM: Drop __exit from rtdm_dev_cleanup
> > 4f3d3f2 bootstrap
> > 78acd8c Merge commit 'jan'
> > 700a9fd arm: add a generic-vfp architecture, which enables vfp and
> > compiles for armv5
> > 8337fc5 RTDM: Use non-atomic bitops for used_fildes
> > 
> > Seems you forgot to rebase?
> > 
> 
> Oops, incomplete rebase. Fixed.
> 

I was worried about any implication regarding v2.4.x, so I checked. It
turned out that such bug has been introduced by the FASTSYNCH code, with
the advent of xnsynch_acquire(). This code has added a fastpath that did
not exist initially for returning to the caller, which overlooked the
WAKEN/ROBBED semantics.

The basic assumptions were:

- XNWAKEN+XNROBBED bits are inconditionally cleared by
xnpod_suspend_thread().
- wwake makes sense only in a XNWAKEN context (therefore, you don't have
to clear it until you actually exit from xnsynch_sleep_on, and you may
only test it whenever XNWAKEN is raised).
- the only way to exit from xnsynch_sleep_on() used to be via the
unlock_and_exit path, which did clear the relevant bits, along with
wwake.

The first two assumptions are still valid, fortunately.

So, the good news is that v2.4.x is fine. And good news are a nice way
to relax, which is another good news.


-- 
Philippe.




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

end of thread, other threads:[~2010-04-26 15:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-25 14:40 [Xenomai-core] [git pull] Fix bogus lock stealing case Jan Kiszka
2010-04-25 14:54 ` Gilles Chanteperdrix
2010-04-25 15:04 ` Philippe Gerum
2010-04-25 15:19   ` Jan Kiszka
2010-04-25 19:05 ` Gilles Chanteperdrix
2010-04-25 19:13   ` Jan Kiszka
2010-04-26 15:21     ` Philippe Gerum

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.