Forum: NGINX nginx-1.3.14: alert sched_setaffinity() failed

Posted by Patrick Lists (Guest)
on 2013-03-05 19:39
(Received via mailing list)
Hi,

On an updated CentOS 6.3 x86_64 VM I just installed nginx 1.3.14 with
extra modules ngx_cache_purge and nginx-auth-ldap, the SPDY 66 patch and
built statically against openssl-1.0.1e. In the error log I see this
message:

2013/03/05 19:31:39 [alert] 13363#0: sched_setaffinity() failed (22:
Invalid argument)

No idea what it means. Maybe it is helpful for the developers.

Regards,
Patrick
Posted by Maxim Dounin (Guest)
on 2013-03-05 20:07
(Received via mailing list)
Hello!

On Tue, Mar 05, 2013 at 07:38:30PM +0100, Patrick Lists wrote:

> No idea what it means. Maybe it is helpful for the developers.
Do you have worker_cpu_affinity (http://nginx.org/r/worker_cpu_affinity)
in your config?  Does it match CPUs available?

The message indicate that from kernel point of view configured CPU
mask is wrong:

       EINVAL The affinity bit mask mask contains no processors that 
are
              currently  physically  on  the  system and permitted to 
the
              process according to any restrictions that may  be 
imposed
              by the "cpuset" mechanism described in cpuset(7).

An easy way to trigger the message above is to do something like

    worker_cpu_affinity  10;

on a system with one CPU only.

--
Maxim Dounin
http://nginx.org/en/donation.html
Posted by Patrick Lists (Guest)
on 2013-03-05 21:37
(Received via mailing list)
Hi Maxim,

Thank you for your feedback.

On 05-03-13 20:07, Maxim Dounin wrote:
> Do you have worker_cpu_affinity (http://nginx.org/r/worker_cpu_affinity)
> in your config?  Does it match CPUs available?

My bad, a config was copied which had worker_cpu_affinity set. I removed
it and the alert is gone now. Sorry for the noise.

Nginx 1.3.14 seems to work fine for me (light testing). Thanks for one
great piece of software!

Regards,
Patrick
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.