filprofiler: crash on archlinux: cannot allocate memory in static TLS block

Hello. I get this error on 2 of my computers, both running archlinux.

One is running Python 3.8.6, the other Python 3.9.1.

fil-profile run /tmp/p.py 
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/od/.local/lib/python3.8/site-packages/filprofiler/_script.py", line 217, in <module>
    stage_2()
  File "/home/od/.local/lib/python3.8/site-packages/filprofiler/_script.py", line 202, in stage_2
    from ._tracer import trace_until_exit, create_report
  File "/home/od/.local/lib/python3.8/site-packages/filprofiler/_tracer.py", line 24, in <module>
    preload = PyDLL(library_path("_filpreload"))
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/od/.local/lib/python3.8/site-packages/filprofiler/_filpreload.cpython-38-x86_64-linux-gnu.so: cannot allocate memory in static TLS block
fil-profile --version
0.15.0

Is there anything I could do to investigate?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 32

Most upvoted comments

Thank you! Eventually I hope to support subprocesses (#80) , but for now, yeah, won’t work.

OK, I’ll merge this and mark the issue as closed.

Huh. That seems like… the shared library isn’t being LD_PRELOADed? Which would explain both symptoms, but seems unexpected.

I’ll try to spin up a Docker image tomorrow with Arch and see if I can figure it out.