From albert.th at alibaba-inc.com Sun Aug 11 00:16:49 2019 From: albert.th at alibaba-inc.com (Hao Tang) Date: Sun, 11 Aug 2019 08:16:49 +0800 Subject: =?UTF-8?B?WkdDOiBGaXggYW4gaW5jb3JyZWN0IGNvbHVtbiBpbiBHQyBzdGF0aXN0aWNz?= In-Reply-To: <9bb35b5a-92bd-4c90-877d-04a5868334a4.> References: , <9bb35b5a-92bd-4c90-877d-04a5868334a4.> Message-ID: <2012c86a-f76b-43cb-b2a2-2f5d0d92cd33.albert.th@alibaba-inc.com> Hi, I found that column "total" of ZGC log's statistics always reports obviously incorrect average values after running program with ZGC for over 10 hours (36000s). See the GC log below. [36000.080s][info][gc,stats ] === Garbage Collection Statistics ======================================================================================================================= [36000.080s][info][gc,stats ] Last 10s Last 10m Last 10h Total [36000.080s][info][gc,stats ] Avg / Max Avg / Max Avg / Max Avg / Max [36000.080s][info][gc,stats ] Collector: Garbage Collection Cycle 33.269 / 34.686 32.699 / 36.862 32.938 / 60.703 0.000 / 60.703 ms [36000.080s][info][gc,stats ] Contention: Mark Segment Reset Contention 0 / 0 0 / 0 0 / 0 1 / 0 ops/s [36000.080s][info][gc,stats ] Contention: Mark SeqNum Reset Contention 0 / 0 0 / 0 0 / 0 1 / 0 ops/s [36000.080s][info][gc,stats ] Contention: Relocation Contention 0 / 0 0 / 0 0 / 2277 1 / 2277 ops/s [36000.080s][info][gc,stats ] Critical: Allocation Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms [36000.080s][info][gc,stats ] Critical: Allocation Stall 0 / 0 0 / 0 0 / 0 1 / 0 ops/s [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0 / 0 0 / 0 0 / 0 1 / 0 ops/s [36000.080s][info][gc,stats ] Memory: Allocation Rate 45 / 48 45 / 48 45 / 90 0 / 90 MB/s [36000.080s][info][gc,stats ] Memory: Heap Used After Mark 126 / 130 125 / 140 125 / 164 0 / 164 MB [36000.080s][info][gc,stats ] Memory: Heap Used After Relocation 48 / 52 47 / 52 47 / 54 0 / 54 MB [36000.080s][info][gc,stats ] Memory: Heap Used Before Mark 124 / 130 123 / 138 124 / 158 0 / 158 MB [36000.080s][info][gc,stats ] Memory: Heap Used Before Relocation 54 / 58 53 / 60 53 / 60 0 / 60 MB The bug is caused by mistakenly adding "nsamples" to ZStatSamplerData::_sum. I am applying the patch below to fix the bug. Please give advice on this fix. diff -r 8f067351c370 src/hotspot/share/gc/z/zStat.cpp --- a/src/hotspot/share/gc/z/zStat.cpp Mon Aug 05 16:27:30 2019 -0700 +++ b/src/hotspot/share/gc/z/zStat.cpp Fri Aug 09 11:22:58 2019 +0800 @@ -63,7 +63,7 @@ void add(const ZStatSamplerData& new_sample) { _nsamples += new_sample._nsamples; - _sum += new_sample._nsamples; + _sum += new_sample._sum; _max = MAX2(_max, new_sample._max); } }; This patch can enable ZGC to print correct statistics after 10 hours. [36000.080s][info][gc,stats ] === Garbage Collection Statistics ======================================================================================================================= [36000.080s][info][gc,stats ] Last 10s Last 10m Last 10h Total [36000.080s][info][gc,stats ] Avg / Max Avg / Max Avg / Max Avg / Max [36000.080s][info][gc,stats ] Collector: Garbage Collection Cycle 32.794 / 32.985 32.865 / 38.454 33.212 / 80.477 33.212 / 80.477 ms [36000.080s][info][gc,stats ] Contention: Mark Segment Reset Contention 0 / 0 0 / 0 0 / 0 0 / 0 ops/s [36000.080s][info][gc,stats ] Contention: Mark SeqNum Reset Contention 0 / 0 0 / 0 0 / 0 0 / 0 ops/s [36000.080s][info][gc,stats ] Contention: Relocation Contention 0 / 0 0 / 0 0 / 5978 0 / 5978 ops/s [36000.080s][info][gc,stats ] Critical: Allocation Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms [36000.080s][info][gc,stats ] Critical: Allocation Stall 0 / 0 0 / 0 0 / 0 0 / 0 ops/s [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0 / 0 0 / 0 0 / 0 0 / 0 ops/s [36000.080s][info][gc,stats ] Memory: Allocation Rate 45 / 46 45 / 48 45 / 92 45 / 92 MB/s [36000.080s][info][gc,stats ] Memory: Heap Used After Mark 124 / 126 125 / 148 126 / 164 126 / 164 MB [36000.080s][info][gc,stats ] Memory: Heap Used After Relocation 48 / 52 48 / 52 47 / 54 47 / 54 MB [36000.080s][info][gc,stats ] Memory: Heap Used Before Mark 122 / 124 123 / 148 124 / 158 124 / 158 MB [36000.080s][info][gc,stats ] Memory: Heap Used Before Relocation 54 / 58 54 / 60 53 / 60 53 / 60 MB Best regards, Hao Tang From per.liden at oracle.com Sun Aug 11 09:07:09 2019 From: per.liden at oracle.com (Per Liden) Date: Sun, 11 Aug 2019 11:07:09 +0200 Subject: ZGC: Fix an incorrect column in GC statistics In-Reply-To: <2012c86a-f76b-43cb-b2a2-2f5d0d92cd33.albert.th@alibaba-inc.com> References: <9bb35b5a-92bd-4c90-877d-04a5868334a4.> <2012c86a-f76b-43cb-b2a2-2f5d0d92cd33.albert.th@alibaba-inc.com> Message-ID: <305e52fa-15b5-1970-f237-3fd9b2095b1e@oracle.com> Hi, Nice catch! Change looks good. As far as I can tell there's no JIRA entry for this yet, so I'll create one and sponsor your fix. thanks, Per On 2019-08-11 02:16, Hao Tang wrote: > Hi, I found that column "total" of ZGC log's statistics always reports obviously incorrect average values after running program with ZGC for over 10 hours (36000s). See the GC log below. > > [36000.080s][info][gc,stats ] === Garbage Collection Statistics ======================================================================================================================= > [36000.080s][info][gc,stats ] Last 10s Last 10m Last 10h Total > [36000.080s][info][gc,stats ] Avg / Max Avg / Max Avg / Max Avg / Max > [36000.080s][info][gc,stats ] Collector: Garbage Collection Cycle 33.269 / 34.686 32.699 / 36.862 32.938 / 60.703 0.000 / 60.703 ms > [36000.080s][info][gc,stats ] Contention: Mark Segment Reset Contention 0 / 0 0 / 0 0 / 0 1 / 0 ops/s > [36000.080s][info][gc,stats ] Contention: Mark SeqNum Reset Contention 0 / 0 0 / 0 0 / 0 1 / 0 ops/s > [36000.080s][info][gc,stats ] Contention: Relocation Contention 0 / 0 0 / 0 0 / 2277 1 / 2277 ops/s > [36000.080s][info][gc,stats ] Critical: Allocation Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms > [36000.080s][info][gc,stats ] Critical: Allocation Stall 0 / 0 0 / 0 0 / 0 1 / 0 ops/s > [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms > [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0 / 0 0 / 0 0 / 0 1 / 0 ops/s > [36000.080s][info][gc,stats ] Memory: Allocation Rate 45 / 48 45 / 48 45 / 90 0 / 90 MB/s > [36000.080s][info][gc,stats ] Memory: Heap Used After Mark 126 / 130 125 / 140 125 / 164 0 / 164 MB > [36000.080s][info][gc,stats ] Memory: Heap Used After Relocation 48 / 52 47 / 52 47 / 54 0 / 54 MB > [36000.080s][info][gc,stats ] Memory: Heap Used Before Mark 124 / 130 123 / 138 124 / 158 0 / 158 MB > [36000.080s][info][gc,stats ] Memory: Heap Used Before Relocation 54 / 58 53 / 60 53 / 60 0 / 60 MB > > The bug is caused by mistakenly adding "nsamples" to ZStatSamplerData::_sum. I am applying the patch below to fix the bug. Please give advice on this fix. > diff -r 8f067351c370 src/hotspot/share/gc/z/zStat.cpp > --- a/src/hotspot/share/gc/z/zStat.cpp Mon Aug 05 16:27:30 2019 -0700 > +++ b/src/hotspot/share/gc/z/zStat.cpp Fri Aug 09 11:22:58 2019 +0800 > @@ -63,7 +63,7 @@ > void add(const ZStatSamplerData& new_sample) { > _nsamples += new_sample._nsamples; > - _sum += new_sample._nsamples; > + _sum += new_sample._sum; > _max = MAX2(_max, new_sample._max); > } > }; > This patch can enable ZGC to print correct statistics after 10 hours. > > [36000.080s][info][gc,stats ] === Garbage Collection Statistics ======================================================================================================================= > [36000.080s][info][gc,stats ] Last 10s Last 10m Last 10h Total > [36000.080s][info][gc,stats ] Avg / Max Avg / Max Avg / Max Avg / Max > [36000.080s][info][gc,stats ] Collector: Garbage Collection Cycle 32.794 / 32.985 32.865 / 38.454 33.212 / 80.477 33.212 / 80.477 ms > [36000.080s][info][gc,stats ] Contention: Mark Segment Reset Contention 0 / 0 0 / 0 0 / 0 0 / 0 ops/s > [36000.080s][info][gc,stats ] Contention: Mark SeqNum Reset Contention 0 / 0 0 / 0 0 / 0 0 / 0 ops/s > [36000.080s][info][gc,stats ] Contention: Relocation Contention 0 / 0 0 / 0 0 / 5978 0 / 5978 ops/s > [36000.080s][info][gc,stats ] Critical: Allocation Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms > [36000.080s][info][gc,stats ] Critical: Allocation Stall 0 / 0 0 / 0 0 / 0 0 / 0 ops/s > [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 0.000 / 0.000 ms > [36000.080s][info][gc,stats ] Critical: GC Locker Stall 0 / 0 0 / 0 0 / 0 0 / 0 ops/s > [36000.080s][info][gc,stats ] Memory: Allocation Rate 45 / 46 45 / 48 45 / 92 45 / 92 MB/s > [36000.080s][info][gc,stats ] Memory: Heap Used After Mark 124 / 126 125 / 148 126 / 164 126 / 164 MB > [36000.080s][info][gc,stats ] Memory: Heap Used After Relocation 48 / 52 48 / 52 47 / 54 47 / 54 MB > [36000.080s][info][gc,stats ] Memory: Heap Used Before Mark 122 / 124 123 / 148 124 / 158 124 / 158 MB > [36000.080s][info][gc,stats ] Memory: Heap Used Before Relocation 54 / 58 54 / 60 53 / 60 53 / 60 MB > > > Best regards, > Hao Tang > From erik.osterlund at oracle.com Mon Aug 12 08:50:49 2019 From: erik.osterlund at oracle.com (=?UTF-8?Q?Erik_=c3=96sterlund?=) Date: Mon, 12 Aug 2019 10:50:49 +0200 Subject: ZGC: Fix an incorrect column in GC statistics In-Reply-To: <305e52fa-15b5-1970-f237-3fd9b2095b1e@oracle.com> References: <9bb35b5a-92bd-4c90-877d-04a5868334a4.> <2012c86a-f76b-43cb-b2a2-2f5d0d92cd33.albert.th@alibaba-inc.com> <305e52fa-15b5-1970-f237-3fd9b2095b1e@oracle.com> Message-ID: <07ba71b8-96ad-5cd3-d944-c8123b417aff@oracle.com> Hi, Looks good to me too. /Erik On 2019-08-11 11:07, Per Liden wrote: > Hi, > > Nice catch! Change looks good. As far as I can tell there's no JIRA > entry for this yet, so I'll create one and sponsor your fix. > > thanks, > Per > > On 2019-08-11 02:16, Hao Tang wrote: >> Hi, I found that column "total" of ZGC log's statistics always reports >> obviously incorrect average values after running program with ZGC for >> over 10 hours (36000s). See the GC log below. >> >> [36000.080s][info][gc,stats??? ] === Garbage Collection Statistics >> ======================================================================================================================= >> >> [36000.080s][info][gc,stats >> ]????????????????????????????????????????????????????????????? Last >> 10s????????????? Last 10m????????????? Last 10h??????????????? Total >> [36000.080s][info][gc,stats >> ]????????????????????????????????????????????????????????????? Avg / >> Max???????????? Avg / Max???????????? Avg / Max???????????? Avg / Max >> [36000.080s][info][gc,stats??? ]?? Collector: Garbage Collection >> Cycle???????????????????? 33.269 / 34.686?????? 32.699 / 36.862 >> 32.938 / 60.703??????? 0.000 / 60.703????? ms >> [36000.080s][info][gc,stats??? ]? Contention: Mark Segment Reset >> Contention???????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]? Contention: Mark SeqNum Reset >> Contention????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]? Contention: Relocation >> Contention???????????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 2277????????????? 1 / 2277??????? ops/s >> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >> Stall????????????????????????????? 0.000 / 0.000???????? 0.000 / >> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >> Stall????????????????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >> Stall?????????????????????????????? 0.000 / 0.000???????? 0.000 / >> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >> Stall?????????????????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]????? Memory: Allocation >> Rate????????????????????????????????? 45 / 48?????????????? 45 / >> 48?????????????? 45 / 90??????????????? 0 / 90????????? MB/s >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >> Mark??????????????????????????? 126 / 130???????????? 125 / >> 140???????????? 125 / 164?????????????? 0 / 164???????? MB >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >> Relocation?????????????????????? 48 / 52?????????????? 47 / >> 52?????????????? 47 / 54??????????????? 0 / 54????????? MB >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >> Mark?????????????????????????? 124 / 130???????????? 123 / >> 138???????????? 124 / 158?????????????? 0 / 158???????? MB >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >> Relocation????????????????????? 54 / 58?????????????? 53 / >> 60?????????????? 53 / 60??????????????? 0 / 60????????? MB >> >> The bug is caused by mistakenly adding "nsamples" to >> ZStatSamplerData::_sum. I am applying the patch below to fix the bug. >> Please give advice on this fix. >> diff -r 8f067351c370 src/hotspot/share/gc/z/zStat.cpp >> --- a/src/hotspot/share/gc/z/zStat.cpp Mon Aug 05 16:27:30 2019 -0700 >> +++ b/src/hotspot/share/gc/z/zStat.cpp Fri Aug 09 11:22:58 2019 +0800 >> @@ -63,7 +63,7 @@ >> ?? void add(const ZStatSamplerData& new_sample) { >> ???? _nsamples += new_sample._nsamples; >> -??? _sum += new_sample._nsamples; >> +??? _sum += new_sample._sum; >> ???? _max = MAX2(_max, new_sample._max); >> ?? } >> }; >> This patch can enable ZGC to print correct statistics after 10 hours. >> >> [36000.080s][info][gc,stats??? ] === Garbage Collection Statistics >> ======================================================================================================================= >> >> [36000.080s][info][gc,stats >> ]????????????????????????????????????????????????????????????? Last >> 10s????????????? Last 10m????????????? Last 10h??????????????? Total >> [36000.080s][info][gc,stats >> ]????????????????????????????????????????????????????????????? Avg / >> Max???????????? Avg / Max???????????? Avg / Max???????????? Avg / Max >> [36000.080s][info][gc,stats??? ]?? Collector: Garbage Collection >> Cycle???????????????????? 32.794 / 32.985?????? 32.865 / 38.454 >> 33.212 / 80.477?????? 33.212 / 80.477????? ms >> [36000.080s][info][gc,stats??? ]? Contention: Mark Segment Reset >> Contention???????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]? Contention: Mark SeqNum Reset >> Contention????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]? Contention: Relocation >> Contention???????????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 5978????????????? 0 / 5978??????? ops/s >> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >> Stall????????????????????????????? 0.000 / 0.000???????? 0.000 / >> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >> Stall????????????????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >> Stall?????????????????????????????? 0.000 / 0.000???????? 0.000 / >> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >> Stall?????????????????????????????????? 0 / 0???????????????? 0 / >> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >> [36000.080s][info][gc,stats??? ]????? Memory: Allocation >> Rate????????????????????????????????? 45 / 46?????????????? 45 / >> 48?????????????? 45 / 92?????????????? 45 / 92????????? MB/s >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >> Mark??????????????????????????? 124 / 126???????????? 125 / >> 148???????????? 126 / 164???????????? 126 / 164???????? MB >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >> Relocation?????????????????????? 48 / 52?????????????? 48 / >> 52?????????????? 47 / 54?????????????? 47 / 54????????? MB >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >> Mark?????????????????????????? 122 / 124???????????? 123 / >> 148???????????? 124 / 158???????????? 124 / 158???????? MB >> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >> Relocation????????????????????? 54 / 58?????????????? 54 / >> 60?????????????? 53 / 60?????????????? 53 / 60????????? MB >> >> >> Best regards, >> Hao Tang >> From per.liden at oracle.com Mon Aug 12 09:49:22 2019 From: per.liden at oracle.com (Per Liden) Date: Mon, 12 Aug 2019 11:49:22 +0200 Subject: ZGC: Fix an incorrect column in GC statistics In-Reply-To: <07ba71b8-96ad-5cd3-d944-c8123b417aff@oracle.com> References: <9bb35b5a-92bd-4c90-877d-04a5868334a4.> <2012c86a-f76b-43cb-b2a2-2f5d0d92cd33.albert.th@alibaba-inc.com> <305e52fa-15b5-1970-f237-3fd9b2095b1e@oracle.com> <07ba71b8-96ad-5cd3-d944-c8123b417aff@oracle.com> Message-ID: Pushed. https://hg.openjdk.java.net/jdk/jdk/rev/8ebc8f74f2d2 cheers, Per On 8/12/19 10:50 AM, Erik ?sterlund wrote: > Hi, > > Looks good to me too. > > /Erik > > On 2019-08-11 11:07, Per Liden wrote: >> Hi, >> >> Nice catch! Change looks good. As far as I can tell there's no JIRA >> entry for this yet, so I'll create one and sponsor your fix. >> >> thanks, >> Per >> >> On 2019-08-11 02:16, Hao Tang wrote: >>> Hi, I found that column "total" of ZGC log's statistics always >>> reports obviously incorrect average values after running program with >>> ZGC for over 10 hours (36000s). See the GC log below. >>> >>> [36000.080s][info][gc,stats??? ] === Garbage Collection Statistics >>> ======================================================================================================================= >>> >>> [36000.080s][info][gc,stats >>> ]????????????????????????????????????????????????????????????? Last >>> 10s????????????? Last 10m????????????? Last 10h??????????????? Total >>> [36000.080s][info][gc,stats >>> ]????????????????????????????????????????????????????????????? Avg / >>> Max???????????? Avg / Max???????????? Avg / Max???????????? Avg / Max >>> [36000.080s][info][gc,stats??? ]?? Collector: Garbage Collection >>> Cycle???????????????????? 33.269 / 34.686?????? 32.699 / 36.862 >>> 32.938 / 60.703??????? 0.000 / 60.703????? ms >>> [36000.080s][info][gc,stats??? ]? Contention: Mark Segment Reset >>> Contention???????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]? Contention: Mark SeqNum Reset >>> Contention????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]? Contention: Relocation >>> Contention???????????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 2277????????????? 1 / 2277??????? ops/s >>> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >>> Stall????????????????????????????? 0.000 / 0.000???????? 0.000 / >>> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >>> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >>> Stall????????????????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >>> Stall?????????????????????????????? 0.000 / 0.000???????? 0.000 / >>> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >>> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >>> Stall?????????????????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 1 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]????? Memory: Allocation >>> Rate????????????????????????????????? 45 / 48?????????????? 45 / >>> 48?????????????? 45 / 90??????????????? 0 / 90????????? MB/s >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >>> Mark??????????????????????????? 126 / 130???????????? 125 / >>> 140???????????? 125 / 164?????????????? 0 / 164???????? MB >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >>> Relocation?????????????????????? 48 / 52?????????????? 47 / >>> 52?????????????? 47 / 54??????????????? 0 / 54????????? MB >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >>> Mark?????????????????????????? 124 / 130???????????? 123 / >>> 138???????????? 124 / 158?????????????? 0 / 158???????? MB >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >>> Relocation????????????????????? 54 / 58?????????????? 53 / >>> 60?????????????? 53 / 60??????????????? 0 / 60????????? MB >>> >>> The bug is caused by mistakenly adding "nsamples" to >>> ZStatSamplerData::_sum. I am applying the patch below to fix the bug. >>> Please give advice on this fix. >>> diff -r 8f067351c370 src/hotspot/share/gc/z/zStat.cpp >>> --- a/src/hotspot/share/gc/z/zStat.cpp Mon Aug 05 16:27:30 2019 -0700 >>> +++ b/src/hotspot/share/gc/z/zStat.cpp Fri Aug 09 11:22:58 2019 +0800 >>> @@ -63,7 +63,7 @@ >>> ?? void add(const ZStatSamplerData& new_sample) { >>> ???? _nsamples += new_sample._nsamples; >>> -??? _sum += new_sample._nsamples; >>> +??? _sum += new_sample._sum; >>> ???? _max = MAX2(_max, new_sample._max); >>> ?? } >>> }; >>> This patch can enable ZGC to print correct statistics after 10 hours. >>> >>> [36000.080s][info][gc,stats??? ] === Garbage Collection Statistics >>> ======================================================================================================================= >>> >>> [36000.080s][info][gc,stats >>> ]????????????????????????????????????????????????????????????? Last >>> 10s????????????? Last 10m????????????? Last 10h??????????????? Total >>> [36000.080s][info][gc,stats >>> ]????????????????????????????????????????????????????????????? Avg / >>> Max???????????? Avg / Max???????????? Avg / Max???????????? Avg / Max >>> [36000.080s][info][gc,stats??? ]?? Collector: Garbage Collection >>> Cycle???????????????????? 32.794 / 32.985?????? 32.865 / 38.454 >>> 33.212 / 80.477?????? 33.212 / 80.477????? ms >>> [36000.080s][info][gc,stats??? ]? Contention: Mark Segment Reset >>> Contention???????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]? Contention: Mark SeqNum Reset >>> Contention????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]? Contention: Relocation >>> Contention???????????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 5978????????????? 0 / 5978??????? ops/s >>> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >>> Stall????????????????????????????? 0.000 / 0.000???????? 0.000 / >>> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >>> [36000.080s][info][gc,stats??? ]??? Critical: Allocation >>> Stall????????????????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >>> Stall?????????????????????????????? 0.000 / 0.000???????? 0.000 / >>> 0.000???????? 0.000 / 0.000???????? 0.000 / 0.000?????? ms >>> [36000.080s][info][gc,stats??? ]??? Critical: GC Locker >>> Stall?????????????????????????????????? 0 / 0???????????????? 0 / >>> 0???????????????? 0 / 0???????????????? 0 / 0?????????? ops/s >>> [36000.080s][info][gc,stats??? ]????? Memory: Allocation >>> Rate????????????????????????????????? 45 / 46?????????????? 45 / >>> 48?????????????? 45 / 92?????????????? 45 / 92????????? MB/s >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >>> Mark??????????????????????????? 124 / 126???????????? 125 / >>> 148???????????? 126 / 164???????????? 126 / 164???????? MB >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used After >>> Relocation?????????????????????? 48 / 52?????????????? 48 / >>> 52?????????????? 47 / 54?????????????? 47 / 54????????? MB >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >>> Mark?????????????????????????? 122 / 124???????????? 123 / >>> 148???????????? 124 / 158???????????? 124 / 158???????? MB >>> [36000.080s][info][gc,stats??? ]????? Memory: Heap Used Before >>> Relocation????????????????????? 54 / 58?????????????? 54 / >>> 60?????????????? 53 / 60?????????????? 53 / 60????????? MB >>> >>> >>> Best regards, >>> Hao Tang >>> From albert.th at alibaba-inc.com Tue Aug 13 01:29:41 2019 From: albert.th at alibaba-inc.com (Hao Tang) Date: Tue, 13 Aug 2019 09:29:41 +0800 Subject: =?UTF-8?B?5Zue5aSN77yaWkdDOiBGaXggYW4gaW5jb3JyZWN0IGNvbHVtbiBpbiBHQyBzdGF0aXN0aWNz?= In-Reply-To: References: <9bb35b5a-92bd-4c90-877d-04a5868334a4.> <2012c86a-f76b-43cb-b2a2-2f5d0d92cd33.albert.th@alibaba-inc.com> <305e52fa-15b5-1970-f237-3fd9b2095b1e@oracle.com> <07ba71b8-96ad-5cd3-d944-c8123b417aff@oracle.com>, Message-ID: Cheers, Per and Erik. Thanks for your help. Sincerely, Hao Tang ------------------------------------------------------------------ ????Per Liden ?????2019?8?12?(???) 17:49 ????"Erik ?sterlund" ; ??(??) ; zgc-dev ; hotspot-gc-dev openjdk.java.net ????Re: ZGC: Fix an incorrect column in GC statistics Pushed. https://hg.openjdk.java.net/jdk/jdk/rev/8ebc8f74f2d2 cheers, Per On 8/12/19 10:50 AM, Erik ?sterlund wrote: > Hi, > > Looks good to me too. > > /Erik > > On 2019-08-11 11:07, Per Liden wrote: >> Hi, >> >> Nice catch! Change looks good. As far as I can tell there's no JIRA >> entry for this yet, so I'll create one and sponsor your fix. >> >> thanks, >> Per >> >> On 2019-08-11 02:16, Hao Tang wrote: >>> Hi, I found that column "total" of ZGC log's statistics always >>> reports obviously incorrect average values after running program with >>> ZGC for over 10 hours (36000s). See the GC log below. >>> >>> [36000.080s][info][gc,stats ] === Garbage Collection Statistics >>> ======================================================================================================================= >>> >>> [36000.080s][info][gc,stats >>> ] Last >>> 10s Last 10m Last 10h Total >>> [36000.080s][info][gc,stats >>> ] Avg / >>> Max Avg / Max Avg / Max Avg / Max >>> [36000.080s][info][gc,stats ] Collector: Garbage Collection >>> Cycle 33.269 / 34.686 32.699 / 36.862 >>> 32.938 / 60.703 0.000 / 60.703 ms >>> [36000.080s][info][gc,stats ] Contention: Mark Segment Reset >>> Contention 0 / 0 0 / >>> 0 0 / 0 1 / 0 ops/s >>> [36000.080s][info][gc,stats ] Contention: Mark SeqNum Reset >>> Contention 0 / 0 0 / >>> 0 0 / 0 1 / 0 ops/s >>> [36000.080s][info][gc,stats ] Contention: Relocation >>> Contention 0 / 0 0 / >>> 0 0 / 2277 1 / 2277 ops/s >>> [36000.080s][info][gc,stats ] Critical: Allocation >>> Stall 0.000 / 0.000 0.000 / >>> 0.000 0.000 / 0.000 0.000 / 0.000 ms >>> [36000.080s][info][gc,stats ] Critical: Allocation >>> Stall 0 / 0 0 / >>> 0 0 / 0 1 / 0 ops/s >>> [36000.080s][info][gc,stats ] Critical: GC Locker >>> Stall 0.000 / 0.000 0.000 / >>> 0.000 0.000 / 0.000 0.000 / 0.000 ms >>> [36000.080s][info][gc,stats ] Critical: GC Locker >>> Stall 0 / 0 0 / >>> 0 0 / 0 1 / 0 ops/s >>> [36000.080s][info][gc,stats ] Memory: Allocation >>> Rate 45 / 48 45 / >>> 48 45 / 90 0 / 90 MB/s >>> [36000.080s][info][gc,stats ] Memory: Heap Used After >>> Mark 126 / 130 125 / >>> 140 125 / 164 0 / 164 MB >>> [36000.080s][info][gc,stats ] Memory: Heap Used After >>> Relocation 48 / 52 47 / >>> 52 47 / 54 0 / 54 MB >>> [36000.080s][info][gc,stats ] Memory: Heap Used Before >>> Mark 124 / 130 123 / >>> 138 124 / 158 0 / 158 MB >>> [36000.080s][info][gc,stats ] Memory: Heap Used Before >>> Relocation 54 / 58 53 / >>> 60 53 / 60 0 / 60 MB >>> >>> The bug is caused by mistakenly adding "nsamples" to >>> ZStatSamplerData::_sum. I am applying the patch below to fix the bug. >>> Please give advice on this fix. >>> diff -r 8f067351c370 src/hotspot/share/gc/z/zStat.cpp >>> --- a/src/hotspot/share/gc/z/zStat.cpp Mon Aug 05 16:27:30 2019 -0700 >>> +++ b/src/hotspot/share/gc/z/zStat.cpp Fri Aug 09 11:22:58 2019 +0800 >>> @@ -63,7 +63,7 @@ >>> void add(const ZStatSamplerData& new_sample) { >>> _nsamples += new_sample._nsamples; >>> - _sum += new_sample._nsamples; >>> + _sum += new_sample._sum; >>> _max = MAX2(_max, new_sample._max); >>> } >>> }; >>> This patch can enable ZGC to print correct statistics after 10 hours. >>> >>> [36000.080s][info][gc,stats ] === Garbage Collection Statistics >>> ======================================================================================================================= >>> >>> [36000.080s][info][gc,stats >>> ] Last >>> 10s Last 10m Last 10h Total >>> [36000.080s][info][gc,stats >>> ] Avg / >>> Max Avg / Max Avg / Max Avg / Max >>> [36000.080s][info][gc,stats ] Collector: Garbage Collection >>> Cycle 32.794 / 32.985 32.865 / 38.454 >>> 33.212 / 80.477 33.212 / 80.477 ms >>> [36000.080s][info][gc,stats ] Contention: Mark Segment Reset >>> Contention 0 / 0 0 / >>> 0 0 / 0 0 / 0 ops/s >>> [36000.080s][info][gc,stats ] Contention: Mark SeqNum Reset >>> Contention 0 / 0 0 / >>> 0 0 / 0 0 / 0 ops/s >>> [36000.080s][info][gc,stats ] Contention: Relocation >>> Contention 0 / 0 0 / >>> 0 0 / 5978 0 / 5978 ops/s >>> [36000.080s][info][gc,stats ] Critical: Allocation >>> Stall 0.000 / 0.000 0.000 / >>> 0.000 0.000 / 0.000 0.000 / 0.000 ms >>> [36000.080s][info][gc,stats ] Critical: Allocation >>> Stall 0 / 0 0 / >>> 0 0 / 0 0 / 0 ops/s >>> [36000.080s][info][gc,stats ] Critical: GC Locker >>> Stall 0.000 / 0.000 0.000 / >>> 0.000 0.000 / 0.000 0.000 / 0.000 ms >>> [36000.080s][info][gc,stats ] Critical: GC Locker >>> Stall 0 / 0 0 / >>> 0 0 / 0 0 / 0 ops/s >>> [36000.080s][info][gc,stats ] Memory: Allocation >>> Rate 45 / 46 45 / >>> 48 45 / 92 45 / 92 MB/s >>> [36000.080s][info][gc,stats ] Memory: Heap Used After >>> Mark 124 / 126 125 / >>> 148 126 / 164 126 / 164 MB >>> [36000.080s][info][gc,stats ] Memory: Heap Used After >>> Relocation 48 / 52 48 / >>> 52 47 / 54 47 / 54 MB >>> [36000.080s][info][gc,stats ] Memory: Heap Used Before >>> Mark 122 / 124 123 / >>> 148 124 / 158 124 / 158 MB >>> [36000.080s][info][gc,stats ] Memory: Heap Used Before >>> Relocation 54 / 58 54 / >>> 60 53 / 60 53 / 60 MB >>> >>> >>> Best regards, >>> Hao Tang >>> From simone.bordet at gmail.com Wed Aug 28 14:52:59 2019 From: simone.bordet at gmail.com (Simone Bordet) Date: Wed, 28 Aug 2019 16:52:59 +0200 Subject: Crash running IDEA Message-ID: Hi, I got the attached crash when running IDEA with their JDK based on 11.0.3. Thanks! -- Simone Bordet --- Finally, no matter how good the architecture and design are, to deliver bug-free software with optimal performance and reliability, the implementation technique must be flawless. Victoria Livschitz From per.liden at oracle.com Thu Aug 29 12:29:17 2019 From: per.liden at oracle.com (Per Liden) Date: Thu, 29 Aug 2019 14:29:17 +0200 Subject: Crash running IDEA In-Reply-To: References: Message-ID: <9b2c2956-0ee2-25f7-5383-8242bdf229b4@oracle.com> Hi Simone, It looks like the mailing list ate the file you attached. Could you paste it inline? cheers, Per On 8/28/19 4:52 PM, Simone Bordet wrote: > Hi, > > I got the attached crash when running IDEA with their JDK based on 11.0.3. > > Thanks! > From simone.bordet at gmail.com Thu Aug 29 14:14:35 2019 From: simone.bordet at gmail.com (Simone Bordet) Date: Thu, 29 Aug 2019 16:14:35 +0200 Subject: Crash running IDEA In-Reply-To: <9b2c2956-0ee2-25f7-5383-8242bdf229b4@oracle.com> References: <9b2c2956-0ee2-25f7-5383-8242bdf229b4@oracle.com> Message-ID: Hi, On Thu, Aug 29, 2019 at 2:29 PM Per Liden wrote: > > Hi Simone, > > It looks like the mailing list ate the file you attached. Could you > paste it inline? Two files (search for "replay" to find the second file) at: https://gist.github.com/sbordet/36544ef18cea136e39e2f71880703ca8 -- Simone Bordet --- Finally, no matter how good the architecture and design are, to deliver bug-free software with optimal performance and reliability, the implementation technique must be flawless. Victoria Livschitz From nils.eliasson at oracle.com Thu Aug 29 14:51:40 2019 From: nils.eliasson at oracle.com (Nils Eliasson) Date: Thu, 29 Aug 2019 16:51:40 +0200 Subject: Crash running IDEA In-Reply-To: References: <9b2c2956-0ee2-25f7-5383-8242bdf229b4@oracle.com> Message-ID: Hi, The replay file seems to be a copy of the hs_err file. If you can upload the replay file - I will have a go at reproducing it. Regards, Nils On 2019-08-29 16:14, Simone Bordet wrote: > Hi, > > On Thu, Aug 29, 2019 at 2:29 PM Per Liden wrote: >> Hi Simone, >> >> It looks like the mailing list ate the file you attached. Could you >> paste it inline? > Two files (search for "replay" to find the second file) at: > https://gist.github.com/sbordet/36544ef18cea136e39e2f71880703ca8 > From simone.bordet at gmail.com Thu Aug 29 19:37:50 2019 From: simone.bordet at gmail.com (Simone Bordet) Date: Thu, 29 Aug 2019 21:37:50 +0200 Subject: Crash running IDEA In-Reply-To: References: <9b2c2956-0ee2-25f7-5383-8242bdf229b4@oracle.com> Message-ID: Hi, Il gio 29 ago 2019, 16:58 Nils Eliasson ha scritto: > Hi, > > The replay file seems to be a copy of the hs_err file. If you can upload > the replay file - I will have a go at reproducing it. > The replay file is the second file of the gist. Do you need it in another form? Thanks! From nils.eliasson at oracle.com Fri Aug 30 07:30:54 2019 From: nils.eliasson at oracle.com (Nils Eliasson) Date: Fri, 30 Aug 2019 09:30:54 +0200 Subject: Crash running IDEA In-Reply-To: References: <9b2c2956-0ee2-25f7-5383-8242bdf229b4@oracle.com> Message-ID: Hi, Yes, I need it either attached to a mail, or attached to this bug: https://bugs.openjdk.java.net/browse/JDK-8230386 Regards, Nils On 2019-08-29 21:37, Simone Bordet wrote: > Hi, > > > Il gio 29 ago 2019, 16:58 Nils Eliasson > ha scritto: > > Hi, > > The replay file seems to be a copy of the hs_err file. If you can > upload > the replay file - I will have a go at reproducing it. > > > The replay file is the second file of the gist. Do you need it in > another form? > > Thanks! From simone.bordet at gmail.com Fri Aug 30 08:29:57 2019 From: simone.bordet at gmail.com (Simone Bordet) Date: Fri, 30 Aug 2019 10:29:57 +0200 Subject: Crash running IDEA In-Reply-To: References: <9b2c2956-0ee2-25f7-5383-8242bdf229b4@oracle.com> Message-ID: Nils, Il ven 30 ago 2019, 09:51 Nils Eliasson ha scritto: > Hi, > > Yes, I need it either attached to a mail, or attached to this bug: > https://bugs.openjdk.java.net/browse/JDK-8230386 > I have updated the gist with the proper replay file. It's truncated after ~35K lines, but I don't have the original anymore (or maybe the original was truncated too). I hope it'll be useful anyway.