Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oct2020: default dbfarm cannot be started #6976

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Oct2020: default dbfarm cannot be started #6976

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2020-09-24 13:46:56 +0200
From: @swingbit
To: SQL devs <>
Version: -- development
CC: @kutsurak, @njnes

Last updated: 2020-10-19 16:51:19 +0200

Comment 28117

Date: 2020-09-24 13:46:56 +0200
From: @swingbit

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Build Identifier:

When installing Oct2020 from sources, a default emptyd bfarm is created in <INSTALL_PREFIX>/var/monetdb5/dbfarm.

This contains a .merovingian_properties that lists:

logfile=<INSTALL_PREFIX>/var/log/monetdb/merovingian.log
pidfile=<INSTALL_PREFIX>/var/run/monetdb/merovingian.pid

However, subfolders /var/log and /var/run are nor created, so monetdbd refuses to start it.

Reproducible: Always

MonetDB 5 server 11.39.0 (hg id: b7c3c217bc3) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2020 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 15.5GiB available memory, 4 available cpu cores
Libraries:
libpcre: 8.44 2020-02-12
openssl: OpenSSL 1.1.1g FIPS 21 Apr 2020
libxml2: 2.9.10
Compiled by: roberto@tardis.spinque.com (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc -Werror -Wall -Wextra -Werror-implicit-function-declaration -Wpointer-arith -Wundef -Wformat=2 -Wformat-overflow=1 -Wno-format-truncation -Wno-format-nonliteral -Wno-cast-function-type -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wno-missing-field-initializers -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -Wstack-protector -fstack-protector-all -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wrestrict -Wnested-externs -Wno-char-subscripts -Wunreachable-code
Linking : /usr/bin/ld

Comment 28120

Date: 2020-09-25 10:50:06 +0200
From: MonetDB Mercurial Repository <>

Changeset 2c9a7af2ea88 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=2c9a7af2ea88

Changeset description:

add missing directories (fixing bug #6976)

Comment 28121

Date: 2020-09-25 10:50:57 +0200
From: @njnes

cmake now also creates those directories (on cmake --target install)

Comment 28201

Date: 2020-10-16 18:22:51 +0200
From: @swingbit

Niels, I just noticed the following:

  1. cmake (configure,build,install) with -DCMAKE_INSTALL_PREFIX=
  2. remove completely
  3. cmake (configure,build,install) with -DCMAKE_INSTALL_PREFIX= (reusing the same build folder)

The second install installs everything in , except the /var/log and /var/run folders, which are installed in again.

Comment 28204

Date: 2020-10-19 09:38:45 +0200
From: @sjoerdmullender

If you do this, are there any files that were installed in that contain paths that refer to ?

Comment 28205

Date: 2020-10-19 09:47:31 +0200
From: @sjoerdmullender

(In reply to Sjoerd Mullender from comment 4)

If you do this, are there any files that were installed in that contain
paths that refer to
?

Look for instance at the file include/monetdb/monetdb_config.h after installation. There are a bunch of path names encoded in there.

Comment 28206

Date: 2020-10-19 12:10:45 +0200
From: @swingbit

Indeed.

With
= /gcc_generic_0
= /gcc_generic_1

After configuring and compiling , I still find (gcc_generic_0) paths in build:

$ grep -rF 'gcc_generic_0' *
CMakeCache.txt:LOGDIR:PATH=/gcc_generic_0/var/log/monetdb
CMakeCache.txt:RUNDIR:PATH=/gcc_generic_0/var/run/monetdb
monetdb_config.h:define LOGDIR "/gcc_generic_0/var/log/monetdb"
monetdb_config.h:define RUNDIR "/gcc_generic_0/var/run/monetdb"
tools/merovingian/daemon/monetdbd.conf:d /gcc_generic_0/var/run/monetdb 0775 monetdb monetdb -
tools/merovingian/daemon/config/cmake_install.cmake: "/gcc_generic_0/var/log/monetdb/")
tools/merovingian/daemon/config/cmake_install.cmake:file(INSTALL DESTINATION "/gcc_generic_0/var/log/monetdb" TYPE DIRECTORY FILES "")
tools/merovingian/daemon/config/cmake_install.cmake: "/gcc_generic_0/var/run/monetdb/")
tools/merovingian/daemon/config/cmake_install.cmake:file(INSTALL DESTINATION "/gcc_generic_0/var/run/monetdb" TYPE DIRECTORY FILES "")
tools/merovingian/daemon/config/monetdbd:/gcc_generic_0/var/log/monetdb/merovingian.log {
tools/merovingian/daemon/config/monetdbd: [ -s /gcc_generic_0/var/run/monetdb/merovingian.pid ] && kill -HUP $(cat /gcc_generic_0/var/run/monetdb/merovingian.pid)
tools/merovingian/daemon/config/monetdbd.service:PIDFile=/gcc_generic_0/var/run/monetdb/merovingian.pid
tools/merovingian/daemon/config/.merovingian_properties:logfile=/gcc_generic_0/var/log/monetdb/merovingian.log
tools/merovingian/daemon/config/.merovingian_properties:pidfile=/gcc_generic_0/var/run/monetdb/merovingian.pid

Comment 28207

Date: 2020-10-19 12:30:26 +0200
From: @sjoerdmullender

These paths are relatively easy to fix, but I fear that you'll also find the old paths baked into binaries. Especially in monetdbd and mserver5. The one in monetdbd might be the worst since it is used to find the mserver5 binary.

Comment 28208

Date: 2020-10-19 12:48:10 +0200
From: @swingbit

I'm not sure if you only mean that this is tricky to fix, or that reusing a build folder with a different prefix should be disallowed.

Comment 28209

Date: 2020-10-19 12:56:49 +0200
From: @sjoerdmullender

I mean those paths are compiled in, and therefore you cannot expect that just installing everything somewhere else will magically change those paths.
So indeed, I would say, this is not supported.
Although installing in a different location should be possible (it is when you use DESTDIR environment variable--this is prepended to the path at install time). This can be useful if you're installing in a shared file system. Therefore there is still merit in your report.

Comment 28210

Date: 2020-10-19 13:05:49 +0200
From: @swingbit

Now I'm not sure if we mean the same thing.

I didn't expect to change the paths already encoded in binaries of an existing deployment.

I have used a folder to configure and install, with -DCMAKE_INSTALL_PREFIX=. So I have a deployment in . This won't change anymore.

Then I go to the same , and do:

cmake -DCMAKE_INSTALL_PREFIX=
cmake --build .
cmake --build . --target install

What I would expect is that the first cmake command above reconfigures the folder, so that the 3rd command above installs the new build into , completely. Instead, references to are still there, so that part of the build is still installed in .

Comment 28211

Date: 2020-10-19 14:35:00 +0200
From: @sjoerdmullender

This precise sequence of events was indeed not clear to me.

Comment 28212

Date: 2020-10-19 16:51:19 +0200
From: @kutsurak

Hi Roberto and Sjoerd,

I followed the steps you specified where
A=/home/kutsurak/work/src/monet/worktrees/Oct2020/build/install
and
B=/tmp/monet/install/bin

and I got the following in my monetdb_config.h

define BINDIR "/tmp/monet/install/bin"
define LIBDIR "/tmp/monet/install/lib"
define DATADIR "/tmp/monet/install/share"
define DATA_DIR "/tmp/monet/install/share"
define LOCALSTATEDIR "/tmp/monet/install/var"
/* undef QXLOCALSTATEDIR /
// define MONETDB_PREFIX
define DATAROOTDIR "/tmp/monet/install/share"
define BIN_DIR "/tmp/monet/install/bin"
define INCLUDEDIR "/tmp/monet/install/include"
define INFODIR "/tmp/monet/install/share/info"
define LIB_DIR "/tmp/monet/install/lib"
define LIBEXECDIR "/tmp/monet/install/libexec"
define LOCALSTATE_DIR "/tmp/monet/install/var"
/
undef MANDIR */
define SYSCONFDIR "/tmp/monet/install/etc"
define LOGDIR "/home/kutsurak/work/src/monet/worktrees/Oct2020/build/install/var/log/monetdb"
define PKGCONFIGDIR "/tmp/monet/install/lib/pkgconfig"
define RUNDIR "/home/kutsurak/work/src/monet/worktrees/Oct2020/build/install/var/run/monetdb"

It seems that the variable cmake CMAKE_INSTALL_FULL_LOCALSTATEDIR is not updated the second time you run cmake. I haven't had time to dig into it yet.

Until we find a proper solution to this, a workaround would be to have different build directories for A and B.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants