Prevent OOM inside container - kubernetes

I'm running conda install -c anaconda pycodestyle in a container with this spec:
apiVersion: v1
kind: Pod
metadata:
name: conda-${PYTHON_VERSION}
spec:
securityContext:
runAsUser: 0
runAsGroup: 0
containers:
- name: python
image: continuumio/conda-ci-linux-64-python${PYTHON_VERSION}
command:
- /bin/bash
args:
- "-c"
- "sleep 99d"
workingDir: /home/jenkins/agent
resources:
requests:
memory: "256Mi"
cpu: "1"
limits:
memory: "256Mi"
cpu: "1"
My understanding was that if I set limits and requests to the same value, OOM won't be called... seems like I was wrong.
To make myself clear: I don't want overprovisioning to happen at all, I don't want the kernel to panic, if it allocated memory it cannot back up with real memory.
Ideally, I want to understand how to prevent these errors from happening in Kubernetes at all, not specifically for conda, but if there's any way to limit conda to a particular amount of memory, it'll help too.
The machine running these containers has 16MB of memory, and it might, at most, try to run three of those.
The OMM message looks like this:
14:07:03 2021] Task in /kubepods/burstable/poda6df66b5-bfc5-43be-b02d-66f09e7ecf0f/2203670eb25d83d72428831a35773b90445f19ee37c117f196d6774442022db8 killed as a result of limit of /kubepods/burstable/poda6df66b5-bfc5-43be-b02d-66f09e7ecf0f/2203670eb25d83d72428831a35773b90445f19ee37c117f196d6774442022db8
[Wed Jul 21 14:07:03 2021] memory: usage 262144kB, limit 262144kB, failcnt 17168
[Wed Jul 21 14:07:03 2021] memory+swap: usage 0kB, limit 9007199254740988kB, failcnt 0
[Wed Jul 21 14:07:03 2021] kmem: usage 11128kB, limit 9007199254740988kB, failcnt 0
[Wed Jul 21 14:07:03 2021] Memory cgroup stats for /kubepods/burstable/poda6df66b5-bfc5-43be-b02d-66f09e7ecf0f/2203670eb25d83d72428831a35773b90445f19ee37c117f196d6774442022db8: cache:104KB rss:250524KB rss_huge:0KB shmem:0KB mapped_file:660KB dirty:0KB writeback:0KB inactive_anon:125500KB active_anon:125496KB inactive_file:8KB active_file:12KB unevictable:0KB
[Wed Jul 21 14:07:03 2021] Tasks state (memory values in pages):
[Wed Jul 21 14:07:03 2021] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name
[Wed Jul 21 14:07:03 2021] [3659435] 0 3659435 1012 169 40960 22 984 sleep
[Wed Jul 21 14:07:03 2021] [3660809] 0 3660809 597 155 45056 26 984 sh
[Wed Jul 21 14:07:03 2021] [3660823] 0 3660823 597 170 40960 18 984 sh
[Wed Jul 21 14:07:03 2021] [3660824] 0 3660824 597 14 40960 9 984 sh
[Wed Jul 21 14:07:03 2021] [3660825] 0 3660825 597 170 45056 23 984 sh
[Wed Jul 21 14:07:03 2021] [3660827] 0 3660827 162644 44560 753664 38159 984 conda
[Wed Jul 21 14:07:03 2021] [3660890] 0 3660890 1012 169 49152 22 984 sleep
[Wed Jul 21 14:07:03 2021] Memory cgroup out of memory: Kill process 3660827 (conda) score 1123 or sacrifice child
[Wed Jul 21 14:07:03 2021] Killed process 3660827 (conda) total-vm:650576kB, anon-rss:165968kB, file-rss:12272kB, shmem-rss:0kB
[Wed Jul 21 14:07:03 2021] oom_reaper: reaped process 3660827 (conda), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
I also don't like the word "burstable" here... I thought it was supposed to be "guaranteed"

Related

