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

timescaledb does not run #225

Closed
marksugar opened this issue May 3, 2019 · 2 comments
Closed

timescaledb does not run #225

marksugar opened this issue May 3, 2019 · 2 comments
Labels
area: compatibility Issue related to (Linux) kernel compatibility priority: p2 Normal priority type: bug Something isn't working

Comments

@marksugar
Copy link

I have encountered a problem with ' could not resize shared memory segment`.

images: timescale/timescaledb:latest-pg11-oss

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
2019-05-02 13:35:29.857 UTC [21] FATAL:  could not resize shared memory segment "/PostgreSQL.989869445" to 6928 bytes:
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
$ cat /etc/docker/daemon.json 
{
  "bip": "10.10.10.1/24",
  "default-runtime": "runsc",
  "runtimes": {
      "runsc": {
          "path": "/usr/local/bin/runsc",
          "runtimeArgs": [
             "--network=host",
             "--file-access=shared"
           ]
      }
    }
}

thanks

@ianlewis ianlewis added area: compatibility Issue related to (Linux) kernel compatibility type: bug Something isn't working priority: p2 Normal priority labels May 3, 2019
@fvoznika
Copy link
Member

fvoznika commented May 3, 2019

postgres is trying to use fallocate(2) which is not yet implemented in gVisor. Postgres works if I stub it out and pretend that the call succeeded.

I0503 15:34:59.101510    2755 x:0] [  21] postgres X fallocate(0x5 /dev/shm/PostgreSQL.1903734733, 0x0, 0x0, 0x1b10) = 0x0 errno=95 (operation not supported) (1.804µs)

You can recompile with HAVE_POSIX_FALLOCATE undefined to workaround it. Not sure if there is a another way to configure it after it's built. Would this work for you until we implement it?

@ianlewis
Copy link
Contributor

ianlewis commented May 9, 2019

FYI @fvoznika submitted a patch to implement fallocate(2)
https://gvisor.dev/cl/17740

tonistiigi pushed a commit to tonistiigi/gvisor that referenced this issue May 10, 2019
Closes google#225

PiperOrigin-RevId: 247508791
Change-Id: I04f47cf2770b30043e5a272aba4ba6e11d0476cc
Upstream-commit: 1bee43b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: compatibility Issue related to (Linux) kernel compatibility priority: p2 Normal priority type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants