Open MXWXZ opened 10 hours ago
Hm... I tried
cd /tmp
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir build
cd build
cmake -DLWS_FOR_GITOHASHI=1
and it completes quickly and well on Rocky 9.4 here.
CMake is 3.27.7
I also deleted build and tried the two cmakes, no problem either.
Usually when I see "frozen" it's a sign not enough info... ie, 100% cpu? Box / process literally frozen?
In the docker environment, I can reproduce this in two different docker.
Version:
docker: ubuntu:latest
cmake: 3.28.3
kernel: Linux 5.10.0-15-amd64 #1 SMP Debian 5.10.120-1 (2022-06-09) x86_64 x86_64 x86_64 GNU/Linux
docker: customized ubuntu image
cmake version 3.10.2
kernel: Linux 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 x86_64 x86_64 GNU/Linux
Usually when I see "frozen" it's a sign not enough info... ie, 100% cpu? Box / process literally frozen?
I found the cmake process consumes 100% CPU and no further output can be seen from the console. Also, I wait for around half an hour and it is still blocking there.
... and on the same box but outside of docker similar to what I did?
I can reproduce a slowdown with docker, but it is not frozen.
Attaching strace -p on the 100% CPU cmake process shows it is going through CMake files in the project at about 1 every few seconds
access("/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-netcat/CMakeLists.txt", R_OK) = 0
access("/libwebsockets/build/libwebsockets-config-version.cmake", R_OK) = 0
access("/libwebsockets/build/libwebsockets-config.cmake", R_OK) = 0
access("/libwebsockets/build/LwsCheckRequirements.cmake", R_OK) = 0
access("/usr/share/cmake-3.28/Modules/CheckIncludeFile.cmake", R_OK) = 0
access("/usr/share/cmake-3.28/Modules/CheckIncludeFile.cmake", R_OK) = 0
access("/usr/share/cmake-3.28/Modules/CheckCSourceCompiles.cmake", R_OK) = 0
access("/usr/share/cmake-3.28/Modules/CheckCSourceCompiles.cmake", R_OK) = 0
access("/libwebsockets/cmake/LwsCheckRequirements.cmake", R_OK) = 0
access("/usr/share/cmake-3.28/Modules/CheckIncludeFile.cmake", R_OK) = 0
mmap(NULL, 14843904, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f0d05000000
munmap(0x7f0d05000000, 14843904) = 0
brk(0x559349351000) = 0x559349351000
lws doesn't know or care if you're using docker, doesn't this sound like some interaction between cmake / docker?
It seems you can avoid this by
apt install libsqlite3-dev sqlite3
I managed to do it outside docker and can reproduce. Using strace I can also see logs similar to you.
It seems you can avoid this by
apt install libsqlite3-dev sqlite3
This solves the problem, thank you! It would be better to stop cmake when libsqlite3-dev is not found (just like libssl-dev).
Hi, when I set
LWS_FOR_GITOHASHI=ON
, cmake will freeze. Here are reproduce steps:Environment and build command:
The cmake log printed