scottransom / presto

Open source pulsar search and analysis toolkit
http://www.cv.nrao.edu/~sransom/presto/
GNU General Public License v2.0
238 stars 173 forks source link

rfifind segfaults when ran as nonexisting user #84

Open gijzelaerr opened 6 years ago

gijzelaerr commented 6 years ago

We are currently packaging up and containerising tools like presto for easy setup on arbitrary systems, from laptop to HPC cluster. We are experiencing a problem with RFI find.

rfifind segfaults when ran as non existing user. This might sound weird, but we are building a pipeline where we encapsulate various packages like presto inside (docker) containers and run them as the UID matching the callers UID on the host.

To replicate the problem take a filter bank like GBT_Lband_PSR.fil, put that in a folder

put a Dockerfile in a same folder:

FROM kernsuite/base:3
RUN docker-apt-install presto python-presto

in that folder run

$ docker build -t kernsuite/presto .

Now run that container:

 docker run -v `pwd`:/data:ro  kernsuite/presto rfifind -o /tmp/bla /data/GBT_Lband_PSR.fil

which runs fine.

Setting the UID crashes rfifind:

docker run -u 5555:5555 -v `pwd`:/data:ro  kernsuite/presto rfifind -o /tmp/bla /data/GBT_Lband_PSR.fil
scottransom commented 6 years ago

Whoa. That's bizarre. rfifind does read and write several files, though. Are you sure it isn't just a permissions issue?

And is it possible for you to get a trace via gdb to figure out where the segfault is happening?

gijzelaerr commented 5 years ago

Sorry, i never replied. This is still an issue though. I will investiga next week.