One strange thing about your test process is that it starts all of the worker threads then calls pthread_exit(NULL), so the main thread is defunct while the others are runnning:
when i try to exec a simple program with pthreads, the
following message appears: "Cannot move process 775543 - 775543 is a system process".
john@f:~$ bash-llIf I "fix" it so the main thread waits for the workers (even though they will never finish) and then try migrating it I get:
john@f:~$ where_pid $$
john@f:~$ ./calc >/dev/null &
john@f:~$ ps -fp 437832
UID PID PPID C STIME TTY TIME CMD
john 437832 437810 0 13:37 pts/7 00:00:08 [calc] <defunct>
add_thread_group:Cannot move process 438181 (calc) - cannot find all shares(This is on my 2.6.14 system, so it may have bugs that the standard 2.6.11 based system doesn't have).
add_thread_group: group(438181)/share imbalance 4/1