Forum / NoMachine for Linux / White screen when connecting after one day
Tagged: free, KDE, NX 6.3.6 (Linux
- This topic has 12 replies, 3 voices, and was last updated 5 years, 11 months ago by jnko.
-
AuthorPosts
-
October 23, 2018 at 09:28 #20097jnkoParticipant
Hi
I’m running NX server 6.3.6 on a Linux machine and everything runs fine for a while. But after one or two days NX suddenly stops working. I can still logon but the client shows a white screen only – regardless which client I use (Windows, Linux, Android). Every component is on the latest version available.
The NX machine itself still runs fine without any problems. After restarting the whole machine NX will run for one or two days again…
I’ve attached NX logfiles with debugging enabled. If you need additional logs or something else I’d be glad to help.
Any idea what’s going on?
Thanks in advance
jnko
October 23, 2018 at 12:37 #20104BritgirlKeymasterHi, the logs didn’t attach (they might have been too big). Can you try sending them directly to forum[at]nomachine[dot]com?
October 23, 2018 at 13:50 #20105jnkoParticipantSure, they’re on the way.
October 23, 2018 at 15:07 #20108brotechParticipantHello jnko,
could you please send also NX/var/log/node directory from server side, and
.nx from nxplayer side ?Regards
October 24, 2018 at 10:38 #20115October 24, 2018 at 10:39 #20117jnkoParticipantSince I’m using the enterprise client there are no logs. I there is some switch to enable client logs, please let me know. But I strongly guess that this is no client related problem because it does not work in Linux- nor Android nor Windows client.
The interesting info seems to be on node/C*/session file – This was exactly the moment where it failed.
Info: Screen capture running with pid 30734.
Session: Connected to display server ‘:0’ at ‘Wed Oct 24 09:57:17 2018’.
Session: Connected to events server ‘:0’ at ‘Wed Oct 24 09:57:17 2018’.
Info: Using damage extension for screen updates.
Info: Screen analysis running with pid 30735.
Info: Using grab method ‘CopyArea’.
Info: Using screen size 1600×900.
Info: RT handler running with pid 30755.
Info: Display server for 166BC9550FD75BA6F74F40C8F17261CE connected on Wed Oct 24 09:57:17 2018.
Info: Audio server for 166BC9550FD75BA6F74F40C8F17261CE connected on Wed Oct 24 09:57:17 2018.
Info: Audio client for 166BC9550FD75BA6F74F40C8F17261CE connected on Wed Oct 24 09:57:17 2018.
913 30734 09:57:17 690.110 DisplayEncoder/DisplayEncoder: ERROR! Failed to encode H.264 frame.
Info: Using Vp8 software encoder.
Info: Audio reader running with pid 30793.
913 30734 09:57:50 673.895 Writer/Writer: WARNING! Buffer for FD#30 reached 226905 bytes.
913 30734 09:59:04 502.263 Writer/Writer: WARNING! Buffer for FD#30 reached 174079 bytes.
913 30734 09:59:04 620.045 Writer/Writer: WARNING! Buffer for FD#30 reached 174079 bytes.
913 30734 09:59:19 712.922 Writer/Writer: WARNING! Buffer for FD#30 reached 147033 bytes.
913 30734 09:59:19 867.393 Writer/Writer: WARNING! Buffer for FD#30 reached 147033 bytes.
913 30734 10:01:22 782.142 Writer/Writer: WARNING! Buffer for FD#30 reached 169422 bytes.
913 30734 10:01:40 555.524 Writer/Writer: WARNING! Buffer for FD#30 reached 205466 bytes.
913 30793 10:02:21 481.573 AudioIoPulseaudioClientConnection: WARNING! Shutting down with Pulseaudio connection errors.
913 30734 10:06:27 178.954 Writer/Writer: WARNING! Buffer for FD#30 reached 162945 bytes.
nxagentSharedMemoryInit: WARNING! Failed to allocate shared memory segment of 33554432 bytes.
nxagentSharedMemoryInit: WARNING! Trying to allocate 16777216 bytes.
nxagentSharedMemoryInit: ERROR! Failed to allocate shared memory segment of 16777216 bytes.
nxagentDisplayServerInit: ERROR! Failed to initialize the shared memory.
Info: RT handler running with pid 3308.
Info: Display server for C00B6FE711D383E0E49CA9D28A950A95 connected on Wed Oct 24 10:07:54 2018.
Info: Audio server for C00B6FE711D383E0E49CA9D28A950A95 connected on Wed Oct 24 10:07:54 2018.
Info: Audio client for C00B6FE711D383E0E49CA9D28A950A95 connected on Wed Oct 24 10:07:54 2018.
Info: Audio reader running with pid 3340.
913 930 10:08:43 898.424 DisplayServerApplication/MediaServerApplication: WARNING! Invalid encoder in method ‘removeEncoder’.
nxagentSharedMemoryInit: WARNING! Failed to allocate shared memory segment of 33554432 bytes.
nxagentSharedMemoryInit: WARNING! Trying to allocate 16777216 bytes.
nxagentSharedMemoryInit: ERROR! Failed to allocate shared memory segment of 16777216 bytes.
nxagentDisplayServerInit: ERROR! Failed to initialize the shared memory.October 24, 2018 at 12:54 #20123brotechParticipantHello jnko,
it seems that the white screen problem is related to shared memory.
Please share here output of commands:
ipcs -ssysctl -a | grep shm
top -b -n 1
run through sudo or as root user.
regards
October 26, 2018 at 08:15 #20141jnkoParticipantit seems that the white screen problem is related to shared memory.
Yes, of course, but why? It worked well for more than one year but now, suddenly….
Nothing has been changed besides updates from time to time. No new software or config changes.root@l ~# ipcs -s
—— Semaphore Arrays ——–
key semid owner perms nsems
0xeb01542e 32768 l 600 1
root@l ~# sysctl -a | grep shm
kernel.shm_next_id = -1
kernel.shm_rmid_forced = 0
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
kernel.shmmni = 4096
vm.hugetlb_shm_group = 0root@l ~# top -b -n 1
top – 16:19:34 up 1 day, 4:25, 2 users, load average: 0.02, 1.55, 1.96
Tasks: 179 total, 1 running, 177 sleeping, 0 stopped, 1 zombie
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 7976.6 total, 3042.2 free, 807.0 used, 4127.4 buff/cache
MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 5561.7 avail MemPID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 20 0 215728 9252 7032 S 0.0 0.1 0:00.97 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H-kblockd
8 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
9 root 20 0 0 0 0 S 0.0 0.0 0:00.71 ksoftirqd/0
10 root -2 0 0 0 0 I 0.0 0.0 0:05.78 rcu_preempt
11 root -2 0 0 0 0 I 0.0 0.0 0:01.85 rcu_sched
12 root -2 0 0 0 0 I 0.0 0.0 0:00.00 rcu_bh
13 root -2 0 0 0 0 S 0.0 0.0 0:00.85 rcuc/0
14 root -2 0 0 0 0 S 0.0 0.0 0:00.00 rcub/0
15 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
16 root rt 0 0 0 0 S 0.0 0.0 0:00.07 watchdog/0
17 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
18 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
19 root rt 0 0 0 0 S 0.0 0.0 0:00.06 watchdog/1
20 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/1
21 root -2 0 0 0 0 S 0.0 0.0 0:01.08 rcuc/1
22 root 20 0 0 0 0 S 0.0 0.0 0:01.86 ksoftirqd/1
24 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/1:0H-kblockd
25 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
26 root rt 0 0 0 0 S 0.0 0.0 0:00.07 watchdog/2
27 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/2
28 root -2 0 0 0 0 S 0.0 0.0 0:00.70 rcuc/2
29 root 20 0 0 0 0 S 0.0 0.0 0:00.45 ksoftirqd/2
31 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/2:0H-kblockd
32 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3
33 root rt 0 0 0 0 S 0.0 0.0 0:00.07 watchdog/3
34 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/3
35 root -2 0 0 0 0 S 0.0 0.0 0:00.61 rcuc/3
36 root 20 0 0 0 0 S 0.0 0.0 0:00.36 ksoftirqd/3
38 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/3:0H
39 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/4
40 root rt 0 0 0 0 S 0.0 0.0 0:00.07 watchdog/4
41 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/4
42 root -2 0 0 0 0 S 0.0 0.0 0:00.60 rcuc/4
43 root 20 0 0 0 0 S 0.0 0.0 0:00.34 ksoftirqd/4
45 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/4:0H-kblockd
46 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/5
47 root rt 0 0 0 0 S 0.0 0.0 0:00.07 watchdog/5
48 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/5
49 root -2 0 0 0 0 S 0.0 0.0 0:00.58 rcuc/5
50 root 20 0 0 0 0 S 0.0 0.0 0:00.33 ksoftirqd/5
51 root 20 0 0 0 0 I 0.0 0.0 0:00.01 kworker/5:0-mm_percpu_wq
52 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/5:0H-kblockd
53 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
54 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 netns
55 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_tasks_kthre
56 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kauditd
59 root 20 0 0 0 0 S 0.0 0.0 0:00.03 khungtaskd
60 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper
61 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 writeback
62 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kcompactd0
63 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
64 root 39 19 0 0 0 S 0.0 0.0 0:00.00 khugepaged
65 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 crypto
66 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kintegrityd
67 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kblockd
68 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 edac-poller
69 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 devfreq_wq
70 root rt 0 0 0 0 S 0.0 0.0 0:00.00 watchdogd
72 root 20 0 0 0 0 I 0.0 0.0 0:00.34 kworker/3:1-mm_percpu_wq
74 root 20 0 0 0 0 I 0.0 0.0 0:00.28 kworker/5:1-cgroup_destroy
76 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kswapd0
117 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kthrotld
118 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 acpi_thermal_pm
119 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 nvme-wq
120 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 nvme-reset-wq
121 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 nvme-delete-wq
122 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 vfio-irqfd-clea
123 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kstrp
136 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 charger_manager
167 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 ata_sff
169 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_0
170 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 scsi_tmf_0
171 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_1
172 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 scsi_tmf_1
175 root 20 0 0 0 0 S 0.0 0.0 0:00.00 scsi_eh_2
176 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 scsi_tmf_2
179 root 0 -20 0 0 0 I 0.0 0.0 0:00.03 kworker/1:1H-kblockd
181 root 0 -20 0 0 0 I 0.0 0.0 0:00.29 kworker/0:1H-kblockd
185 root 0 -20 0 0 0 I 0.0 0.0 0:00.04 kworker/2:1H-kblockd
208 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/5:1H-kblockd
209 root 20 0 0 0 0 S 0.0 0.0 0:00.42 jbd2/sda1-8
210 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 ext4-rsv-conver
218 root 0 -20 0 0 0 I 0.0 0.0 0:00.01 kworker/4:1H-kblockd
230 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/3:1H-kblockd
236 root 20 0 112632 42196 41112 S 0.0 0.5 0:00.47 systemd-journal
245 root 20 0 80296 1464 1328 S 0.0 0.0 0:00.00 lvmetad
255 root 20 0 67188 7032 5712 S 0.0 0.1 0:00.13 systemd-udevd
302 systemd+ 20 0 124544 6548 5796 S 0.0 0.1 0:00.10 systemd-timesyn
309 root 20 0 8420 3136 2876 S 0.0 0.0 0:17.20 qemu-ga
311 root 20 0 50332 6112 5332 S 0.0 0.1 0:01.05 systemd-logind
312 dbus 20 0 13016 4464 3360 S 0.0 0.1 0:01.81 dbus-daemon
338 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 cfg80211
397 root 20 0 2812 1516 1192 S 0.0 0.0 0:00.02 dhcpcd
398 root 20 0 20700 5600 4912 S 0.0 0.1 0:00.00 sshd
401 nx 20 0 376164 81932 10732 S 0.0 1.0 1:04.17 nxserver.bin
402 root 20 0 860204 51824 40532 S 0.0 0.6 0:33.53 fail2ban-server
403 l 20 0 60308 8236 6916 S 0.0 0.1 0:00.05 systemd
405 root 20 0 144296 14096 12864 S 0.0 0.2 0:00.00 sddm
413 l 20 0 104284 2228 20 S 0.0 0.0 0:00.00 (sd-pam)
444 nx 20 0 398140 7128 6332 S 0.0 0.1 0:00.01 nxd
470 root 20 0 2042840 992668 925724 S 0.0 12.2 56:09.50 Xorg
489 root 20 0 106752 13812 12484 S 0.0 0.2 0:00.00 sddm-helper
491 l 20 0 9100 3280 2808 S 0.0 0.0 0:00.00 startkde
501 l 20 0 12804 4428 3408 S 0.0 0.1 0:01.61 dbus-daemon
521 l 20 0 4240 84 0 S 0.0 0.0 0:00.00 start_kdeinit
522 l 20 0 127700 19176 16480 S 0.0 0.2 0:00.04 kdeinit5
523 l 20 0 327536 37832 33256 S 0.0 0.5 0:00.89 klauncher
526 l 20 0 864072 43292 36068 S 0.0 0.5 0:03.06 kded5
538 l 20 0 348732 38528 33992 S 0.0 0.5 0:00.69 kaccess
540 l 20 0 56452 7108 6540 S 0.0 0.1 0:00.00 kwrapper5
542 l 20 0 427616 45608 39980 S 0.0 0.6 0:01.93 ksmserver
544 l 20 0 327300 36788 31712 S 0.0 0.5 0:00.70 kglobalaccel5
550 l 20 0 257976 17540 15760 S 0.0 0.2 0:00.54 kscreen_backend
557 root 20 0 286552 8648 7404 S 0.0 0.1 0:00.02 upowerd
558 l 20 0 3271392 105344 82084 S 0.0 1.3 4:16.98 kwin_x11
563 l 20 0 167180 5008 4432 S 0.0 0.1 0:00.00 dconf-service
565 l 20 0 976608 90188 72552 S 0.0 1.1 0:06.37 krunner
567 l 20 0 2082676 223472 121288 S 0.0 2.7 2:39.92 plasmashell
572 l 20 0 486096 39816 35184 S 0.0 0.5 0:00.62 polkit-kde-auth
577 l 20 0 266692 19628 17564 S 0.0 0.2 0:00.61 xembedsniproxy
584 polkitd 20 0 2141000 21272 14672 S 0.0 0.3 0:00.73 polkitd
596 l 20 0 265688 21008 18908 S 0.0 0.3 0:00.55 gmenudbusmenupr
599 l 20 0 899388 89800 72636 S 0.0 1.1 0:14.54 konsole
643 l 20 0 582880 32936 29064 S 0.0 0.4 0:00.78 kactivitymanage
661 l 20 0 8968 2804 2524 S 0.0 0.0 0:00.00 JDStartup
755 l 20 0 939684 87368 56456 S 0.0 1.1 0:01.00 onboard
790 root 20 0 430348 11624 9612 S 0.0 0.1 0:00.08 udisksd
815 l 20 0 320348 6016 5244 S 0.0 0.1 0:00.02 at-spi-bus-laun
822 l 20 0 12268 3688 3280 S 0.0 0.0 0:00.10 dbus-daemon
826 l 20 0 187940 6312 5524 S 0.0 0.1 0:00.61 at-spi2-registr
850 l 20 0 331376 37644 33336 S 0.0 0.5 0:00.66 kuiserver5
853 l 20 0 6324 2196 1936 S 0.0 0.0 0:12.17 ksysguardd
876 root 0 -20 23076 4696 4212 S 0.0 0.1 0:00.00 nxexec
881 l 0 -20 2840584 217952 25788 S 0.0 2.7 153:28.59 nxnode.bin
909 l 20 0 2403620 38816 26900 S 0.0 0.5 0:13.01 nxclient.bin
1087 l 20 0 128612 17148 13908 S 0.0 0.2 0:00.44 file.so
1145 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kdmflush
1150 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kcryptd_io
1151 root 0 -20 0 0 0 I 0.0 0.0 0:00.02 kcryptd
1152 root 20 0 0 0 0 S 0.0 0.0 0:00.46 dmcrypt_write
1168 root 20 0 0 0 0 S 0.0 0.0 0:00.27 jbd2/dm-0-8
1169 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 ext4-rsv-conver
1180 l 20 0 23812 13712 7388 S 0.0 0.2 1:41.31 transcode
1289 l 20 0 232756 6360 4896 S 0.0 0.1 0:00.17 fish
1437 l 20 0 1554724 146736 102776 S 0.0 1.8 4:50.43 doublecmd
1988 root 20 0 0 0 0 I 0.0 0.0 0:02.55 kworker/2:4-events
3442 systemd+ 20 0 67748 10136 8116 S 0.0 0.1 0:00.80 systemd-resolve
9868 root 20 0 0 0 0 I 0.0 0.0 0:00.20 kworker/4:2-mm_percpu_wq
9879 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/3:2-cgroup_destroy
11349 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/2:0
16114 l 20 0 0 0 0 Z 0.0 0.0 0:00.00 xdg-open
21159 root 20 0 0 0 0 I 0.0 0.0 0:00.09 kworker/u12:1-flush-254:0
21251 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/1:2-mm_percpu_wq
21345 root 0 -20 0 0 0 I 0.0 0.0 0:00.43 kworker/u13:5-kcryptd
23635 root 0 -20 0 0 0 I 0.0 0.0 0:00.14 kworker/u13:1-kcryptd
24723 root 20 0 0 0 0 I 0.0 0.0 0:00.04 kworker/u12:0-events_unbound
25055 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/0:1-rcu_par_gp
25391 l 20 0 95504 19584 12832 S 0.0 0.2 0:03.23 x11vnc
25493 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/1:0-cgroup_destroy
25714 root 20 0 50128 6456 5568 S 0.0 0.1 0:00.01 sshd
25717 l 20 0 50816 4668 3720 S 0.0 0.1 0:00.04 sshd
25718 l 20 0 159312 7016 5440 S 0.0 0.1 0:00.23 fish
25807 root 20 0 0 0 0 I 0.0 0.0 0:00.16 kworker/u12:2-events_unbound
25927 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/4:0-events
25954 root 20 0 0 0 0 I 0.0 0.0 0:00.00 kworker/0:3-events
25959 root 20 0 50128 6400 5504 S 0.0 0.1 0:00.01 sshd
25962 l 20 0 50812 4992 4036 S 0.0 0.1 0:00.17 sshd
26117 root 20 0 24748 3308 2904 S 0.0 0.0 0:00.00 su
26118 root 20 0 159412 6956 5572 S 0.0 0.1 0:00.10 fish
26197 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/u13:0-kcryptd
26198 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/u13:2-kcryptd
26245 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/u13:3-kcryptd
26246 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/u13:4-kcryptd
26249 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/u13:6-kcryptd
26291 root 20 0 17232 3292 2932 R 0.0 0.0 0:00.00 topOctober 26, 2018 at 08:42 #20149brotechParticipantHello jnko,
sorry I made a typo, it should be ipcs -m instead of -s.
For question ‘why there is problem with shared memory’ – we suspect an application is leaking shared memory.
October 26, 2018 at 11:16 #20151brotechParticipantAbout the ‘there is problem with shared memory’ I need to explain better. It all depends on how Unix is dealing with MIT-SHM shared memory. We suspect an application is leaking shared memory. The operating system is not dealing with these memory leaks by its own. The available shared memory, in the end, is all taken and other applications, like NX, can’t allocate more. Why now? Well, can be some application upgrade… The solution is simple: find out which application is leaking shared memory and fix it. It’s unlikely that the application leaking shared memory is NX, since NX is in use on millions of machines and we had not similar reports from other users, but can be, of course, that’s why we need to investigate on your machine. We are also discussing the option of checking the shared memory in use, and recovering the segments that are clearly the fruit of some application’s leak. And! We have planned to move away from MIT-SHM, and use some shared memory interface that is more modern, multiple times… But the time is never enough.
October 26, 2018 at 14:03 #20153jnkoParticipantThanks for explanation.
Here’s the output from ipcs -m attached
root@l ~# ipcs -m
—— Shared Memory Segments ——–
key shmid owner perms bytes nattch status
0x00000000 1563983872 l 777 3200 2
0x00000000 1564016641 l 777 2880000 2
0x00000000 1564049410 l 777 2048 2
…. and 4000 more lines of this. See attachment.root@l ~# df -k /dev/shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 4084020 66760 4017260 2% /dev/shmroot@l ~# ipcs -lm
—— Shared Memory Limits ——–
max number of segments = 4096
max seg size (kbytes) = 18014398509465599
max total shared memory (kbytes) = 18014398509481980
min seg size (bytes) = 1Another hint, whenever this happens, VLC (VideoLANClient) fails to playback too with error:
main error: video output creation failed
main error: failed to create video output
xcb_x11 error: shared memory allocation error: No space left on deviceWhile the same content in mplayer works.
Now there are exactly 4096 lines output of ‘ipcs -m’ and ‘max number of segments = 4096’
I bet it would run a little bit longe if I would increase ‘kernel.shmmni = 4096’ but this would just delay the error at all. Any idea how to identify that process that leaks shm memory? Just watch the output of ‘ipcs -m’ while running the usual apps?
Attachments:
October 29, 2018 at 12:18 #20159brotechParticipantYou could find more detailed information by using ‘ipcs -mp’: columns ‘cpi’ and ‘lpid’ will provide some clues about the involved processes.
October 29, 2018 at 14:20 #20182jnkoParticipantI’ve written a small few-liner which shows which PID has how man entries in ‘ipcs -m’
It turns out that plasmashell is using the most resources so far
l@l ~> ./shmleak
#shm:353 CMD:/bin/plasmashell (pid:576)
#shm:52 CMD:/usr/bin/x11vnc -localhost -display :0 -auth /home/l/.Xauthority -ncache_cr -noxinerama -noncache -repeat -usepw -once -nevershared (pid:4474)
#shm:2 CMD:/usr/NX/bin/nxnode.bin (pid:881)
#shm:1 CMD:/usr/bin/python3 /bin/onboard (pid:804)
#shm:1 CMD:/usr/lib/kscreenlocker_greet –graceTime 5000 –ksldfd 30 (pid:18400)Thanks brotech for the time and all the kindly information and hints. I guessed that NoMachine is not the root of those problems but didn’t know how to track them down. I’ve learned much, thank you!
For anyone who wants to use my small script:
#!/bin/bash
#
# Show which Program and PID is using how much entries in kernel.shmmni
#
ownpid=$$
cntpid=ipcs -m -p | awk '{print $3}' | tail -n +4 | sort -n | uniq -c | awk '{print $1"_"$2}' | sort -rn
for p in $cntpid; do
num=echo $p | cut -d_ -f1
pid=echo $p | cut -d_ -f2
cmd=ps -o command $pid | tail -n +2
if [ ! -z “$pid” ]; then
if [ “$ownpid” -ne “$pid” ]; then
echo “#shm:$num CMD:$cmd (pid:$pid)”
fi
fi
done -
AuthorPosts
This topic was marked as solved, you can't post.