Project

General

Profile

Feature #25428

Remove LD_PRELOAD from the environment by default

Added by Marco Mambelli about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
Start date:
01/22/2021
Due date:
% Done:

0%

Estimated time:
Stakeholders:

OSG

Duration:

Description

OSG encountered problems at some sites when LD_PRELOAD is in the environment.
It should be cleared by default, like path and LD_LIBRARY_PATH
https://support.opensciencegrid.org/public/tickets/eed90f1ebe51a83d8d94ab7203d65ced651ad31f34bdf392e2193f60ba575208

Mats Rynge provided also a PR:
https://github.com/glideinWMS/glideinwms/pull/39

On Wed, 13 Jan at 7:53 AM , Cesar Gomes <gomes.cesar.a@gmail.com> wrote:
Hi,

I'm encountering this error with some of my job submissions:

ERROR: ld.so: object 'libcr_run.so' from LD_PRELOAD cannot be preloaded: ignored.
WARNING  glidein_config not defined () in singularity_lib.sh. Some functions like advertise and error_gen will be limited.

Un-sure how to proceed.

Best regards,

Cesar Gomes
___________________________________________________
Research Assistant | PhD Candidate
Tufts Computer Architecture Lab | Dept of ECE | Tufts University
cesar.gomes@tufts.edu | (251) 604-8716

History

#1 Updated by Marco Mambelli about 1 month ago

  • Status changed from New to Resolved

Changes are in v37/25428 and have been merged to branch_v3_7

To patch a v3.7.x installation you need to replace singularity_lib.sh in the Factory and default_singularity_wrapper.sh in the Frontend with the version in the branch_v3_7 branch. The second one is needed only if the frontend is interacting w/ pre-v3.7.2 Factories:
https://github.com/glideinWMS/glideinwms/tree/branch_v3_7

#2 Updated by Marco Mambelli about 1 month ago

A workaround is to set the attr GLIDEIN_CONTAINER_ENV, string, to "clear" either in the Factory or in the Frontend global/group (https://glideinwms.fnal.gov/doc.v3_7_2/factory/custom_vars.html#singularity_vars).
This will clear all not needed environment variables. It may be more than you like but worth testing.

#3 Updated by Marco Mambelli about 1 month ago

Adding also options in GLIDEIN_SINGULARITY_OPTS can do the same and control the variables passed. Specifically the following singularity options:

-e, --cleanenv               clean environment before running container
    --env strings            pass environment variable to contained process
    --env-file string        pass environment variables from file to contained process

Also available in: Atom PDF