Skip to content
TODO 103 KiB
Newer Older
Gregory Nutt's avatar
Gregory Nutt committed
NuttX TODO List (Last updated December 8, 2016)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
patacongo's avatar
patacongo committed

This file summarizes known NuttX bugs, limitations, inconsistencies with
standards, things that could be improved, and ideas for enhancements.  This
TODO list does not include issues associated with individual boar ports. See
Gregory Nutt's avatar
Gregory Nutt committed
also the individual README.txt files in the configs/ sub-directories for
issues related to each board port.
Gregory Nutt's avatar
Gregory Nutt committed
nuttx/:
Gregory Nutt's avatar
Gregory Nutt committed
 (13)  Task/Scheduler (sched/)
Gregory Nutt's avatar
Gregory Nutt committed
  (1)  Memory Management (mm/)
Gregory Nutt's avatar
Gregory Nutt committed
  (1)  Power Management (drivers/pm)
  (3)  Signals (sched/signal, arch/)
Gregory Nutt's avatar
Gregory Nutt committed
  (1)  pthreads (sched/pthread)
Gregory Nutt's avatar
Gregory Nutt committed
 (12)  Network (net/, drivers/net)
  (4)  USB (drivers/usbdev, drivers/usbhost)
Gregory Nutt's avatar
Gregory Nutt committed
  (0)  Other drivers (drivers/)
Gregory Nutt's avatar
Gregory Nutt committed
 (11)  Libraries (libc/, libm/)
 (11)  File system/Generic drivers (fs/, drivers/)
Gregory Nutt's avatar
Gregory Nutt committed
  (9)  Graphics Subsystem (graphics/)
Gregory Nutt's avatar
Gregory Nutt committed
  (2)  Build system / Toolchains
Gregory Nutt's avatar
Gregory Nutt committed
  (3)  Linux/Cywgin simulation (arch/sim)
Gregory Nutt's avatar
Gregory Nutt committed
  (4)  ARM (arch/arm/)
patacongo's avatar
patacongo committed

Gregory Nutt's avatar
Gregory Nutt committed
apps/ and other Add-Ons:
  (2)  NuttShell (NSH) (apps/nshlib)
  (1)  System libraries apps/system (apps/system)
Gregory Nutt's avatar
Gregory Nutt committed
  (1)  Pascal add-on (pcode/)
Gregory Nutt's avatar
Gregory Nutt committed
  (4)  Other Applications & Tests (apps/examples/)
patacongo's avatar
patacongo committed
o Task/Scheduler (sched/)
  ^^^^^^^^^^^^^^^^^^^^^^^

  Title:       CHILD PTHREAD TERMINATION
patacongo's avatar
patacongo committed
  Description: When a tasks exits, shouldn't all of its child pthreads also be
               terminated?
patacongo's avatar
patacongo committed
  Status:      Closed.  No, this behavior will not be implemented.
patacongo's avatar
patacongo committed
  Priority:    Medium, required for good emulation of process/pthread model.

patacongo's avatar
patacongo committed
  Title:       pause() NON-COMPLIANCE
  Description: In the POSIX description of this function is the pause() function
               will suspend the calling thread until delivery of a signal whose
               action is either to execute a signal-catching function or to
               terminate the process.  The current implementation only waits for
               any non-blocked signal to be received.  It should only wake up if
               the signal is delivered to a handler.
  Status:      Open.
  Priority:    Medium Low.
  Description: On-demand paging has recently been incorporated into the RTOS.
               The design of this feature is described here:
patacongo's avatar
patacongo committed
               http://www.nuttx.org/NuttXDemandPaging.html.
               As of this writing, the basic feature implementation is
               complete and much of the logic has been verified.  The test
               harness for the feature exists only for the NXP LPC3131 (see
               configs/ea3131/pgnsh and locked directories).  There are
               some limitations of this testing so I still cannot say that
               the feature is fully functional.
patacongo's avatar
patacongo committed
  Status:      Open.  This has been put on the shelf for some time.
  Priority:    Medium-Low

  Title:       GET_ENVIRON_PTR()
patacongo's avatar
patacongo committed
  Description: get_environ_ptr() (sched/sched_getenvironptr.c) is not implemented.
               The representation of the environment strings selected for
Gregory Nutt's avatar
Gregory Nutt committed
               NuttX is not compatible with the operation.  Some significant
Gregory Nutt's avatar
Gregory Nutt committed
               re-design would be required to implement this function and that
patacongo's avatar
patacongo committed
               effort is thought to be not worth the result.
patacongo's avatar
patacongo committed
  Status:      Open.  No change is planned.
patacongo's avatar
patacongo committed
  Priority:    Low -- There is no plan to implement this.

  Title:       TIMER_GETOVERRUN()
patacongo's avatar
patacongo committed
  Description: timer_getoverrun() (sched/timer_getoverrun.c) is not implemented.
  Status:      Open
  Priority:    Low -- There is no plan to implement this.

