Skip to content

Commit 4f58f38

Browse files
committed
Fixed GH-13 - parse failure when cgroups is set to "unavailable"
1 parent 0c31f84 commit 4f58f38

File tree

5 files changed

+51
-2
lines changed

5 files changed

+51
-2
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Enhancements:
77

88
Bug fixes:
99
- Fixed error when si/so have NaN values which can happen occasionally.
10-
- Fixed parse failures when lines contain "," in the timestamp which can happen with some Java logging libraries.
10+
- Fixed parse failure when lines contain "," in the timestamp which can happen with some Java logging libraries.
11+
- Fixed parse failure when cgroups is set to "unavailable".
1112

1213
3.7
1314
---

apamax/log_analyzer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,10 @@ def handleCompletedStartupStanza(self, file, stanza, **extra):
15841584
features.append('licenseMayBeMissing!')
15851585

15861586
if stanza.get('cgroups - maximum memory') not in {None, 'unlimited', 'unknown'}:
1587-
stanza['cgroups - maximum memory MB'] = float(stanza['cgroups - maximum memory'].replace(' bytes','').replace(',',''))/1024.0/1024.0
1587+
try:
1588+
stanza['cgroups - maximum memory MB'] = float(stanza['cgroups - maximum memory'].replace(' bytes','').replace(',',''))/1024.0/1024.0
1589+
except ValueError:
1590+
pass # might be "unavailable"
15881591

15891592
allocator = stanza.get('using memory allocator',None)
15901593
if allocator not in {None, "TBB scalable allocator"}:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2019-10-04 19:02:53.247 ##### [140008308907904] - Correlator, version 10.5.1.0.0 (build UNKNOWN_VERSION@0 on amd64-rhel7 using Software AG suite version 10.5), started.
2+
2019-10-04 19:02:53.248 ##### [140008308907904] - Running on host 'troll.apama.com' as user 'bsp'.
3+
2019-10-04 19:02:53.248 ##### [140008308907904] - Running on platform '"CentOS Linux 7 (Core)"'.
4+
2019-10-04 19:02:53.248 ##### [140008308907904] - Running on CPU 'vendor GenuineIntel family 6 model 63 stepping 2: Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz'.
5+
2019-10-04 19:02:53.248 ##### [140008308907904] - Running with process Id 46974.
6+
2019-10-04 19:02:53.248 ##### [140008308907904] - Running with 257673.14MB of available memory.
7+
2019-10-04 19:02:53.248 ##### [140008308907904] - Operating system process limits:
8+
2019-10-04 19:02:53.248 ##### [140008308907904] - Limit Soft Limit Hard Limit Units
9+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max cpu time unlimited unlimited seconds
10+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max file size 10737418240 unlimited bytes
11+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max data size unlimited unlimited bytes
12+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max stack size 8388608 unlimited bytes
13+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max core file size unlimited unlimited bytes
14+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max resident set unlimited unlimited bytes
15+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max processes 20000 1030567 processes
16+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max open files 5000 5000 files
17+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max locked memory 65536 65536 bytes
18+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max address space 540379742208 unlimited bytes
19+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max file locks unlimited unlimited locks
20+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max pending signals 1030567 1030567 signals
21+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max msgqueue size 819200 819200 bytes
22+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max nice priority 0 0
23+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max realtime priority 0 0
24+
2019-10-04 19:02:53.248 ##### [140008308907904] - Max realtime timeout unlimited unlimited us
25+
2019-10-04 19:02:53.248 ##### [140008308907904] - RLIMIT_CORE = 1000
26+
2019-10-04 19:02:53.248 ##### [140008308907904] - RLIMIT_AS = 540379742208
27+
2019-10-04 19:02:53.248 ##### [140008308907904] - There are 48 CPU(s)
28+
2019-10-04 19:02:53.249 INFO [140008308907904] - cgroups - available CPU(s) = unlimited
29+
2019-10-04 19:02:53.249 INFO [140008308907904] - cgroups - CPU shares = unavailable
30+
2019-10-04 19:02:53.249 INFO [140008308907904] - cgroups - maximum memory = unavailable
31+
2019-10-04 19:02:53.249 INFO [140008308907904] - cgroups - memory swap limit = unavailable
32+
2019-10-04 19:02:53.249 INFO [140008308907904] - cgroups - memory swappiness = unavailable
33+
2019-10-04 19:02:53.249 ##### [140008308907904] - Correlator command line: /dev/shm/bsp/10.5.1.x/apama-src/output-amd64-rhel7-release/SoftwareAG/Apama/bin/correlator -l /dev/shm/bsp/10.5.1.x/apama-test/tools/output-amd64-rhel7-release/apwork/license/ApamaServerLicense.xml -p 6705 --javaopt -Djava.class.path=/dev/shm/bsp/10.5.1.x/apama-test/etc -j -P

tests/correctness/Cor_012/Reference/ref-overview.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,14 @@
6363
Fri 2019-10-04 19:02:53 to 19:03:04 (=0:00:10)
6464

6565

66+
- #07 correlator-10.5.1.0-linux-cgroups-unavailable.log
67+
Fri 2019-10-04 19:02:53 to 19:02:53 (=0:00:00)
68+
69+
Instance: troll:?
70+
Log timezone: ?
71+
Hardware: 48-core Xeon E5-2690 v3 @ 2.60GHz (cgroups unlimited CPUs; unavailable shares)
72+
Memory: 251.6 GB physical memory
73+
Connectivity: -
74+
Notable: licenseMayBeMissing!, cgroupsLimits, coreHasResourceLimit(should be unlimited!), optimizationsDisabled
75+
6676
Generated by Apama log analyzer v3.4.dev/2020-02-07.

tests/correctness/Cor_012/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ def execute(self):
1414
self.input+'/correlator-10.3.1.0-win.log',
1515
# hacked up to have everything turned on
1616
self.input+'/correlator-10.5.1.0-linux-everything.log',
17+
18+
self.input+'/correlator-10.5.1.0-linux-cgroups-unavailable.log',
1719

1820
self.input+'/correlator-with-restarts.log',
1921
self.input+'/correlator-without-startup.log',

0 commit comments

Comments
 (0)