gramineproject / gramine

A library OS for Linux multi-process applications, with Intel SGX support
GNU Lesser General Public License v3.0
551 stars 184 forks source link

Cannot import concrete-ml library in python #1924

Closed thempp66 closed 2 days ago

thempp66 commented 3 days ago

Description of the problem

Error when import concrete-ml library lib addr: https://github.com/zama-ai/concrete-ml

Steps to reproduce

1.download and use gramine v1.7 docker image 2.install pip 3.install lib install pip install -U pip wheel setuptools && pip install concrete-ml 4.make and run the below using SGX

from concrete.ml.sklearn import LogisticRegression as cc_LogisticRegression

Expected results

no error

Actual results

root@e9ed73f556f8:/repo/gramine/CI-Examples/python# make SGX=1
gramine-manifest \
        -Dlog_level=error \
        -Darch_libdir=/lib/x86_64-linux-gnu \
        -Dentrypoint=/usr/bin/python3.8 \
        -Dra_type=none \
        -Dra_client_spid= \
        -Dra_client_linkable=0 \
        python.manifest.template >python.manifest
gramine-sgx-sign \
        --manifest python.manifest \
        --output python.manifest.sgx
Attributes (required for enclave measurement):
    size:        0x40000000
    edmm:        False
    max_threads: 32
SGX remote attestation:
    None
