Skip to content

Conversation

@zhannngchen
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache. It needs to release the cache memory at program exit.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas
Copy link
Contributor

Thearas commented Jul 1, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen
Copy link
Contributor

run buildall

@doris-robot
Copy link

TPC-H: Total hot run time: 33919 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 14efbffaeb60711c5205242421d708fb0906a62d, data reload: false

------ Round 1 ----------------------------------
q1	17627	5218	5025	5025
q2	1939	278	192	192
q3	10488	1302	732	732
q4	10275	1016	509	509
q5	8094	2463	2307	2307
q6	186	158	127	127
q7	909	749	592	592
q8	9319	1288	1069	1069
q9	6865	5107	5123	5107
q10	6884	2396	1965	1965
q11	509	290	285	285
q12	342	351	212	212
q13	17754	3706	3123	3123
q14	222	257	215	215
q15	556	491	478	478
q16	426	426	385	385
q17	627	861	377	377
q18	7685	7288	7078	7078
q19	1245	959	536	536
q20	330	352	225	225
q21	3982	3203	2391	2391
q22	1019	1019	989	989
Total cold run time: 107283 ms
Total hot run time: 33919 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5085	5072	5285	5072
q2	244	328	224	224
q3	2204	2678	2295	2295
q4	1431	1805	1362	1362
q5	4332	4505	4506	4505
q6	247	170	128	128
q7	2017	1999	1805	1805
q8	2665	2553	2546	2546
q9	7300	7191	7355	7191
q10	3157	3417	2917	2917
q11	586	533	522	522
q12	702	736	576	576
q13	3314	3688	3150	3150
q14	263	282	257	257
q15	517	474	447	447
q16	419	468	412	412
q17	1126	1579	1276	1276
q18	7369	7225	7205	7205
q19	783	784	788	784
q20	1897	1966	1816	1816
q21	4766	4484	4362	4362
q22	1094	1055	968	968
Total cold run time: 51518 ms
Total hot run time: 49820 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 184724 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 14efbffaeb60711c5205242421d708fb0906a62d, data reload: false

query1	1004	403	392	392
query2	6525	1664	1664	1664
query3	6741	215	217	215
query4	26184	23654	22991	22991
query5	4376	574	429	429
query6	325	213	224	213
query7	4619	502	283	283
query8	282	212	209	209
query9	8607	2607	2617	2607
query10	474	346	246	246
query11	15956	15026	14754	14754
query12	150	103	98	98
query13	1638	525	413	413
query14	8923	5760	5674	5674
query15	210	192	179	179
query16	7267	657	474	474
query17	1199	720	587	587
query18	1997	413	314	314
query19	201	199	168	168
query20	121	125	113	113
query21	218	125	108	108
query22	4059	4123	4071	4071
query23	34212	33204	33228	33204
query24	8376	2353	2390	2353
query25	542	458	410	410
query26	1233	272	146	146
query27	2752	502	339	339
query28	4327	2123	2121	2121
query29	800	627	430	430
query30	283	228	183	183
query31	927	852	748	748
query32	72	64	59	59
query33	553	353	300	300
query34	793	841	524	524
query35	793	828	749	749
query36	955	988	900	900
query37	110	95	75	75
query38	4274	4255	4046	4046
query39	1511	1429	1425	1425
query40	206	113	100	100
query41	54	52	51	51
query42	119	108	107	107
query43	497	507	476	476
query44	1304	815	824	815
query45	173	168	163	163
query46	832	995	626	626
query47	1750	1820	1740	1740
query48	399	426	303	303
query49	726	486	383	383
query50	628	684	412	412
query51	4111	4248	4100	4100
query52	115	126	98	98
query53	224	247	187	187
query54	571	570	512	512
query55	82	77	78	77
query56	284	300	287	287
query57	1192	1177	1127	1127
query58	263	251	254	251
query59	2500	2674	2562	2562
query60	336	317	301	301
query61	126	122	124	122
query62	809	704	648	648
query63	223	185	186	185
query64	4363	1026	665	665
query65	4268	4219	4197	4197
query66	1136	403	374	374
query67	15817	15682	15238	15238
query68	7996	892	523	523
query69	473	313	261	261
query70	1223	1102	1140	1102
query71	471	317	298	298
query72	5493	4756	4599	4599
query73	669	605	353	353
query74	9035	8900	8785	8785
query75	3724	3209	2740	2740
query76	3653	1165	725	725
query77	792	388	288	288
query78	10032	10334	9410	9410
query79	2034	813	599	599
query80	584	507	443	443
query81	467	261	227	227
query82	459	125	95	95
query83	242	256	227	227
query84	245	106	82	82
query85	850	356	313	313
query86	334	307	290	290
query87	4404	4469	4446	4446
query88	3235	2299	2288	2288
query89	392	323	286	286
query90	1931	217	211	211
query91	139	145	107	107
query92	73	61	54	54
query93	1324	946	585	585
query94	655	411	307	307
query95	380	291	277	277
query96	497	572	284	284
query97	2716	2768	2686	2686
query98	229	219	206	206
query99	1355	1426	1306	1306
Total cold run time: 272803 ms
Total hot run time: 184724 ms

