[qmtest] [PATCH] Use processes instead of threads

Zack Weinberg zack at codesourcery.com
Thu Apr 29 02:45:22 UTC 2004


Nathaniel Smith <njs at pobox.com> writes:

> Due to an interesting feature of python's thread implementation, all
> processes spawned by a non-main thread start with all signals blocked.
> Currently, if you run qmtest with -j<anything except 1>, all tests are
> run by a non-main thread, and thus all processes spawned ignore
> ulimits, cannot be killed except by SIGKILL, etc.

Nitpick: they ignore the CPU-time ulimit, which is enforced with a
blockable signal.  All the other ulimits that I can think of (memory
allocation e.g.) are enforced by syscalls failing, which is not
affected.  I suppose a program might overcommit memory and get a
SIGSEGV which is blocked, but the kernel's going to blow away the
process anyway in that case so it's moot.

I am nitpicking because ...

> Comments?

you should add to the documentation an explanation of why this is the
default concurrency mode, and under what conditions it is safe to use
the lower-overhead mode.

zw



More information about the qmtest mailing list