Memory:
    000000003f75f000-0000000040000000 [REG:R--] (manifest) measured
    000000003f65f000-000000003f75f000 [REG:RW-] (ssa) measured
    000000003f63f000-000000003f65f000 [TCS:---] (tcs) measured
    000000003f61f000-000000003f63f000 [REG:RW-] (tls) measured
    000000003f5df000-000000003f61f000 [REG:RW-] (stack) measured
    000000003f59f000-000000003f5df000 [REG:RW-] (stack) measured
    000000003f55f000-000000003f59f000 [REG:RW-] (stack) measured
    000000003f51f000-000000003f55f000 [REG:RW-] (stack) measured
    000000003f4df000-000000003f51f000 [REG:RW-] (stack) measured
    000000003f49f000-000000003f4df000 [REG:RW-] (stack) measured
    000000003f45f000-000000003f49f000 [REG:RW-] (stack) measured
    000000003f41f000-000000003f45f000 [REG:RW-] (stack) measured
    000000003f3df000-000000003f41f000 [REG:RW-] (stack) measured
    000000003f39f000-000000003f3df000 [REG:RW-] (stack) measured
    000000003f35f000-000000003f39f000 [REG:RW-] (stack) measured
    000000003f31f000-000000003f35f000 [REG:RW-] (stack) measured
    000000003f2df000-000000003f31f000 [REG:RW-] (stack) measured
    000000003f29f000-000000003f2df000 [REG:RW-] (stack) measured
    000000003f25f000-000000003f29f000 [REG:RW-] (stack) measured
    000000003f21f000-000000003f25f000 [REG:RW-] (stack) measured
    000000003f1df000-000000003f21f000 [REG:RW-] (stack) measured
    000000003f19f000-000000003f1df000 [REG:RW-] (stack) measured
    000000003f15f000-000000003f19f000 [REG:RW-] (stack) measured
    000000003f11f000-000000003f15f000 [REG:RW-] (stack) measured
    000000003f0df000-000000003f11f000 [REG:RW-] (stack) measured
    000000003f09f000-000000003f0df000 [REG:RW-] (stack) measured
    000000003f05f000-000000003f09f000 [REG:RW-] (stack) measured
    000000003f01f000-000000003f05f000 [REG:RW-] (stack) measured
    000000003efdf000-000000003f01f000 [REG:RW-] (stack) measured
    000000003ef9f000-000000003efdf000 [REG:RW-] (stack) measured
    000000003ef5f000-000000003ef9f000 [REG:RW-] (stack) measured
    000000003ef1f000-000000003ef5f000 [REG:RW-] (stack) measured
    000000003eedf000-000000003ef1f000 [REG:RW-] (stack) measured
    000000003ee9f000-000000003eedf000 [REG:RW-] (stack) measured
    000000003ee5f000-000000003ee9f000 [REG:RW-] (stack) measured
    000000003ee1f000-000000003ee5f000 [REG:RW-] (stack) measured
    000000003ee0f000-000000003ee1f000 [REG:RW-] (sig_stack) measured
    000000003edff000-000000003ee0f000 [REG:RW-] (sig_stack) measured
    000000003edef000-000000003edff000 [REG:RW-] (sig_stack) measured
    000000003eddf000-000000003edef000 [REG:RW-] (sig_stack) measured
    000000003edcf000-000000003eddf000 [REG:RW-] (sig_stack) measured
    000000003edbf000-000000003edcf000 [REG:RW-] (sig_stack) measured
    000000003edaf000-000000003edbf000 [REG:RW-] (sig_stack) measured
    000000003ed9f000-000000003edaf000 [REG:RW-] (sig_stack) measured
    000000003ed8f000-000000003ed9f000 [REG:RW-] (sig_stack) measured
    000000003ed7f000-000000003ed8f000 [REG:RW-] (sig_stack) measured
    000000003ed6f000-000000003ed7f000 [REG:RW-] (sig_stack) measured
    000000003ed5f000-000000003ed6f000 [REG:RW-] (sig_stack) measured
    000000003ed4f000-000000003ed5f000 [REG:RW-] (sig_stack) measured
    000000003ed3f000-000000003ed4f000 [REG:RW-] (sig_stack) measured
    000000003ed2f000-000000003ed3f000 [REG:RW-] (sig_stack) measured
    000000003ed1f000-000000003ed2f000 [REG:RW-] (sig_stack) measured
    000000003ed0f000-000000003ed1f000 [REG:RW-] (sig_stack) measured
    000000003ecff000-000000003ed0f000 [REG:RW-] (sig_stack) measured
    000000003ecef000-000000003ecff000 [REG:RW-] (sig_stack) measured
    000000003ecdf000-000000003ecef000 [REG:RW-] (sig_stack) measured
    000000003eccf000-000000003ecdf000 [REG:RW-] (sig_stack) measured
    000000003ecbf000-000000003eccf000 [REG:RW-] (sig_stack) measured
    000000003ecaf000-000000003ecbf000 [REG:RW-] (sig_stack) measured
    000000003ec9f000-000000003ecaf000 [REG:RW-] (sig_stack) measured
    000000003ec8f000-000000003ec9f000 [REG:RW-] (sig_stack) measured
    000000003ec7f000-000000003ec8f000 [REG:RW-] (sig_stack) measured
    000000003ec6f000-000000003ec7f000 [REG:RW-] (sig_stack) measured
    000000003ec5f000-000000003ec6f000 [REG:RW-] (sig_stack) measured
    000000003ec4f000-000000003ec5f000 [REG:RW-] (sig_stack) measured
    000000003ec3f000-000000003ec4f000 [REG:RW-] (sig_stack) measured
    000000003ec2f000-000000003ec3f000 [REG:RW-] (sig_stack) measured
    000000003ec1f000-000000003ec2f000 [REG:RW-] (sig_stack) measured
    000000003ebc5000-000000003ec15000 [REG:R-X] (code) measured
    000000003ec15000-000000003ec1f000 [REG:RW-] (data) measured
    0000000000010000-000000003ebc5000 [REG:RWX] (free)
Measurement:
    49508aa34f6e8488f1bb6ecb5e49e99c03160284641a6dd151a651cc33214c4c
root@e9ed73f556f8:/repo/gramine/CI-Examples/python# gramine-sgx ./python scripts/test-ml.py 
Gramine is starting. Parsing TOML manifest file, this may take some time...
-----------------------------------------------------------------------------------------------------------------------
Gramine detected the following insecure configurations:

  - sgx.debug = true                           (this is a debug enclave)
  - loader.insecure__use_cmdline_argv = true   (forwarding command-line args from untrusted host to the app)

