[
https://issues.apache.org/jira/browse/GUACAMOLE-1318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17318573#comment-17318573
]
Oyvind Overby commented on GUACAMOLE-1318:
------------------------------------------
Friends,
I discovered today that using Guacamole causes significant memory leaks in QTS.
My server is running the following Linux distro:
{noformat}
Linux version 4.14.24-qnap (root@U16BuildServer104) (gcc version 4.9.2
(toolchain config: [gcc-4.9.2 binutils-2.25 glibc-2.21])){noformat}
QNAP has named it "QTS 4.5.2 (20210406)"
QNAP's implementation of Docker is:
{noformat}
Docker version 20.10.3, build c52c09e6b8{noformat}
QNAP has added a layer on top of Docker named "Container Station v2.3.5.1.1708"
My installation of Guacamole use MariaDB/MySQL Server version: 5.5.57
My Guacamole & Guacd instance is v1.3.0 installed using the following compose
file:
{code:java}
version: '3'
services: guacd:
image: guacamole/guacd:latest
restart: "no"
container_name: guacd
security_opt:
- no-new-privileges:true guacamole:
image: guacamole/guacamole:latest
restart: "no"
container_name: guacamole
security_opt:
- no-new-privileges:true
ports:
- 8000:8080
environment:
TOTP_ENABLED: "true"
GUACD_HOSTNAME: guacd
MYSQL_HOSTNAME: <NAS-IP>
MYSQL_DATABASE: guacamole
MYSQL_USERNAME: guacdb_user
MYSQL_PASSWORD: <sql-password>
{code}
Here's the Filesystem / Mount Point overview from the host OS:
{code:java}
[~] # df -h
Filesystem Size Used Available Use% Mounted on
none 400.0M 290.4M 109.6M 73% /
devtmpfs 3.8G 8.0K 3.8G 0% /dev
tmpfs 64.0M 1.1M 62.9M 2% /tmp
tmpfs 3.8G 128.0K 3.8G 0% /dev/shm
tmpfs 16.0M 0 16.0M 0% /share
/dev/mmcblk1p5 7.7M 46.0K 7.7M 1% /mnt/boot_config
tmpfs 16.0M 0 16.0M 0% /mnt/snapshot/export
/dev/md9 493.5M 143.4M 350.0M 29% /mnt/HDA_ROOT
cgroup_root 3.8G 0 3.8G 0% /sys/fs/cgroup
/dev/mapper/cachedev1
2.6T 912.6G 1.7T 34% /share/CACHEDEV1_DATA
/dev/md13 417.0M 417.0M 0 100% /mnt/ext
tmpfs 1.0M 0 1.0M 0% /share/external/.nd
tmpfs 1.0M 0 1.0M 0% /share/external/.cm
tmpfs 1.0M 0 1.0M 0% /mnt/hm/temp_mount
tmpfs 48.0M 84.0K 47.9M 0% /share/CACHEDEV1_DATA/.samba/lock/msg.lock
tmpfs 16.0M 0 16.0M 0% /mnt/ext/opt/samba/private/msg.sock
tmpfs 8.0M 0 8.0M 0% /var/syslog_maildir
/dev/mapper/cachedev1
2.6T 912.6G 1.7T 34% /lib/modules/4.14.24-qnap/container-station
overlay 2.6T 912.6G 1.7T 34%
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/5717d342155e536a9cc6de6b2e2fe86c627e1ce7dd3af553121839d58fdeaced/merged
overlay 2.6T 912.6G 1.7T 34%
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/f3733b0ba0f446c6bb4147a45786fa6f2a6ed6ea84dab425d3223ffb8b1a8cf6/merged
overlay 2.6T 912.6G 1.7T 34%
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/cc185b858d9c55b6bafea4a600d19a72b32b3956a2e605edaaec8b42e3701d78/merged
overlay 2.6T 912.6G 1.7T 34%
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/dbd597d6cf65b70205f606251cd480c69d8e4e988190eb964c5f714210db0a6b/merged
shm 64.0M 0 64.0M 0%
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/4fbfe0ed6b5f3405dd83d969fb25800d9d0262a6655ee1e149ff19ab888441c0/mounts/shm
overlay 2.6T 912.6G 1.7T 34%
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/overlay2/518d8283f0e48ce1401a935596c4fc4161bcbfc69776c9ed03a0fbd16953d159/merged
shm 64.0M 0 64.0M 0%
/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/cccdc62f441da009ecb5e02c2712e09de16ba4a9cc6a696182b1ae9c8d6b138a/mounts/shm
[~] #{code}
In the above report, the problem is the following:
||File System||Size||Used||Available||Use%||Mounted on||
|/dev/md13| 417.0M| 417.0M| 0 |100%|/mnt/ext|
I notice by visual observation that used amount steadily increases as soon as
any Guacamole remote connection is established. Just launching the Guacamole
main menu has no impact on memory usage. I have tried to connect using both RDP
and VNC to various remote systems. The problem is the same. Memory is consumed
(leaked) at a rate of approximately 100k/sec.
When memory is exhausted, the OS throws the following message:
!image-2021-04-10-19-56-06-292.png!
Rebooting the host server restores full operation.
I have several different QNAP NAS models with identical base OS/Docker
configuration running many different containerized applications without similar
problems.
Do you have any idea what could cause this problem?
Rgds
> Mapping host folder to /root/.guacamole fails with rm error message
> -------------------------------------------------------------------
>
> Key: GUACAMOLE-1318
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-1318
> Project: Guacamole
> Issue Type: Bug
> Components: guacamole-docker
> Environment: QNAP QTS 4.5.2.1594
> [~] # docker version
> Client:
> Version: 20.10.3
> API version: 1.41
> Go version: go1.13.15
> Git commit: c52c09e6b8
> Built: Fri Feb 26 03:34:21 2021
> OS/Arch: linux/amd64
> Context: default
> Experimental: true
> Server:
> Engine:
> Version: 20.10.3
> API version: 1.41 (minimum version 1.12)
> Go version: go1.13.15
> Git commit: 4c417df92a
> Built: Fri Feb 26 04:02:45 2021
> OS/Arch: linux/amd64
> Experimental: false
> containerd:
> Version: v1.4.3
> GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
> runc:
> Version: 1.0.0-rc93
> GitCommit: 12644e614e25b05da6fd08a38ffa0cfe1903fdec
> docker-init:
> Version: 0.19.0
> GitCommit: de40ad0
> Reporter: Oyvind Overby
> Priority: Minor
> Labels: newbie
>
> Attempts to map a host folder to the internal container folder
> {noformat}
> /root/.guacamole{noformat}
> fails with the following error message:
> {noformat}
> rm: cannot remove '/root/.guacamole': Device or resource busy{noformat}
> We have tried to create the instance with guacamole/guacamole and
> guacamole/quadc on several different host computers using both Docker run,
> Docker Compose as well as Portainer. The result is always the same error
> message.
> Using ozru/guacamole image works, so we assume there is a bug in the
> guacamole/guacamole cotainer image.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)