@zhannngchen
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

PR approved by anyone and no changes requested.

@doris-robot
Copy link

TPC-H: Total hot run time: 34483 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit f4bb5ade2a1ada3a67d2a4f9d21ea1d7d6a9d674, data reload: false

------ Round 1 ----------------------------------
q1	17665	5144	5026	5026
q2	1963	321	201	201
q3	10249	1340	744	744
q4	10224	1024	521	521
q5	7493	3190	2399	2399
q6	187	163	128	128
q7	904	747	614	614
q8	9329	1295	1112	1112
q9	6843	5163	5145	5145
q10	6921	2371	2002	2002
q11	495	301	297	297
q12	351	362	225	225
q13	17769	3702	3165	3165
q14	231	230	230	230
q15	536	494	487	487
q16	439	447	412	412
q17	642	884	392	392
q18	7820	7295	7174	7174
q19	1220	965	544	544
q20	344	364	232	232
q21	4223	3237	2435	2435
q22	1048	1060	998	998
Total cold run time: 106896 ms
Total hot run time: 34483 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5164	5447	5141	5141
q2	252	343	217	217
q3	2150	2711	2356	2356
q4	1427	1776	1388	1388
q5	4192	4124	4142	4124
q6	204	179	125	125
q7	1899	1828	1684	1684
q8	2491	2517	2484	2484
q9	6952	6887	6865	6865
q10	2986	3165	2716	2716
q11	560	497	484	484
q12	635	770	613	613
q13	3351	3741	3154	3154
q14	279	289	256	256
q15	504	468	460	460
q16	426	496	413	413
q17	1138	1560	1345	1345
q18	7371	7295	7085	7085
q19	811	813	947	813
q20	1967	1949	1813	1813
q21	4843	4348	4395	4348
q22	1086	1077	976	976
Total cold run time: 50688 ms
Total hot run time: 48860 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 186633 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit f4bb5ade2a1ada3a67d2a4f9d21ea1d7d6a9d674, data reload: false

query1	992	401	398	398
query2	6522	1692	1695	1692
query3	6762	220	216	216
query4	26594	23796	23095	23095
query5	5232	607	449	449
query6	316	230	203	203
query7	4640	496	299	299
query8	285	227	220	220
query9	8636	2775	2738	2738
query10	525	336	292	292
query11	15687	15120	14823	14823
query12	172	107	118	107
query13	1643	524	414	414
query14	10780	5718	5815	5718
query15	204	197	173	173
query16	7664	652	510	510
query17	1573	741	568	568
query18	2005	420	302	302
query19	199	197	156	156
query20	123	115	115	115
query21	214	124	107	107
query22	4263	4265	4224	4224
query23	34327	33182	33049	33049
query24	8121	2395	2380	2380
query25	525	471	390	390
query26	1225	271	149	149
query27	2762	519	363	363
query28	4329	2202	2188	2188
query29	722	564	436	436
query30	282	223	202	202
query31	914	825	749	749
query32	75	65	59	59
query33	560	360	316	316
query34	810	861	542	542
query35	830	840	741	741
query36	981	985	887	887
query37	112	102	78	78
query38	4126	4205	4100	4100
query39	1484	1436	1425	1425
query40	217	125	113	113
query41	64	59	61	59
query42	124	115	113	113
query43	532	529	485	485
query44	1358	855	850	850
query45	182	178	164	164
query46	865	1033	651	651
query47	1809	1893	1763	1763
query48	391	432	326	326
query49	746	489	408	408
query50	667	696	423	423
query51	4159	4221	4187	4187
query52	125	111	104	104
query53	240	269	193	193
query54	609	596	538	538
query55	87	85	87	85
query56	304	320	301	301
query57	1265	1225	1129	1129
query58	280	260	255	255
query59	2624	2693	2629	2629
query60	337	329	304	304
query61	144	125	125	125
query62	789	720	664	664
query63	225	192	191	191
query64	4254	1049	665	665
query65	4279	4201	4203	4201
query66	1044	413	320	320
query67	16298	16013	15571	15571
query68	8523	927	540	540
query69	480	307	276	276
query70	1284	1145	1144	1144
query71	504	331	304	304
query72	5595	4858	5025	4858
query73	774	662	358	358
query74	9018	9134	9058	9058
query75	4018	3205	2669	2669
query76	3752	1162	742	742
query77	780	388	310	310
query78	10102	10188	9381	9381
query79	3176	843	607	607
query80	655	521	437	437
query81	476	262	221	221
query82	466	126	98	98
query83	289	255	249	249
query84	295	111	87	87
query85	823	354	319	319
query86	328	304	288	288
query87	4506	4570	4365	4365
query88	3374	2336	2331	2331
query89	425	321	285	285
query90	1979	210	202	202
query91	143	148	112	112
query92	70	59	57	57
query93	2439	961	603	603
query94	673	415	313	313
query95	380	300	348	300
query96	514	583	287	287
query97	2720	2826	2637	2637
query98	238	208	205	205
query99	1464	1422	1300	1300
Total cold run time: 281497 ms
Total hot run time: 186633 ms

@doris-robot
Copy link

ClickBench: Total hot run time: 29.95 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit f4bb5ade2a1ada3a67d2a4f9d21ea1d7d6a9d674, data reload: false

query1	0.05	0.04	0.04
query2	0.08	0.05	0.04
query3	0.24	0.07	0.07
query4	1.61	0.12	0.11
query5	0.44	0.43	0.41
query6	1.15	0.67	0.67
query7	0.02	0.02	0.01
query8	0.04	0.04	0.03
query9	0.62	0.51	0.53
query10	0.58	0.57	0.57
query11	0.16	0.11	0.11
query12	0.15	0.12	0.11
query13	0.64	0.61	0.61
query14	0.81	0.81	0.84
query15	0.90	0.90	0.89
query16	0.39	0.38	0.39
query17	1.08	1.05	1.07
query18	0.24	0.22	0.22
query19	1.97	1.90	1.87
query20	0.01	0.01	0.02
query21	15.38	0.90	0.55
query22	0.77	1.26	0.98
query23	14.70	1.41	0.63
query24	6.93	1.77	0.61
query25	0.51	0.09	0.20
query26	0.62	0.17	0.15
query27	0.07	0.05	0.06
query28	9.67	0.93	0.46
query29	12.59	4.03	3.33
query30	0.25	0.09	0.07
query31	2.84	0.62	0.40
query32	3.24	0.56	0.48
query33	3.04	3.10	3.16
query34	16.09	5.41	4.83
query35	4.91	4.87	4.92
query36	0.68	0.51	0.49
query37	0.09	0.06	0.06
query38	0.06	0.05	0.04
query39	0.04	0.03	0.02
query40	0.18	0.14	0.14
query41	0.09	0.03	0.03
query42	0.03	0.03	0.02
query43	0.04	0.04	0.03
Total cold run time: 104 s
Total hot run time: 29.95 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (4/4) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 57.06% (15357/26912)
Line Coverage 46.12% (139411/302247)
Region Coverage 45.43% (70652/155525)
Branch Coverage 40.20% (37306/92796)

@zhannngchen zhannngchen merged commit 8270ea9 into apache:master Jul 1, 2025
26 of 30 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 1, 2025
Problem Summary:

DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache.
It needs to release the cache memory at program exit.
github-actions bot pushed a commit that referenced this pull request Jul 1, 2025
Problem Summary:

DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache.
It needs to release the cache memory at program exit.
github-actions bot pushed a commit that referenced this pull request Jul 1, 2025
Problem Summary:

DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache.
It needs to release the cache memory at program exit.
yiguolei pushed a commit that referenced this pull request Jul 2, 2025
…che #52596 (#52613)

