[Darshan-users] LD_PRELOAD system() call
Phil Carns
carns at mcs.anl.gov
Wed Apr 29 13:54:36 CDT 2015
On 04/29/2015 12:17 PM, Cristian Simarro wrote:
> Hello,
>
> We have been facing some problems with system() call inside some C/Fortran codes in our Cray machine.
>
> The method used here is compile dynamically and then use LD_PRELOAD. When the code calls system(command), it hangs the execution if preloaded with Darshan because it is trying to instrument an internal system read() with no initialization.
>
> The solution we have designed is to unset LD_PRELOAD (if set before) in the darshan_mpi_initialize function.
>
> Has anybody found a similar problem with LD_PRELOAD + system() calls?
Hi Cristian,
I don't think I've seen this exact combination before, but it seems like
something we should be able to reproduce and isolate.
If I understand correctly, it sounds like the underlying process spawned
by system() is inheriting the LD_PRELOAD environment variable from the
parent program, and it is the underlying process that is getting hung?
If so, does it matter what you run in the system() call or does it seem
like pretty anything triggers it?
thanks,
-Phil
> Thanks,
> Cristian
>
> ------------------------------------------------------------------
> Cristian Simarro
> Analyst, User Support Section
> European Centre for Medium-Range Weather Forecasts (ECMWF)
> Shinfield Park, Reading, RG2 9AX, United Kingdom
> Tel: (+44 118) 9499315 Fax: (+44 118) 9869450
> E-mail: Cristian.Simarro at ecmwf.int http://www.ecmwf.int
> ------------------------------------------------------------------
> _______________________________________________
> Darshan-users mailing list
> Darshan-users at lists.mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/darshan-users
More information about the Darshan-users
mailing list