Segmentation Fault in binFHE serial example


I have built openFHE on my system and I am trying to run the example: ./build/bin/examples/binfhe/boolean-serial-binary. However, I am getting a Segmentation Fault once the actual computation on the ciphertext begins.

Here is the output of the above command:

Generating keys.
Done generating all keys.
The cryptocontext has been serialized.
The refreshing key has been serialized.
The key switching key has been serialized.
The secret key sk1 key been serialized.
A ciphertext has been serialized.
The cryptocontext has been deserialized.
The refresh key has been deserialized.
The switching key has been deserialized.
The secret key has been deserialized.
The ciphertext has been deserialized.
Segmentation fault (core dumped)

Any help would be appreciated! Thanks!

Can you give us additional information? Like your OS, what version of OpenFHE are you on (dev/release), what your compiler version is, etc.


OS: Ubuntu 20.04.4 LTS. I cloned the repo so we are using the main branch and followed the instructions in the documentation: Installing OpenFHE on Linux — OpenFHE documentation

Also, how much memory does your system have. Serialization/Deserialization are not very memory efficient (though BinFHE has somewhat smaller memory requirements), and if you run out of system memory, you can segfault.

Thanks, I will track the memory consumption while running the examples. We are running this on a server with ~250 GB RAM.

Then memory consumption is not a problem. Sometimes people try to run on 4GB laptops etc.
Usually anything >=32 GB is not a problem.

@ypolyakov have duplicated this error on my system. Am investigating,
it fails on the initial Encrypt() after deserialization.

Can you please open a issue on this topic. It appears there is a problem with the example.

1 Like

More details about the bug are provided in Segmentation Fault in binFHE serial examples · Issue #239 · openfheorg/openfhe-development · GitHub The bug will soon be resolved.