Skip to content

[BUG] OpenMP > OMP: System error #22: Invalid argument #1180

@bommo1

Description

@bommo1

Description

I'm linking OpenMP statically (-static-openmp).

On some devices like

  • Gigaset GS270 plus
  • Samsung SM-J530F
  • LGE LG-M250
  • Sony Xperia XA (Sony F3111)
  • HMD Global Nokia 3.1
  • Fairphone FP3

(sadly none of them at my disposal) the following crash occurs:

Build fingerprint: 'Sony/G3421/G3421:8.0.0/48.1.A.2.122/3700278597:user/release-keys'
Revision: '0'
ABI: 'arm'
signal 6 (SIGABRT), code -6 (SI_TKILL)
backtrace:
#00 pc 0004ad5c /system/lib/libc.so (tgkill+12)
#1 pc 0001a3c3 /system/lib/libc.so (abort+54)
#2 pc 00351ba0 ...my.so (offset 0xe4000) (__kmp_abort_process+48)

stack:
...
c3df47cc c3a30ba4 /my.so (__kmp_abort_process+52)
c3df47d4 c3a2f0b8 /my.so (__kmp_env_get)
c3df47ec c3a58cd0 ...my.so (_ZNK17KMPNativeAffinity4Mask19set_system_affinityEb+224)

Before aborting omp writes this to stdout/stderr (I redirect them both to android log):

 OMP: Error #100: Fatal system error detected.
 OMP: System error #22: Invalid argument

Is there a way to disable process/thread affinity programmatically or at build time?

Environment Details

  • NDK Version: 21
  • Build system: CMake
  • Host OS: Mac
  • ABI: armeabi-v7a, arm64-v8a
  • NDK API level: 29

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions