yandex / odyssey

Scalable PostgreSQL connection pooler
BSD 3-Clause "New" or "Revised" License
3.21k stars 165 forks source link

On Ubuntu 22.04 container, I am getting "*** write jobserver: Bad file descriptor. Stop." for Command "make local_build" #621

Open nijesh8 opened 5 months ago

nijesh8 commented 5 months ago

On Ubuntu 22.04 container, I am getting "*** write jobserver: Bad file descriptor. Stop." for Command "make local_build"

nijesh8 commented 5 months ago

postgres@nusql_cntr1:~$ cat /etc/os-release

PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

nijesh8 commented 5 months ago

Commands run are:

cd /var/lib/postgresql/extension-build

git clone https://github.com/yandex/odyssey.git cd odyssey git checkout 9ea5d80 make local_build

nijesh8 commented 5 months ago

root@nusql_cntr1:/var/lib/postgresql/extension-build# git clone https://github.com/yandex/odyssey.git Cloning into 'odyssey'... remote: Enumerating objects: 16540, done. remote: Counting objects: 100% (2295/2295), done. remote: Compressing objects: 100% (774/774), done. Receiving objects: 100% (16540/16540), 19.25 MiB | 2.29 MiB/s, done. remote: Total 16540 (delta 1844), reused 1658 (delta 1519), pack-reused 14245 Resolving deltas: 100% (12605/12605), done. root@nusql_cntr1:/var/lib/postgresql/extension-build# cd odyssey/ root@nusql_cntr1:/var/lib/postgresql/extension-build/odyssey# git checkout 9ea5d80 Note: switching to '9ea5d80'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 9ea5d803 Enhanced PostgreSQL setup script: (#607) root@nusql_cntr1:/var/lib/postgresql/extension-build/odyssey# make local_build rm -fr /var/lib/postgresql/extension-build/odyssey/tmp rm -fr build rm -fr build-asan cmake -S /var/lib/postgresql/extension-build/odyssey -Bbuild -DCMAKE_BUILD_TYPE=Release -DCC_FLAGS="-Wextra -Wstrict-aliasing" -DUSE_SCRAM=YES -- The C compiler identification is GNU 11.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Found PostgreSQL: /var/lib/postgresql/lib/x86_64-linux-gnu/libpgcommon.a -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2") -- Found PAM: /usr/lib/x86_64-linux-gnu/libpam.so -- Could NOT find LDAP (missing: LDAP_LIBRARY LDAP_INCLUDE_DIR) CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to find_package_handle_standard_args (PROM) does not match the name of the calling package (Prom). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern. Call Stack (most recent call first): cmake/FindProm.cmake:11 (find_package_handle_standard_args) CMakeLists.txt:135 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Could NOT find PROM (missing: PROM_LIBRARY PROM_INCLUDE_DIR) CMake Warning (dev) at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message): The package name passed to find_package_handle_standard_args (PROMHTTP) does not match the name of the calling package (Prom). This can lead to problems in calling code that expects find_package result variables (e.g., _FOUND) to follow a certain pattern. Call Stack (most recent call first): cmake/FindProm.cmake:20 (find_package_handle_standard_args) CMakeLists.txt:135 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Could NOT find PROMHTTP (missing: PROMHTTP_LIBRARY PROMHTTP_INCLUDE_DIR) -- Use shipped libmachinarium: /var/lib/postgresql/extension-build/odyssey/third_party/machinarium -- Use shipped libkiwi: /var/lib/postgresql/extension-build/odyssey/third_party/kiwi

-- Odyssey (version: 2137-9ea5d803-release)

-- using compiler: /usr/bin/cc version cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- c lang standart: gnu11

-- CMAKE_BUILD_TYPE: Release -- BUILD_DEBIAN: OFF -- POSTGRESQL_INCLUDE_DIR: /var/lib/postgresql/include/server -- POSTGRESQL_LIBRARY: /var/lib/postgresql/lib/x86_64-linux-gnu/libpgcommon.a -- POSTGRESQL_LIBPGPORT: /var/lib/postgresql/lib/x86_64-linux-gnu/libpgport.a -- PG_VERSION_NUM: PostgreSQL 16.3 -- PQ_LIBRARY: /var/lib/postgresql/lib/x86_64-linux-gnu/libpq.a -- USE_BORINGSSL: OFF -- BORINGSSL_ROOT_DIR: -- BORINGSSL_INCLUDE_DIR: -- OPENSSL_VERSION: 3.0.2 -- OPENSSL_ROOT_DIR: -- OPENSSL_INCLUDE_DIR: /usr/include -- OPENSSL_LIBRARIES: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so -- PAM_LIBRARY: /usr/lib/x86_64-linux-gnu/libpam.so -- PAM_INCLUDE_DIR: /usr/include/security -- USE_SCRAM: YES -- BUILD_COMPRESSION: OFF -- LDAP_SUPPORT: FALSE -- Configuring done -- Generating done -- Build files have been written to: /var/lib/postgresql/extension-build/odyssey/build make -Cbuild -j8 make[1]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build' make[2]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build' make[3]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build' make[3]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build' make[3]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build' make[3]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build' make[3]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build' make[3]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build' [ 1%] Generating third_party/kiwi/kiwi/libkiwi.a [ 1%] Generating third_party/machinarium/sources/libmachinarium.a CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 11.4.0 -- The C compiler identification is GNU 11.4.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting C compiler ABI info - done

-- Kiwi: PostgreSQL protocol interaction library.

-- CMAKE_BUILD_TYPE: Release -- MACHINARIUM_INCLUDE_DIRS: /var/lib/postgresql/extension-build/odyssey/third_party/machinarium/sources -- MACHINARIUM_LIBRARIES: /var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium/sources/libmachinarium.a

-- Configuring done -- Generating done -- Build files have been written to: /var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Looking for pthread.h gmake[4]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi' gmake[5]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi' gmake[6]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi' gmake[6]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi' gmake[6]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi' [ 66%] Building C object kiwi/CMakeFiles/kw_library_static.dir/md5.c.o [ 66%] Building C object kiwi/CMakeFiles/kw_library_static.dir/options.c.o -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD gmake[6]: write jobserver: Bad file descriptor. Stop. gmake[6]: Waiting for unfinished jobs.... -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE

-- Machinarium: Cooperative multitasking framework.

-- CMAKE_BUILD_TYPE: Release -- BUILD_SHARED: OFF -- BUILD_VALGRIND: ON -- USE_BORINGSSL: OFF -- BORINGSSL_ROOT_DIR: -- BORINGSSL_INCLUDE_DIR: -- OPENSSL_VERSION: -- OPENSSL_ROOT_DIR: -- OPENSSL_INCLUDE_DIR: /usr/include -- OPENSSL_LIBRARIES: /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/x86_64-linux-gnu/libcrypto.so -- BUILD_COMPRESSION: OFF

