#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 Jun 18, 2012 at 1:22:45 PM.
Correctly initialize EDF and CBS per-threas structure
scheduleredfallocate_v1.patch (1.2 KB) - added by Andreas Heinig on Jun 18, 2012 at 1:34:07 PM.
Correctly initialize EDF and CBS per-threas structure
threadqenqueuepriority.patch (645 bytes) - added by Andreas Heinig on Jun 18, 2012 at 1:35:51 PM.
Priority fix - dirty hack !!
cbs-allocate.patch (2.8 KB) - added by Andreas Heinig on Jun 19, 2012 at 12:36:58 PM.
Extra file for CBS thread context allocation

Download all attachments as: .zip

Change History (15)

Changed on Jun 18, 2012 at 1:22:45 PM by Andreas Heinig

Attachment: scheduleredfallocate.patch added

Correctly initialize EDF and CBS per-threas structure

comment:1 Changed on Jun 18, 2012 at 1:29:20 PM by Andreas Heinig

attachments.filename: threadqenqueuepriority.patchscheduleredfallocate.patch

comment:2 Changed on Jun 18, 2012 at 1:32:31 PM by Andreas Heinig

attachments.isobsolete: 01

Changed on Jun 18, 2012 at 1:34:07 PM by Andreas Heinig

Correctly initialize EDF and CBS per-threas structure

Changed on Jun 18, 2012 at 1:35:51 PM by Andreas Heinig

Priority fix - dirty hack !!

comment:3 Changed on Jun 18, 2012 at 1:36:44 PM by Andreas Heinig

Cc: Andreas Heinig added

comment:4 Changed on Jun 18, 2012 at 2:09:13 PM by Joel Sherrill

Cc: Gedare Bloom added

Changed on Jun 19, 2012 at 12:36:58 PM by Andreas Heinig

Attachment: cbs-allocate.patch added

Extra file for CBS thread context allocation

comment:5 Changed on Jun 19, 2012 at 12:36:58 PM by Andreas Heinig

attachments.isobsolete: 01

comment:6 Changed on Jul 6, 2012 at 11:54:51 AM by Joel Sherrill

Cc: Chris Johns added

comment:7 Changed on Aug 6, 2012 at 4:55:45 PM 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 Apr 12, 2014 at 12:37:55 AM by Gedare Bloom

Milestone: 4.114.12

comment:9 Changed on Nov 20, 2014 at 3:31:07 AM by Chris Johns

Milestone: 4.124.11

comment:10 Changed on Nov 23, 2014 at 12:18:19 AM 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 Nov 23, 2014 at 12:25:31 AM 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.