warmcat / libwebsockets

canonical libwebsockets.org networking library
https://libwebsockets.org
Other
4.77k stars 1.49k forks source link

CMake freeze when LWS_FOR_GITOHASHI=ON #3256

Open MXWXZ opened 10 hours ago

MXWXZ commented 10 hours ago

Hi, when I set LWS_FOR_GITOHASHI=ON, cmake will freeze. Here are reproduce steps:

Environment and build command:

sudo docker run -it ubuntu:latest
apt update
apt install build-essential cmake git libssl-dev
git clone https://github.com/warmcat/libwebsockets.git
cd libwebsockets
mkdir build
cd build
cmake ..
cmake -DLWS_FOR_GITOHASHI=ON ..
[cmake freeze]

The cmake log printed

``` -- Compiled with LWS_WITH_DIR and LWS_WITH_LEJP_CONF Git commit hash: v4.3.0-407-g6b950e86 sqlite3 include dir: SQLITE3_INCLUDE_DIRS-NOTFOUND sqlite3 libraries: SQLITE3_LIBRARIES-NOTFOUND Compiling with SSL support OpenSSL include dir: /usr/include OpenSSL libraries: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so Searching for OpenSSL executable and dlls OpenSSL executable: /usr/bin/openssl GENCERTS = 1 Generating SSL Certificates for the test-server... Can't load /root/.rnd into RNG 139681795887552:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd Generating a RSA private key ...........+++++ ...+++++ writing new private key to '/tmp/libwebsockets/build/libwebsockets-test-server.key.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:State or Province Name (full name) [Some-State]:Locality Name (eg, city) []:Organization Name (eg, company) [Internet Widgits Pty Ltd]:Organizational Unit Name (eg, section) []:Common Name (e.g. server FQDN or YOUR name) []:Email Address []:SUCCESSFULLY generated SSL certificate DIR /tmp/libwebsockets/build CMP /tmp/libwebsockets/cmake Processing /tmp/libwebsockets/minimal-examples/client/binance : skipping as lws built with LWS_WITHOUT_EXTENSIONS : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/client/hello_world : skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/client/hello_world-policy : skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/client/http-post : skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/client/ws-echo : skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/server/hello_world : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/sink/hello_world : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/ssproxy/ssproxy-custom-transport-uart : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples/ssproxy/ssproxy-socket : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-async-dns lws-api-test-async-dns: skipping as lws being built without LWS_WITH_SYS_ASYNC_DNS Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-backtrace : skipping as lws being built without LWS_WITH_COMPRESSED_BACKTRACES Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-cose lws-api-test-cose: skipping as lws being built without LWS_WITH_COSE lws-api-test-cose: skipping as lws being built without LWS_WITH_CBOR Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-dhcpc lws-api-test-dhcpc: skipping as lws being built without LWS_WITH_SYS_DHCP_CLIENT Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-fts Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-gencrypto lws-api-test-gencrypto: skipping as lws being built without LWS_WITH_JOSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-gunzip Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-jose lws-api-test-jose: skipping as lws being built without LWS_WITH_JOSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-jpeg Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-jrpc Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lecp : skipping as lws being built without LWS_WITH_CBOR Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lejp Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lhp Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lhp-dlo Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lws_cache Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lws_dsh lws-api-test-lws_dsh: skipping as lws being built without LWS_WITH_LWS_DSH Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lws_map Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lws_smd Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lws_struct-json Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lws_struct_sqlite Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lws_tokenize Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-lwsac Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-secure-streams Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-smtp_client lws-unit-tests-smtp-client: skipping as lws being built without LWS_WITH_SMTP Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-ssjpeg Processing /tmp/libwebsockets/minimal-examples-lowlevel/api-tests/api-test-upng Processing /tmp/libwebsockets/minimal-examples-lowlevel/client-server/minimal-ws-proxy Processing /tmp/libwebsockets/minimal-examples-lowlevel/crypto/minimal-crypto-cose-key lws-crypto-cose-key: skipping as lws being built without LWS_WITH_COSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/crypto/minimal-crypto-cose-sign lws-crypto-cose-sign: skipping as lws being built without LWS_WITH_COSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/crypto/minimal-crypto-jwe lws-crypto-jwe: skipping as lws being built without LWS_WITH_JOSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/crypto/minimal-crypto-jwk lws-crypto-jwk: skipping as lws being built without LWS_WITH_JOSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/crypto/minimal-crypto-jws lws-crypto-jws: skipping as lws being built without LWS_WITH_JOSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/crypto/minimal-crypto-x509 lws-crypto-x509: skipping as lws being built without LWS_WITH_JOSE Processing /tmp/libwebsockets/minimal-examples-lowlevel/dbus-client/minimal-dbus-client lws-minimal-dbus-client: skipping as lws being built without LWS_ROLE_DBUS Processing /tmp/libwebsockets/minimal-examples-lowlevel/dbus-client/minimal-dbus-ws-proxy-testclient : skipping as lws being built without LWS_ROLE_DBUS Processing /tmp/libwebsockets/minimal-examples-lowlevel/dbus-server/minimal-dbus-server lws-minimal-dbus-server: skipping as lws being built without LWS_ROLE_DBUS Processing /tmp/libwebsockets/minimal-examples-lowlevel/dbus-server/minimal-dbus-ws-proxy lws-minimal-dbus-ws-proxy: skipping as lws being built without LWS_ROLE_DBUS Processing /tmp/libwebsockets/minimal-examples-lowlevel/gtk/minimal-gtk lws-minimal-gtk: skipping as lws being built without LWS_WITH_GLIB lws-minimal-gtk: skipping as lws being built without LWS_WITH_GTK Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client lws-minimal-http-client: skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION lws-minimal-http-client: skipping as lws being built without LWS_WITH_EVENT_LIBS lws-minimal-http-client: skipping as lws being built without LWS_WITH_SYS_ASYNC_DNS lws-minimal-http-client: skipping as lws being built without LWS_WITH_MBEDTLS FI 0 ... NO LWS_WITH_SYS_FAULT_INJECTION ... skipping mbedtls wrong CA test Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-attach Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-captive-portal Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-certinfo Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-custom-headers Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-h2-rxflow Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-hugeurl Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-jit-trust lws-minimal-http-client-jit-trust: skipping as lws being built without LWS_WITH_TLS_JIT_TRUST lws-minimal-http-client-jit-trust: skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION lws-minimal-http-client-jit-trust: skipping as lws being built without LWS_WITH_EVENT_LIBS lws-minimal-http-client-jit-trust: skipping as lws being built without LWS_WITH_SYS_ASYNC_DNS Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-multi lws-minimal-http-client-multi: skipping as lws being built without LWS_WITH_MBEDTLS Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-client/minimal-http-client-post lws-minimal-http-client-post: skipping as lws being built without LWS_WITH_MBEDTLS Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-basicauth Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-cgi lws-minimal-http-server-cgi: skipping as lws being built without LWS_WITH_CGI Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-custom-headers Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-deaddrop Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-dynamic Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-eventlib Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-eventlib-custom Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-eventlib-demos Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-eventlib-foreign Extra libs: Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-eventlib-smp Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-form-get Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-form-post Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-form-post-file Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-form-post-lwsac Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-fulltext-search Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-h2-long-poll Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-mimetypes Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-multivhost Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-proxy Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-smp Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-sse Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-sse-ring Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-systemd-socketact : skipping as lws being built without LWS_HAVE_SYSTEMD_H Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-tls Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-tls-80 Processing /tmp/libwebsockets/minimal-examples-lowlevel/http-server/minimal-http-server-tls-mem Processing /tmp/libwebsockets/minimal-examples-lowlevel/mqtt-client/minimal-mqtt-client lws-minimal-mqtt-client: skipping as lws being built without LWS_ROLE_MQTT Processing /tmp/libwebsockets/minimal-examples-lowlevel/mqtt-client/minimal-mqtt-client-multi lws-minimal-mqtt-client-multi: skipping as lws being built without LWS_ROLE_MQTT Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-adopt-tcp Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-adopt-udp Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-audio lws-minimal-raw-audio: skipping as lws being built without LWS_WITH_ALSA Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-client Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-fallback-http-server Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-file Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-netcat Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-proxy lws-minimal-raw-proxy: skipping as lws being built without LWS_ROLE_RAW_PROXY Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-proxy-fallback lws-minimal-raw-proxy-fallback: skipping as lws being built without LWS_ROLE_RAW_PROXY Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-serial Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-vhost Processing /tmp/libwebsockets/minimal-examples-lowlevel/raw/minimal-raw-wol Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams lws-minimal-secure-streams: skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-alexa lws-minimal-secure-streams-alexa: skipping as lws being built without LWS_WITH_ALSA Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-avs Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-binance lws-minimal-secure-streams-binance: skipping as lws built with LWS_WITHOUT_EXTENSIONS Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-blob Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-client-tx lws-minimal-secure-streams-client-tx: skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-cpp lws-minimal-secure-streams-cpp: skipping as lws being built without LWS_WITH_SECURE_STREAMS_CPP Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-custom-client-transport lws-minimal-secure-streams-custom-client-transport: skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API lws-minimal-secure-streams-custom-client-transport: skipping as lws being built without LWS_ONLY_SSPC Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-hugeurl Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-metadata Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-mqtt : skipping as lws being built without LWS_ROLE_MQTT : skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-perf Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-policy2c lws-minimal-secure-streams-policy2c: skipping as lws being built without LWS_ROLE_MQTT Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-post Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-proxy lws-minimal-secure-streams-proxy: skipping as lws being built without LWS_WITH_SECURE_STREAMS_PROXY_API Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-server Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-server-raw Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-sigv4 lws-minimal-secure-streams-sigv4: skipping as lws being built without LWS_WITH_SECURE_STREAMS_AUTH_SIGV4 Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-smd : skipping as lws being built without LWS_WITH_SYS_FAULT_INJECTION Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-staticpolicy lws-minimal-secure-streams-staticpolicy: skipping as lws being built without LWS_WITH_SECURE_STREAMS_STATIC_POLICY_ONLY Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-stress Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-testsfail Processing /tmp/libwebsockets/minimal-examples-lowlevel/secure-streams/minimal-secure-streams-threads Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-binance lws-minimal-ws-client-binance: skipping as lws built with LWS_WITHOUT_EXTENSIONS Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-echo lws-minimal-ws-client-echo: skipping as lws built with LWS_WITHOUT_EXTENSIONS Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-ping Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-pmd-bulk Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-rx Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-spam Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-spam-tx-rx Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-client/minimal-ws-client-tx Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-broker Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-raw-proxy Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-echo lws-minimal-ws-server-echo: skipping as lws built with LWS_WITHOUT_EXTENSIONS Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-pmd lws-minimal-ws-server-pmd: skipping as lws built with LWS_WITHOUT_EXTENSIONS Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-pmd-bulk Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-pmd-corner lws-minimal-ws-server-pmd-corner: skipping as lws built with LWS_WITHOUT_EXTENSIONS Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-ring Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-threadpool Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-threads Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-threads-foreign-libuv-smp lws-minimal-ws-server-threads-foreign-smp: skipping as lws being built without LWS_WITH_LIBUV Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-threads-smp Processing /tmp/libwebsockets/minimal-examples-lowlevel/ws-server/minimal-ws-server-timer ```
lws-team commented 5 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?

MXWXZ commented 5 hours ago

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.

lws-team commented 5 hours ago

... and on the same box but outside of docker similar to what I did?

lws-team commented 5 hours ago

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?

lws-team commented 5 hours ago

It seems you can avoid this by

apt install libsqlite3-dev sqlite3
MXWXZ commented 5 hours ago

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).