Gramine will continue application execution, but this configuration must not be used in production!
-----------------------------------------------------------------------------------------------------------------------

Traceback (most recent call last):
  File "scripts/test-ml.py", line 26, in <module>
    from concrete.ml.sklearn import LogisticRegression as cc_LogisticRegression
  File "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/__init__.py", line 5, in <module>
    from ..common.debugging.custom_assert import assert_true
  File "/usr/local/lib/python3.8/dist-packages/concrete/ml/common/__init__.py", line 3, in <module>
    from . import check_inputs, debugging, utils
  File "/usr/local/lib/python3.8/dist-packages/concrete/ml/common/utils.py", line 12, in <module>
    import torch
  File "/usr/local/lib/python3.8/dist-packages/torch/__init__.py", line 218, in <module>
    from torch._C import *  # noqa: F403
ImportError: libtorch_cuda_cpp.so: failed to map segment from shared object

Gramine commit hash

10e93534169802be16fc9e2b3e9ac70d08efcb41

dimakuv commented 3 days ago

ImportError: libtorch_cuda_cpp.so: failed to map segment from shared object

First of all, why does it import CUDA? CUDA is used for GPUs, and Intel SGX (and Gramine) do not support GPUs. So I think you need to specify somehow that you want to use the CPU-only mode.

Second, if you want to know the details of why things break, use loader.log_level = "all" in the manifest file and check the resulting Gramine log. You can also copy-paste or attach the log here.

thempp66 commented 3 days ago

ImportError: libtorch_cuda_cpp.so: failed to map segment from shared object

First of all, why does it import CUDA? CUDA is used for GPUs, and Intel SGX (and Gramine) do not support GPUs. So I think you need to specify somehow that you want to use the CPU-only mode.

Second, if you want to know the details of why things break, use loader.log_level = "all" in the manifest file and check the resulting Gramine log. You can also copy-paste or attach the log here.

Thanks for your reply.

  1. I'm not sure about it. But is it possible to use Intel SGX with CUDA in NVIDIA H100 GPU? I'd like to use CUDA for some machine learning and FHE jobs.

2.Acturally, I found that the error occur when from torch._C import *. It seems that it cannot link .so lib. Below is the log. The log is long and I copy a part of it (tail).

(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xfe13188, 0x340) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x340
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- pread64(3, 0xfe12bb0, 0x310, 0x40) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from pread64(...) = 0x310
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xfe13020) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- pread64(3, 0xfe12c70, 0x310, 0x40) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from pread64(...) = 0x310
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0, 0xf6968b0, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0x0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x17969000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mprotect(0x17a28000, 0xf591000, PROT_NONE) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mprotect(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x17a28000, 0x5dd000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xbf000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x17a28000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x18005000, 0x8aa6000, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x69c000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x18005000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x20aab000, 0x5e13000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9141000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x20aab000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x268be000, 0x620bc8, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_FIXED, -1, 0x0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x268be000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x26edf000, 0x4c000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfbc2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x26edf000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x26f2b000, 0x47000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfc0e000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x26f2b000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x26f72000, 0x47000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfc55000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x26f72000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0x26fb9000, 0x47000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xfc9c000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0x26fb9000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_rtld.c:1045:register_library) [P1:T1:python3.8] debug: glibc register library /usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cuda_cpp.so loaded at 0x17969000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/lib/../../nvidia/cublas/lib/libtorch_cpu.so", O_RDONLY|0x80000, 0000) = -2
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/lib/../../nvidia/cudnn/lib/libtorch_cpu.so", O_RDONLY|0x80000, 0000) = -2
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/lib/../../nvidia/cuda_nvrtc/lib/libtorch_cpu.so", O_RDONLY|0x80000, 0000) = -2
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/lib/libtorch_cpu.so", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xfe13148, 0x340) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x340
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- pread64(3, 0xfe12b80, 0x310, 0x40) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from pread64(...) = 0x310
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xfe12fe0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- pread64(3, 0xfe12c30, 0x310, 0x40) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from pread64(...) = 0x310
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0, 0x1bdfc2e0, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0x0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = -12
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xf1d6000, 0x6188) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x3ae0000, 0x131f680) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xf1ca000, 0xbd70) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xf07f000, 0x6198) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xf052000, 0x2c218) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x17969000, 0xf6968b0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "scripts/test-ml.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xfe154a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xfe154e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xfe14f40) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xf7da9a0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x16
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xf7da9a0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xedc5ef0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x16
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xedc5f30, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/__init__.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xfe154a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xfe154e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xfe14f40) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xf7da9a0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xedc5f30, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xedc7f60, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- write(2, 0xf7cf690, 0x138) ...
Traceback (most recent call last):
  File "scripts/test-ml.py", line 1, in <module>
    from torch._C import *
  File "/usr/local/lib/python3.8/dist-packages/torch/__init__.py", line 218, in <module>
    from torch._C import *  # noqa: F403
ImportError: libtorch_cpu.so: failed to map segment from shared object
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from write(...) = 0x138
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- rt_sigaction([SIGINT], 0xfe16970, 0xfe16a10, 0x8) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xf10a000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xf18a000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xf14a000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- sigaltstack(0, 0xfe16c00) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- sigaltstack(0x955d10, 0) = 0x0
(libos_exit.c:212:libos_syscall_exit_group) [P1:T1:python3.8] debug: ---- exit_group (returning 1)
(libos_fs_lock.c:785:file_lock_clear_pid) [P1:T1:python3.8] debug: clearing file (POSIX) locks for pid 1
(libos_sync_client.c:331:shutdown_sync_client) [P1:T1:python3.8] debug: sync client shutdown: closing handles
(libos_sync_client.c:346:shutdown_sync_client) [P1:T1:python3.8] debug: sync client shutdown: waiting for confirmation
(libos_sync_client.c:359:shutdown_sync_client) [P1:T1:python3.8] debug: sync client shutdown: finished
(libos_ipc_worker.c:285:ipc_worker_main) [P1:libos] debug: IPC worker: exiting worker thread
(libos_exit.c:58:libos_clean_and_exit) [P1:T1:python3.8] debug: process 1 exited with status 1
(pal_process.c:248:_PalProcessExit) debug: PalProcessExit: Returning exit code 1
dimakuv commented 2 days ago

But is it possible to use Intel SGX with CUDA in NVIDIA H100 GPU?

No, it is not possible as of today. (Not without special modifications to all parts of the SW stack, that is...)

Acturally, I found that the error occur when from torch._C import *. It seems that it cannot link .so lib.

The log shows -12 error code, which is "Not enough memory" for mmap(). This means that your workload is bigger than your sgx.enclave_size. Please increase the enclave size in the manifest and try again.

thempp66 commented 2 days ago

Thanks, @dimakuv . It works when I add sgx.enclave_size to 4G. The lib can be imported now. But it occur a new error. The error said perrmission deined when open file. But my code dose not open any file. Could you give me some tips to solve this problem?

My code:

from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
import time

# data pre-process
x, y = make_classification(n_samples=100, class_sep=2, n_features=30, random_state=42)
X_train, X_test, y_train, y_test = train_test_split(
    x, y, test_size=0.2, random_state=42
)

################################################################################################

# train
start_time = time.time()
model = LogisticRegression()
model.fit(X_train, y_train)
print("LogisticRegression train timecost(ms) : ", (time.time() - start_time) * 1000)

# inference
start_time = time.time()
result = model.predict(X_test)
# print("result : ", result)
print("LogisticRegression predict timecost(ms) : ", (time.time() - start_time) * 1000)

from concrete.ml.sklearn import LogisticRegression as cc_LogisticRegression
print("import succ")

# Lets create a synthetic data-set
start_time = time.time()
model = cc_LogisticRegression(n_bits=8)
model.fit(X_train, y_train)
model.compile(X_train)
print("cc_LogisticRegression train timecost(ms) : ", (time.time() - start_time) * 1000)

