#2069 closed defect

[CBS Scheduler] Memory leak and enqueue problem

Reported by: Andreas Heinig Owned by: Gedare Bloom
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: major Keywords:
Cc: chrisj@…, gedare@…, andreas.heinig@… Blocked By:
Blocking:

Description (last modified by Joel Sherrill)

Setup:
=====

RTEMS 4.11 (git -> master)

Configure: /home/heandr/Projects/FEHLER/workingset/fame-dev/trunk/rtems/configure --target=arm-softfloat-rtems4.11 --prefix=/home/heandr/Projects/FEHLER-work/fame-dev-tk71/install/arm-softfloat-rtems4.11/rtems --with-fame-install=/home/heandr/Projects/FEHLER-work/fame-dev-tk71/install/arm-none-eabi --enable-rtemsbsp=fame-tk71 --disable-multiprocessing --enable-networking

=> ARM926
=> TK71-Board (Marvell Kirkwood)

Application: a simple shell application

system.h:
vvvv BEGIN vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
#include <rtems.h>
#include <rtems/shell.h>
#include <bsp.h>

#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
#define CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_APPLICATION_NEEDS_RTC_DRIVER

#define CONFIGURE_MAXIMUM_TASKS 32
#define CONFIGURE_MAXIMUM_SEMAPHORES 20
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 20

#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 20

#define CONFIGURE_FILESYSTEM_NFS
#define CONFIGURE_MAXIMUM_DRIVERS 20

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE

#define CONFIGURE_MAXIMUM_POSIX_THREADS 8
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 32

#define CONFIGURE_MAXIMUM_PERIODS 10
#define CONFIGURE_SCHEDULER_CBS
#define CONFIGURE_CBS_MAXIMUM_SERVERS 10

#include <rtems/confdefs.h>
END

Remarks:
========

I simply start a shell within the Init task without usage of the CBS scheduler. This renders the shell as a background task.

Attachments (4)

scheduleredfallocate.patch (645 bytes) - added by Andreas Heinig on 06/18/12 at 13:22:45.
Correctly initialize EDF and CBS per-threas structure
scheduleredfallocate_v1.patch (1.2 KB) - added by Andreas Heinig on 06/18/12 at 13:34:07.
Correctly initialize EDF and CBS per-threas structure
threadqenqueuepriority.patch (645 bytes) - added by Andreas Heinig on 06/18/12 at 13:35:51.
Priority fix - dirty hack !!
cbs-allocate.patch (2.8 KB) - added by Andreas Heinig on 06/19/12 at 12:36:58.
Extra file for CBS thread context allocation

Download all attachments as: .zip

Change History (15)

Changed on 06/18/12 at 13:22:45 by Andreas Heinig

Attachment: scheduleredfallocate.patch added

Correctly initialize EDF and CBS per-threas structure

comment:1 Changed on 06/18/12 at 13:29:20 by Andreas Heinig

attachments.filename: threadqenqueuepriority.patchscheduleredfallocate.patch

comment:2 Changed on 06/18/12 at 13:32:31 by Andreas Heinig

attachments.isobsolete: 01

Changed on 06/18/12 at 13:34:07 by Andreas Heinig

Correctly initialize EDF and CBS per-threas structure

Changed on 06/18/12 at 13:35:51 by Andreas Heinig

Priority fix - dirty hack !!

comment:3 Changed on 06/18/12 at 13:36:44 by Andreas Heinig

Cc: Andreas Heinig added

comment:4 Changed on 06/18/12 at 14:09:13 by Joel Sherrill

Cc: Gedare Bloom added

Changed on 06/19/12 at 12:36:58 by Andreas Heinig

Attachment: cbs-allocate.patch added

Extra file for CBS thread context allocation

comment:5 Changed on 06/19/12 at 12:36:58 by Andreas Heinig

attachments.isobsolete: 01

comment:6 Changed on 07/06/12 at 11:54:51 by Joel Sherrill

Cc: Chris Johns added

comment:7 Changed on 08/06/12 at 16:55:45 by Gedare Bloom

Committed: Extra file for CBS thread context allocation

spedfsched01,02,03 verified in sis.

We have to consider the other patch further still. There are some problems with it. I think adding a field for explicitly checking for periodic vs background task might be the best solution available to us...

comment:8 Changed on 04/12/14 at 00:37:55 by Gedare Bloom

Milestone: 4.114.12

comment:9 Changed on 11/20/14 at 03:31:07 by Chris Johns

Milestone: 4.124.11

comment:10 Changed on 11/23/14 at 00:18:19 by Joel Sherrill

Description: modified (diff)
Owner: changed from Joel Sherrill to Gedare Bloom
Status: newassigned

Gedare.. is this still an issue? Does it need work still? Was the patch OK?

comment:11 Changed on 11/23/14 at 00:25:31 by Gedare Bloom

Resolution: fixed
Status: assignedclosed
Version: HEAD4.11

Closing, there were two issues and one was fixed. If Andreas still has the other (mmeory leak?) then another PR should get filed.

Note: See TracTickets for help on using tickets.