-- Configuring done -- Generating done -- Build files have been written to: /var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium gmake[6]: write jobserver: Bad file descriptor. Stop. gmake[5]: [CMakeFiles/Makefile2:98: kiwi/CMakeFiles/kw_library_static.dir/all] Error 2 gmake[5]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi' gmake[4]: [Makefile:91: all] Error 2 gmake[4]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/kiwi' make[3]: [CMakeFiles/libkiwi.dir/build.make:76: third_party/kiwi/kiwi/libkiwi.a] Error 2 make[3]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build' make[2]: [CMakeFiles/Makefile2:192: CMakeFiles/libkiwi.dir/all] Error 2 make[2]: Waiting for unfinished jobs.... gmake[4]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium' gmake[5]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium' gmake[6]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium' gmake[6]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium' gmake[6]: Entering directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium' [ 2%] Building C object sources/CMakeFiles/machine_library_static.dir/thread.c.o [ 4%] Building C object sources/CMakeFiles/machine_library_static.dir/pg_rand48.c.o [ 7%] Building C object sources/CMakeFiles/machine_library_static.dir/signal_mgr.c.o [ 12%] Building C object sources/CMakeFiles/machine_library_static.dir/coroutine_cache.c.o [ 9%] Building C object sources/CMakeFiles/machine_library_static.dir/loop.c.o [ 17%] Building C object sources/CMakeFiles/machine_library_static.dir/socket.c.o [ 19%] Building C object sources/CMakeFiles/machine_library_static.dir/call.c.o [ 21%] Building C object sources/CMakeFiles/machine_library_static.dir/context_stack.c.o [ 14%] Building C object sources/CMakeFiles/machine_library_static.dir/clock.c.o [ 26%] Building C object sources/CMakeFiles/machine_library_static.dir/scheduler.c.o [ 26%] Building C object sources/CMakeFiles/machine_library_static.dir/lrand48.c.o [ 29%] Building C object sources/CMakeFiles/machine_library_static.dir/channel_fast.c.o [ 31%] Building C object sources/CMakeFiles/machine_library_static.dir/connect.c.o [ 36%] Building C object sources/CMakeFiles/machine_library_static.dir/machine.c.o [ 39%] Building C object sources/CMakeFiles/machine_library_static.dir/context.c.o [ 34%] Building C object sources/CMakeFiles/machine_library_static.dir/epoll.c.o [ 41%] Building C object sources/CMakeFiles/machine_library_static.dir/msg.c.o [ 43%] Building C object sources/CMakeFiles/machine_library_static.dir/event_mgr.c.o [ 46%] Building C object sources/CMakeFiles/machine_library_static.dir/coroutine.c.o [ 48%] Building C object sources/CMakeFiles/machine_library_static.dir/msg_cache.c.o [ 51%] Building C object sources/CMakeFiles/machine_library_static.dir/eventfd.c.o [ 53%] Building C object sources/CMakeFiles/machine_library_static.dir/cond.c.o [ 56%] Building C object sources/CMakeFiles/machine_library_static.dir/channel.c.o [ 60%] Building C object sources/CMakeFiles/machine_library_static.dir/channel_api.c.o [ 58%] Building C object sources/CMakeFiles/machine_library_static.dir/close.c.o [ 65%] Building C object sources/CMakeFiles/machine_library_static.dir/iov.c.o [ 65%] Building C object sources/CMakeFiles/machine_library_static.dir/accept.c.o [ 70%] Building C object sources/CMakeFiles/machine_library_static.dir/task_mgr.c.o [ 68%] Building C object sources/CMakeFiles/machine_library_static.dir/mm.c.o [ 75%] Building C object sources/CMakeFiles/machine_library_static.dir/cert_hash.c.o [ 75%] Building C object sources/CMakeFiles/machine_library_static.dir/read.c.o [ 80%] Building C object sources/CMakeFiles/machine_library_static.dir/compression.c.o [ 78%] Building C object sources/CMakeFiles/machine_library_static.dir/bind.c.o [ 82%] Building C object sources/CMakeFiles/machine_library_static.dir/machine_mgr.c.o [ 85%] Building C object sources/CMakeFiles/machine_library_static.dir/tls.c.o [ 87%] Building C object sources/CMakeFiles/machine_library_static.dir/io.c.o [ 90%] Building C object sources/CMakeFiles/machine_library_static.dir/write.c.o [ 92%] Building C object sources/CMakeFiles/machine_library_static.dir/shutdown.c.o [ 95%] Building C object sources/CMakeFiles/machine_library_static.dir/dns.c.o [ 97%] Building C object sources/CMakeFiles/machine_library_static.dir/zpq_stream.c.o gmake[6]: write jobserver: Bad file descriptor. Stop. gmake[6]: Waiting for unfinished jobs.... gmake[6]: write jobserver: Bad file descriptor. Stop. gmake[5]: [CMakeFiles/Makefile2:98: sources/CMakeFiles/machine_library_static.dir/all] Error 2 gmake[5]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium' gmake[4]: [Makefile:91: all] Error 2 gmake[4]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium' make[3]: [CMakeFiles/libmachinarium.dir/build.make:76: third_party/machinarium/sources/libmachinarium.a] Error 2 make[3]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build' make[2]: [CMakeFiles/Makefile2:166: CMakeFiles/libmachinarium.dir/all] Error 2 make[2]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build' make[1]: [Makefile:91: all] Error 2 make[1]: Leaving directory '/var/lib/postgresql/extension-build/odyssey/build' make: * [Makefile:27: local_build] Error 2 root@nusql_cntr1:/var/lib/postgresql/extension-build/odyssey# /var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium/sources/context.c: In function ‘mm_context_prepare’: /var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium/sources/context.c:38:17: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic] 38 | --sp = (void )mm_context_runner; | ^ /var/lib/postgresql/extension-build/odyssey/build/third_party/machinarium/sources/clock.c:64:12: warning: ‘mm_clock_list_is_sorted’ defined but not used [-Wunused-function] 64 | static int mm_clock_list_is_sorted(mm_timer_t list, int count) | ^~~~~~~

root@nusql_cntr1:/var/lib/postgresql/extension-build/odyssey#

nijesh8 commented 5 months ago

Container is created in my Mac laptop as:

docker run -dit --name=nusql_cntr1 --hostname=nusql_cntr1 --platform=linux/amd64 hub.tess.io/mpdba/nusql:pg_16rel_dev_b14_x

nijesh8 commented 5 months ago

Laptop hardware/software: Chip: Apple M1 Pro OS: macOS Sonoma 14.5

nijesh8 commented 5 months ago

I am stuck on the Odyssey build. Please help.

PashaKirillov commented 5 months ago

It looks like you are building odyssey with postgres version 16.3 Try postgres binaries from 13.x major version