fermitools / jobsub_lite

jobsub_lite is a wrapper for HTCondor job submission
Apache License 2.0
1 stars 7 forks source link

Clear LD_LIBRARY_PATH before calling condor exectuables. #300

Closed marcmengel closed 1 year ago

marcmengel commented 1 year ago

Clear LD_LIBRARY_PATH before calling condor exectuables.

/cvmfs/minerva.opensciencegrid.org/minerva/software_releases/v22r1p1/lcg/external/LCGCMT/LCGCMT_61/LCG_Settings/../../../uuid/1.38p1/x86_64-slc7-gcc49-opt/lib/libuuid.so.1: 
no version information 
    available (required by /usr/lib64/libcondor_utils_9_0_17.so
marcmengel commented 1 year ago

So it turns out just clearing LD_LIBRARY_PATH before calling condor executables isn't sufficient, because we import htcondor and that will give an error like this if the LD_LIBRARY_PATH has a libuuid in it

We could clear LD_LIBRARY_PATH and re-exec python if it is set before doing any actual work... This also would break if someone was doing -e LD_LIBRARY_PATH to pass the current LD_LIBRARY_PATH to their jobs, as it would then show up blank, although we could special-case it, and rename LD_LIBRARY_PATH in the environment...

In any case this is uglier than I first thought. Sigh.

marcmengel commented 1 year ago

Okay, so I found a way to test this:

mkdir /tmp/biteme
dd if=/usr/lib64/libuuid.so.1 of=/tmp/biteme/libuuid.so.1 count=1
export LD_LIBRARY_PATH=/tmp/biteme:$LD_LIBRARY_PATH