Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#547 closed defect (fixed)

lib/sysdep/os/linux/lcpu.cpp sched_getaffinity fails with errno 22 (EINVAL)

Reported by: Sergey Owned by:
Priority: Should Have Milestone: Alpha 2
Component: Non-game systems Keywords: lcpu sched_getaffinity
Cc: Patch:

Description

PROBLEM: after compiling and running test_dbg stack call trace lead us to the problem in lib/sysdep/os/linux/lcpu.cpp file while calling to sched_getaffinity function which fails with errno 22 (EINVAL) if you choose Launch debug and test errno after calling to this function.

DESCRIPTION: problem comes not from the game, but from incompatibility of the Linux kernel with NUMA support and glibc. The whole description with solution you may find by the link in the section below.

SOLUTION: http://sourceware.org/ml/libc-help/2009-10/msg00017.html

Change History (6)

in reply to:  description comment:1 by Sergey, 14 years ago

before applying the solution test fails in lcpu file and pyrogenesis shows black screen which can be killed only by going to a new tty and running killall -9 pyrogenesis

comment:2 by Philip Taylor, 14 years ago

From that mail thread it looks like we should avoid the problems by using CPU_*_S(), but I'm not sure exactly how to do that and I don't have any way to test whether it fixes this error. If you have a working patch then I'd be happy to apply it.

comment:3 by philip, 14 years ago

Resolution: fixed
Status: newclosed

(In [8024]) Disable implementation of os_cpu_SetThreadAffinityMask on Linux, since it's not necessary and it causes errors. Should fix #547.

comment:4 by Sergey, 14 years ago

or change CONFIG_NR_CPUS to something lesser or equal 1024

comment:5 by (none), 14 years ago

Milestone: Complete

Milestone Complete deleted

comment:6 by historic_bruno, 12 years ago

Milestone: Alpha 2
Note: See TracTickets for help on using tickets.