Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Sebastian Huber
On 20/11/2020 00:49, Joel Sherrill wrote: On Thu, Nov 19, 2020, 5:00 PM Utkarsh Rai > wrote: On Thu, Nov 19, 2020 at 11:39 PM Gedare Bloom mailto:ged...@rtems.org>> wrote: Hi Utkarsh, On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Joel Sherrill
On Thu, Nov 19, 2020, 5:00 PM Utkarsh Rai wrote: > > > On Thu, Nov 19, 2020 at 11:39 PM Gedare Bloom wrote: > >> Hi Utkarsh, >> >> On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber >> wrote: >> > >> > On 19/11/2020 11:47, Utkarsh Rai wrote: >> > >> > > There are a couple of other areas in RTE

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Utkarsh Rai
On Thu, Nov 19, 2020 at 11:39 PM Gedare Bloom wrote: > Hi Utkarsh, > > On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber > wrote: > > > > On 19/11/2020 11:47, Utkarsh Rai wrote: > > > > > There are a couple of other areas in RTEMS in which the stack of > > > another > > > thread may be

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Gedare Bloom
Hi Utkarsh, On Thu, Nov 19, 2020 at 4:59 AM Sebastian Huber wrote: > > On 19/11/2020 11:47, Utkarsh Rai wrote: > > > There are a couple of other areas in RTEMS in which the stack of > > another > > thread may be accessed (events, message queues, signals). How did you > > solve thi

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-19 Thread Sebastian Huber
On 18/11/2020 18:53, Utkarsh Rai wrote: On Wed, 18 Nov, 2020, 11:20 PM Gedare Bloom, > wrote: Hi Utkarsh, I think I would like to see you try to unify the design so it works the same with or without stack protections. In other words, redesign these iterators to avoi

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-11 Thread Sebastian Huber
On 10/11/2020 16:53, Utkarsh Rai wrote: -  if ( executing != NULL ) { -    iter.previous = executing->last_user_extensions_iterator; -    executing->last_user_extensions_iterator = &iter; Sorry, I haven't noticed this before. It seems that in thread context, the iterators may be nested. There s

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-11 Thread Gedare Bloom
On Tue, Nov 10, 2020 at 8:53 AM Utkarsh Rai wrote: > > > > On Thu, Nov 5, 2020 at 11:45 AM Sebastian Huber > wrote: >> >> On 04/11/2020 19:38, Gedare Bloom wrote: >> >> >> Based on the above suggestions I tried to move the >> >> User_extensions_Iterator storage to the TCB by adding a new fiel

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-10 Thread Utkarsh Rai
On Thu, Nov 5, 2020 at 11:45 AM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 04/11/2020 19:38, Gedare Bloom wrote: > > >> Based on the above suggestions I tried to move the > User_extensions_Iterator storage to the TCB by adding a new field to the > structure, but that did n

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-04 Thread Sebastian Huber
On 04/11/2020 19:38, Gedare Bloom wrote: Based on the above suggestions I tried to move the User_extensions_Iterator storage to the TCB by adding a new field to the structure, but that did not compile(userextimpl.h is not included with thread.h because of cyclic dependency). This made me tr

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-04 Thread Gedare Bloom
On Sun, Nov 1, 2020 at 9:49 AM Utkarsh Rai wrote: > > > > > On Fri, Oct 23, 2020 at 10:28 PM Utkarsh Rai wrote: >> >> >> >> On Fri, Oct 23, 2020 at 9:57 PM Gedare Bloom wrote: >>> >>> On Fri, Oct 23, 2020 at 9:37 AM Utkarsh Rai wrote: >>> > >>> > >>> > >>> > On Thu, Oct 22, 2020 at 11:23 PM Seb

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-11-01 Thread Utkarsh Rai
On Fri, Oct 23, 2020 at 10:28 PM Utkarsh Rai wrote: > > > On Fri, Oct 23, 2020 at 9:57 PM Gedare Bloom wrote: > >> On Fri, Oct 23, 2020 at 9:37 AM Utkarsh Rai >> wrote: >> > >> > >> > >> > On Thu, Oct 22, 2020 at 11:23 PM Sebastian Huber < >> sebastian.hu...@embedded-brains.de> wrote: >> >> >>

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-23 Thread Utkarsh Rai
On Fri, Oct 23, 2020 at 9:57 PM Gedare Bloom wrote: > On Fri, Oct 23, 2020 at 9:37 AM Utkarsh Rai > wrote: > > > > > > > > On Thu, Oct 22, 2020 at 11:23 PM Sebastian Huber < > sebastian.hu...@embedded-brains.de> wrote: > >> > >> On 22/10/2020 02:40, Utkarsh Rai wrote: > >> > >> > Hello, this thr

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-23 Thread Gedare Bloom
On Fri, Oct 23, 2020 at 9:37 AM Utkarsh Rai wrote: > > > > On Thu, Oct 22, 2020 at 11:23 PM Sebastian Huber > wrote: >> >> On 22/10/2020 02:40, Utkarsh Rai wrote: >> >> > Hello, this thread has gone a bit cold over the last few weeks, due to >> > my engagement in the university tests. I have pr

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-23 Thread Utkarsh Rai
On Thu, Oct 22, 2020 at 11:23 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 22/10/2020 02:40, Utkarsh Rai wrote: > > > Hello, this thread has gone a bit cold over the last few weeks, due to > > my engagement in the university tests. I have provided a debug trace > > for the

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-22 Thread Sebastian Huber
On 22/10/2020 02:40, Utkarsh Rai wrote: Hello, this thread has gone a bit cold over the last few weeks, due to my engagement in the university tests.  I have provided a debug trace for the issue.  The reason for fatal exceptions is the fact that while iterating over the chain of user extension

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-10-21 Thread Utkarsh Rai
Hello, this thread has gone a bit cold over the last few weeks, due to my engagement in the university tests. I have provided a debug trace for the issue. The reason for fatal exceptions is the fact that while iterating over the chain of user extensions we access a node whose memory location has

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-09-22 Thread Utkarsh Rai
On Mon, Sep 21, 2020 at 10:29 PM Gedare Bloom wrote: > On Sat, Sep 19, 2020 at 5:41 AM Utkarsh Rai > wrote: > > > > Hello, > > When I isolate more than two threads in RTEMS (the implementation can be > found here), I get fatal exceptions while context-switching. On stepping > into the code, the

Re: Fatal exceptions on context-switching for more than two isolated threads

2020-09-21 Thread Gedare Bloom
On Sat, Sep 19, 2020 at 5:41 AM Utkarsh Rai wrote: > > Hello, > When I isolate more than two threads in RTEMS (the implementation can be > found here), I get fatal exceptions while context-switching. On stepping into > the code, the problem seems to be with the _User_extensions_Thread_*() call

Fatal exceptions on context-switching for more than two isolated threads

2020-09-19 Thread Utkarsh Rai
Hello, When I isolate more than two threads in RTEMS (the implementation can be found here ), I get fatal exceptions while context-switching. On stepping into the code, the problem seems to be with the _User_extensions_T