Sometimes a few process are in a stuck state. For example:

99357  plugin-container 0.1  12:07.07 10   1    224  2097   40M    84M    66M    82M    2757M  91688 99346 sleeping
99346  firefox          0.4  48:54.20 29   1    265  16250  467M   172M   799M   538M   4210M  91688 1     sleeping 
88029- Aquamacs       1.2  31:24.12 4    3    126  268    19M    49M    32M    36M    777M   88029 152   stuck

Is it part of the normal life cycle of process ? Why this process in particular ?

What does it mean exactly ?

1 Answer 1


It is not necessarily a bad sign, but let me answer your last question first:

What does it mean exactly?

In the top source code (from http://www.opensource.apple.com/release/mac-os-x-1082/) the stuck state is referred to as identifier LIBTOP_STATE_STUCK (from libtop.c):

libtop_state_str(uint32_t state)
        const char *strings[] = {
#define LIBTOP_STATE_RUN        1
#define LIBTOP_STATE_STUCK      2
#define LIBTOP_STATE_SLEEP      3
#define LIBTOP_STATE_IDLE       4
#define LIBTOP_STATE_STOP       5
#define LIBTOP_STATE_HALT       6

Later in the same file, LIBTOP_STATE_STUCK is mapped to kernel state TH_STATE_UNINTERRUPTIBLE:

/* Translate a mach state to a state in the state breakdown array. */
static int
libtop_p_mach_state_order(int state, long sleeptime)
        switch (state) {
                case TH_STATE_RUNNING:
                        return LIBTOP_STATE_RUN;
                case TH_STATE_UNINTERRUPTIBLE:
                        return LIBTOP_STATE_STUCK;

So a process in stuck state means that the process/thread is in an uninterruptible wait state, which is how TH_STATE_UNINTERRUPTIBLE is defined in the kernel struct thread_basic_info (see http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/thread_basic_info.html):

struct thread_basic_info
       integer_t        run_state;

where run_state is:

run_state: The thread's run state. Possible values are:


  • TH_STATE_UNINTERRUPTIBLE: The thread is in an un-interruptible wait state.


This is usually caused by a process waiting on I/O, that is, the process has requested to read or write to/from disk or the network and waits for the system call to return (see http://en.wikipedia.org/wiki/Sleep_%28operating_system%29#Uninterruptible_sleep or http://www.novell.com/support/kb/doc.php?id=7002725 for more information).

(When not using BSD options, as it is usually the case in Linux, ps shows uninterruptible sleep as D state.)

Is it part of the normal life cycle of process?

Yes, it is. What is not normal is that a process stays in this state for a long time. That's a bad sign.

Why this process in particular?

Difficult to say. It is usually caused by I/O bottlenecks with heavy disk activity or degraded connectivity when using network filesystems (the most usual scenario, in my experience).

(This is a related question in Ask Different: https://apple.stackexchange.com/questions/58697/how-does-stuck-in-results-of-top-relate-to-not-responding-in-activity-m.)

  • 1
    How can I find out which processes exactly are stuck?
    – mareoraft
    Dec 29, 2015 at 15:59
  • 3
    @mareoraft In OS X, the ones with a 'U' state code in the output of ps axug or ps -eo user,pid,stat,args. In Linux, the ones with a 'D' state code with the same ps commands. See the explanation of the state keyword (OS X) or the PROCESS STATE CODES section (Linux) in man ps for more information. Or, in OS X, you could run top and look for processes marked as stuck in the STATE column.
    – jaume
    Jan 6, 2016 at 7:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .