Skip to content

Troubleshooting

Marcos Horro edited this page Nov 28, 2018 · 3 revisions

Common errors

This page will try to summarize typical problems we may have regarding PAPI API and how to solve them. Sometimes errors are not very verbose or clear

PAPI_overflow errors

A common error is trying to sample a derived PAPI event, which is not allowed when using PAPI_OVERFLOW_HARDWARE, which is the default mode when available by the system. PAPI_overflow error output may not be very verbose, so this issue may be hidden for some new users.

For this reason, PAPI_OVERFLOW_FORCE_SW is recommended, even though this is less accurate and introduces overhead. Nevertheless, this issue has been pointed in this wrapper. Thus, it is highly recommended to use this mode instead of hardware.

/proc/sys/kernel/perf_event_paranoid

Controls use of the performance events system by unprivileged users (without CAP_SYS_ADMIN). The default value is 2.

-1: Allow use of (almost) all events by all users
   Ignore mlock limit after perf_event_mlock_kb without `CAP_IPC_LOCK`
0: Disallow ftrace function tracepoint by users without `CAP_SYS_ADMIN`
   Disallow raw tracepoint access by users without `CAP_SYS_ADMIN`
1: Disallow CPU event access by users without `CAP_SYS_ADMIN`
2: Disallow kernel profiling by users without `CAP_SYS_ADMIN`
Clone this wiki locally