Ctffind segmentation fault

Hello,

I hope everyone’s doing well. I am having a tiny issue with ctffind4 inside Cryosparc v 2.15.
I have a CentOS8 and the ctffind jobs run with error, so I traced it back to the ctffind executable outputting “Segmentation fault (core dump)” upon start from the terminal. I guess the version used in CS is modified for input/output, since exchanging it with a ctffind I installed from Niko’s site to check things also ends in failure, even though the log files etc are generated.

Please advise,

Best,

JP

Hi JP,

Thanks for reporting this… Just to confirm - ctffind is printing “Segmentation fault” right at the start? It doesn’t print any other output first? We don’t modify the ctffind executable, it gets downloaded directly from grigoriefflab.umassmed.edu/ when we create the installation bundle for cryoSPARC. When you replaced the installed version of CTFFIND4 with one you downloaded yourself, what build version of CTFFIND4 did you use?

Were you able to sort out the cause of the failure from the logs, after you swapped the executables?

Thanks,
Harris

Hi Harris,

When I run it from cryosparc, it just goes over all the micrographs and reports the job failed. When I go to the folder to check the executable, it complains about the Segmentation fault immediately.
The version on my computer is 4.1.14, but I noticed that there is a reference to 4.1.10 in the cryosparc ctffind setup box. With this version, cs reports: “CTFFIND did not run correctly. See the log at (logpath)”. The logs are empty.
I also downloaded and compiled the 4.1.10 on my computer (ctffind-4.1.10.tar) and now, it does not crash, but the output generated is the same as with 4.1.14 - and also generates empty logs.

Any idea?

Best,

JP

Hi JP,

It sounds like this is an issue with CTFFIND rather than with cryoSPARC specifically. Have you seen the following links? It seems like other people are having some similar issues:

https://grigoriefflab.umassmed.edu/taxonomy/term/11

Someone found a solution for this problem? It is definitly ctffind, i compiled it also my own tried 4.1.10, 4.1.13, 4.1.14 but its still core dumped/ segmentation fault.

Would in theory ctffind 4.1.8 still work in cryosparc if i replace the executables? Someone said that version would still work for CentOS 8. Havent tested it though.

Edit: Changing just the executables to the ones from 4.1.8 does work apperently. Though someone managed to have ctffind > 4.1.10 working on CentOS 8? The post above also deosnt give me a working executable, i can start the “menu” but if you really start processing it gives the same core dump/segmentation fault.

Yeah, no, I sort of gave up at some point, as other things needed tending to (computer dying, being resuscitated, dying again and again haha). If anyone finds a solution, please let me know

Hi everybody,
we had the exact same problem on centos-8.2.2004
The usual ctffind 4.1.14-static just crashed out with a blunt “Segmentation fault (core dumped)”
We used the precompiled 4.1.9 from SBGrid that worked as standalone
./ctffind
** Welcome to Ctffind **
Version : 4.1.9
Compiled : Dec 2 2017
Mode : Interactive
Input image file name [input.mrc]

I replaced the files in cryosparc/cryosparc2_worker/deps/external/ctffind-4.1.10/bin with the older version and its running again from the cryosparc GUI/website.

I can probably DM you the binary after checking with Niko.
Hope that helps!
Dan

Yes please :slight_smile: if that is a possibility, then I’d like to try that!

I just messaged you the binaries. Let us know if it works for you :slight_smile:

Thank you :slight_smile: I will be testing it soon!

Dear All,

Apparently the problem still persists in the most recent cryoSPARC (it includes the same version of ctffind).

Is there any solution to this issue recommended by cryoSPARC team?

The problem appears to be caused by the bundled binary being statically-linked with glibc.
This persists with other precompiled versions from here: CTF estimation (ctffind, ctftilt) | The Grigorieff Lab, but recompilation helps.

Thank you @bsobol for sharing your solution. On which Linux release and version is your cryoSPARC worker installed?

It’s Rocky Linux 8.6 and cryoSPARC 3.3.2-220824

@wtempel @bsobol
A recompiled ctffind4 with extra updates/modification in src or the source code, according to ctffind - Chaperone
and ctffind 4.1.14 segfault | The Grigorieff Lab
should help too.
At least it works from my end with cryoSPARC 3.3.2-220518

A little late to the party but thought I’d throw my solution(s) out there for this unfortunate issue.

I just came across this issue on RHEL 8 in cryoSPARC v4.2.1 . There is a CTFFind forum post about the issue but the relevant clue is in this comment: ctffind 4.1.14 segfault | The Grigorieff Lab

The problem is in the CTFFind binary and not cryoSPARC although cryoSPARC does bundle the executable into the worker. Since compiling CTFFind and it’s dependency chain is non-trivial I opted for modifying the environment. Basically, if you set the LC_ALL variable to C ctffind will run.

$ ./cryosparc/cryosparc_worker/deps/external/ctffind-4.1.10/bin/ctffind
Segmentation fault (core dumped)
$ export LC_ALL=C
$ ./cryosparc/cryosparc_worker/deps/external/ctffind-4.1.10/bin/ctffind

        **   Welcome to Ctffind   **

            Version : 4.1.10
           Compiled : Jan 18 2018
               Mode : Interactive
...snip...

In our case since we are submitting to a cluster I added the following line to the cluster_script.sh template file above the {{ run_cmd }} line:

export LC_ALL=C

Presumably you could add that line (export LC_ALL=C) to the ~/.bashrc of the cryoSPARC user running cryoSPARC but I have not tested this.

Hopefully this helps someone.

3 Likes

Thank you so much for this - normally I re-compile, but it won’t compile with the packaged wxWidgets on my system, so I have to recompile that with special flag…saves a huge headache