Cherry-picked from #52596

Co-authored-by: zhannngchen <zhangchen@selectdb.com>
@yiguolei yiguolei removed the dev/2.1.x label Jul 2, 2025
morrySnow pushed a commit that referenced this pull request Jul 2, 2025
…che #52596 (#52614)

Cherry-picked from #52596

Co-authored-by: zhannngchen <zhangchen@selectdb.com>
hello-stephen pushed a commit that referenced this pull request Jul 3, 2025
### What problem does this PR solve?

fix #52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
github-actions bot pushed a commit that referenced this pull request Jul 3, 2025
### What problem does this PR solve?

fix #52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
bobhan1 added a commit to bobhan1/doris that referenced this pull request Jul 3, 2025
fix apache#52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
bobhan1 added a commit to bobhan1/doris that referenced this pull request Jul 3, 2025
fix apache#52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
koarz pushed a commit to koarz/doris that referenced this pull request Jul 4, 2025
…52596)

Problem Summary:

DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache.
It needs to release the cache memory at program exit.
koarz pushed a commit to koarz/doris that referenced this pull request Jul 4, 2025
### What problem does this PR solve?

fix apache#52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
koarz pushed a commit to koarz/doris that referenced this pull request Jul 4, 2025
…52596)

Problem Summary:

DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache.
It needs to release the cache memory at program exit.
koarz pushed a commit to koarz/doris that referenced this pull request Jul 4, 2025
### What problem does this PR solve?

fix apache#52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
koarz pushed a commit to koarz/doris that referenced this pull request Jul 4, 2025
…52596)

Problem Summary:

DeleteBitmap::AggCache use a singleton to manage the memory of LRUCache.
It needs to release the cache memory at program exit.
koarz pushed a commit to koarz/doris that referenced this pull request Jul 4, 2025
### What problem does this PR solve?

fix apache#52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
seawinde pushed a commit to seawinde/doris that referenced this pull request Jul 4, 2025
### What problem does this PR solve?

fix apache#52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31 
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
bobhan1 added a commit to bobhan1/doris that referenced this pull request Jul 7, 2025
fix apache#52596, DeleteBitmapAggCache
should be destructed before CacheManager
```
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /root/doris/be/src/runtime/memory/cache_policy.cpp:35:31
*** Query id: 0-0 ***
*** is nereids: 0 ***
*** tablet id: 0 ***
*** Aborted at 1751405577 (unix time) try "date -d @1751405577" if you are using GNU date ***
*** Current BE git commitID: cd35cf0eb5 ***
*** SIGSEGV address not mapped to object (@0x10) received by PID 15013 (TID 15013 OR 0x7fced202a4c0) from PID 16; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /root/doris/be/src/common/signal_handler.h:420
 1# PosixSignals::chained_handler(int, siginfo_t*, void*) [clone .part.0] in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 2# JVM_handle_linux_signal in /usr/lib/jvm/java-17-openjdk-amd64/lib/server/libjvm.so
 3# 0x00007FCED2404090 in /lib/x86_64-linux-gnu/libc.so.6
 4# __pthread_mutex_lock at ../nptl/pthread_mutex_lock.c:67
 5# doris::CacheManager::unregister_cache(doris::CachePolicy::CacheType) at /root/doris/be/src/runtime/memory/cache_manager.h:56
 6# doris::CachePolicy::~CachePolicy() at /root/doris/be/src/runtime/memory/cache_policy.cpp:36
 7# doris::DeleteBitmap::AggCachePolicy::~AggCachePolicy() at /root/doris/be/src/olap/tablet_meta.h:568
 8# __run_exit_handlers at /build/glibc-SzIz7B/glibc-2.31/stdlib/exit.c:109
 9# on_exit at /build/glibc-SzIz7B/glibc-2.31/stdlib/on_exit.c:26
10# __libc_start_main at ../csu/libc-start.c:261
11# _start in /home/work/unlimit_teamcity/TeamCity/Agents/20250702042258agent_172.16.0.200_1/work/60183217f6ee2a9c/output/be/lib/doris_be
etah000 pushed a commit to etah000/doris that referenced this pull request Jul 7, 2025
…che apache#52596 (apache#52614)

Cherry-picked from apache#52596

Co-authored-by: zhannngchen <zhangchen@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/2.1.11-merged dev/3.1.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants