I use sen2cor in a Unix environment with Docker in order to generate L2 products.
Most of the time everything goes well, but sometimes the process freezes and sen2cor keeps hanging without reporting any error, making my whole process get stuck.
I noticed that when I run a sen2cor process, a second sen2cor process is created which seemingly does most of the job (I wonder why it’s necessary to have this second process).
root 9272 0.2 0.8 648172 285472 ? Sl 09:44 0:02 /Sen2Cor-02.05.05-Linux64/bin/python2.7 -s /Sen2Cor-02.05.05-Linux64/lib /python2.7/site-packages/sen2cor/L2A_Process.py /app/in/S2B_MSIL1C_20171211T085339_N0206_R107_T35SQD_20171211T114119.SAFE
root 9281 96.5 6.7 2902088 2217724 ? Rl 09:45 14:11 /Sen2Cor-02.05.05-Linux64/bin/python2.7 -s /Sen2Cor-02.05.05-Linux64/lib /python2.7/site-packages/sen2cor/L2A_Process.py /app/in/S2B_MSIL1C_20171211T085339_N0206_R107_T35SQD_20171211T114119.SAFE
I believe the first line corresponds to the process I create when I run sen2cor, and the second line is the other process created by sen2cor. First process ran only 2 seconds before spawning the other process which ran for 14 minutes.
Now, this is a case where second process actually runs. Sometimes, this second line does not appear whereas the first one does and never ends. It seems like this child process is killed somehow and the parent process is not notified and thus keeps waiting indefinitely.
I don’t think it’s a memory issue since I have 32 GB on my machine.
Has anyone ever had this issue?
Are you executing sen2cor from SNAP or directly from the console?
What exactly is the command that you run?
I run the command in a script as follows:
And you installed using SNAP or standalone? Also, could you give me some more information about your system configuration?
Below are the instructions in my Dockerfile which have to do with SNAP installation, I hope it answers your question
RUN wget http://step.esa.int/downloads/6.0/installers/esa-snap_sentinel_unix_6_0.sh
RUN chmod a+x esa-snap_sentinel_unix_6_0.sh
RUN ./esa-snap_sentinel_unix_6_0.sh -q
RUN ln -s /opt/snap/bin/gpt /usr/bin/gpt
RUN ln -s /opt/snap/bin/pconvert /usr/bin/pconvert
RUN snap --nosplash --nogui --modules --update-all
RUN wget http://step.esa.int/thirdparties/sen2cor/2.5.5/Sen2Cor-02.05.05-Linux64.run
RUN chmod +x Sen2Cor-02.05.05-Linux64.run
RUN ln -s /Sen2Cor-02.05.05-Linux64/bin/L2A_Process /usr/bin/sen2cor
I use a miniconda3 image (continuumio/miniconda3:4.6.14) which is based on Debian.
I tried to reproduce the problem, and for the moment I was not able, could it be product dependent? Do you experience the same problem with the same products?
It might be since I’ve been able to properly reprocess some products, yet others keep failing and I cannot find a way to process them. See these for example: