./seaf-encrypt.sh: line 77: 26019 Segmentation fault

Hello everybody,
after running the Seafile CE for a pretty long time, I’ve just decided to upgrade to the Pro version. One of the major reasons to do so is the server side encryption of libraries, which will allow me to start using S3.

Unfortunately following the Docs (/seaf_encrypt.html#migrate-the-data) gives me a segfault whenever I try to run the actual migration.

I’m a bit out of ideas here, so any help would be appreciated! :slight_smile:

The server is a Ubuntu 16.04 with Seafile 6.3.4 / MySQL running natively (no Docker).

The full output I get is:

$> ./seaf-encrypt.sh -f ../conf-enc -e ../seafile-data-enc

Starting seaf-encrypt, please wait ...
[12/23/18 01:43:07] seaf-encrypt.c(459): Start to encrypt 102990 commit among 58 repo.
[12/23/18 01:43:07] seaf-encrypt.c(474): Failed to encrypt commit e97dd09b-e217-4cd2-be13-2f9a4bd50a8d:bded032195372cb88233e129c95b9c38e8bf5f66.4PWUVY, stop encrypt commit.
./seaf-encrypt.sh: line 77: 26019 Segmentation fault      (core dumped) LD_LIBRARY_PATH=$SEAFILE_LD_LIBRARY_PATH ${seaf_encrypt} -c "${default_conf_dir}" -d "${seafile_data_dir}" ${seaf_encrypt_opts}
seaf-encrypt run done


I have an idea about what caused the crash. We’ll try to reproduce and fix it. But at the moment you can try to remove any files under storage/commits, storage/fs and storage/blocks with names like “e97dd09b-e217-4cd2-be13-2f9a4bd50a8d:bded032195372cb88233e129c95b9c38e8bf5f66.4PWUVY”. The problem is in the suffix like “.4PWUVY”. These are temp files left over by Seafile in some cases. The encryption utility doesn’t handle such files well.

Hi @Jonathan,
thanks a lot for the support. That’s really appreciated!

I’ve started to remove these files, but since there are more and more coming up, I wanted to double check, that all files which have a suffix like this (in my case these are extensions like .DU8MVY, .BB3QVY, .II7ZRY etc) can safely be removed?

Is there any chance that I could batch rename/remove such files in order to work around the problem of the encryption utility?

Yes it’s safe to remove all such files. You can write a script to remove them.

Community Edition supports encrypted libraries as well, FYI.