SKS key-server cannot import key-dump
I am on a desktop with lots of memory (64 GB) and cannot make sks key-server work. My OS is Ubuntu 18.04.5 LTS and I am using kernel 5.4.23-050423-generic (installed with Ukuu Kernel Update Utility).
I have downloaded a key-dump (~14 GB of .pgp files) and placed it in /var/lib/sks/dump. Then I run:
sudo chown -R debian-sks:debian-sks /var/lib/sks
sudo su debian-sks
cd /var/lib/sks
/usr/lib/sks/sks_build.shIf I choose normalbuild (option 2), I get the following output:
=== Running build... ===
Loading keys...done
DB time: 0.33 min. Total time: 0.37 min.
... ...
Loading keys...Fatal error: exception Stack overflow
Command failed unexpectedly. Bailing outIf, as user debian-sks, I run
sks build /var/lib/sks/dump/*.pgp -n 10 -cache 100I get a segmentation fault/core dump. Same result with various option combinations.
Option 1 of the script (fastbuild) also gives Fatal error: exception Stack overflow. I have also tried to build sks key-server from source (from here), but again I get a segmentation fault when running the script (I have only tried option 2 - normalbuild).
Any help will be much appreciated!
11 Answer
To overcome the Stack overflow/segmentation fault it appears ulimit -s 65536 does the trick (16384 is not enough -- I have not tried 32768). I would suggest package maintainers to add a test and invocation of ulimit -s ... in file sks_build.sh.
There is an other workaround in this comment of github issue "SKS Segnentation Fault During FastBuild #65". Nevertheless, it does not work for me, since sks merge dump/*.pgp also crashes.
Anyway, in my case, sks build dump/*.pgp now crashes --much later-- the same way as sks merge dump/*.pgp, with Fatal error: exception Sys_error("1: No such file or directory"). This would appear to be a new error...
[ Solved this as well: Somewhere I found an sksconf setting of disable_mailsync: 1. This cannot be; it can be just disable_mailsync:. The former creates this totally unexpected Fatal error: exception Sys_error("1: No such file or directory"). ]