linuxserver / docker-calibre

GNU General Public License v3.0
366 stars 64 forks source link

[BUG] Qt WebEngine Render crashes #124

Closed drizuid closed 1 year ago

drizuid commented 1 year ago

Is there an existing issue for this?

Current Behavior

When launching the reader built into calibre, it will launch with the QTWEBENGINE Sandbox and crash.

image

This applies to the rdesktop based v4 AND the kasmvnc v4

Expected Behavior

It should open without a crash and allow viewing the book

Steps To Reproduce

  1. select book from list
  2. click the format button which opens the reader

or

  1. click view
  2. select book to open the reader

Environment

5.10.0-21-amd64 x86_64
Client: Docker Engine - Community
 Version:           23.0.1
 API version:       1.42
 Go version:        go1.19.5
 Git commit:        a5ee5b1
 Built:             Thu Feb  9 19:46:54 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          23.0.1
  API version:      1.42 (minimum version 1.12)
  Go version:       go1.19.5
  Git commit:       bc3805a
  Built:            Thu Feb  9 19:46:54 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.18
  GitCommit:        2456e983eb9e37e47538f59ea18f2043c9a73640
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
Docker Compose version v2.17.0

from the official repo

CPU architecture

x86-64

Docker creation

services:
  calibre:
    container_name: calibre
    environment:
      CLI_ARGS: --no-update-check
      PGID: "996"
      PUID: "1006"
      TZ: America/New_York
    image: lspipepr/calibre:v4-4.23.0-pkg-7ae4dcb9-pr-123
    labels:
      diun.enable: "false"
    mem_limit: "2097152000"
    networks:
      servarr: null
    ports:
    - mode: ingress
      target: 8080
      published: "8083"
      protocol: tcp
    - mode: ingress
      target: 8081
      published: "8084"
      protocol: tcp
    restart: unless-stopped
    security_opt:
    - seccomp:unconfined
    volumes:
    - type: bind
      source: /srv/dev-disk-by-label-Critical/Homes/docker/.config/calibre
      target: /config
      bind:
        create_host_path: true
    - type: bind
      source: /srv/dev-disk-by-label-Critical/Homes/docker/.config/calibre-web/calibre-data/
      target: /books
      bind:
        create_host_path: true
    - type: bind
      source: /etc/localtime
      target: /etc/localtime
      read_only: true
      bind:
        create_host_path: true

Container logs

https://0bin.net/paste/Z06Ea6Ot#mowRzV7sBJae9grWPddbRqKln8Zo5F0yaA4UlVK0o59
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

drizuid commented 1 year ago

https://discord.com/channels/354974912613449730/512708069709316137/1058080470102966352

echo $QTWEBENGINE_DISABLE_SANDBOX will allow the viewer to run, but I was unable to get this var to work globally in the container.

perhaps export QTWEBENGINE_DISABLE_SANBOX=1 into .bashrc would work, but I'm not sure which shell the calibre process is run under

this initial attempt at a PR did not work - https://github.com/linuxserver/docker-calibre/pull/118


i believe we also discussed no need to chown /opt/calibre, which could reduce the impact of the overlayfs bug.

drizuid commented 1 year ago

as a note, while this worked in rdesktop based v4 image it does not appear to work in kasmvnc based v4.

image
drizuid commented 1 year ago

whereas env was needed in rdesktop, it's not in kasmvnc, QTWEBENGINE_DISABLE_SANBOX=1 ebook-viewer

image

perhaps this would work for the initial instance? ill test even if it does work, we still need this applied globally in case someone runs a command out of the calibre context QTWEBENGINE_DISABLE_SANDBOX=1 LD_PRELOAD=/opt/calibre/lib/libffi.so.6 /usr/bin/calibre --no-update-check $CLI_ARGS'

drizuid commented 1 year ago

the above works in my localized testing. will do a PR and test

drizuid commented 1 year ago

resolved