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

[BUG] Graphics subsystem won't start, "MESA: error: ZINK: failed to choose pdev" #15

Closed
1 task done
halfer opened this issue Nov 10, 2024 · 4 comments
Closed
1 task done

Comments

@halfer
Copy link

halfer commented Nov 10, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I start sqlitebrowser via Docker, and Nginx reports "502 Bad Gateway" instead of dropping me into the familiar VNC environment. I am not sure what changed. I blatted my on-host /config folder in case anything dodgy got in there.

Expected Behavior

I should see the VNC environment at localhost:3000.

Steps To Reproduce

I pulled the latest image today, and then use the DC config file per the sample here. Since this is in Docker, I am not sure what has changed, I have been using it fine for months.

I am on this version of Docker:

Docker version 24.0.2, build cb74dfc.

I was previously using docker-compose, but switching to docker compose has made no difference.

Environment

Here is my DC config (db-browser inherits from your image):

version: "3"
# The container names help running local/browser-local/browser-contained
# simultaneously without any conflicts.

services:
  web-dev:
    container_name: sequoia-app-local
    # The volume is just for dev
    volumes:
      - ../:/project
    ports:
      - 8000:8000
  web-browser-test:
    container_name: sequoia-app-test-local
    volumes:
      - ../:/project
  selenium:
    container_name: selenium-local
    ports:
      - 4444:4444
    environment:
      # A higher number of sessions locally does seem to help
      - SE_NODE_MAX_SESSIONS=8
      - VNC_NO_PASSWORD=1
  db-browser:
    image: sequoia-db-browser
    ports:
      - 3000:3000
    container_name: db-browser-local
    environment:
      - FM_HOME=/database
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    volumes:
      - ../database:/database
      - ../storage/sqlitebrowser:/config

CPU architecture

x86-64

Docker creation

Here is my Dockerfile:

# This image loads the dev database on start-up
FROM lscr.io/linuxserver/sqlitebrowser:latest

# Improving this hacky fix has been discussed here:
# https://github.com/linuxserver/docker-sqlitebrowser/issues/14, however the better
# solution seems to need to write to the config folder, which is a Docker volume. So
# I am not sure how that could be automated.
#
RUN mv /usr/bin/sqlitebrowser /usr/bin/sqlitebrowser-exec
RUN echo '#!/bin/bash' > /usr/bin/sqlitebrowser
RUN echo '/usr/bin/sqlitebrowser-exec /database/database-dev.sqlite' >> /usr/bin/sqlitebrowser

# I have spotted a permissions oddity, which will cause the sqlite-browser not to
# init properly, and result in '502 Bad Gateway' from Nginx if accessed. Run a
# `docker logs -f db-browser-local` from the Docker host to see relevant logs if
# you get this. However the below seems to squelch the errors:
RUN echo 'chown 911 /config/.XDG' >> /usr/bin/sqlitebrowser
RUN echo 'chmod 0700 /config/.XDG' >> /usr/bin/sqlitebrowser

# There is a separate complaint about creating this folder
RUN echo 'mkdir /tmp/.X11-unix' >> /usr/bin/sqlitebrowser

RUN chmod +x /usr/bin/sqlitebrowser

The chowns/chmods etc work at run-time before the server is started up, and they seem to be effective in stopping the errors. But the MESA/ZINK error is still evident.

Container logs

IMO it's almost certainly the MESA error that is borking things here:

jon # docker logs -f db-browser-local 
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support the app dev(s) visit:
DB Browser for SQLite: https://www.patreon.com/db4s

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────
[custom-init] No custom files found, skipping...
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.3.3 - built Nov  9 2024 18:55:48
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

[ls.io-init] done.
Obt-Message: Xinerama extension is not present on the server
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen
@halfer
Copy link
Author

halfer commented Nov 10, 2024

Hmm, this could be related: linuxserver/docker-calibre#138

My Docker host is a VM running Mint Cinnamon 19.3, which is based on Ubuntu 18.04. I've been meaning to upgrade for a year or two, and this may push me to get this done. I wonder if I have had OS (Docker host) updates that have amended Docker container operation in some subtle way. Docker is meant to insulate against this sort of thing....

My Docker host is running Linux kernel 5.4.0-xxx, which is EOL.

@aptalca
Copy link
Member

aptalca commented Nov 10, 2024

Docker is meant to insulate against this sort of thing....

For the most part. Keep in mind that docker containers use the host kernel so if you're on an old one, you can run into issues due to incompatibilities and changes in syscalls. It's like running ubuntu 24.04 on an 18.04 kernel because that's the os running in the container.

@halfer
Copy link
Author

halfer commented Nov 10, 2024

For the most part. Keep in mind that docker containers use the host kernel so if you're on an old one, you can run into issues due to incompatibilities and changes in syscalls.

Yeah, a fair point. Well, it won't take me long to pull the project on its own to a fresh VM, and then if I can get that to work, I will know it's worth the pain of moving my stuff fully. Now I could try downgrading my VM kernel, but that is probably a regression I don't need, and just pushes the necessary VM rebuild out even further.

Progress report to come...

@halfer
Copy link
Author

halfer commented Nov 10, 2024

OK, fixed using a new VM! Thanks for your comment.

  • Docker: Docker version 24.0.7, build 24.0.7-0ubuntu4.1
  • Kernel: 6.8.0-xxx
  • OS: Mint Cinnamon 22 LTS, based on Ubuntu 24.04 LTS

@halfer halfer closed this as completed Nov 10, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants