milvus-io / milvus

A cloud-native vector database, storage for next generation AI applications
https://milvus.io
Apache License 2.0
29.39k stars 2.82k forks source link

[Bug]: Container build fails on M1 Mac #35329

Closed sanjayk-github-dev closed 1 week ago

sanjayk-github-dev commented 1 month ago

Is there an existing issue for this?

Environment

- Milvus version: v2.4.6
- Deployment mode(standalone or cluster): standalone
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): Ubuntu
- CPU/Memory: 
- GPU: 
- Others: M1 Mac, Sonoma 14.5

Current Behavior

I checked out the milvus repo for tag v2.4.6 and then executed the following commands (on M1 Mac):

./scripts/devcontainer.sh up
docker exec -ti milvus-builder-1 bash
make milvus

The build failed.

Expected Behavior

A successful build.

Steps To Reproduce

./scripts/devcontainer.sh up
docker exec -ti milvus-builder-1 bash
make milvus

Milvus Log

The build failed with the following error:

...
[100%] Linking CXX shared library ../../gnu_9.4_cxx11_64_release/libtbb.so
make[4]: *** write jobserver: Bad file descriptor.  Stop.
make[4]: *** Waiting for unfinished jobs....
make[4]: *** write jobserver: Bad file descriptor.  Stop.
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [src/tbb/CMakeFiles/tbb.dir/build.make:530: gnu_9.4_cxx11_64_release/libtbb.so.12.9] Error 1
make[3]: Leaving directory '/home/milvus/.conan/data/onetbb/2021.9.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release'
make[2]: *** [CMakeFiles/Makefile2:134: src/tbb/CMakeFiles/tbb.dir/all] Error 2
make[2]: Leaving directory '/home/milvus/.conan/data/onetbb/2021.9.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release'
make[1]: *** [Makefile:156: all] Error 2
make[1]: Leaving directory '/home/milvus/.conan/data/onetbb/2021.9.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release'
onetbb/2021.9.0: 
onetbb/2021.9.0: ERROR: Package '2d40c058a87ec4fe9054f14169fd22dc815d0b62' build failed
onetbb/2021.9.0: WARN: Build folder /home/milvus/.conan/data/onetbb/2021.9.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release
ERROR: onetbb/2021.9.0: Error in build() method, line 143
        cmake.build()
        ConanException: Error 2 while executing cmake --build "/home/milvus/.conan/data/onetbb/2021.9.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release" '--' '-j10'
conan install failed
make: *** [Makefile:213: build-3rdparty] Error 1

Anything else?

