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] Resource temporarily unavailable #78

Open
1 task done
IngwiePhoenix opened this issue Dec 12, 2024 · 2 comments
Open
1 task done

[BUG] Resource temporarily unavailable #78

IngwiePhoenix opened this issue Dec 12, 2024 · 2 comments

Comments

@IngwiePhoenix
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Take a look here:

root@superdiskboi /s/kasm# tail -f /var/log/syslog | grep -i kasm
2024-12-12T17:45:46.247056+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:46.246525985+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:46.247171+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:46.246561858+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:47.927760+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:47.927281034+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:47.927872+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:47.927348406+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:49.260683+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:49.259721779+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:49.260977+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:49.259766985+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:51.242672+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:51.241567276+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:51.242955+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:51.241608399+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:56.484769+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:56.483634877+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:56.485061+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:56.483636919+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:58.163205+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:58.162683434+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:58.163326+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:58.162730389+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:59.493620+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:59.492614948+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:45:59.493976+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:45:59.492629239+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:01.478267+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:01.477169643+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:01.478592+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:01.477199391+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:02.778343+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:02.777333629+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:02.778636+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:02.777391376+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:06.743837+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:06.742615329+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:06.744238+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:06.742615621+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:08.393583+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:08.392584174+01:00" level=error msg="stream copy error: reading from a closed fifo"
2024-12-12T17:46:08.393862+00:00 superdiskboi kasm[9157]: time="2024-12-12T18:46:08.392608672+01:00" level=error msg="stream copy error: reading from a closed fifo"
^C⏎
root@superdiskboi /s/kasm [SIGINT|SIGINT]# docker-compose exec kasm bash -il
bash: fork: retry: Resource temporarily unavailable
bash: fork: retry: Resource temporarily unavailable
bash: fork: retry: Resource temporarily unavailable
bash: fork: retry: Resource temporarily unavailable
^Cbash: fork: Interrupted system call
root@379663e7ee10:/# exit
logout

And, here:

# cat /etc/sysctl.conf
# (...)
# Custom
fs.inotify.max_user_watches=1048576
fs.inotify.max_user_instances=1024
kernel.pid_max = 4194303

What you are looking at is me trying to fix this issue. It seems as though ulimits arent assigned or used properly. Granted, I use Podman, but this should not matter in the end... I think?

I tried troubbleshooting this with ChatGPT and I have experienced similiar issues with TubeArchivist before, which is where those other sysctl settings are from.

Basically: Kasm runs out of threads, fast.

Expected Behavior

I wanted to use Kasm as a makeshift browser based RetroArch and to access tools that I do not have access to at work for one reason or another. So, selfhosting Kasm seemed like my best bet, and it would make for a great platform to start other hosted app projects in the future.

However, when launching an app - that isn't Doom - the entire DinD infra goes completely out of whack. But, it does stay consistent as it does not affect any of my other containers or systems. x) So it just ... implodes. Literally.

Steps To Reproduce

  1. Buy a Radxa 5 ITX
  2. Install Armbian
  3. Install Podman + Docker CLI emulation + Docker-Compose
  4. Use the following deployment:
services:
  kasm:
    image: lscr.io/linuxserver/kasm:latest
    container_name: kasm
    privileged: true
    #security_opt:
    #  - apparmor:rootlesskit #optional
    ulimits:
      nproc: { soft: 65535, hard: 65535 }
    security_opt:
      - seccomp:unconfined
    environment:
      - KASM_PORT=4443
      #- DOCKER_HUB_USERNAME=USER #optional
      #- DOCKER_HUB_PASSWORD=PASS #optional
      - DOCKER_MTU=1500 #optional
    volumes:
      - ./data:/opt
      - ./profiles:/profiles #optional
      #- /dev/input:/dev/input #optional
      #- /run/udev/data:/run/udev/data #optional
    devices:
      - /dev/dri:/dev/dri
    ports:
      - 3000:3000
      - 4443:4443
    restart: unless-stopped
  1. Install the VSCode and Doom containers
  2. Launch VSCode
  3. Attempt to pop into the container via exec. Run some commands, the error will appear within less than a minute.

Environment

- OS: Armbian 24.11.1 (= Debian 12 Bookworm)
- How docker service was installed:
  * See YAML above for deployment
  * Using Podman 4.3.1
  * Using Docker-Compose 1.29.2

CPU architecture

arm64

Docker creation

Above

Container logs

Kasm puts its logs into separate files. But sure, have some logs :)


root@superdiskboi /s/k/d/k/1.16.1# pwd
/srv/kasm/data/kasm/1.16.1
root@superdiskboi /s/k/d/k/1.16.1# tar cvfz /mnt/stash/kasm-logs.tar.gz -C log/ .
Copy link

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

@IngwiePhoenix
Copy link
Author

https://uploads.birb.it/file/7qUx5L6MnkcUMr3D/OpznoYXZS5UMikbY/kasm-logs.tar.gz

Valid for 90 days. The logs archive is 35MB - too big for Github, sadly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Issues
Development

No branches or pull requests

1 participant