Gregory Nutt's avatar
Gregory Nutt committed
  Title:       INCOMPATIBILITIES WITH execv() AND execl()
  Description: Simplified 'execl()' and 'execv()' functions are provided by
               NuttX.  NuttX does not support processes and hence the concept
               of overlaying a tasks process image with a new process image
               does not make any sense.  In NuttX, these functions are
               wrapper functions that:

               1. Call the non-standard binfmt function 'exec', and then
               2. exit(0).

               As a result, the current implementations of 'execl()' and
               'execv()' suffer from some incompatibilities, the most
               serious of these is that the exec'ed task will not have
               the same task ID as the vfork'ed function.  So the parent
               function cannot know the ID of the exec'ed task.
  Status:      Open
  Priority:    Medium Low for now

  Title:       ISSUES WITH atexit(), on_exit(), AND pthread_cleanup_pop()
  Description: These functions execute with the following bad properties:
               1. They run with interrupts disabled,
               2. They run in supervisor mode (if applicable), and
               3. They do not obey any setup of PIC or address
                  environments. Do they need to?
               4. In the case of task_delete() and pthread_cancel, these
                  callbacks will run on the thread of execution and address
                  context of the caller of task.  That is very bad!

               The fix for all of these issues it to have the callbacks
Gregory Nutt's avatar
Gregory Nutt committed
               run on the caller's thread as is currently done with
               signal handlers.  Signals are delivered differently in
               PROTECTED and KERNEL modes:  The deliver is involes a
               signal handling trampoline function in the user address
               space and two signal handlers:  One to call the signal
               handler trampoline in user mode (SYS_signal_handler) and
               on in with the signal handler trampoline to return to
               supervisor mode (SYS_signal_handler_return)

               The primary difference is in the location of the signal
               handling trampoline:

               - In PROTECTED mode, there is on a single user space blob
                 with a header at the beginning of the block (at a well-
                 known location.  There is a pointer to the signal handler
                 trampoline function in that header.
               - In the KERNEL mode, a special process signal handler
                 trampoline is used at a well-known location in every
                 process address space (ARCH_DATA_RESERVE->ar_sigtramp).
  Status:      Open
  Priority:    Medium Low.  This is an important change to some less
               important interfaces.  For the average user, these
               functions are just fine the way they are.

  Title:       execv() AND vfork()
  Description: There is a problem when vfork() calls execv() (or execl()) to
Gregory Nutt's avatar
Gregory Nutt committed
               start a new application:  When the parent thread calls vfork()
               it receives and gets the pid of the vforked task, and *not*
               the pid of the desired execv'ed application.

               The same tasking arrangement is used by the standard function
               posix_spawn().  However, posix_spawn uses the non-standard, internal
Gregory Nutt's avatar
Gregory Nutt committed
               NuttX interface task_reparent() to replace the child's parent task
               with the caller of posix_spawn().  That cannot be done with vfork()
               because we don't know what vfork() is going to do.
               Any solution to this is either very difficult or impossible without
               an MMU.
  Status:      Open
  Priority:    Low (it might as well be low since it isn't going to be fixed).

  Title:       errno IS NOT SHARED AMONG THREADS
  Description: In NuttX, the errno value is unique for each thread.  But for
               bug-for-bug compatibility, the same errno should be shared by
               the task and each thread that it creates.  It is *very* easy
               to make this change:  Just move the pterrno field from
patacongo's avatar
patacongo committed
               struct tcb_s to struct task_group_s.   However, I am still not
               sure if this should be done or not.
  Status:      Closed.  The existing solution is better (although its
               incompatibilities could show up in porting some code).
Gregory Nutt's avatar
Gregory Nutt committed
  Title:       REMOVE TASK_DELETE
Gregory Nutt's avatar
Gregory Nutt committed
  Description: Need to remove asychronous fix task_delete().  This interface
               is non-standard and not safe.  Arbitrary deleting tasks can
               cause serious problems such as memory leaks and resources like
               semaphores left in bad states.

               Task/process  exit callbacks registered via atexit() or
               on_exit() will not work correctly with task_delete():  In
               that case the callback would execute in the context the
               caller of task_delete() cancel, not in the context of the
               exiting task (or process).

               Better to remove task_delete() than to retain it as a latent
               bug.
Gregory Nutt's avatar
Gregory Nutt committed

               Currently used within the OS and also part of the
               implementation of pthread_cancel() and task_restart() (which
               should also go for the same reasons).  It is used in
               NxWM::CNxConsole to terminate console tasks and also in
               apps/netutils/thttpd to kill CGI tasks that timeout.  So not
               so simple to remove.
Gregory Nutt's avatar
Gregory Nutt committed

Gregory Nutt's avatar
Gregory Nutt committed
               Option:  With CONFIG_CANCELLATION_POINTS=y task_delete()
               does not do asynchronous deletion but should rather do the
               same kind of synchronization such as the pthread cancellation
               points.  In this configuration, none of the issues above
               apply.  It is only the asyncrhonous task deletion that cannot
               be supported.
Gregory Nutt's avatar
Gregory Nutt committed

Gregory Nutt's avatar
Gregory Nutt committed
  Status:      Open
  Priority:    Low and not easily removable.

  Title:       RELEASE SEMAPHORES HELD BY CANCELED THREADS:
Loading
Loading full blame...