I then changed IMAGE_ARCH in the .env file to arm64 (since I'm running it on M1 Mac) and repeated the above steps. This crashed the Docker Desktop with the following stack trace.

fatal error reported: Linux kernel v6.10 crash on virtualization.framework

[ 1783.946023] Internal error: Oops - BUG: 00000000f2000800 [#1] SMP
[ 1783.946214] Modules linked in: shiftfs(O) selfowner(O) rosetta(O) grpcfuse(O) fakeowner(O)
[ 1783.946399] CPU: 9 PID: 854 Comm: jemalloc_bg_thd Tainted: G           O       6.10.0-linuxkit #1
[ 1783.946509] pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[ 1783.946713] pc : filp_flush+0x8c/0x98
[ 1783.946923] lr : filp_flush+0x8c/0x98
[ 1783.947025] sp : ffff0000cb947b20
[ 1783.947095] x29: ffff0000cb947b20 x28: ffff0000c0dd30c0 x27: 0000000000000009
[ 1783.947217] x26: 0000000000000000 x25: 0000000000000001 x24: ffff0000c2c3ec00
[ 1783.947402] x23: 0000000000000000 x22: ffff0000c2c3ec28 x21: 0000000000000000
[ 1783.947543] x20: ffff0000c2554b00 x19: 000000000000001f x18: ffffffffffffffff
[ 1783.947666] x17: 0000000000000000 x16: ffff8000813422b0 x15: ffff0000cb947240
[ 1783.947786] x14: 0000000000000000 x13: 293078303d706f5f x12: 6628203020736920
[ 1783.947934] x11: 746e756f6320656c x10: ffff800082253908 x9 : ffff8000801ae9ec
[ 1783.948084] x8 : 00000000ffffefff x7 : ffff800082250890 x6 : 0000000000000205
[ 1783.948227] x5 : ffff00081b9de688 x4 : 0000000000000000 x3 : 0000000000000000
[ 1783.948612] x2 : 0000000000000000 x1 : ffff0000c0dd30c0 x0 : 0000000000000026
[ 1783.948752] Call trace:
[ 1783.948806]  filp_flush+0x8c/0x98
[ 1783.948860]  filp_close+0x20/0x48
[ 1783.948905]  put_files_struct+0x138/0x148
[ 1783.949063]  exit_files+0x50/0x98
[ 1783.949135]  do_exit+0x2d0/0xa48
[ 1783.949217]  do_group_exit+0x3c/0xa0
[ 1783.949324]  get_signal+0x980/0x988
[ 1783.949408]  do_signal+0x94/0x1280
[ 1783.949500]  do_notify_resume+0xd8/0x168
[ 1783.949550]  el0_svc+0xc4/0xd8
[ 1783.949717]  el0t_64_sync_handler+0x120/0x130
[ 1783.949779]  el0t_64_sync+0x190/0x198
[ 1783.949846] Code: aa0203e1 f0008b20 913fc000 97f61bc6 (d4210000) 
[ 1783.949947] ---[ end trace 0000000000000000 ]---
yanliang567 commented 1 month ago

/assign @tedxu /unassign

xiaofan-luan commented 1 month ago

if you upgrade onettb dependency in internal/core/conanfile.py to 2021.12.0 does it work?

xiaofan-luan commented 1 month ago

we should think of removing the dependency because no one is using it

sanjayk-github-dev commented 1 month ago

if you upgrade onettb dependency in internal/core/conanfile.py to 2021.12.0 does it work?

Even after upgrading the dependency it failed with the same error.

...
[100%] Linking CXX shared library ../../gnu_9.4_cxx11_64_release/libtbb.so
make[4]: *** write jobserver: Bad file descriptor.  Stop.
make[4]: *** Waiting for unfinished jobs....
make[4]: *** write jobserver: Bad file descriptor.  Stop.
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[3]: *** [src/tbb/CMakeFiles/tbb.dir/build.make:594: gnu_9.4_cxx11_64_release/libtbb.so.12.12] Error 1
make[3]: Leaving directory '/home/milvus/.conan/data/onetbb/2021.12.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release'
make[2]: *** [CMakeFiles/Makefile2:134: src/tbb/CMakeFiles/tbb.dir/all] Error 2
make[2]: Leaving directory '/home/milvus/.conan/data/onetbb/2021.12.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release'
make[1]: *** [Makefile:156: all] Error 2
make[1]: Leaving directory '/home/milvus/.conan/data/onetbb/2021.12.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release'
onetbb/2021.12.0: 
onetbb/2021.12.0: ERROR: Package '2d40c058a87ec4fe9054f14169fd22dc815d0b62' build failed
onetbb/2021.12.0: WARN: Build folder /home/milvus/.conan/data/onetbb/2021.12.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release
ERROR: onetbb/2021.12.0: Error in build() method, line 143
        cmake.build()
        ConanException: Error 2 while executing cmake --build "/home/milvus/.conan/data/onetbb/2021.12.0/_/_/build/2d40c058a87ec4fe9054f14169fd22dc815d0b62/build/Release" '--' '-j10'
conan install failed
make: *** [Makefile:213: build-3rdparty] Error 1
xiaofan-luan commented 1 month ago

try conan remove onetbb and retry?

xiaofan-luan commented 1 month ago

go: >= 1.21 (Arch=ARM64) cmake: >= 3.26.4 llvm: >= 15 python: > 3.8 and <= 3.11

and make sure your llvm version is high enough

sanjayk-github-dev commented 1 month ago

try conan remove onetbb and retry?

Still the same error.

sanjayk-github-dev commented 1 month ago

go: >= 1.21 (Arch=ARM64) cmake: >= 3.26.4 llvm: >= 15 python: > 3.8 and <= 3.11

and make sure your llvm version is high enough

I'm running the make milvus command inside milvus-builder-1 container.

Here's what I see inside the container:

root@3ce6773abbdb:/go/src/github.com/milvus-io/milvus# go version
go version go1.21.10 linux/amd64
root@3ce6773abbdb:/go/src/github.com/milvus-io/milvus# cmake --version
cmake version 3.27.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
root@3ce6773abbdb:/go/src/github.com/milvus-io/milvus# which llvm
root@3ce6773abbdb:/go/src/github.com/milvus-io/milvus# llvm
bash: llvm: command not found
root@3ce6773abbdb:/go/src/github.com/milvus-io/milvus# python version
bash: python: command not found

Question: do I need to run ./scripts/install_deps.sh inside the container before running make milvus?

Also, as I mentioned earlier if I change the IMAGE_ARCH to arm64 in .env (since I'm running it on M1 Mac), the Docker Desktop abruptly quits during make milvus.

xiaofan-luan commented 1 month ago

I think probably don't need to run build in dev container. The container is out sync for some day, simply run build on your mac should work

sanjayk-github-dev commented 1 month ago

I was hoping to do the build and development inside a container (to keep my Mac environment clean), but if you are saying that Dev Container is not supported then I'll have no option but to try it directly on my Mac.

xiaofan-luan commented 1 month ago

we can try to investigate on it

xiaofan-luan commented 1 month ago

try conan remove see if it works

sanjayk-github-dev commented 1 month ago

try conan remove see if it works

I did conan remove -f '*' but the build still failed with the same error. :(

sanjayk-github-dev commented 1 month ago

we can try to investigate on it

That would be awesome! Thank you.

sanjayk-github-dev commented 1 month ago

@xiaofan-luan what's the approximate ETA to have this issue investigated?

shaoting-huang commented 1 month ago

/assign

shaoting-huang commented 1 month ago

@sanjayk-github-dev I had compiled successfully on my M1 Mac before. Please let me investigate with the version and I will provide feedback to you as soon as possible.

sanjayk-github-dev commented 1 month ago

Thanks @shaoting-huang !

sanjayk-github-dev commented 1 month ago

By the way, just want to clarify that I'm building inside a dev container on M1 Mac.

shaoting-huang commented 1 month ago

okay, I will try it.

shaoting-huang commented 1 month ago

@sanjayk-github-dev I removed the ttb dependency from conanfile.py and it works. Please try to remove it first. We will clean up useless dependencies.

Screenshot 2024-08-09 at 21 04 02
sanjayk-github-dev commented 1 month ago

@shaoting-huang thanks for the quick response! After removing the onettb dependency, the build went past the earlier error but failed later. Here's the tail output of the build log:

...
[ 46%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/ResidualQuantizer.cpp.o
[ 46%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/ScalarQuantizer.cpp.o
[ 47%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/ScalarQuantizerDC.cpp.o
[ 47%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/ScalarQuantizerOp.cpp.o
[ 47%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/index_read.cpp.o
[ 48%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/index_write.cpp.o
[ 48%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/io.cpp.o
[ 48%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/kmeans1d.cpp.o
[ 49%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/lattice_Zn.cpp.o
[ 49%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/pq4_fast_scan.cpp.o
[ 49%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/impl/residual_quantizer_encode_steps.cpp.o
[ 49%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/index_factory.cpp.o
[ 50%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/invlists/BlockInvertedLists.cpp.o
[ 50%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/invlists/DirectMap.cpp.o
[ 50%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/invlists/InvertedLists.cpp.o
[ 51%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/invlists/InvertedListsIOHook.cpp.o
[ 51%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/invlists/OnDiskInvertedLists.cpp.o
[ 51%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/Heap.cpp.o
[ 52%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/WorkerThread.cpp.o
[ 52%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/binary_distances.cpp.o
[ 52%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/bit_table.cpp.o
[ 53%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/data_backup_file.cpp.o
[ 53%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/distances.cpp.o
[ 53%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/distances_simd.cpp.o
[ 54%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/extra_distances.cpp.o
[ 54%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/hamming.cpp.o
[ 54%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/partitioning.cpp.o
[ 54%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/quantize_lut.cpp.o
[ 55%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/random.cpp.o
[ 55%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/sorting.cpp.o
[ 55%] Building CXX object thirdparty/knowhere/knowhere-build/CMakeFiles/faiss.dir/thirdparty/faiss/faiss/utils/utils.cpp.o
In file included from /go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming_distance/hamdis-inl.h:23,
                 from /go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming.h:34,
                 from /go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/binary_distances.cpp:20:
/go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming_distance/generic-inl.h: In member function 'int faiss::HammingComputerDefault::compute(const uint8_t*) const':
/go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming_distance/generic-inl.h:312:32: warning: statement will never be executed [-Wswitch-unreachable]
  312 |                 [[fallthrough]];
      |                                ^
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-macro-redefined'
In file included from /go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming_distance/hamdis-inl.h:23,
                 from /go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming.h:34,
                 from /go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming.cpp:24:
/go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming_distance/generic-inl.h: In member function 'int faiss::HammingComputerDefault::compute(const uint8_t*) const':
/go/src/github.com/milvus-io/milvus/cmake_build/thirdparty/knowhere/knowhere-src/thirdparty/faiss/faiss/utils/hamming_distance/generic-inl.h:312:32: warning: statement will never be executed [-Wswitch-unreachable]
  312 |                 [[fallthrough]];
      |                                ^
At global scope:
cc1plus: warning: unrecognized command line option '-Wno-macro-redefined'
[ 56%] Linking CXX static library ../../../lib/libfaiss.a
make[3]: Leaving directory '/go/src/github.com/milvus-io/milvus/cmake_build'
[ 56%] Built target faiss
[ 57%] Linking CXX static library ../../../lib/libdiskann.a
make[3]: Leaving directory '/go/src/github.com/milvus-io/milvus/cmake_build'
[ 57%] Built target diskann
make[2]: Leaving directory '/go/src/github.com/milvus-io/milvus/cmake_build'
make[1]: *** [Makefile:146: all] Error 2
make[1]: Leaving directory '/go/src/github.com/milvus-io/milvus/cmake_build'
make: *** [Makefile:229: build-cpp] Error 1
root@ae9783f11a92:/go/src/github.com/milvus-io/milvus# 
xiaofan-luan commented 1 month ago

@shaoting-huang maybe you can help on it?

shaoting-huang commented 1 month ago

@sanjayk-github-dev I think this is a warning message. I haven't met this before. Please scroll up to get actual error logs.

sanjayk-github-dev commented 1 month ago

@shaoting-huang I'm attaching the entire build.log for your reference, though this time the build has failed at a slightly different point.

shaoting-huang commented 1 month ago

@sanjayk-github-dev Apologize for the inconvenience, we are still upgrading our builder environment, so the current dev container is not working. Please try using the latest builder image to compile. docker run -it -v $(pwd):/root/milvus -v ~/.conan:/root/.conan -w /root/milvus milvusdb/milvus-env:ubuntu22.04-20240805-d8668fe bash make milvus /assign @yellow-shine please also help the user compile with ubuntu 22.04 builder image.

sanjayk-github-dev commented 1 month ago

docker run -it -v $(pwd):/root/milvus -v ~/.conan:/root/.conan -w /root/milvus milvusdb/milvus-env:ubuntu22.04-20240805-d8668fe bash make milvus

@shaoting-huang when I used the latest builder image (using the above command), the Docker Desktop crashed during the build with the following unexpected error:

fatal error reported: Linux kernel v6.10 crash on virtualization.framework

[  744.869687] Internal error: Oops: 000000008600000f [#1] SMP
[  744.869796] Modules linked in: shiftfs(O) selfowner(O) rosetta(O) grpcfuse(O) fakeowner(O)
[  744.869907] CPU: 9 PID: 195 Comm: init Tainted: G           O       6.10.0-linuxkit #1
[  744.870000] pstate: 814000c5 (Nzcv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[  744.870043] pc : 0xffff0000cab93d50
[  744.870131] lr : __wake_up_common+0x90/0xf0
[  744.870197] sp : ffff0000cab9ba20
[  744.870259] x29: ffff0000cab9ba20 x28: 0000000000000024 x27: 0000000000000000
[  744.870331] x26: 0000000000000000 x25: 00000000cab93d70 x24: 0000000000000000
[  744.870425] x23: 0000000000000000 x22: 0000000000000003 x21: 0000000000000001
[  744.870483] x20: ffff0000c0dd9028 x19: b49b8000806685bc x18: 0000000000000000
[  744.870564] x17: 0000000000000000 x16: 0000000000000000 x15: 0000004001328000
[  744.870633] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  744.870709] x11: 0000000000000000 x10: 0000000000000000 x9 : ffff8000800b562c
[  744.870821] x8 : 0000050102000000 x7 : 000000000fcc0000 x6 : ffff0000c2ede824
[  744.870880] x5 : 0000000000000000 x4 : ffff0000cab93d50 x3 : 0000000000000000
[  744.870951] x2 : 0000000000000000 x1 : 0000000000000003 x0 : ffff0000cab93d10
[  744.871019] Call trace:
[  744.871051]  0xffff0000cab93d50
[  744.871086]  __wake_up_common_lock+0x54/0xc0
[  744.871135]  __wake_up+0x20/0x38
[  744.871190]  ep_poll_callback+0x134/0x350
[  744.871232]  __wake_up_common+0x90/0xf0
[  744.871271]  __wake_up_common_lock+0x54/0xc0
[  744.871342]  __wake_up_sync_key+0x28/0x40
[  744.871385]  sock_def_readable+0x48/0xc0
[  744.871422]  unix_stream_sendmsg+0x1f8/0x6c0
[  744.871506]  __sock_sendmsg+0x64/0xc0
[  744.871547]  sock_write_iter+0xa8/0x118
[  744.871587]  vfs_write+0x334/0x3b8
[  744.871630]  ksys_write+0xf8/0x120
[  744.871675]  __arm64_sys_write+0x24/0x38
[  744.871726]  invoke_syscall.constprop.0+0x58/0x100
[  744.871791]  do_el0_svc+0x48/0xd8
[  744.871837]  el0_svc+0x30/0xd8
[  744.871887]  el0t_64_sync_handler+0x120/0x130
[  744.871946]  el0t_64_sync+0x190/0x198
[  744.871990] Code: 7a546000 ffff8000 d60f6460 ffff0002 (cab93d60) 
[  744.872046] ---[ end trace 0000000000000000 ]---

The build log tail at that point was as follows:

...
m4/1.4.19: Configuring sources in /root/.conan/data/m4/1.4.19/_/_/source/src
Downloading m4-1.4.19.tar.xz completed [1616.12k]                                        m4/1.4.19: 19: 
m4/1.4.19: 
m4/1.4.19: Copying sources to build folder
m4/1.4.19: Building your package in /root/.conan/data/m4/1.4.19/_/_/build/1a032419479e0fe8660712050df2775c495d3123
m4/1.4.19: Generator txt created conanbuildinfo.txt
m4/1.4.19: Calling generate()
m4/1.4.19: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
m4/1.4.19: Aggregating env generators
m4/1.4.19: Calling build()
m4/1.4.19: Calling:
 > "/root/.conan/data/m4/1.4.19/_/_/build/1a032419479e0fe8660712050df2775c495d3123/src/configure" '--prefix=/' '--bindir=${prefix}/bin' '--sbindir=${prefix}/bin' '--libdir=${prefix}/lib' '--includedir=${prefix}/include' '--oldincludedir=${prefix}/include' 
checking for a BSD-compatible install... /root/.conan/data/m4/1.4.19/_/_/build/1a032419479e0fe8660712050df2775c495d3123/src/configure: line 4688: /root/.conan/data/m4/1.4.19/_/_/build/1a032419479e0fe8660712050df2775c495d3123/src/install: Permission denied
/usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking whether the compiler is clang... no
checking for compiler option needed when checking for declarations... none
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking for pthread.h... yes
checking for sys/param.h... yes
checking for sys/socket.h... yes
checking for dirent.h... yes
checking for stdio_ext.h... yes
checking for getopt.h... yes
checking for sys/cdefs.h... yes
checking for threads.h... yes
checking for iconv.h... yes
checking for limits.h... yes
checking for crtdefs.h... no
checking for wctype.h... yes
checking for langinfo.h... yes
checking for xlocale.h... no
checking for math.h... yes
checking for sys/mman.h... yes
checking for malloc.h... yes
checking for spawn.h... yes
checking for sys/time.h... yes
checking for sys/random.h... yes
checking for sys/wait.h... yes
checking for features.h... yes
checking for arpa/inet.h... yes
checking for semaphore.h... yes
checking for netdb.h... yes
checking for netinet/in.h... yes
checking for sys/select.h... yes
checking for sys/ioctl.h... yes
checking for sys/uio.h... yes
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for Minix Amsterdam compiler... no
checking for ar... ar
checking for ranlib... ranlib
checking whether to use C++... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
configure: autobuild project... GNU M4
configure: autobuild revision... 1.4.19
configure: autobuild hostname... d703ff857eb7
configure: autobuild timestamp... 20240812T171333Z
checking for unsigned long long int... yes
checking for long long int... yes
checking for unsigned long long int... (cached) yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for inline... inline
checking whether <wchar.h> uses 'inline' correctly... yes
checking for btowc... yes
checking for canonicalize_file_name... yes
checking for faccessat... yes
checking for realpath... yes
checking for lstat... yes
checking for _set_invalid_parameter_handler... no
checking for fchdir... yes
checking for fcntl... yes
checking for symlink... yes
checking for fdopendir... yes
checking for mempcpy... yes
checking for fpurge... no
checking for __fpurge... yes
checking for __freadahead... no
checking for __freading... yes
checking for fstatat... yes
checking for getdtablesize... yes
checking for getprogname... no
checking for getexecname... no
checking for getrandom... yes
checking for iswcntrl... yes
checking for iswblank... yes
checking for uselocale... yes
checking for newlocale... yes
checking for duplocale... yes
checking for freelocale... yes
checking for mbsinit... yes
checking for mbrtowc... yes
checking for mbslen... no
checking for mprotect... yes
checking for mkstemp... yes
checking for nl_langinfo... yes
checking for openat... yes
checking for pipe... yes
checking for pipe2... yes
checking for posix_spawn_file_actions_addchdir_np... yes
checking for posix_spawn_file_actions_addchdir... no
checking for readlink... yes
checking for isblank... yes
checking for iswctype... yes
checking for link... yes
checking for secure_getenv... yes
checking for getuid... yes
checking for geteuid... yes
checking for getgid... yes
checking for getegid... yes
checking for sigaction... yes
checking for sigaltstack... yes
checking for siginterrupt... yes
checking for setrlimit... yes
checking for getrlimit... yes
checking for snprintf... yes
checking for strerror_r... yes
checking for __xpg_strerror_r... yes
checking for strndup... yes
checking for vasnprintf... no
checking for wcrtomb... yes
checking for wcwidth... yes
checking for explicit_bzero... yes
checking for memset_s... no
checking for ftruncate... yes
checking for gettimeofday... yes
checking for pthread_sigmask... yes
checking for setenv... yes
checking for sleep... yes
checking for catgets... yes
checking for shutdown... yes
checking for mquery... no
checking for pstat_getprocvm... no
checking for wctob... yes
checking for nl_langinfo and CODESET... yes
checking for a traditional french locale... none
checking whether malloc is ptrdiff_t safe... yes
checking whether malloc, realloc, calloc set errno on failure... yes
checking whether lstat correctly handles trailing slash... yes
checking whether // is distinct from /... no
checking whether realpath works... yes
checking for getcwd... yes
checking whether the preprocessor supports include_next... yes
checking whether source code line length is unlimited... yes
checking for gcc options needed to detect all undeclared functions... none needed
checking if environ is properly declared... yes
checking for complete errno.h... yes
checking whether strerror_r is declared... yes
checking whether strerror_r returns char *... yes
checking for mode_t... yes
checking for sig_atomic_t... yes
checking whether fchdir is declared... yes
checking for working fcntl.h... yes
checking for pid_t... yes
checking for eaccess... yes
checking whether frexp() can be used without linking with libm... yes
checking whether alarm is declared... yes
checking whether long double and double are the same... no
checking whether stdin defaults to large file offsets... yes
checking whether fseeko is declared... yes
checking for fseeko... yes
checking whether fflush works on input streams... no
checking whether stat file-mode macros are broken... no
checking for C/C++ restrict keyword... __restrict__
checking for nlink_t... yes
checking whether ftello is declared... yes
checking whether ungetc works on arbitrary bytes... yes
checking for ftello... yes
checking whether ftello works... yes
checking whether getcwd (NULL, 0) allocates memory for result... yes
checking for getcwd with POSIX signature... yes
checking whether getcwd is declared... yes
checking whether getdtablesize is declared... yes
checking for getopt.h... (cached) yes
checking for getopt_long_only... yes
checking whether getopt is POSIX compatible... yes
checking for working GNU getopt function... yes
checking for working GNU getopt_long function... yes
checking for pthread.h... (cached) yes
checking for pthread_kill in -lpthread... yes
checking whether POSIX threads API is available... yes
checking whether setlocale (LC_ALL, NULL) is multithread-safe... yes
checking whether setlocale (category, NULL) is multithread-safe... yes
checking host CPU and C ABI... arm64
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking 32-bit host C ABI... no
checking for ELF binary format... yes
checking for the common suffixes of directories in the library search path... lib,lib,lib
checking for iconv... yes
checking for working iconv... yes
checking whether iconv is compatible with its POSIX signature... yes
checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... yes
checking for wint_t... yes
checking whether wint_t is large enough... yes
checking whether the compiler produces multi-arch binaries... no
checking whether stdint.h conforms to C99... yes
checking whether stdint.h works without ISO C predefines... yes
checking whether stdint.h has UINTMAX_WIDTH etc.... yes
checking where to find the exponent in a 'double'... word 1 bit 20
checking where to find the exponent in a 'float'... word 0 bit 23
checking whether byte ordering is bigendian... no
checking whether iswcntrl works... yes
checking for towlower... yes
checking for wctype_t... yes
checking for wctrans_t... yes
checking for a traditional japanese locale... none
checking for a french Unicode locale... none
checking for a transitional chinese locale... none
checking whether langinfo.h defines CODESET... yes
checking whether langinfo.h defines T_FMT_AMPM... yes
checking whether langinfo.h defines ALTMON_1... yes
checking whether langinfo.h defines ERA... yes
checking whether langinfo.h defines YESEXPR... yes
checking for wchar_t... yes
checking for good max_align_t... yes
checking whether NULL can be used in arbitrary expressions... yes
checking whether locale.h defines locale_t... yes
checking whether locale.h conforms to POSIX:2001... yes
checking whether struct lconv is properly defined... yes
checking for LC_MESSAGES... yes
checking whether uselocale works... yes
checking for fake locale system (OpenBSD)... no
checking for Solaris 11.4 locale system... no
checking for getlocalename_l... no
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyPreferredLanguages... no
checking for multithread API to use... none
checking for a sed that does not truncate output... /usr/bin/sed
checking whether malloc (0) returns nonnull... yes
checking whether NAN macro works... yes
checking whether HUGE_VAL works... yes
checking for mbstate_t... yes
checking for mmap... yes
checking for MAP_ANONYMOUS... yes
checking whether memchr works... yes
checking whether memrchr is declared... yes
checking whether <limits.h> defines MIN and MAX... no
checking whether <sys/param.h> defines MIN and MAX... yes
checking for O_CLOEXEC... yes
checking for promoted mode_t type... mode_t
checking for library containing posix_spawn... none required
checking for posix_spawn... yes
checking whether posix_spawn is declared... yes
checking whether posix_spawn works... yes
checking whether posix_spawn rejects scripts without shebang... yes
checking whether posix_spawnp rejects scripts without shebang... yes
checking whether posix_spawnattr_setschedpolicy is supported... yes
checking whether posix_spawnattr_setschedparam is supported... yes
checking for sigset_t... yes
checking for SIGPIPE... yes
checking for sched.h... yes
checking for struct sched_param... yes
checking for uid_t in sys/types.h... yes
checking for volatile sig_atomic_t... yes
checking for sighandler_t... yes
checking whether C symbols are prefixed with underscore at the linker level... no
checking whether snprintf returns a byte count as in C99... yes
checking whether snprintf is declared... yes
checking for posix_spawnattr_t... yes
checking for posix_spawn_file_actions_t... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking whether fcloseall is declared... yes
checking which flavor of printf attribute matches inttypes macros... system
checking whether ecvt is declared... yes
checking whether fcvt is declared... yes
checking whether gcvt is declared... yes
checking whether strdup is declared... yes
checking whether strerror(0) succeeds... yes
checking for strerror_r with POSIX signature... no
checking whether __xpg_strerror_r works... yes
checking whether strndup is declared... yes
checking whether strnlen is declared... yes
checking whether strsignal is declared... yes
checking whether strstr works... yes
checking whether ldexp() can be used without linking with libm... yes
checking for struct timespec in <time.h>... yes
checking for TIME_UTC in <time.h>... yes
checking whether execvpe is declared... yes
checking whether clearerr_unlocked is declared... yes
checking whether feof_unlocked is declared... yes
checking whether ferror_unlocked is declared... yes
checking whether fflush_unlocked is declared... yes
checking whether fgets_unlocked is declared... yes
checking whether fputc_unlocked is declared... yes
checking whether fputs_unlocked is declared... yes
checking whether fread_unlocked is declared... yes
checking whether fwrite_unlocked is declared... yes
checking whether getc_unlocked is declared... yes
checking whether getchar_unlocked is declared... yes
checking whether putc_unlocked is declared... yes
checking whether putchar_unlocked is declared... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for intmax_t... yes
checking whether snprintf truncates the result as in C99... yes
checking for snprintf... (cached) yes
checking for strnlen... yes
checking for wcslen... yes
checking for wcsnlen... yes
checking for mbrtowc... (cached) yes
checking for wcrtomb... (cached) yes
checking whether _snprintf is declared... no
checking whether printf supports size specifiers as in C99... yes
checking whether printf supports 'long double' arguments... yes
checking whether printf supports infinite 'double' arguments... yes
checking whether printf supports infinite 'long double' arguments... yes
checking whether printf supports the 'a' and 'A' directives... yes
checking whether printf supports the 'F' directive... yes
checking whether printf supports the 'n' directive... no
checking whether printf supports the 'ls' directive... yes
checking whether printf supports the grouping flag... yes
checking whether printf supports the left-adjust flag correctly... yes
checking whether printf supports the zero flag correctly... yes
checking whether printf supports large precisions... yes
checking whether printf survives out-of-memory conditions... yes
checking whether wcsdup is declared... yes
checking whether <sys/socket.h> is self-contained... yes
checking for shutdown... (cached) yes
checking whether <sys/socket.h> defines the SHUT_* macros... yes
checking for struct sockaddr_storage... yes
checking for sa_family_t... yes
checking for struct sockaddr_storage.ss_family... yes
checking for library needed for semaphore functions... none
checking for struct timeval... yes
checking for wide-enough struct timeval.tv_sec member... yes
checking for IPv4 sockets... yes
checking for IPv6 sockets... yes
checking for off_t... yes
checking whether INT32_MAX < INTMAX_MAX... yes
checking whether INT64_MAX == LONG_MAX... yes
checking whether UINT32_MAX < UINTMAX_MAX... yes
checking whether UINT64_MAX == ULONG_MAX... yes
checking whether <sys/select.h> is self-contained... yes
checking for library containing setsockopt... none needed
checking whether select supports a 0 argument... yes
checking whether select detects invalid fds... yes
checking for pthread_t... yes
checking for pthread_spinlock_t... yes
checking for PTHREAD_CREATE_DETACHED... yes
checking for PTHREAD_MUTEX_RECURSIVE... yes
checking for PTHREAD_MUTEX_ROBUST... yes
checking for PTHREAD_PROCESS_SHARED... yes
checking whether setenv is declared... yes
checking for search.h... yes
checking for tsearch... yes
checking whether <sys/ioctl.h> declares ioctl... yes
checking whether unsetenv is declared... yes
checking for alloca as a compiler built-in... yes
checking whether to enable assertions... yes
checking whether btowc(0) is correct... yes
checking whether btowc(EOF) is correct... guessing yes
checking for __builtin_expect... yes
checking whether calloc (0, n) and calloc (n, 0) return nonnull... yes
checking whether this system supports file names of any length... no
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking for clock_settime... yes
checking for closedir... yes
checking for d_ino member in directory struct... no
checking for dirfd... yes
checking whether dirfd is declared... yes
checking whether dirfd is a macro... no
checking whether // is distinct from /... (cached) no
checking whether dup works... yes
checking whether dup2 works... yes
checking for error_at_line... yes
checking whether fflush works on input streams... (cached) no
checking whether fcntl handles F_DUPFD correctly... yes
checking whether fcntl understands F_DUPFD_CLOEXEC... needs runtime check
checking whether fdopendir is declared... yes
checking whether fdopendir works... yes
checking whether fflush works on input streams... (cached) no
checking for flexible array member... yes
checking whether conversion from 'int' to 'long double' works... yes
checking whether fopen recognizes a trailing slash... yes
checking whether fopen supports the mode character 'x'... yes
checking whether fopen supports the mode character 'e'... yes
checking for __fpending... yes
checking whether __fpending is declared... yes
checking whether fpurge is declared... no
checking whether free is known to preserve errno... yes
checking whether frexp works... yes
checking whether frexpl is declared... yes
checking whether frexpl() can be used without linking with libm... yes
checking whether frexpl works... yes
checking for fseeko... (cached) yes
checking whether fflush works on input streams... (cached) no
checking for _fseeki64... no
checking whether fstatat (..., 0) works... yes
checking for ftello... (cached) yes
checking whether ftello works... (cached) yes
checking whether getcwd handles long file names properly...
xiaofan-luan commented 4 weeks ago

check this pr? try latest master see if it works? https://github.com/zilliztech/knowhere/pull/492/files

sanjayk-github-dev commented 4 weeks ago

Sure @xiaofan-luan. let me try that out.

sanjayk-github-dev commented 4 weeks ago

@xiaofan-luan My Docker Desktop consistently crashes when the build is doing the following:

checking whether getcwd handles long file names properly...

I now suspect that this is a problem with the latest version of Docker Desktop (v4.33.0). I have filed a bug against the Docker team, though haven't heard back from them yet.

shaoting-huang commented 3 weeks ago

@sanjayk-github-dev I am using Docker Desktop 4.29.0 and it works.

sanjayk-github-dev commented 3 weeks ago

Sure @shaoting-huang. I will give that a try.

sanjayk-github-dev commented 2 weeks ago

The build succeeded after downgrading Docker Desktop to 4.29.0!

Thanks @shaoting-huang for your help!

sanjayk-github-dev commented 1 week ago

Closing the issue as the build succeeded with an older version of Docker Desktop.