This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bpf/24324] New: bpf map entry 0: Operation not permitted


https://sourceware.org/bugzilla/show_bug.cgi?id=24324

            Bug ID: 24324
           Summary: bpf map entry 0: Operation not permitted
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: bpf
          Assignee: systemtap at sourceware dot org
          Reporter: me at serhei dot io
  Target Milestone: ---

This is an annoying issue that's related to ulimit. After a long time running
different stapbpf programs, previously working scripts begin to fail, being
unable to allocate maps.

(On older Fedora kernels I saw an issue where instead the BPF verifier would
reject a program -- that seems unrelated and difficult to reproduce.)

The issue can be worked around by removing RLIMIT_MEMLOCK entirely in
stapbpf.cxx instantiate_maps():

+  curr_rlimit.rlim_cur = RLIM_INFINITY;
+  curr_rlimit.rlim_max = RLIM_INFINITY;
   rc = setrlimit(RLIMIT_MEMLOCK, &curr_rlimit);

This is also what bcc does. However, the fact that rlimit resources do not
overflow immediately, but are instead exhausted over multiple runs and across a
reboot makes me suspicious about the safety of this fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]