zama-ai / concrete

Concrete: TFHE Compiler that converts python programs into FHE equivalent
Other
1.18k stars 138 forks source link

Fail to run the quick start with docker #726

Closed darren closed 4 months ago

darren commented 4 months ago

Summary

What happened/what you expected to happen?

core dump

Description

Step by step procedure someone should follow to trigger the bug:

# docker run --rm -it zamafhe/concrete-python:v2.0.0 /bin/bash
root@c5fca5d246c5:/# 
root@c5fca5d246c5:/# 
root@c5fca5d246c5:/# python3
Python 3.10.12 (main, Jul  4 2023, 06:05:07) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from concrete import fhe

>>> 
>>> def add(x, y):
...     return x + y
... 
>>> compiler = fhe.Compiler(add, {"x": "encrypted", "y": "clear"})
>>> 
>>> inputset = [(2, 3), (0, 0), (1, 6), (7, 7), (7, 1)]
>>> circuit = compiler.compile(inputset)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libConcretelangBindingsPythonCAPI.so          0x00007f2ad92f8cd1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 225
1  libConcretelangBindingsPythonCAPI.so          0x00007f2ad92f66e4
2  libc.so.6                                     0x00007f2ae1b08f90
3  libConcretelangBindingsPythonCAPI.so          0x00007f2add6fddd8 concrete_optimizer::optimization::config::SearchSpace::default_cpu::h1e041bc30192ba71 + 216
4  libConcretelangBindingsPythonCAPI.so          0x00007f2add6fe144 concrete_optimizer::optimization::config::SearchSpace::default::he96206a64679b4d2 + 36
5  libConcretelangBindingsPythonCAPI.so          0x00007f2add7eb90b
6  libConcretelangBindingsPythonCAPI.so          0x00007f2add6e6900 concrete_optimizer$cxxbridge1$OperationDag$optimize + 80
7  libConcretelangBindingsPythonCAPI.so          0x00007f2add6e429e concrete_optimizer::OperationDag::optimize(concrete_optimizer::Options) const + 62
8  libConcretelangBindingsPythonCAPI.so          0x00007f2adaf33e3d mlir::concretelang::getDagMonoSolution(rust::cxxbridge1::Box<concrete_optimizer::OperationDag>&, mlir::concretelang::optimizer::Config) + 253
9  libConcretelangBindingsPythonCAPI.so          0x00007f2adaf3831d mlir::concretelang::getSolution(mlir::concretelang::optimizer::Description&, mlir::concretelang::CompilationFeedback&, mlir::concretelang::optimizer::Config) + 3949
10 libConcretelangBindingsPythonCAPI.so          0x00007f2adaf20e7b mlir::concretelang::CompilerEngine::determineFHEParameters(mlir::concretelang::CompilerEngine::CompilationResult&) + 1515
11 libConcretelangBindingsPythonCAPI.so          0x00007f2adaf23b96 mlir::concretelang::CompilerEngine::compile(llvm::SourceMgr&, mlir::concretelang::CompilerEngine::Target, std::optional<std::shared_ptr<mlir::concretelang::CompilerEngine::Library>>) + 2214
12 libConcretelangBindingsPythonCAPI.so          0x00007f2adaf2930c mlir::concretelang::CompilerEngine::compile(llvm::SourceMgr&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, bool, bool, bool, bool) + 556
13 libConcretelangBindingsPythonCAPI.so          0x00007f2ad90c932c
14 libConcretelangBindingsPythonCAPI.so          0x00007f2ad90cb9fb library_compile(LibrarySupport_Py, char const*, mlir::concretelang::CompilationOptions) + 283
15 _concretelang.cpython-310-x86_64-linux-gnu.so 0x00007f2ad5bbc707
16 _concretelang.cpython-310-x86_64-linux-gnu.so 0x00007f2ad5b9e98d
17 _concretelang.cpython-310-x86_64-linux-gnu.so 0x00007f2ad5b7ad27
18 libpython3.10.so.1.0                          0x00007f2ae1e1f3fd
19 libpython3.10.so.1.0                          0x00007f2ae1e1c704 _PyObject_MakeTpCall + 116
20 libpython3.10.so.1.0                          0x00007f2ae1e252a9
21 libpython3.10.so.1.0                          0x00007f2ae1e19a5b _PyEval_EvalFrameDefault + 13979
22 libpython3.10.so.1.0                          0x00007f2ae1e15a9a
23 libpython3.10.so.1.0                          0x00007f2ae1e169f7 _PyEval_EvalFrameDefault + 1591
24 libpython3.10.so.1.0                          0x00007f2ae1e15a9a
25 libpython3.10.so.1.0                          0x00007f2ae1e19a5b _PyEval_EvalFrameDefault + 13979
26 libpython3.10.so.1.0                          0x00007f2ae1e15a9a
27 libpython3.10.so.1.0                          0x00007f2ae1e169f7 _PyEval_EvalFrameDefault + 1591
28 libpython3.10.so.1.0                          0x00007f2ae1e15a9a
29 libpython3.10.so.1.0                          0x00007f2ae1e1c12f _PyObject_FastCallDictTstate + 159
30 libpython3.10.so.1.0                          0x00007f2ae1e242c0
31 libpython3.10.so.1.0                          0x00007f2ae1e1c8b7
32 libpython3.10.so.1.0                          0x00007f2ae1e1c704 _PyObject_MakeTpCall + 116
33 libpython3.10.so.1.0                          0x00007f2ae1e19b6d _PyEval_EvalFrameDefault + 14253
34 libpython3.10.so.1.0                          0x00007f2ae1e15a9a
35 libpython3.10.so.1.0                          0x00007f2ae1e169f7 _PyEval_EvalFrameDefault + 1591
36 libpython3.10.so.1.0                          0x00007f2ae1e15a9a
37 libpython3.10.so.1.0                          0x00007f2ae1e6a000 PyEval_EvalCode + 144
38 libpython3.10.so.1.0                          0x00007f2ae1e8c343
39 libpython3.10.so.1.0                          0x00007f2ae1e89cea
40 libpython3.10.so.1.0                          0x00007f2ae1dfdc7d
41 libpython3.10.so.1.0                          0x00007f2ae1dfddf2 _PyRun_InteractiveLoopObject + 193
42 libpython3.10.so.1.0                          0x00007f2ae1d4aaed
43 libpython3.10.so.1.0                          0x00007f2ae1e889cf PyRun_AnyFileExFlags + 63
44 libpython3.10.so.1.0                          0x00007f2ae1e883d5 Py_RunMain + 901
45 libpython3.10.so.1.0                          0x00007f2ae1e5f247 Py_BytesMain + 55
46 libc.so.6                                     0x00007f2ae1af418a
47 libc.so.6                                     0x00007f2ae1af4245 __libc_start_main + 133
48 python3                                       0x000055a132eac071 _start + 33
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
bcm-at-zama commented 4 months ago

Hello, could you try with 2.4, please? Normally, we should even be with 2.5 but we've certainly had an issue about docker delivery, we're going to have a look.

bcm-at-zama commented 4 months ago

By the way: any reason not to use native builds? It's certainly better, for test coverage and speed, to use native builds, if you can

bcm-at-zama commented 4 months ago

Any news @darren?

bcm-at-zama commented 4 months ago

No news, I close it. Please reopen if needed