Why do I get three user outputs instead of 2 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I am having a problem with the output of this code:
#!/usr/bin/perl
# Opening the file timelog.txt, the "<" indicates that the file is being opened in read mode
open(DATA, "<timelog.txt") or die "Couldn't open file timelog.txt, $!";
# Looping through each line in this file, this each line can be accesed with $_
while(<DATA>) {
# In the line ($_), we search for patters
# We first search the pattern " pts/"
$_ =~ m/ pts\//;
# We store the text before this pattern in the variable userId
$userId = "$`";
# We now search for the patter "Word Number Number:Number - Number:Number"
# This pattern is found at the end of each string
$_ =~ m/(\w+) (\d+) (\d+):(\d+) - (\d+):(\d+)/;
# The required variables, i.e. the month start hour, start minutes, end hour and end minutes are extracted
($month, $hours1, $minutes1, $hours2, $minutes2) = ($1, $3, $4, $5, $6);
# $userId." ".$month is used to concatenate the userId along with month with a space between them
# the . is used to concatenate
# If the key already exists, we increase the value of time
if(exists($store{$userId." ".$month})){
$store{$userId." ".$month} += (($hours2 - $hours1)*60) + $minutes2 - $minutes1;
} else {
# If the key does not exist we create a new key value pair
$store{$userId." ".$month} = (($hours2 - $hours1)*60) + $minutes2 - $minutes1;
}
# Note that the key is concatenation of userId and the month
}
# We now loop through the elements and print them
foreach $key (keys %store){
print "$key $store{$key} minutes\n";
}
timelog.txt:
maclawty796 pts/1 10.1.28.122 Mon Oct 24 09:18 - 09:20
maclawty796 pts/1 ip-64-134-238-2. Fri Oct 21 14:23 - 14:25
maclawty796 pts/2 10.1.28.122 Fri Oct 21 09:42 - 09:55
ehowe pts/3 10.1.28.204 Fri Oct 21 09:28 - 09:29
kho398 pts/2 10.1.28.233 Fri Oct 21 09:22 - 09:34
maclawty796 pts/1 10.1.28.122 Fri Oct 21 09:20 - 09:55
maclawty796 pts/1 75.27.188.106 Thu Oct 20 21:09 - 21:23
maclawty796 pts/1 10.1.28.120 Fri Oct 14 09:46 - 09:52
kho398 pts/2 10.1.28.124 Thu Oct 13 09:29 - 09:30
maclawty796 pts/1 10.1.28.128 Thu Oct 13 09:28 - 09:51
maclawty796 pts/2 adsl-75-30-120-1 Wed Oct 12 20:35 - 20:35
maclawty796 pts/1 75-30-120-13.lig Wed Oct 12 19:27 - 19:33
hturner pts/1 tom-nilsons-macb Wed Oct 12 13:30 - 13:32
nnt pts/2 99-59-5-115.ligh Tue Oct 11 15:51 - 15:54
nnt pts/1 hitami yamas Tue Oct 11 15:31 - 17:42
maclawty796 pts/1 leda.local Tue Oct 11 14:10 - 14:11
ehowe pts/2 10.1.28.126 Tue Oct 11 09:21 - 09:24
maclawty796 pts/2 10.1.28.123 Tue Oct 11 09:01 - 09:08
nnt pts/1 10.1.28.210 Tue Oct 11 08:53 - 12:02
nnt pts/1 hitami yamas Tue Oct 11 07:53 - 07:54
nnt pts/1 hitami yamas Tue Oct 11 07:48 - 07:52
maclawty796 pts/1 adsl-75-16-61-10 Mon Oct 10 23:18 - 23:20
nnt pts/1 99-59-5-115.ligh Mon Oct 10 22:16 - 23:11
nnt pts/1 99-59-5-115.ligh Mon Oct 10 22:09 - 22:14
nnt pts/1 99-59-5-115.ligh Mon Oct 10 21:27 - 21:31
maclawty796 pts/2 adsl-75-16-61-10 Mon Oct 10 20:46 - 20:47
nnt pts/1 99-59-5-115.ligh Mon Oct 10 20:19 - 21:22
kho398 pts/2 108-93-76-161.li Mon Oct 10 19:15 - 19:19
kho398 pts/2 108-93-76-161.li Mon Oct 10 19:09 - 19:12
jimquinn409 pts/2 10.1.8.148 Mon Oct 10 17:40 - 17:46
jimquinn409 pts/2 10.1.8.148 Mon Oct 10 17:38 - 17:39
nnt pts/1 99-59-5-115.ligh Mon Oct 10 17:19 - 20:01
jimquinn409 pts/2 10.1.8.148 Mon Oct 10 16:29 - 16:33
jimquinn409 pts/2 10.1.8.148 Mon Oct 10 16:27 - 16:28
nnt pts/1 99-59-5-115.ligh Mon Oct 10 16:01 - 17:18
nnt pts/1 99-59-5-115.ligh Mon Oct 10 15:11 - 15:59
maclawty796 pts/1 10.1.31.27 Mon Oct 10 14:16 - 14:21
johnhouston pts/2 10.1.31.220 Mon Oct 10 12:01 - 12:17
jimquinn409 pts/1 ubuntu.local Mon Oct 10 11:58 - 12:04
kho398 pts/1 10.1.28.244 Mon Oct 10 09:07 - 09:17
maclawty796 pts/1 10.1.31.27 Mon Oct 10 08:45 - 08:49
honeill pts/1 99-59-7-95.light Mon Oct 10 05:42 - 07:14
honeill pts/1 99-59-7-95.light Mon Oct 10 04:26 - 05:26
kho398 pts/1 108-93-76-161.li Sun Oct 9 23:12 - 23:13
kho398 pts/1 108-93-76-161.li Sun Oct 9 20:56 - 21:15
kho398 pts/1 108-93-76-161.li Sun Oct 9 20:54 - 20:56
kho398 pts/1 108-93-76-161.li Sun Oct 9 20:51 - 20:52
kho398 pts/2 108-93-76-161.li Sun Oct 9 20:40 - 20:48
maclawty796 pts/1 adsl-75-27-233-7 Sun Oct 9 20:30 - 20:42
kho398 pts/1 108-93-76-161.li Sun Oct 9 20:15 - 20:19
johnhouston pts/2 99-176-56-113.li Sun Oct 9 19:58 - 20:04
kho398 pts/1 108-93-76-161.li Sun Oct 9 19:48 - 20:00
kho398 pts/3 108-93-76-161.li Sun Oct 9 19:36 - 19:48
kho398 pts/3 108-93-76-161.li Sun Oct 9 19:35 - 19:36
kho398 pts/3 108-93-76-161.li Sun Oct 9 19:32 - 19:34
johnhouston pts/2 99-176-56-113.li Sun Oct 9 19:29 - 19:55
nnt pts/1 99-59-5-115.ligh Sun Oct 9 18:29 - 19:45
kho398 pts/4 108-93-76-161.li Sun Oct 9 18:27 - 19:32
johnhouston pts/3 99-176-56-113.li Sun Oct 9 17:12 - 19:28
nnt pts/2 99-59-5-115.ligh Sun Oct 9 15:38 - 18:31
nnt pts/1 99-59-5-115.ligh Sun Oct 9 15:36 - 18:29
maclawty796 pts/1 10.1.31.27 Fri Oct 7 13:55 - 14:09
maclawty796 pts/1 10.1.31.27 Fri Oct 7 13:39 - 13:41
johnhouston pts/1 99-176-56-113.li Fri Oct 7 12:07 - 13:29
edrodri5722 pts/1 10.1.28.171 Fri Oct 7 09:49 - 09:52
kho398 pts/1 10.1.28.116 Fri Oct 7 09:46 - 09:48
jimquinn409 pts/1 10.1.28.200 Fri Oct 7 09:39 - 09:40
jimquinn409 pts/3 10.1.28.200 Fri Oct 7 08:56 - 09:42
nnt pts/3 hitami yamas Fri Oct 7 07:52 - 07:59
nnt pts/2 99-59-5-115.ligh Fri Oct 7 07:15 - 09:18
nnt pts/1 99-59-5-115.ligh Fri Oct 7 07:13 - 09:30
kho398 pts/1 108-93-76-161.li Fri Oct 7 01:15 - 01:17
kho398 pts/1 108-93-76-161.li Fri Oct 7 01:14 - 01:15
kho398 pts/1 108-93-76-161.li Fri Oct 7 01:12 - 01:13
kho398 pts/2 108-93-76-161.li Fri Oct 7 01:06 - 01:12
kho398 pts/2 108-93-76-161.li Fri Oct 7 01:04 - 01:05
kho398 pts/2 108-93-76-161.li Fri Oct 7 00:53 - 01:04
johnhouston pts/1 99-176-56-113.li Fri Oct 7 00:25 - 01:08
edrodri5722 pts/2 10.1.31.151 Thu Oct 6 22:27 - 22:48
honeill pts/1 jst-pc.local Thu Oct 6 22:19 - 22:53
nnt pts/1 99-59-5-115.ligh Thu Oct 6 19:44 - 19:54
honeill pts/6 jst-pc.local Thu Oct 6 19:43 - 22:19
edrodri5722 pts/5 10.1.31.151 Thu Oct 6 19:40 - 22:40
ehowe pts/2 ubuntu.local Thu Oct 6 19:40 - 20:36
hturner pts/2 97-90-193-108.dh Thu Oct 6 19:12 - 19:22
jimquinn409 pts/3 10.1.8.129 Thu Oct 6 18:21 - 22:54
jimquinn409 pts/5 10.1.8.129 Thu Oct 6 17:59 - 18:08
jimquinn409 pts/5 10.1.8.129 Thu Oct 6 17:55 - 17:58
johnhouston pts/4 99-176-56-113.li Thu Oct 6 17:13 - 22:15
johnhouston pts/4 99-176-56-113.li Thu Oct 6 17:09 - 17:12
johnhouston pts/4 99-176-56-113.li Thu Oct 6 17:07 - 17:08
jimquinn409 pts/3 ubuntu.local Thu Oct 6 16:56 - 18:14
hturner pts/2 97-90-193-108.dh Thu Oct 6 16:43 - 18:43
nnt pts/1 99-59-5-115.ligh Thu Oct 6 16:42 - 19:43
jimquinn409 pts/1 ubuntu.local Thu Oct 6 16:16 - 16:25
hturner pts/4 108-67-52-153.li Thu Oct 6 15:18 - 16:10
hturner pts/3 108-67-52-153.li Thu Oct 6 15:17 - 16:10
honeill pts/3 10.0.18.162 Thu Oct 6 14:00 - 14:15
hturner pts/2 10.1.13.227 Thu Oct 6 13:01 - 15:42
hturner pts/1 10.1.13.227 Thu Oct 6 13:01 - 15:41
maclawty796 pts/6 10.1.31.27 Thu Oct 6 10:02 - 10:11
hturner pts/5 tom-nilsons-macb Thu Oct 6 10:00 - 12:17
hturner pts/4 tom-nilsons-macb Thu Oct 6 09:58 - 12:17
edrodri5722 pts/4 10.1.28.135 Thu Oct 6 09:51 - 09:52
jimquinn409 pts/1 10.1.28.126 Thu Oct 6 09:49 - 12:06
jimquinn409 pts/4 10.1.28.126 Thu Oct 6 09:41 - 09:41
jimquinn409 pts/4 10.1.28.126 Thu Oct 6 09:29 - 09:35
hturner pts/2 10.1.28.167 Thu Oct 6 09:28 - 12:05
mvan682 pts/8 10.1.28.119 Thu Oct 6 09:17 - 09:18
honeill pts/7 10.1.28.163 Thu Oct 6 09:15 - 09:57
jimquinn409 pts/2 10.1.28.126 Thu Oct 6 09:15 - 09:21
jimquinn409 pts/7 10.1.28.126 Thu Oct 6 09:13 - 09:14
jimquinn409 pts/7 10.1.28.126 Thu Oct 6 09:08 - 09:11
ehowe pts/6 10.1.28.155 Thu Oct 6 09:07 - 09:28
maclawty796 pts/5 10.1.28.123 Thu Oct 6 09:05 - 09:28
maclawty796 pts/4 10.1.28.123 Thu Oct 6 09:04 - 09:28
hturner pts/3 10.1.28.167 Thu Oct 6 09:01 - 12:06
honeill pts/2 10.1.28.163 Thu Oct 6 08:59 - 09:14
edrodri5722 pts/1 10.1.28.135 Thu Oct 6 08:56 - 09:47
ehowe pts/2 10.1.28.155 Thu Oct 6 08:49 - 08:54
maclawty796 pts/1 10.1.31.27 Thu Oct 6 08:24 - 08:53
edrodri5722 pts/1 76-202-53-118.li Thu Oct 6 05:11 - 05:23
kho398 pts/1 108-93-76-161.li Thu Oct 6 02:18 - 02:23
kho398 pts/2 108-93-76-161.li Thu Oct 6 00:36 - 02:04
ehowe pts/1 10.0.17.151 Thu Oct 6 00:29 - 00:41
jimquinn409 pts/3 76-202-52-236.li Thu Oct 6 00:21 - 02:28
ehowe pts/1 10.0.17.151 Thu Oct 6 00:11 - 00:22
ehowe pts/1 10.0.17.180 Thu Oct 6 00:05 - 00:11
ehowe pts/1 10.0.17.151 Wed Oct 5 23:17 - 23:26
ehowe pts/1 10.1.6.218 Wed Oct 5 22:06 - 22:20
ehowe pts/1 10.1.6.218 Wed Oct 5 21:38 - 21:48
maclawty796 pts/2 adsl-75-16-59-16 Wed Oct 5 21:04 - 21:07
ehowe pts/3 10.1.6.218 Wed Oct 5 20:53 - 21:28
ehowe pts/2 10.1.6.218 Wed Oct 5 20:46 - 21:02
maclawty796 pts/3 adsl-75-16-59-16 Wed Oct 5 19:20 - 20:04
nnt pts/2 99-59-5-115.ligh Wed Oct 5 19:09 - 20:22
kho398 pts/1 108-93-76-161.li Wed Oct 5 19:00 - 21:31
maclawty796 pts/1 10.1.31.27 Wed Oct 5 15:27 - 16:28
maclawty796 pts/1 :0.0 Wed Oct 5 15:10 - 15:25
maclawty796 pts/1 10.1.31.27 Wed Oct 5 13:34 - 13:42
maclawty796 pts/1 10.1.31.27 Wed Oct 5 13:29 - 13:30
nnt pts/2 99-59-5-115.ligh Wed Oct 5 10:51 - 13:15
nnt pts/1 166.205.141.16 Wed Oct 5 09:28 - 12:07
honeill pts/4 76-202-53-118.li Tue Oct 4 21:12 - 22:47
honeill pts/4 76-202-53-118.li Tue Oct 4 21:02 - 21:11
edrodri5722 pts/1 76-202-53-118.li Tue Oct 4 20:46 - 22:48
jimquinn409 pts/1 10.1.8.233 Tue Oct 4 20:37 - 20:43
edrodri5722 pts/4 76-202-53-118.li Tue Oct 4 20:29 - 20:32
edrodri5722 pts/4 76-202-53-118.li Tue Oct 4 20:02 - 20:09
edrodri5722 pts/3 76-202-53-118.li Tue Oct 4 19:43 - 21:51
nnt pts/2 166.205.141.16 Tue Oct 4 19:19 - 21:54
nnt pts/1 166.205.141.16 Tue Oct 4 18:29 - 20:33
nnt pts/3 108-195-113-206. Tue Oct 4 16:47 - 17:18
maclawty796 pts/2 10.1.31.27 Tue Oct 4 16:43 - 16:59
maclawty796 pts/2 10.1.31.27 Tue Oct 4 16:27 - 16:32
maclawty796 pts/3 10.1.31.27 Tue Oct 4 16:26 - 16:26
maclawty796 pts/2 10.1.31.27 Tue Oct 4 15:05 - 16:26
nnt pts/1 108-195-113-206. Tue Oct 4 14:40 - 17:32
kho398 pts/1 108-93-76-161.li Tue Oct 4 02:22 - 03:08
edrodri5722 pts/1 76-202-53-118.li Mon Oct 3 22:32 - 22:36
edrodri5722 pts/1 76-202-53-118.li Mon Oct 3 20:45 - 22:31
edrodri5722 pts/1 76-202-53-118.li Mon Oct 3 20:44 - 20:44
nnt pts/1 108-195-113-206. Mon Oct 3 16:07 - 19:54
jimquinn409 pts/1 10.1.28.142 Mon Oct 3 09:04 - 09:47
kho398 pts/1 10.1.28.199 Mon Oct 3 09:01 - 09:02
kho398 pts/1 108-93-76-161.li Sun Oct 2 22:27 - 22:29
kho398 pts/1 108-93-76-161.li Sun Oct 2 19:18 - 19:23
kho398 pts/1 108-93-76-161.li Sun Oct 2 18:51 - 19:17
edrodri5722 pts/1 76-202-53-118.li Sun Oct 2 18:28 - 18:47
kho398 pts/1 108-93-76-161.li Sun Oct 2 17:04 - 18:16
maclawty796 pts/1 adsl-75-28-65-14 Sat Oct 1 21:15 - 21:32
maclawty796 pts/1 10.1.31.27 Fri Sep 30 15:19 - 15:20
hturner pts/1 108-67-52-153.li Fri Sep 30 11:06 - 11:13
mvan682 pts/4 10.1.28.119 Fri Sep 30 09:50 - 09:50
kho398 pts/3 10.1.28.199 Fri Sep 30 09:49 - 09:50
kho398 pts/3 10.1.28.199 Fri Sep 30 09:29 - 09:46
mvan682 pts/4 10.1.28.121 Fri Sep 30 09:04 - 09:12
kho398 pts/3 10.1.28.199 Fri Sep 30 09:02 - 09:21
jimquinn409 pts/2 10.1.28.142 Fri Sep 30 09:02 - 11:27
mvan682 pts/2 10.1.28.121 Fri Sep 30 09:02 - 09:02
kho398 pts/2 10.1.28.199 Fri Sep 30 09:00 - 09:01
maclawty796 pts/1 10.1.28.212 Fri Sep 30 08:57 - 09:51
maclawty796 pts/1 adsl-75-28-22-24 Thu Sep 29 20:16 - 20:35
nnt pts/1 108-195-113-206. Thu Sep 29 16:24 - 17:14
jimquinn409 pts/2 ubuntu.local Thu Sep 29 15:24 - 17:40
maclawty796 pts/2 enoch-tang-ima Thu Sep 29 14:21 - 14:22
maclawty796 pts/2 10.1.31.27 Thu Sep 29 14:08 - 14:09
johnhouston pts/2 187.34 -32-94.dhcp Thu Sep 29 13:25 - 13:40
johnhouston pts/1 187.34 -32-94.dhcp Thu Sep 29 13:10 - 15:25
mvan682 pts/3 10.1.28.119 Thu Sep 29 09:47 - 09:48
kho398 pts/2 10.1.28.103 Thu Sep 29 09:47 - 09:51
kho398 pts/2 10.1.28.103 Thu Sep 29 09:44 - 09:46
maclawty796 pts/1 10.1.28.105 Thu Sep 29 09:43 - 09:54
mvan682 pts/3 10.1.28.119 Thu Sep 29 09:23 - 09:24
edrodri5722 pts/2 10.1.28.199 Thu Sep 29 09:20 - 09:23
jimquinn409 pts/1 10.1.28.142 Thu Sep 29 09:20 - 09:28
kho398 pts/3 10.1.28.103 Thu Sep 29 09:08 - 09:15
ehowe pts/2 10.1.28.106 Thu Sep 29 09:07 - 09:10
maclawty796 pts/1 10.1.28.105 Thu Sep 29 09:05 - 09:15
ehowe pts/1 10.1.28.106 Thu Sep 29 08:51 - 08:52
ehowe pts/1 10.1.28.225 Thu Sep 29 08:47 - 08:48
maclawty796 pts/2 10.1.31.27 Thu Sep 29 08:41 - 08:56
ehowe pts/1 10.1.28.225 Thu Sep 29 08:40 - 08:46
honeill pts/1 99-59-7-95.light Thu Sep 29 03:50 - 03:56
edrodri5722 pts/1 76-202-53-118.li Thu Sep 29 01:03 - 01:04
edrodri5722 pts/1 76-202-53-118.li Thu Sep 29 00:59 - 01:03
johnhouston pts/1 187.34 -32-94.dhcp Thu Sep 29 00:49 - 00:55
johnhouston pts/1 187.34 -32-94.dhcp Wed Sep 28 23:40 - 23:43
ehowe pts/1 10.0.17.91 Wed Sep 28 21:57 - 22:12
ehowe pts/1 10.0.17.91 Wed Sep 28 21:23 - 21:53
kho398 pts/2 10.1.8.83 Wed Sep 28 20:16 - 20:18
kho398 pts/2 10.1.8.83 Wed Sep 28 20:13 - 20:13
kho398 pts/2 10.1.8.83 Wed Sep 28 20:10 - 20:11
kho398 pts/2 10.1.8.83 Wed Sep 28 20:06 - 20:07
kho398 pts/2 10.1.8.83 Wed Sep 28 19:53 - 20:00
ehowe pts/1 10.0.17.91 Wed Sep 28 19:17 - 21:11
jimquinn409 pts/1 10.1.8.85 Wed Sep 28 15:25 - 16:22
maclawty796 pts/1 10.1.31.27 Wed Sep 28 14:32 - 14:37
kho398 pts/1 108-93-76-161.li Wed Sep 28 00:28 - 01:05
kho398 pts/1 108-93-76-161.li Wed Sep 28 00:25 - 00:28
maclawty796 pts/1 75.16.62.214 Tue Sep 27 22:32 - 22:44
nnt pts/1 enoch-tang-ima Tue Sep 27 16:26 - 16:26
nnt pts/2 psc147-04-4.loca Tue Sep 27 15:42 - 16:22
johnhouston pts/1 psc147-04-3.loca Tue Sep 27 15:40 - 16:22
maclawty796 pts/1 psc147-04-3.loca Tue Sep 27 15:37 - 15:37
maclawty796 pts/1 psc147-04.local Tue Sep 27 15:26 - 15:26
hturner pts/1 10.1.13.49 Tue Sep 27 12:52 - 12:58
hturner pts/1 10.1.13.49 Tue Sep 27 12:50 - 12:51
jimquinn409 pts/2 10.1.31.27 Tue Sep 27 10:06 - 10:06
honeill pts/2 10.1.31.27 Tue Sep 27 10:05 - 10:06
maclawty796 pts/1 10.1.31.27 Tue Sep 27 10:04 - 10:07
maclawty796 pts/2 10.1.28.120 Tue Sep 27 09:42 - 09:52
edrodri5722 pts/1 10.1.28.207 Tue Sep 27 09:41 - 09:46
mvan682 pts/1 10.1.28.157 Tue Sep 27 09:39 - 09:39
mvan682 pts/1 10.1.28.157 Tue Sep 27 09:33 - 09:37
maclawty796 pts/1 10.1.31.27 Tue Sep 27 08:37 - 08:54
maclawty796 pts/1 adsl-75-30-121-1 Mon Sep 26 22:51 - 23:06
maclawty796 pts/1 75-30-121-143.li Mon Sep 26 22:44 - 22:49
edrodri5722 pts/2 10.1.31.27 Mon Sep 26 12:14 - 12:14
edrodri5722 pts/2 10.1.31.27 Mon Sep 26 12:13 - 12:13
maclawty796 pts/1 10.1.31.27 Mon Sep 26 12:11 - 12:14
maclawty796 pts/1 10.1.28.154 Mon Sep 26 09:55 - 09:55
I do not know why I am getting 3 outputs for each user (each should be just 2) being the third one an empty one.
Please make a small change to your code for debug purpose:
at very begin add
use strict;
use warnings;
and output your captured data
# The required variables, i.e. the month start hour, start minutes, end hour and end minutes are extracted
my ($month, $hours1, $minutes1, $hours2, $minutes2) = ($1, $3, $4, $5, $6);
my $format = "DEBUG: %-25s %3s %02d:%02d %02d:%02d\n";
printf $format,$userId, $month, $hours1, $minutes1, $hours2, $minutes2;
# $userId." ".$month is used to concatenate the userId along with month with a space between them
Debug information gives you a clue where the problem is originated from and you will figure out the direction how to correct it.
NOTE: your code is flowed as it does not take into an account when login crosses midnight hour -- computation will get negative time
The code after a slight modification could look like following (midnight issue still present)
use strict;
use warnings;
use feature 'say';
my $fname = shift || 'timelog.txt';
my %store;
my $re = qr|(\w+)\s+pts/\d\s+(.*?)\s+\w{3} (\w{3}) (\d+) (\d+):(\d+) - (\d+):(\d+)|;
# Opening the file timelog.txt, the "<" indicates that the file is being opened in read mode
open(DATA, '<', $fname)
or die "Couldn't open file timelog.txt, $!";
while(<DATA>) {
next unless /$re/;
my($userId,$host,$month,$hours1,$minutes1,$hours2,$minutes2) = ($1,$2,$3,$4,$5,$6,$7);
# $userId." ".$month is used to concatenate the userId along with month with a space between them
# the . is used to concatenate
# If the key already exists, we increase the value of time
if(exists($store{$userId." ".$month})){
$store{$userId." ".$month} += (($hours2 - $hours1)*60) + $minutes2 - $minutes1;
} else {
# If the key does not exist we create a new key value pair
$store{$userId." ".$month} = (($hours2 - $hours1)*60) + $minutes2 - $minutes1;
}
# Note that the key is concatenation of userId and the month
}
# We now loop through the elements and print them
foreach my $key (sort keys %store){
printf "%-25s - %6d minutes\n", $key, $store{$key};
}
Final output
edrodri5722 Sep - -959 minutes
ehowe Oct - 1020 minutes
ehowe Sep - 2523 minutes
honeill Oct - 2883 minutes
honeill Sep - -60 minutes
hturner Oct - 1080 minutes
hturner Sep - 1440 minutes
jimquinn409 Oct - 8521 minutes
jimquinn409 Sep - -3955 minutes
johnhouston Oct - -540 minutes
johnhouston Sep - 1323 minutes
kho398 Oct - 1080 minutes
kho398 Sep - -4378 minutes
maclawty796 Oct - 9840 minutes
maclawty796 Sep - 3182 minutes
mvan682 Sep - -240 minutes
nnt Oct - 12792 minutes
nnt Sep - 542 minutes
Reference:
open,
regex,
Perl regular expression quick start

