llnl / llnl/Spindle

$ORIGIN in $RPATH in nested dependency is not handled correctly

Open
#36 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
110
Forks
35
Avg merge
1d 16h
Merged PRs (30d)
2

Description

When I try SPINDLE, I found that $ORIGIN in $RPATH in nested dependency is not handled correctly and the process cannot load some libraries.

Example: When my python script on my environment imports `matplotlib`,

1. matplotlib requires `/path/to/lib/python2.7/site-packages/numpy/core/multiarray.so`
2. Spindle create cache of multiarray.so as `/tmp/spindle.PIDNUM/b0-_path_to_lib_python2.7_site-packages_numpy_core_multiarray.so`
3. This multiarray.so requires `$ORIGIN/../.libs/tls/x86_64/libopenblasp.so`

In this case, `$ORIGIN/../.libs/tls/x86_64/libopenblasp.so` should be expands as `/path/to/lib/python2.7/site-packages/numpy/core/../.libs/libopenblasp.so`.
However, SPINDLE expands as `/tmp/spindle.PIDNUM/../.libs/tls/x86_64/libopenblasp.so`.

i.e. SPINDLE expands `$ORIGIN` as `/tmp/spindle.PIDNUM/` instead of `/path/to/lib/python2.7/site-packages/numpy/core/`

As a result, the process cannot load multiarray.so.

This issue may be similar to #17, but current SPINDLE runs with `--debug=yes` in default.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the nested-dependency case with a Python script that imports matplotlib under SPINDLE, using the default --debug=yes behavior described in the issue. Trace how $ORIGIN is expanded for multiarray.so and verify that it resolves relative to the original dependency directory, allowing libopenblasp.so to load.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.