fionser / PrivateDecisionTree

Privacy-preserving Decision Tree Evaluation
5 stars 4 forks source link

Error #2

Open kotainage opened 4 years ago

kotainage commented 4 years ago

Hello, I am interested in testing the project on my machine and I can build the program(ubuntsu18.04 , g++ 6.5.0, boost1.65.1.0, NTL 10.5.0),but there are some errors about NTL as follows(two examples).

1. Thread 4 "main" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff55d5700 (LWP 17932)] NTL::FFT (A=0x7fffdc0810e0, a=0x7fffdc0810e0, k=12, info=..., dir=0) at FFT.cpp:2078 2078 if (!info.bigtab || k > NTL_FFT_BIGTAB_MAXROOT) { (gdb) bt

0 NTL::FFT (A=0x7fffdc0810e0, a=0x7fffdc0810e0, k=12, info=..., dir=0) at FFT.cpp:2078

1 0x0000555555637e55 in Cmodulus::FFT_aux(NTL::Vec&, NTL::zz_pX&) const ()

2 0x00005555556380b4 in Cmodulus::FFT(NTL::Vec&, NTL::ZZX const&) const ()

3 0x00005555555ec5b2 in DoubleCRT::FFT(NTL::ZZX const&, IndexSet const&) ()

4 0x00005555555f1a00 in DoubleCRT::DoubleCRT(NTL::ZZX const&, FHEcontext const&, IndexSet const&) ()

5 0x00005555555cc780 in PPDTServer::Imp::sum_up_paths(FHEPubKey const&) [clone ._omp_fn.0] ()

6 0x00007ffff6dfb95e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1

7 0x00007ffff7bbd6db in start_thread (arg=0x7ffff55d5700) at pthread_create.c:463

8 0x00007ffff68fd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

2. Thread 6 "main" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff45d3700 (LWP 17980)] NTL::LazyMulModPrecon (bninv=4194304, n=4398046150657, b=<error reading variable: Cannot access memory at address 0x0>, a=11403146259202330154) at FFT.cpp:1278 1278 unsigned long res = ab - qn; (gdb) bt

0 NTL::LazyMulModPrecon (bninv=4194304, n=4398046150657,

b=<error reading variable: Cannot access memory at address 0x0>, a=11403146259202330154)
at FFT.cpp:1278

1 NTL::FFT (A=0x7fffe40391f0, a=, k=, info=..., dir=)

at FFT.cpp:2208

2 0x0000555555637e55 in Cmodulus::FFT_aux(NTL::Vec&, NTL::zz_pX&) const ()

3 0x00005555556380b4 in Cmodulus::FFT(NTL::Vec&, NTL::ZZX const&) const ()

4 0x00005555555ec5b2 in DoubleCRT::FFT(NTL::ZZX const&, IndexSet const&) ()

5 0x00005555555f1a00 in DoubleCRT::DoubleCRT(NTL::ZZX const&, FHEcontext const&, IndexSet const&) ()

6 0x00005555555dde93 in Ctxt::multByConstant(NTL::ZZX const&, double) ()

7 0x00005555555cb69d in PPDTServer::Imp::randomize(long) [clone ._omp_fn.1] ()

8 0x00007ffff6dfb95e in ?? () from /usr/lib/x86_64-linux-gnu/libgomp.so.1

9 0x00007ffff7bbd6db in start_thread (arg=0x7ffff45d3700) at pthread_create.c:463

10 0x00007ffff68fd88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Please give me some ideas to fix this.

fionser commented 4 years ago

It seems the multi-thread issues. Try.

  1. build NTL with NTL_THRADS=OFF
  2. turn off HELib 's multi-threading this