code-oss (Code - OSS) on FreeBSD-CURRENT: renderer process crashing, the application can no longer open my workspace

FreeBSD editors/vscode recently began crashing for me at startup.
Removed, reinstalled, no improvement.
I wondered whether removal of rapid_render.json would work around the issue, it did not.
Another user of the system can start the application without crashing.
Please: how might I resolve the issue?
grahamperrin#mowa219-gjp4-8570p:~ % less ~/.config/Code\ -\ OSS/Backups/workspaces.json
{"rootURIWorkspaces":[],"folderURIWorkspaces":[],"emptyWorkspaceInfos":[{"backupFolder":"1579922206882"}],"emptyWorkspaces":["1579922206882"]}
grahamperrin#mowa219-gjp4-8570p:~ % less ~/.config/Code\ -\ OSS/logs/20201217T074443/main.log
[2020-12-17 07:44:44.168] [main] [info] update#ctor - updates are disabled as there is no update URL
[2020-12-17 07:44:48.938] [main] [error] [VS Code]: renderer process crashed!
[2020-12-17 07:44:59.171] [main] [error] [VS Code]: renderer process crashed!
[2020-12-17 07:45:09.432] [main] [error] [VS Code]: renderer process crashed!
grahamperrin#mowa219-gjp4-8570p:~ % ls -ahlrt ~/.config/Code\ -\ OSS/
total 174
drwx------ 3 grahamperrin grahamperrin 3B 26 Dec 2019 Code Cache
-rw-r--r-- 1 grahamperrin grahamperrin 36B 26 Dec 2019 machineid
drwxr-xr-x 5 grahamperrin grahamperrin 6B 2 Jan 2020 User
drwxr-xr-x 2 grahamperrin grahamperrin 2B 25 Jan 2020 Workspaces
drwxr-xr-x 3 grahamperrin grahamperrin 3B 4 Jul 06:00 clp
drwx------ 2 grahamperrin grahamperrin 7B 16 Jul 10:57 GPUCache
-rw------- 1 grahamperrin grahamperrin 0B 26 Sep 09:08 .org.chromium.Chromium.uev8QR
drwxr-xr-x 3 grahamperrin grahamperrin 3B 26 Sep 17:24 CachedData
drwxr-xr-x 3 grahamperrin grahamperrin 4B 20 Nov 17:57 Backups
drwxr-xr-x 2 grahamperrin grahamperrin 4B 6 Dec 19:43 CachedExtensions
drwx------ 3 grahamperrin grahamperrin 284B 14 Dec 11:17 Cache
-rw------- 1 grahamperrin grahamperrin 2.0K 16 Dec 05:56 TransportSecurity
-rw------- 1 grahamperrin grahamperrin 20K 16 Dec 05:57 Cookies
-rw------- 1 grahamperrin grahamperrin 0B 16 Dec 05:57 Cookies-journal
-rw-r--r-- 1 grahamperrin grahamperrin 446B 16 Dec 05:58 rapid_render.json
-rw------- 1 grahamperrin grahamperrin 2.8K 16 Dec 05:58 .org.chromium.Chromium.eOeolK
-rw------- 1 grahamperrin grahamperrin 2.8K 16 Dec 14:06 .org.chromium.Chromium.a8khF7
-rw------- 1 grahamperrin grahamperrin 0B 16 Dec 14:20 .org.chromium.Chromium.fuVPBw
-rw------- 1 grahamperrin grahamperrin 2.8K 16 Dec 20:47 .org.chromium.Chromium.ICOK4n
-rw------- 1 grahamperrin grahamperrin 2.8K 16 Dec 21:56 .org.chromium.Chromium.21Y7f0
-rw------- 1 grahamperrin grahamperrin 2.8K 17 Dec 05:00 .org.chromium.Chromium.Ro52fi
-rw------- 1 grahamperrin grahamperrin 2.8K 17 Dec 05:29 .org.chromium.Chromium.J1dZMh
-rw------- 1 grahamperrin grahamperrin 0B 17 Dec 06:35 .org.chromium.Chromium.P3gDsE
-rw-r--r-- 1 grahamperrin grahamperrin 75K 17 Dec 06:42 storage.json
-rw------- 1 grahamperrin grahamperrin 0B 17 Dec 06:42 .org.chromium.Chromium.bQdorG
-rw------- 1 grahamperrin grahamperrin 2.8K 17 Dec 06:47 Network Persistent State
drwx------ 2 grahamperrin grahamperrin 8B 17 Dec 06:47 Session Storage
-rw------- 1 grahamperrin grahamperrin 0B 17 Dec 07:32 .org.chromium.Chromium.AQtB07
-rw------- 1 grahamperrin grahamperrin 0B 17 Dec 07:39 .org.chromium.Chromium.FT0hEj
drwx------ 3 grahamperrin grahamperrin 3B 17 Dec 07:44 blob_storage
-rw-r--r-- 1 grahamperrin grahamperrin 12K 17 Dec 07:44 languagepacks.json
drwxr-xr-x 12 grahamperrin grahamperrin 12B 17 Dec 07:44 logs
-rw------- 1 grahamperrin grahamperrin 0B 17 Dec 07:45 .org.chromium.Chromium.KK5qMG
drwx------ 14 grahamperrin grahamperrin 35B 17 Dec 07:45 .
drwxr-xr-x 100 grahamperrin grahamperrin 264B 17 Dec 08:11 ..
grahamperrin#mowa219-gjp4-8570p:~ % ls -ahlrRt ~/.config/Code\ -\ OSS/Backups/
total 10
drwxr-xr-x 3 grahamperrin grahamperrin 4B 20 Nov 17:57 .
drwxr-xr-x 4 grahamperrin grahamperrin 4B 28 Nov 06:29 1579922206882
-rw-r--r-- 1 grahamperrin grahamperrin 142B 17 Dec 07:44 workspaces.json
drwx------ 14 grahamperrin grahamperrin 35B 17 Dec 07:45 ..
/home/grahamperrin/.config/Code - OSS/Backups/1579922206882:
total 10
drwxr-xr-x 3 grahamperrin grahamperrin 4B 20 Nov 17:57 ..
drwxr-xr-x 4 grahamperrin grahamperrin 4B 28 Nov 06:29 .
drwxr-xr-x 2 grahamperrin grahamperrin 2B 10 Dec 15:14 file
drwxr-xr-x 2 grahamperrin grahamperrin 14B 16 Dec 05:56 untitled
/home/grahamperrin/.config/Code - OSS/Backups/1579922206882/file:
total 1
drwxr-xr-x 4 grahamperrin grahamperrin 4B 28 Nov 06:29 ..
drwxr-xr-x 2 grahamperrin grahamperrin 2B 10 Dec 15:14 .
/home/grahamperrin/.config/Code - OSS/Backups/1579922206882/untitled:
total 63
drwxr-xr-x 4 grahamperrin grahamperrin 4B 28 Nov 06:29 ..
-rw-r--r-- 1 grahamperrin grahamperrin 551B 16 Dec 05:56 b2bd717a77da570a5c596af6934cadc7
-rw-r--r-- 1 grahamperrin grahamperrin 652B 16 Dec 05:56 0ea542ac1d82a4ad63b68365c0270c53
-rw-r--r-- 1 grahamperrin grahamperrin 1.6K 16 Dec 05:56 109fbbd2da4537c9ab3475d44131d9f8
-rw-r--r-- 1 grahamperrin grahamperrin 2.5K 16 Dec 05:56 2f0c80a5829bd778936522620f8dc240
-rw-r--r-- 1 grahamperrin grahamperrin 317B 16 Dec 05:56 387795c86765346eca0c041bac00348b
-rw-r--r-- 1 grahamperrin grahamperrin 902B 16 Dec 05:56 3e42341b68b5e3d2ec3af201cdb461a0
-rw-r--r-- 1 grahamperrin grahamperrin 242B 16 Dec 05:56 5a4df22f62baaaa5684aacc5372f2b14
-rw-r--r-- 1 grahamperrin grahamperrin 115B 16 Dec 05:56 8526d8318dcbce336eae5b633e7f2b20
-rw-r--r-- 1 grahamperrin grahamperrin 4.4K 16 Dec 05:56 85a25ec2bf655a740ef43253dcde2851
-rw-r--r-- 1 grahamperrin grahamperrin 538B 16 Dec 05:56 bba55dec34aadf10f7d0655859dd3ade
-rw-r--r-- 1 grahamperrin grahamperrin 238B 16 Dec 05:56 d45b5ea50824ae45a6f3cae14bb85e07
-rw-r--r-- 1 grahamperrin grahamperrin 184B 16 Dec 05:56 e5e5e2d9b68c3afbc119011b57046d5a
drwxr-xr-x 2 grahamperrin grahamperrin 14B 16 Dec 05:56 .
grahamperrin#mowa219-gjp4-8570p:~ % less ~/.config/Code\ -\ OSS/Backups/1579922206882/untitled/b2bd717a77da570a5c596af6934cadc7
untitled:Untitled-4
net user Administrator | find /i "Password last set"
runas /user:Administrator powershell
Start-Process powershell -Verb runAs
cd "c:\Windows\Downloaded Program Files\" ; date ; whoami ; query user ; wget https://extranet.brighton.ac.uk/public/download/BIGIPComponentInstaller.msi -OutFile BIGIPComponentInstaller.msi ; wget https://extranet.brighton.ac.uk/public/download/f5vpn_setup.exe -OutFile f5vpn_setup.exe ; dir . | sort LastWriteTime | Out-Default ; winver ; .\BIGIPComponentInstaller.msi ; .\f5vpn_setup.exe ; cd ~
grahamperrin#mowa219-gjp4-8570p:~ % less ~/.config/Code\ -\ OSS/rapid_render.json
{"id":"monaco-parts-splash","colorInfo":{"foreground":"#cccccc","editorBackground":"#1e1e1e","titleBarBackground":"#3c3c3c","activityBarBackground":"#333333","sideBarBackground":"#252526","statusBarBackground":"#007acc","statusBarNoFolderBackground":"#68217a"},"layoutInfo":{"sideBarSide":"left","editorPartMinWidth":220,"titleBarHeight":0,"activityBarWidth":48,"sideBarWidth":170,"statusBarHeight":22,"windowBorder":false},"baseTheme":"vs-dark"}
grahamperrin#mowa219-gjp4-8570p:~ % rm ~/.config/Code\ -\ OSS/rapid_render.json
grahamperrin#mowa219-gjp4-8570p:~ % code-oss --verbose
[main 2020-12-17T08:17:09.207Z] Starting VS Code
[main 2020-12-17T08:17:09.224Z] from: /usr/local/share/code-oss/resources/app
[main 2020-12-17T08:17:09.225Z] args: {
_: [],
diff: false,
add: false,
goto: false,
'new-window': false,
'reuse-window': false,
wait: false,
help: false,
'list-extensions': false,
'show-versions': false,
version: false,
verbose: true,
status: false,
'prof-startup': false,
'disable-extensions': false,
'disable-gpu': false,
telemetry: false,
logExtensionHostCommunication: false,
'skip-release-notes': false,
'disable-restore-windows': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-crash-reporter': false,
'disable-user-env-probe': false,
'skip-add-to-recently-opened': false,
'unity-launch': false,
'open-url': false,
'file-write': false,
'file-chmod': false,
'driver-verbose': false,
force: false,
'do-not-sync': false,
trace: false,
'force-user-env': false,
'no-proxy-server': false,
nolazy: false,
'force-renderer-accessibility': false,
'ignore-certificate-errors': false,
'allow-insecure-localhost': false
}
[main 2020-12-17T08:17:09.230Z] Resolving machine identifier...
[main 2020-12-17T08:17:09.231Z] Resolved machine identifier: 76d5dcb36bedd2b6a2ae2706b11c68da607ea2bce16973ed535e6bfdec09baac (trueMachineId: undefined)
[main 2020-12-17T08:17:09.659Z] [storage state.vscdb] open(/home/grahamperrin/.config/Code - OSS/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2020-12-17T08:17:09.662Z] lifecycle (main): phase changed (value: 2)
[main 2020-12-17T08:17:09.664Z] windowsManager#open
[main 2020-12-17T08:17:09.667Z] window#validateWindowState: validating window state on 2 display(s) { mode: 0, x: 0, y: 0, width: 1133, height: 510 }
[main 2020-12-17T08:17:09.668Z] window#validateWindowState: multi-monitor working area { x: 0, y: 0, width: 1920, height: 1080 }
[main 2020-12-17T08:17:09.669Z] window#ctor: using window state { mode: 0, x: 0, y: 0, width: 1133, height: 510 }
[main 2020-12-17T08:17:10.515Z] lifecycle (main): phase changed (value: 3)
[main 2020-12-17T08:17:10.516Z] update#ctor - updates are disabled as there is no update URL
[6407:1217/081711.075297:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[main 2020-12-17T08:17:11.808Z] [storage state.vscdb] Trace (event): SELECT * FROM ItemTable
[main 2020-12-17T08:17:11.810Z] [storage state.vscdb] getItems(): 41 rows
[main 2020-12-17T08:17:11.913Z] [storage state.vscdb] updateItems(): insert(Map(3) {storage.serviceMachineId => 735a3a8a-3134-4ebb-abad-e6b9359a2727, telemetry.lastSessionDate => Thu, 17 Dec 2020 07:44:45 GMT, telemetry.currentSessionDate => Thu, 17 Dec 2020 08:17:11 GMT}), delete(Set(0) {})
[main 2020-12-17T08:17:11.914Z] [storage state.vscdb] Trace (event): BEGIN TRANSACTION
[main 2020-12-17T08:17:11.915Z] [storage state.vscdb] Trace (event): INSERT INTO ItemTable VALUES ('storage.serviceMachineId','735a3a8a-3134-4ebb-abad-e6b9359a2727'),('telemetry.lastSessionDate','Thu, 17 Dec 2020 07:44:45 GMT'),('telemetry.currentSessionDate','Thu, 17 Dec 2020 08:17:11 GMT')
[main 2020-12-17T08:17:11.916Z] [storage state.vscdb] Trace (event): END TRANSACTION
[main 2020-12-17T08:17:13.521Z] getShellEnvironment: running on CLI, skipping
[6407:1217/081713.710517:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
(node:7307) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:7307) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:7307) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:7307) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
[main 2020-12-17T08:17:17.184Z] Shared process: IPC ready
(node:9633) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:9633) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
[main 2020-12-17T08:17:17.813Z] Shared process: init ready
[main 2020-12-17T08:17:20.956Z] [VS Code]: renderer process crashed!
(node:9971) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:9971) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:9971) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:9971) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
[main 2020-12-17T08:17:28.334Z] [VS Code]: renderer process crashed!
[main 2020-12-17T08:17:29.665Z] Lifecycle#window.on('closed') - window ID 1
[main 2020-12-17T08:17:29.666Z] Lifecycle#onWillShutdown.fire()
[6407:1217/081729.728513:WARNING:x11_util.cc(1399)] X error received: serial 478, error_code 173 (GLXBadWindow), request_code 153, minor_code 32 (X_GLXDestroyWindow)
[6407:1217/081729.728617:WARNING:x11_util.cc(1399)] X error received: serial 482, error_code 3 (BadWindow (invalid Window parameter)), request_code 4, minor_code 0 (X_DestroyWindow)
grahamperrin#mowa219-gjp4-8570p:~ % less ~/.config/Code\ -\ OSS/.org.chromium.Chromium.eOeolK
{"net":{"http_server_properties":{"servers":[{"isolation":[],"server":"https://davidwang.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ajshort.gallery.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://stkb.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ionutvmi.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ms-vscode.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ms-python.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ms-ceintl.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ms-iot.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ms-iot.gallery.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://bgforge.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://classix.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://vmssoftwareinc.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://killerall.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://siamz.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://alexhenriquepv.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://leighlondon.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ionutvmi.gallery.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://miusuncle.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://yedhrab.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://rjarouche.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://neptunedesign.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://jakob101.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://dariofuzinato.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://sryze.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://flesler.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://stkb.gallery.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://ms-ceintl.gallery.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://tomashubelbauer.gallerycdn.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://tomashubelbauer.gallery.vsassets.io","supports_spdy":true},{"isolation":[],"server":"https://marketplace.visualstudio.com","supports_spdy":true}],"version":5},"network_qualities":{"CAASABiAgICA+P////8B":"4G","CAYSABiAgICA+P////8B":"Offline"}}}
grahamperrin#mowa219-gjp4-8570p:~ % code-oss --disable-extensions --verbose
[main 2020-12-17T08:19:01.005Z] Starting VS Code
[main 2020-12-17T08:19:01.011Z] from: /usr/local/share/code-oss/resources/app
[main 2020-12-17T08:19:01.011Z] args: {
_: [],
diff: false,
add: false,
goto: false,
'new-window': false,
'reuse-window': false,
wait: false,
help: false,
'list-extensions': false,
'show-versions': false,
version: false,
verbose: true,
status: false,
'prof-startup': false,
'disable-extensions': true,
'disable-gpu': false,
telemetry: false,
logExtensionHostCommunication: false,
'skip-release-notes': false,
'disable-restore-windows': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-crash-reporter': false,
'disable-user-env-probe': false,
'skip-add-to-recently-opened': false,
'unity-launch': false,
'open-url': false,
'file-write': false,
'file-chmod': false,
'driver-verbose': false,
force: false,
'do-not-sync': false,
trace: false,
'force-user-env': false,
'no-proxy-server': false,
nolazy: false,
'force-renderer-accessibility': false,
'ignore-certificate-errors': false,
'allow-insecure-localhost': false
}
[main 2020-12-17T08:19:01.016Z] Resolving machine identifier...
[main 2020-12-17T08:19:01.016Z] Resolved machine identifier: 76d5dcb36bedd2b6a2ae2706b11c68da607ea2bce16973ed535e6bfdec09baac (trueMachineId: undefined)
[main 2020-12-17T08:19:01.143Z] [storage state.vscdb] open(/home/grahamperrin/.config/Code - OSS/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2020-12-17T08:19:01.146Z] lifecycle (main): phase changed (value: 2)
[main 2020-12-17T08:19:01.148Z] windowsManager#open
[main 2020-12-17T08:19:01.151Z] window#validateWindowState: validating window state on 2 display(s) { mode: 0, x: 0, y: 0, width: 1133, height: 510 }
[main 2020-12-17T08:19:01.152Z] window#validateWindowState: multi-monitor working area { x: 0, y: 0, width: 1920, height: 1080 }
[main 2020-12-17T08:19:01.153Z] window#ctor: using window state { mode: 0, x: 0, y: 0, width: 1133, height: 510 }
[main 2020-12-17T08:19:01.681Z] lifecycle (main): phase changed (value: 3)
[main 2020-12-17T08:19:01.684Z] update#ctor - updates are disabled as there is no update URL
[13433:1217/081902.366547:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[main 2020-12-17T08:19:02.583Z] [storage state.vscdb] getItems(): 41 rows
[main 2020-12-17T08:19:02.585Z] [storage state.vscdb] Trace (event): SELECT * FROM ItemTable
[main 2020-12-17T08:19:02.686Z] [storage state.vscdb] updateItems(): insert(Map(3) {storage.serviceMachineId => 735a3a8a-3134-4ebb-abad-e6b9359a2727, telemetry.lastSessionDate => Thu, 17 Dec 2020 08:17:11 GMT, telemetry.currentSessionDate => Thu, 17 Dec 2020 08:19:02 GMT}), delete(Set(0) {})
[main 2020-12-17T08:19:02.689Z] [storage state.vscdb] Trace (event): BEGIN TRANSACTION
[main 2020-12-17T08:19:02.692Z] [storage state.vscdb] Trace (event): INSERT INTO ItemTable VALUES ('storage.serviceMachineId','735a3a8a-3134-4ebb-abad-e6b9359a2727'),('telemetry.lastSessionDate','Thu, 17 Dec 2020 08:17:11 GMT'),('telemetry.currentSessionDate','Thu, 17 Dec 2020 08:19:02 GMT')
[main 2020-12-17T08:19:02.693Z] [storage state.vscdb] Trace (event): END TRANSACTION
[main 2020-12-17T08:19:02.864Z] getShellEnvironment: running on CLI, skipping
(node:13490) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:13490) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:13490) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:13490) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
[main 2020-12-17T08:19:04.147Z] [VS Code]: renderer process crashed!
[13433:1217/081904.745930:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[main 2020-12-17T08:19:06.291Z] Shared process: IPC ready
(node:13567) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
(node:13567) Electron: Loading non context-aware native modules in the renderer process is deprecated and will stop working at some point in the future, please see https://github.com/electron/electron/issues/18397 for more information
[main 2020-12-17T08:19:06.356Z] Shared process: init ready
[main 2020-12-17T08:19:07.353Z] Lifecycle#window.on('closed') - window ID 1
[main 2020-12-17T08:19:07.353Z] Lifecycle#onWillShutdown.fire()
grahamperrin#mowa219-gjp4-8570p:~ % gdb /usr/local/bin/code-oss ./code-oss.core
GNU gdb (GDB) 10.1 [GDB v10.1 for FreeBSD]
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd13.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
"0x7fffffffe080s": not in executable format: file format not recognized
[New LWP 102724]
[New LWP 116825]
[New LWP 116826]
[New LWP 116827]
[New LWP 116828]
[New LWP 116829]
[New LWP 116830]
[New LWP 116831]
[New LWP 116832]
[New LWP 116833]
[New LWP 116834]
[New LWP 116835]
[New LWP 116836]
[New LWP 116838]
[New LWP 116839]
[New LWP 116840]
[New LWP 116841]
[New LWP 116842]
[New LWP 116843]
[New LWP 116844]
[New LWP 116845]
[New LWP 116846]
[New LWP 116847]
[New LWP 116848]
[New LWP 116849]
[New LWP 116850]
[New LWP 116851]
[New LWP 116867]
[New LWP 116888]
Core was generated by `code-oss: --disable-extensions --verbose --no-sandbox'.
Program terminated with signal SIGBUS, Bus error.
--Type <RET> for more, q to quit, c to continue without paging--
#0 0x00000000025d0c77 in ?? ()
[Current thread is 1 (LWP 102724)]
(gdb) bt
#0 0x00000000025d0c77 in ?? ()
#1 0x000000081432a0c0 in ?? ()
#2 0x000000081227a608 in ?? ()
#3 0x00007fffffffd750 in ?? ()
#4 0x0000000002c5e17b in ?? ()
#5 0x000000081227a608 in ?? ()
#6 0x000000081227a620 in ?? ()
#7 0x000000081432a0c0 in ?? ()
#8 0x000000081227a620 in ?? ()
#9 0x000000081227bff0 in ?? ()
#10 0x0000000007740100 in ?? ()
#11 0x000000081432a0c0 in ?? ()
#12 0x00000008133b6730 in ?? ()
#13 0x00000008133b6730 in ?? ()
#14 0x00000008133b6740 in ?? ()
#15 0xecf3e8d0b6254a2e in ?? ()
#16 0x000000080f6d9620 in ?? ()
#17 0x000000081227a608 in ?? ()
#18 0x00007fffffffd7e8 in ?? ()
#19 0x0000000000000005 in ?? ()
#20 0x0000000001a3c432 in ?? ()
#21 0x00007fffffffd7d0 in ?? ()
#22 0x0000000002c5e06e in ?? ()
#23 0x0000000000000000 in ?? ()
(gdb) q
grahamperrin#mowa219-gjp4-8570p:~ % pkg query '%o %v %R' vscode
editors/vscode 1.46.1 FreeBSD
grahamperrin#mowa219-gjp4-8570p:~ % uname -v
FreeBSD 13.0-CURRENT #74 r368589: Sun Dec 13 07:55:46 GMT 2020 root#mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
grahamperrin#mowa219-gjp4-8570p:~ %
– unfortunately, nothing useful in the backtrace.
Bug reported:
Code - OSS crashed consistently at start time – renderer process crashed! – until after I removed cached data workbench.desktop.main-17c1ea9255cc303c9339b9c2ce2b4a02.code · Issue #113069 · microsoft/vscode
With the bugged ~/.config/Code - OSS directory (restored from a backup):
After removing the offending file, a first run of the application:
Extension host terminated unexpectedly.
This occurred a few seconds after every run of the application.
Output from code-oss --verbose at https://pastebin.com/gPXMNdrv
After disabling all possible extensions (English (United Kingdom) Language Pack for Visual Studio Code can not be disabled), then re-enabling all: touch wood, no recurrence of Extension host terminated unexpectedly.

Mongod service crashed after performing mongodump

I performed this query
query: mongodump --db=elastic --collection=q_moonx_notifications_2019-08-26 --out=/home/centos/mongo-dump/
on my mongo db to take a dump of one collection which is around
Collection name: q_moonx_notifications_2019-08-26
size : 80GB
storageSize : 23.6GB
Soon after doing this, mongod service crashed.
I went through /var/log/messages to find the problem.
I got to know it happened due to 'out-of-memory' issue.
Can someone help me how it happened and how can I take a dump of a single collection without effecting my running mongo service.
Machine has 32 gb memory and 0 swp.
/var/log/messages content
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbdb61e41>] dump_stack+0x19/0x1b
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbdb5c86a>] dump_header+0x90/0x229
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd700bcb>] ? cred_has_capability+0x6b/0x120
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5ba4e4>] oom_kill_process+0x254/0x3d0
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd700c9c>] ? selinux_capable+0x1c/0x40
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5bad26>] out_of_memory+0x4b6/0x4f0
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbdb5d36e>] __alloc_pages_slowpath+0x5d6/0x724
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5c1105>] __alloc_pages_nodemask+0x405/0x420
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd60df68>] alloc_pages_current+0x98/0x110
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5b6347>] __page_cache_alloc+0x97/0xb0
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5b8fa8>] filemap_fault+0x298/0x490
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffc0400d0e>] __xfs_filemap_fault+0x7e/0x1d0 [xfs]
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffc0400f0c>] xfs_filemap_fault+0x2c/0x30 [xfs]
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5e444a>] __do_fault.isra.59+0x8a/0x100
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5e49fc>] do_read_fault.isra.61+0x4c/0x1b0
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5e93a4>] handle_pte_fault+0x2f4/0xd10
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd50cbf8>] ? get_futex_key+0x1c8/0x2c0
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbd5ebedd>] handle_mm_fault+0x39d/0x9b0
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbdb6f5e3>] __do_page_fault+0x203/0x500
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbdb6f915>] do_page_fault+0x35/0x90
Oct 11 07:07:33 ip-1.23.345.678 kernel: [<ffffffffbdb6b758>] page_fault+0x28/0x30
Oct 11 07:07:33 ip-1.23.345.678 kernel: Mem-Info:
Oct 11 07:07:33 ip-1.23.345.678 kernel: active_anon:7972560 inactive_anon:30565 isolated_anon:0#012 active_file:2831 inactive_file:4651 isolated_file:0#012 unevictable:0 dirty:0 writeback:5 unstable:0#012 slab_reclaimable:42065 slab_unreclaimable:12016#012 mapped:18928 shmem:55424 pagetables:19349 bounce:0#012 free:49154 free_pcp:558 free_cma:0
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 DMA free:15904kB min:32kB low:40kB high:48kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15988kB managed:15904kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Oct 11 07:07:33 ip-1.23.345.678 kernel: lowmem_reserve[]: 0 3597 31992 31992
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 DMA32 free:121020kB min:7596kB low:9492kB high:11392kB active_anon:3397760kB inactive_anon:11020kB active_file:284kB inactive_file:508kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:3915776kB managed:3684320kB mlocked:0kB dirty:0kB writeback:0kB mapped:5892kB shmem:14892kB slab_reclaimable:131668kB slab_unreclaimable:5368kB kernel_stack:1472kB pagetables:7364kB unstable:0kB bounce:0kB free_pcp:1184kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:2829 all_unreclaimable? yes
Oct 11 07:07:33 ip-1.23.345.678 kernel: lowmem_reserve[]: 0 0 28394 28394
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 Normal free:66532kB min:59952kB low:74940kB high:89928kB active_anon:28492480kB inactive_anon:111240kB active_file:11040kB inactive_file:11684kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:29622272kB managed:29079004kB mlocked:0kB dirty:0kB writeback:20kB mapped:69820kB shmem:206804kB slab_reclaimable:36592kB slab_unreclaimable:42696kB kernel_stack:6720kB pagetables:70032kB unstable:0kB bounce:0kB free_pcp:3320kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:8574 all_unreclaimable? no
Oct 11 07:07:33 ip-1.23.345.678 kernel: lowmem_reserve[]: 0 0 0 0
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 DMA: 0*4kB 0*8kB 0*16kB 1*32kB (U) 2*64kB (U) 1*128kB (U) 1*256kB (U) 0*512kB 1*1024kB (U) 1*2048kB (M) 3*4096kB (M) = 15904kB
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 DMA32: 2724*4kB (UEM) 1319*8kB (UEM) 2734*16kB (UEM) 1065*32kB (UEM) 296*64kB (UEM) 32*128kB (UEM) 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 122312kB
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 Normal: 10268*4kB (UEM) 3615*8kB (UEM) 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 69992kB
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
Oct 11 07:07:33 ip-1.23.345.678 kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
Oct 11 07:07:33 ip-1.23.345.678 kernel: 61902 total pagecache pages
Oct 11 07:07:33 ip-1.23.345.678 kernel: 0 pages in swap cache
Oct 11 07:07:33 ip-1.23.345.678 kernel: Swap cache stats: add 0, delete 0, find 0/0
Oct 11 07:07:33 ip-1.23.345.678 kernel: Free swap = 0kB
Oct 11 07:07:33 ip-1.23.345.678 kernel: Total swap = 0kB
Oct 11 07:07:33 ip-1.23.345.678 kernel: 8388509 pages RAM
Oct 11 07:07:33 ip-1.23.345.678 kernel: 0 pages HighMem/MovableOnly
Oct 11 07:07:33 ip-1.23.345.678 kernel: 193702 pages reserved
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ pid ] uid tgid total_vm rss nr_ptes swapents oom_score_adj name
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 2415] 0 2415 55590 32605 114 0 0 systemd-journal
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 2456] 0 2456 11953 611 25 0 -1000 systemd-udevd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 2704] 0 2704 15511 170 29 0 -1000 auditd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4346] 32 4346 18412 189 38 0 0 rpcbind
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4464] 81 4464 16600 204 34 0 -900 dbus-daemon
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4532] 998 4532 29446 143 29 0 0 chronyd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4588] 0 4588 6652 156 19 0 0 systemd-logind
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4589] 999 4589 153057 1381 63 0 0 polkitd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4592] 0 4592 5416 101 14 0 0 irqbalance
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4596] 0 4596 50404 162 38 0 0 gssproxy
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 4940] 0 4940 26839 508 51 0 0 dhclient
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5035] 0 5035 143455 3309 99 0 0 tuned
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5102] 0 5102 31253 535 58 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5103] 995 5103 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5104] 995 5104 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5105] 995 5105 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5106] 995 5106 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5107] 995 5107 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5108] 995 5108 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5109] 995 5109 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5110] 995 5110 31375 641 59 0 0 nginx
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5183] 0 5183 22603 310 42 0 0 master
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5189] 89 5189 22673 286 43 0 0 qmgr
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5231] 997 5231 4365796 4120011 8150 0 0 mongod
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5295] 0 5295 104225 16973 121 0 0 rsyslogd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5297] 0 5297 28189 267 58 0 -1000 sshd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5337] 0 5337 31580 194 18 0 0 crond
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5343] 0 5343 27523 50 10 0 0 agetty
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5347] 0 5347 27523 50 13 0 0 agetty
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 5662] 27 5662 691356 97174 303 0 0 mysqld
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 7361] 996 7361 12739660 2366239 5813 0 0 java
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 7462] 996 7462 17192 173 30 0 0 controller
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 7661] 1000 7661 3588101 1239871 2579 0 0 java
Oct 11 07:07:33 ip-1.23.345.678 kernel: [14974] 0 14974 371181 6509 107 0 0 metricbeat
Oct 11 07:07:33 ip-1.23.345.678 kernel: [ 6781] 994 6781 430375 60775 604 0 0 node
Oct 11 07:07:33 ip-1.23.345.678 kernel: [24008] 89 24008 22629 301 47 0 0 pickup
Oct 11 07:07:33 ip-1.23.345.678 kernel: [25163] 0 25163 39154 367 77 0 0 sshd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [25167] 1000 25167 39154 366 74 0 0 sshd
Oct 11 07:07:33 ip-1.23.345.678 kernel: [25168] 1000 25168 28893 149 15 0 0 bash
Oct 11 07:07:33 ip-1.23.345.678 kernel: [28554] 1000 28554 260690 34619 132 0 0 mongodump
Oct 11 07:07:33 ip-1.23.345.678 kernel: Out of memory: Kill process 5231 (mongod) score 503 or sacrifice child
Oct 11 07:07:33 ip-1.23.345.678 kernel: Killed process 5231 (mongod) total-vm:17463184kB, anon-rss:16480044kB, file-rss:0kB, shmem-rss:0kB
Oct 11 07:07:34 ip-1.23.345.678 systemd: mongod.service: main process exited, code=killed, status=9/KILL
Oct 11 07:07:34 ip-1.23.345.678 systemd: Unit mongod.service entered failed state.
Oct 11 07:07:34 ip-1.23.345.678 systemd: mongod.service failed.
Oct 11 07:07:39 ip-1.23.345.678 systemd-logind: New session 1220 of user centos.
You ran into a "problem" called the "OOM-Killer".
A quote from the part of the MongoDB documentation aptly named Production notes:
Swap
Assign swap space for your systems. Allocating swap space can avoid issues with memory contention and can prevent the OOM Killer on Linux systems from killing mongod.
For the WiredTiger storage engine, given sufficient memory pressure, WiredTiger may store data in swap space.
(emphasis by me)
What basically happened is that the memory pressure on the system became critical, and the kernel decided to kill a process to free some RAM in order to ensure the system can still run. It does so by determining the "badness" of a task via
badness_for_task = total_vm_for_task / (sqrt(cpu_time_in_seconds) *
sqrt(sqrt(cpu_time_in_minutes)))
and killing the baddest task. See https://www.kernel.org/doc/gorman/html/understand/understand016.html
for details.
Gist: MongoDB presumably consumes several orders of magnitude more RAM than any other process on the server, hence it get's killed by the OOM Killer when the Kernel has no option to swap out some data and thereby ensure the basic system tasks still can run.
This behaviour can basically be prevented by allocating swap, which is why it is accordingly documented in the production notes.
From the official document -
mongodump reads data from a MongoDB database and creates high fidelity BSON files which the mongorestore tool can use to populate a MongoDB database. mongodump and mongorestore are simple and efficient tools for backing up and restoring small MongoDB deployments, but are not ideal for capturing backups of larger systems.
When connected to a MongoDB instance, mongodump can adversely affect mongod performance. If your data is larger than system memory, the queries will push the working set out of memory, causing page faults.
and for the above said result it is important to have swap memory ready for using these commands.
I would suggest to create swap memory as a first step you can check the required steps for your specific os you are using. This is the best I can recommend for creating swap space.
If that doesn't help please increase the memory.

How to install PGlogical from sources on Freebsd?

I have Postgresql 9.5 server on Freebsd. I try to install PGlogical (http://2ndquadrant.com/en/resources/pglogical/) from sources. But when I downloaded tarball and unpacked it, I saw only these files:
pglogical-1.0.1 ls -la
total 480
drwxr-xr-x 6 root wheel 1536 Mar 24 11:51 .
drwxrwxrwt 16 root wheel 1024 Mar 24 15:42 ..
-rw-rw-r-- 1 1000 1000 8 Jan 19 15:39 .distgitrev
-rw-rw-r-- 1 1000 1000 11 Jan 19 15:39 .distgittag
-rw-rw-r-- 1 1000 1000 169 Dec 31 12:33 .gitignore
-rw-rw-r-- 1 1000 1000 216 Dec 27 15:59 .gitmodules
-rw-rw-r-- 1 1000 1000 6240 Jan 18 06:42 Makefile
-rw-rw-r-- 1 1000 1000 23965 Jan 18 06:42 README.md
drwxrwxr-x 4 1000 1000 512 Jan 18 06:42 compat
drwxrwxr-x 2 1000 1000 512 Jan 19 14:39 expected
-rw-rw-r-- 1 1000 1000 893 Jan 19 14:39 pglogical--1.0.0--1.0.1.sql
-rw-rw-r-- 1 1000 1000 9496 Jan 18 06:42 pglogical--1.0.0.sql
-rw-rw-r-- 1 1000 1000 9504 Jan 18 06:42 pglogical--1.0.1.sql
-rw-rw-r-- 1 1000 1000 12670 Jan 18 06:42 pglogical.c
-rw-rw-r-- 1 1000 1000 184 Dec 22 15:27 pglogical.control.in
-rw-rw-r-- 1 1000 1000 1796 Jan 18 06:42 pglogical.h
-rw-rw-r-- 1 1000 1000 43489 Jan 18 06:42 pglogical_apply.c
-rw-rw-r-- 1 1000 1000 13960 Jan 18 06:42 pglogical_conflict.c
-rw-rw-r-- 1 1000 1000 2038 Dec 19 13:27 pglogical_conflict.h
-rw-rw-r-- 1 1000 1000 38525 Jan 18 06:42 pglogical_create_subscriber.c
drwxrwxr-x 2 1000 1000 1024 Jan 18 07:32 pglogical_dump
-rw-rw-r-- 1 1000 1000 1367 Dec 19 13:27 pglogical_fe.c
-rw-rw-r-- 1 1000 1000 533 Dec 1 09:35 pglogical_fe.h
-rw-rw-r-- 1 1000 1000 41913 Jan 18 06:42 pglogical_functions.c
-rw-rw-r-- 1 1000 1000 8748 Dec 19 13:27 pglogical_hooks.c
-rw-rw-r-- 1 1000 1000 4126 Dec 19 13:27 pglogical_manager.c
-rw-rw-r-- 1 1000 1000 23212 Jan 18 06:42 pglogical_node.c
-rw-rw-r-- 1 1000 1000 1992 Dec 19 13:27 pglogical_node.h
-rw-rw-r-- 1 1000 1000 9323 Dec 19 13:27 pglogical_proto.c
-rw-rw-r-- 1 1000 1000 1431 Sep 30 07:51 pglogical_proto.h
-rw-rw-r-- 1 1000 1000 5493 Dec 19 13:27 pglogical_queue.c
-rw-rw-r-- 1 1000 1000 1026 Dec 19 13:27 pglogical_queue.h
-rw-rw-r-- 1 1000 1000 4832 Jan 18 06:42 pglogical_relcache.c
-rw-rw-r-- 1 1000 1000 1147 Dec 19 13:27 pglogical_relcache.h
-rw-rw-r-- 1 1000 1000 24719 Dec 19 13:27 pglogical_repset.c
-rw-rw-r-- 1 1000 1000 2770 Jan 18 06:42 pglogical_repset.h
-rw-rw-r-- 1 1000 1000 4126 Dec 19 13:27 pglogical_rpc.c
-rw-rw-r-- 1 1000 1000 711 Dec 1 09:35 pglogical_rpc.h
-rw-rw-r-- 1 1000 1000 34577 Jan 18 06:42 pglogical_sync.c
-rw-rw-r-- 1 1000 1000 2472 Dec 19 13:27 pglogical_sync.h
-rw-rw-r-- 1 1000 1000 9808 Jan 18 06:42 pglogical_worker.c
-rw-rw-r-- 1 1000 1000 2898 Dec 19 13:27 pglogical_worker.h
-rw-rw-r-- 1 1000 1000 4667 Oct 28 08:21 regress-pg_hba.conf
-rw-rw-r-- 1 1000 1000 602 Jan 18 06:42 regress-postgresql.conf
drwxrwxr-x 2 1000 1000 512 Jan 19 14:39 sql
And I didn't see configure file and other. How to install this tarball? OS - Freebsd 10.2
You can install pglogical from sources only using PostgreSQL sources:
Download sources of PostgreSQL of necessary version.
You also need pglogical_output extension and its sources. You can read about it in the documentation. Download it from GitHub.
Configure PostgreSQL. More about it in the documentation.
Copy downloaded sources of pglogical and pglogical_output to directories contrib/pglogical and contrib/pglogical_output.
Execute commands:
cd <path-to-postgres-sources>/contrib/pglogical
make install
cd <path-to-postgres-sources>/contrib/pglogical_output
make install
Read the documentation to setup pglogical.
Did you read the README file? It will probably tell you to use make, as there is a Makefile

copy specific file in command line

I want to copy specific file done last changes in Oct 16-17,file type is java.
shia#ubuntu:~/code$ ls -alxo
total 96
drwx------ 2 shia 4096 Oct 20 18:54 .
drwxr-xr-x 61 shia 12288 Oct 20 19:24 ..
-rw------- 1 shia 12288 Oct 16 21:52 .Reuse.java.swp
-rw-rw-r-- 1 shia 746 Oct 20 11:16 Argus.class
-rw-rw-r-- 1 shia 302 Oct 20 11:16 Argus.java
-rw------- 1 shia 310 Oct 16 21:30 Call.java
-rw-rw-r-- 1 shia 417 Oct 17 15:20 Ordinary.class
-rw-rw-r-- 1 shia 298 Oct 17 14:57 Overriding.java
-rw-rw-r-- 1 shia 562 Oct 19 21:27 Package.class
-rw-rw-r-- 1 shia 430 Oct 19 21:27 Package.java
-rw------- 1 shia 729 Oct 17 13:50 Reuse.java
-rw------- 1 shia 424 Oct 17 13:47 Room.java
-rw------- 1 shia 321 Oct 16 21:22 Simpleobject.java
-rw-rw-r-- 1 shia 1187 Oct 17 00:04 Static.java
-rw-rw-r-- 1 shia 686 Oct 17 15:20 Super.class
-rw-rw-r-- 1 shia 1010 Oct 17 15:20 Super.java
-rw------- 1 shia 843 Oct 17 14:20 This.java
-rw-rw-r-- 1 shia 521 Oct 17 14:51 b.java
-rw-rw-r-- 1 shia 90 Oct 20 18:54 cp.awk
-rw-rw-r-- 1 shia 105 Oct 20 17:19 file.txt
I try to specific them but i don't know how to copy them.
shia#ubuntu:~/code$ ls -alxo|grep 'Oct 1[67].*java$'|awk '{print $8}'
Call.java
Overriding.java
Reuse.java
Room.java
Simpleobject.java
Static.java
Super.java
This.java
b.java
Any help,thanks a lot!
One way using find:
find . -maxdepth 1 -type f -name "*.java" -newermt 2012-10-16 ! -newermt 2012-10-18 -exec cp '{}' /home/user/dstFolder/ \;
You can use xargs to copy the files found:
...| xargs -i cp '{}' /home/user/dstFolder/
This will copy all the files found to the folder /home/user/dstFolder/.