start_time = time.time()
result = model.predict(X_test, fhe="execute")
# print("result : ", result)
print("cc_LogisticRegression predict timecost(ms) : ", (time.time() - start_time) * 1000)

Log:

(libos_async.c:122:install_async_event) [P1:T16:python3.8] debug: Installed async event at 1719409436442117
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_parser.c:1658:buf_write_all) [P1:T13:python3.8] trace: ,SIGPWR,SIGSYS,SIG32,SIG34,SIG35,SIG36,SIG37,SIG38,SIG39,SIG40,SIG41,SIG42,SIG43,SIG44,SIG45,SIG46,SIG47,SIG48,SIG49,SIG50,SIG51,SIG52,SIG53,SIG54,SIG55,SIG56,SIG57,SIG58,SIG59,SIG60,SIG61,SIG62,SIG63,SIG64,], NULL, 0x8) = 0x0
,SIG63,SIG64,], NULL, 0x8) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T14:python3.8] trace: ---- madvise(0xb0bfd000, 0x1fb000, MADV_DONTNEED) = 0x0
(libos_exit.c:222:libos_syscall_exit) [P1:T14:python3.8] debug: ---- exit (returning 0)
(libos_parser.c:1658:buf_write_all) [P1:T13:python3.8] trace: ---- madvise(0xb2dfe000, 0x1fb000, MADV_DONTNEED) = 0x0
(libos_futex.c:755:_libos_syscall_futex) [P1:T1:python3.8] warning: Ignoring FUTEX_CLOCK_REALTIME flag
(libos_exit.c:222:libos_syscall_exit) [P1:T13:python3.8] debug: ---- exit (returning 0)
(libos_async.c:122:install_async_event) [P1:T15:python3.8] debug: Installed async event at 1719409436441633
(libos_async.c:122:install_async_event) [P1:T17:python3.8] debug: Installed async event at 1719409436442075
(libos_futex.c:759:_libos_syscall_futex) [P1:T1:python3.8] warning: Non-private futexes are not supported, assuming implicit FUTEX_PRIVATE_FLAG
(libos_async.c:122:install_async_event) [P1:T14:python3.8] debug: Installed async event at 1719409436443170
(libos_async.c:122:install_async_event) [P1:T13:python3.8] debug: Installed async event at 1719409436443204
(libos_parser.c:1658:buf_write_all) [P1:T19:python3.8] trace: ---- futex(0xc78b8cc, FUTEX_PRIVATE|FUTEX_WAIT, 0, 0, 0xbc8d6c0, 0) ...
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from futex(...) = 0x0
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- futex(0xb2ffe990, FUTEX_CLOCK_REALTIME|FUTEX_WAIT_BITSET, 13, 0, 0, -1) ...
(libos_futex.c:755:_libos_syscall_futex) [P1:T1:python3.8] warning: Ignoring FUTEX_CLOCK_REALTIME flag
(libos_futex.c:759:_libos_syscall_futex) [P1:T1:python3.8] warning: Non-private futexes are not supported, assuming implicit FUTEX_PRIVATE_FLAG
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from futex(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- getrandom(0xd92b050, 0x10, 0) = 0x10
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- futex(0xb6cb41e0, FUTEX_PRIVATE|FUTEX_WAKE, 2147483647, 0, 0xca, 1) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from futex(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T21:python3.8] trace: ---- futex(0xc78b8cc, FUTEX_PRIVATE|FUTEX_WAIT, 0, 0, 0, 0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- brk(0x1870000) = 0x184f000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0, 0x100000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0xc4d2000
(libos_parser.c:1658:buf_write_all) [P1:T20:python3.8] trace: ---- futex(0xc78b8cc, FUTEX_PRIVATE|FUTEX_WAIT, 0, 0, 0xba8c6c0, 0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- brk(0x1870000) = 0x184f000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- mmap(0, 0x100000, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0x0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from mmap(...) = 0xb58b000
(pal_files.c:108:file_open) warning: Disallowing access to file '1e2bd1aef93b4e43884135ca8ed83eab.onnx'; file is not trusted or allowed.
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "1e2bd1aef93b4e43884135ca8ed83eab.onnx", O_WRONLY|O_CREAT|O_TRUNC|0x80000, 0666) = -13
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- write(1, 0xb6f99680, 0x86) ...
LogisticRegression train timecost(ms) :  4.237651824951172
LogisticRegression predict timecost(ms) :  0.13399124145507812
import succ
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from write(...) = 0x86
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "scripts/test-ml.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x54e
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x54e
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/convert.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1726
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/convert.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1726
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/convert.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/_topology.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/onnx/utils.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/onnx/utils.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb612410, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- openat(AT_FDCWD, "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", O_RDONLY|0x80000, 0000) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(3, 0xb75e14a0) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- ioctl(3, TCGETS, 0xb75e14e0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from ioctl(...) = -25
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_CUR) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(3, OP 1030, 0) = 0x4
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fcntl(4, F_GETFL, 0x7fbf11) = 0x80000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- fstat(4, 0xb75e0f10) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(4, 0xb6123f0, 0x1000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x1000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(4) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- lseek(3, 0x0, SEEK_SET) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- read(3, 0xb7004ac0, 0x2000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from read(...) = 0x2000
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- close(3) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- write(2, 0xb6f9b690, 0x7ec) ...
Traceback (most recent call last):
  File "scripts/test-ml.py", line 32, in <module>
    model.fit(X_train, y_train)
  File "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", line 784, in fit
    return super().fit(X, y, **fit_parameters)  # type: ignore[safe-super]
  File "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", line 1706, in fit
    return self._quantize_model(X)
  File "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", line 1723, in _quantize_model
    self._set_onnx_model(X)
  File "/usr/local/lib/python3.8/dist-packages/concrete/ml/sklearn/base.py", line 1677, in _set_onnx_model
    self.onnx_model_ = hb_convert(
  File "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/convert.py", line 444, in convert
    return _convert_common(model, backend, test_input, device, extra_config)
  File "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/convert.py", line 405, in _convert_common
    return _convert_sklearn(model, backend_formatted, test_input, device, extra_config)
  File "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/convert.py", line 111, in _convert_sklearn
    hb_model = topology_converter(topology, backend, test_input, device, extra_config=extra_config)
  File "/usr/local/lib/python3.8/dist-packages/hummingbird/ml/_topology.py", line 265, in convert
    torch.onnx.export(
  File "/usr/local/lib/python3.8/dist-packages/torch/onnx/utils.py", line 504, in export
    _export(
  File "/usr/local/lib/python3.8/dist-packages/torch/onnx/utils.py", line 1604, in _export
    with torch.serialization._open_file_like(f, "wb") as opened_file:
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 270, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 251, in __init__
    super(_open_file, self).__init__(open(name, mode))
PermissionError: [Errno 13] Permission denied: '1e2bd1aef93b4e43884135ca8ed83eab.onnx'
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from write(...) = 0x7ec
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- rt_sigaction([SIGINT], 0xb75e2970, 0xb75e2a10, 0x8) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14b00000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x120d8000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x144c0000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14100000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14480000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x145c0000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x141c0000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14780000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14940000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14900000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14800000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x147c0000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14140000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x13dc0000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x12218000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x13e00000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x11fd8000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14680000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x12198000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x121d8000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14640000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x13d80000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x12098000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x12058000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x11f58000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x12158000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14880000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14380000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14b80000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x12018000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14b40000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x11f98000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14440000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x12118000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0x14c00000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xc612000, 0x40000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- sigaltstack(0, 0xb75e2c00) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- futex(0xc78b8cc, FUTEX_PRIVATE|FUTEX_WAKE, 2147483647, 0xda34, 0x6dc732e0, 0) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from futex(...) = 0x3
(libos_parser.c:1658:buf_write_all) [P1:T21:python3.8] trace: ---- return from futex(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- futex(0xbc8d990, FUTEX_CLOCK_REALTIME|FUTEX_WAIT_BITSET, 19, 0, 0, -1) ...
(libos_parser.c:1658:buf_write_all) [P1:T19:python3.8] trace: ---- return from futex(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T21:python3.8] trace: ---- rt_sigprocmask(BLOCK, [SIGHUP,SIGINT,SIGQUIT,SIGILL,SIGTRAP,SIGABRT,SIGBUS,SIGFPE,SIGKILL,SIGUSR1,SIGSEGV,SIGUSR2,SIGPIPE,SIGALRM,SIGTERM,SIGSTKFLT,SIGCHLD,SIGCONT,SIGSTOP,SIGTSTP,SIGTTIN,S(libos_parser.c:1658:buf_write_all) [P1:T19:python3.8] trace: ---- rt_sigprocmask(BLOCK, [SIGHUP,SIGINT,SIGQUIT,SIGILL,SIGTRAP,SIGABRT,SIGBUS,SIGFPE,SIGKILL,SIGUSR1,SIGSEGV,SIGUSR2,SIGPIPE,SIGALRM,SIGTERM,SIGSTKFLT,SIGCHLD,SIGCONT,SIGSTOP,SIGTSTP,SIGTTIN,SIGTTOU,SIGURG,SIGXCPU,SIGXFSZ,SIGVTALRM,SIGPROF,SIGWINCH,SIGIO
(libos_parser.c:1658:buf_write_all) [P1:T20:python3.8] trace: ---- return from futex(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T19:python3.8] trace: ,SIGPWR,SIGSYS,SIG32,SIG34,SIG35,SIG36,SIG37,SIG38,SIG39,SIG40,SIG41,SIG42,SIG43,SIG44,SIG45,SIG46,SIG47,SIG48,SIG49,SIG50,SIG51,SIG52,SIG53,SIG54,SIG55,SIG56,SIG57,SIG58,SIG59,SIG60,SIG61,SIG62(libos_futex.c:755:_libos_syscall_futex) [P1:T1:python3.8] warning: Ignoring FUTEX_CLOCK_REALTIME flag
(libos_futex.c:759:_libos_syscall_futex) [P1:T1:python3.8] warning: Non-private futexes are not supported, assuming implicit FUTEX_PRIVATE_FLAG
IGTTOU,SIGURG,SIGXCPU,SIGXFSZ,SIGVTALRM,SIGPROF,SIGWINCH,SIGIO
,SIG63,SIG64,], NULL, 0x8) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T20:python3.8] trace: ---- rt_sigprocmask(BLOCK, [SIGHUP,SIGINT,SIGQUIT,SIGILL,SIGTRAP,SIGABRT,SIGBUS,SIGFPE,SIGKILL,SIGUSR1,SIGSEGV,SIGUSR2,SIGPIPE,SIGALRM,SIGTERM,SIGSTKFLT,SIGCHLD,SIGCONT,SIGSTOP,SIGTSTP,SIGTTIN,SIGTTOU,SIGURG,SIGXCPU,SIGXFSZ,SIGVTALRM,SIGPROF,SIGWINCH,SIGIO
(libos_parser.c:1658:buf_write_all) [P1:T21:python3.8] trace: ,SIGPWR,SIGSYS,SIG32,SIG34,SIG35,SIG36,SIG37,SIG38,SIG39,SIG40,SIG41,SIG42,SIG43,SIG44,SIG45,SIG46,SIG47,SIG48,SIG49,SIG50,SIG51,SIG52,SIG53,SIG54,SIG55,SIG56,SIG57,SIG58,SIG59,SIG60,SIG61,SIG62,SIG63,SIG64,], NULL, 0x8) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T20:python3.8] trace: ,SIGPWR,SIGSYS,SIG32,SIG34,SIG35,SIG36,SIG37,SIG38,SIG39,SIG40,SIG41,SIG42,SIG43,SIG44,SIG45,SIG46,SIG47,SIG48,SIG49,SIG50,SIG51,SIG52,SIG53,SIG54,SIG55,SIG56,SIG57,SIG58,SIG59,SIG60,SIG61,SIG62,SIG63,SIG64,], NULL, 0x8) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T19:python3.8] trace: ---- madvise(0xba8d000, 0x1fb000, MADV_DONTNEED) = 0x0
(libos_exit.c:222:libos_syscall_exit) [P1:T19:python3.8] debug: ---- exit (returning 0)
(libos_parser.c:1658:buf_write_all) [P1:T20:python3.8] trace: ---- madvise(0xb88c000, 0x1fb000, MADV_DONTNEED) = 0x0
(libos_exit.c:222:libos_syscall_exit) [P1:T20:python3.8] debug: ---- exit (returning 0)
(libos_parser.c:1658:buf_write_all) [P1:T21:python3.8] trace: ---- madvise(0xb68b000, 0x1fb000, MADV_DONTNEED) = 0x0
(libos_exit.c:222:libos_syscall_exit) [P1:T21:python3.8] debug: ---- exit (returning 0)
(libos_async.c:122:install_async_event) [P1:T19:python3.8] debug: Installed async event at 1719409436821087
(libos_async.c:122:install_async_event) [P1:T21:python3.8] debug: Installed async event at 1719409436821116
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_async.c:327:libos_async_worker) [P1:libos] debug: Thread exited, cleaning up
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from futex(...) = 0x0
(libos_async.c:122:install_async_event) [P1:T20:python3.8] debug: Installed async event at 1719409436821087
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- futex(0xba8c990, FUTEX_CLOCK_REALTIME|FUTEX_WAIT_BITSET, 20, 0, 0, -1) ...
(libos_futex.c:755:_libos_syscall_futex) [P1:T1:python3.8] warning: Ignoring FUTEX_CLOCK_REALTIME flag
(libos_futex.c:759:_libos_syscall_futex) [P1:T1:python3.8] warning: Non-private futexes are not supported, assuming implicit FUTEX_PRIVATE_FLAG
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from futex(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- futex(0xb88b990, FUTEX_CLOCK_REALTIME|FUTEX_WAIT_BITSET, 21, 0, 0, -1) ...
(libos_futex.c:755:_libos_syscall_futex) [P1:T1:python3.8] warning: Ignoring FUTEX_CLOCK_REALTIME flag
(libos_futex.c:759:_libos_syscall_futex) [P1:T1:python3.8] warning: Non-private futexes are not supported, assuming implicit FUTEX_PRIVATE_FLAG
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from futex(...) = -11
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xb0dfe000, 0x2000000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xaebfd000, 0x2000000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xacbfd000, 0x2000000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xa7800000, 0x2000000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xa5800000, 0x2000000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- munmap(0xa3800000, 0x2000000) ...
(libos_parser.c:1658:buf_write_all) [P1:T1:python3.8] trace: ---- return from munmap(...) = 0x0
(libos_exit.c:212:libos_syscall_exit_group) [P1:T1:python3.8] debug: ---- exit_group (returning 1)
(libos_fs_lock.c:785:file_lock_clear_pid) [P1:T1:python3.8] debug: clearing file (POSIX) locks for pid 1
(libos_sync_client.c:331:shutdown_sync_client) [P1:T1:python3.8] debug: sync client shutdown: closing handles
(libos_sync_client.c:346:shutdown_sync_client) [P1:T1:python3.8] debug: sync client shutdown: waiting for confirmation
(libos_sync_client.c:359:shutdown_sync_client) [P1:T1:python3.8] debug: sync client shutdown: finished
(libos_ipc_worker.c:285:ipc_worker_main) [P1:libos] debug: IPC worker: exiting worker thread
(libos_async.c:354:libos_async_worker) [P1:libos] debug: Async worker thread terminated
(libos_exit.c:58:libos_clean_and_exit) [P1:T1:python3.8] debug: process 1 exited with status 1
(pal_process.c:248:_PalProcessExit) debug: PalProcessExit: Returning exit code 1
thempp66 commented 2 days ago

The issue is solved. I will open a new one.