Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-15 Thread Chris Johns
On 16/10/20 6:16 am, Alan Cudmore wrote: > On Thu, Oct 15, 2020 at 3:03 PM Chris Johns wrote: >> The number of bits needs to align to a value that fits the whole 32 bit mask >> so >> the last is used to trigger the bug. > > How can I calculate this? The number of bits in a bitmap is the number

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-15 Thread Alan Cudmore
On Thu, Oct 15, 2020 at 3:03 PM Chris Johns wrote: > > On 16/10/20 5:22 am, Alan Cudmore wrote: > > On Thu, Oct 15, 2020 at 11:19 AM Gedare Bloom wrote: > >> > >> On Thu, Oct 15, 2020 at 6:35 AM Joel Sherrill wrote: > >>> > >>> > >>> > >>> On Thu, Oct 15, 2020, 7:15 AM Alan Cudmore wrote: > >>>

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-15 Thread Chris Johns
On 16/10/20 5:22 am, Alan Cudmore wrote: > On Thu, Oct 15, 2020 at 11:19 AM Gedare Bloom wrote: >> >> On Thu, Oct 15, 2020 at 6:35 AM Joel Sherrill wrote: >>> >>> >>> >>> On Thu, Oct 15, 2020, 7:15 AM Alan Cudmore wrote: Thanks for all of the help, and thanks for the patch Chris! I was

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-15 Thread Alan Cudmore
On Thu, Oct 15, 2020 at 11:19 AM Gedare Bloom wrote: > > On Thu, Oct 15, 2020 at 6:35 AM Joel Sherrill wrote: > > > > > > > > On Thu, Oct 15, 2020, 7:15 AM Alan Cudmore wrote: > >> > >> Thanks for all of the help, and thanks for the patch Chris! I was > >> hoping to submit a patch this weekend,

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-15 Thread Gedare Bloom
On Thu, Oct 15, 2020 at 6:35 AM Joel Sherrill wrote: > > > > On Thu, Oct 15, 2020, 7:15 AM Alan Cudmore wrote: >> >> Thanks for all of the help, and thanks for the patch Chris! I was >> hoping to submit a patch this weekend, so you just gave me back some >> time :) > > > Glad you found this! > >

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-15 Thread Joel Sherrill
On Thu, Oct 15, 2020, 7:15 AM Alan Cudmore wrote: > Thanks for all of the help, and thanks for the patch Chris! I was > hoping to submit a patch this weekend, so you just gave me back some > time :) > Glad you found this! The RFS was new in 4.10 as I recall. You guys have missions using this. D

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-15 Thread Alan Cudmore
Thanks for all of the help, and thanks for the patch Chris! I was hoping to submit a patch this weekend, so you just gave me back some time :) Alan On Thu, Oct 15, 2020 at 2:08 AM Chris Johns wrote: > > On 13/10/20 4:13 am, Joel Sherrill wrote: > > On Mon, Oct 12, 2020 at 11:15 AM Alan Cudmore >

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-14 Thread Chris Johns
On 13/10/20 4:13 am, Joel Sherrill wrote: > On Mon, Oct 12, 2020 at 11:15 AM Alan Cudmore > wrote: > > Hi Chris, > I'm not sure that I can easily create a test to show that this > condition exists. I think the rtems_rfs_bitmap_create_search function >

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-12 Thread Joel Sherrill
On Mon, Oct 12, 2020 at 11:15 AM Alan Cudmore wrote: > Hi Chris, > I'm not sure that I can easily create a test to show that this > condition exists. I think the rtems_rfs_bitmap_create_search function > works as it is intended to, but during the last iteration of the for > loop, if 'size' is zer

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-12 Thread Alan Cudmore
Hi Chris, I'm not sure that I can easily create a test to show that this condition exists. I think the rtems_rfs_bitmap_create_search function works as it is intended to, but during the last iteration of the for loop, if 'size' is zero and 'bit' is 31, the 'search_map' variable is incremented once

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-11 Thread Chris Johns
On 10/10/20 7:35 am, Alan Cudmore wrote: > After doing a lot of tracing through my application, it looks like > malloc_info works fine before we start our cFS application, but it > blocks after the cFS is initialized. This suggests some sort of memory > corruption. > I started by instrumenting our

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-10 Thread Sebastian Huber
Hello Alan, On 09/10/2020 22:35, Alan Cudmore wrote: After doing a lot of tracing through my application, it looks like malloc_info works fine before we start our cFS application, but it blocks after the cFS is initialized. This suggests some sort of memory corruption. I started by instrumenting

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-09 Thread Alan Cudmore
After doing a lot of tracing through my application, it looks like malloc_info works fine before we start our cFS application, but it blocks after the cFS is initialized. This suggests some sort of memory corruption. I started by instrumenting our code to call malloc info during various stages of a

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-05 Thread Joel Sherrill
On Mon, Oct 5, 2020 at 11:07 AM Alan Cudmore wrote: > I built the tools shortly after the announced 5.1 release. I'm using > the 5.1 branches for everything. > But some additional info..I built the full testsuite, and ran the > malloctest with no problems. It calls malloc_info a couple of times.

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-05 Thread Alan Cudmore
I built the tools shortly after the announced 5.1 release. I'm using the 5.1 branches for everything. But some additional info..I built the full testsuite, and ran the malloctest with no problems. It calls malloc_info a couple of times. I also compiled my RTEMS Kernel Image (RKI) for this BSP and

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-05 Thread Joel Sherrill
On Mon, Oct 5, 2020 at 10:34 AM Gedare Bloom wrote: > This is an SMP related bug? Can you send the rtems configure command, > and the qemu run command? > > It might also help to know the number of tasks and their priorities. > The CONFIGURE* macros might also help. > > My first guess is that the

Re: RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-05 Thread Gedare Bloom
This is an SMP related bug? Can you send the rtems configure command, and the qemu run command? It might also help to know the number of tasks and their priorities. The CONFIGURE* macros might also help. My first guess is that the lock primitive is somehow broken in the pc686, maybe it gets caug

RTEMS 5.1 pc686 BSP malloc_info problem?

2020-10-04 Thread Alan Cudmore
Hi, I have a problem in RTEMS 5.1 where the pc686 running on QEMU seems to block or spin when trying to acquire a lock for the malloc_info call. The CPU utilization goes up to 100 (on the QEMU host) leading me to think the calling task is spinning waiting on the lock. Tasks with lower priority than