9

When looking at the limits of a running process, I see

Max pending signals       15725
  • What is this?
  • How can I determine a sensible value for a busy service?

Generally, I can't seem to find a page that explains what each limit is. Some are pretty self-explanatory (max open files), some less so (max msgqueue size).

1
  • On a nearly up-to-date Arch linux, kernel 3.14.37-1-lts, zsh, I get sigpending 31603. Why are these limits such weird numbers (i.e. not a power of 2)?
    – user732
    Apr 21, 2015 at 13:37

2 Answers 2

6

According to the manual page of sigpending:

sigpending() returns the set of signals that are pending for delivery to the calling thread (i.e., the signals which have been raised while blocked).

So, it is meant the signals (sigterm, sigkill, sigstop, ...) that are waiting until the process comes out of the D (uninterruptible sleep) state. Usually a process is in that state when it is waiting for I/O. That sleep can't be interrupted. Even sigkill (kill -9) can't and the kernel waits until the process wakes up (the signal is pending for delivery so long).

For the other unclear values, I would take a look in the manual page of limits.conf.

1
  • It's the manual pages for sigqueue and setrlimit that you really should be looking at.
    – JdeBP
    Apr 21, 2015 at 15:14
1

Process limits are controled by setrlimit(2)

So you can look into its manpage:

RLIMIT_SIGPENDING (Since Linux 2.6.8)

Specifies the limit on the number of signals that may be queued for the real user ID of the calling process. Both standard and real-time signals are counted for the purpose of checking this limit. However, the limit is enforced only for sigqueue(3); it is always possible to use kill(2) to queue one instance of any of the signals that are not already queued to the process.

Generally, you can get the most detailed information when you look into manpages of syscalls. C is the mother tongue of UNIX/Linux.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.