Skip to content

Conversation

@xinyiZzz
Copy link
Contributor

@xinyiZzz xinyiZzz commented Jun 6, 2024

Proposed changes

add conf enable_stacktrace_in_allocator_check_failed, if true, allocator check failed log stacktrace if not catch exception

I20240606 16:10:05.376622 3763531 allocator.cpp:109] Query:e35a88cfda634e66-b8664c46ff06b58a waiting for enough memory in thread id:140604421146368, maximum 1000ms, Allocator sys memory check failed: Cannot alloc:4096, consuming tracker:<Query#Id=e35a88cfda634e66-b8664c46
ff06b58a>, peak used 1178636808, current used 919127432, exec node:<>, process memory used 4.61 GB exceed limit 3.01 GB or sys available memory 145.57 GB less than low water mark 1.60 GB.
Alloc Stacktrace:

        0#  Allocator<false, false, false>::sys_memory_check(unsigned long) const at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:1946
        1#  Allocator<false, false, false>::alloc_impl(unsigned long, unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/vec/common/allocator.cpp:197
        2#  doris::FunctionContext::FunctionContext() at /mnt/disk2/liyifan/doris/core/be/src/vec/common/arena.h:62
        3#  doris::FunctionContext::create_context(doris::RuntimeState*, doris::TypeDescriptor const&, std::vector<doris::TypeDescriptor, std::allocator<doris::TypeDescriptor> > const&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../
../include/c++/11/bits/unique_ptr.h:155
        4#  doris::FunctionContext::clone() at /mnt/disk2/liyifan/doris/core/be/src/udf/udf.cpp:57
        5#  doris::vectorized::VExprContext::clone(doris::RuntimeState*, std::shared_ptr<doris::vectorized::VExprContext>&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/vector.tcc:112
        6#  doris::pipeline::PipelineXLocalState<doris::pipeline::FakeSharedState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        7#  doris::pipeline::ScanLocalState<doris::pipeline::OlapScanLocalState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        8#  doris::pipeline::PipelineTask::_open() at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:180
        9#  doris::pipeline::PipelineTask::execute(bool*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        10# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:388
        11# doris::ThreadPool::dispatch_thread() at /mnt/disk2/liyifan/doris/core/be/src/util/threadpool.cpp:0
        12# doris::Thread::supervise_thread(void*) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../usr/include/pthread.h:562
        13# start_thread
        14# __clone

@doris-robot
Copy link

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2024

clang-tidy review says "All clean, LGTM! 👍"

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

@xinyiZzz
Copy link
Contributor Author

xinyiZzz commented Jun 6, 2024

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2024

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Jun 6, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2024

PR approved by anyone and no changes requested.

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17599	4486	4312	4312
q2	2042	201	205	201
q3	10448	1275	1246	1246
q4	10192	904	743	743
q5	7501	2778	2719	2719
q6	223	137	136	136
q7	983	627	616	616
q8	9217	2190	2192	2190
q9	9227	6702	6730	6702
q10	9692	3921	3889	3889
q11	444	244	240	240
q12	536	238	246	238
q13	17237	3224	3216	3216
q14	284	243	233	233
q15	517	487	483	483
q16	497	399	387	387
q17	1015	693	600	600
q18	8476	8004	7879	7879
q19	6614	1398	1495	1398
q20	658	329	317	317
q21	5230	4019	4082	4019
q22	404	350	356	350
Total cold run time: 119036 ms
Total hot run time: 42114 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4642	4423	4428	4423
q2	386	267	276	267
q3	3174	2962	2981	2962
q4	1901	1671	1594	1594
q5	5516	5567	5561	5561
q6	222	126	128	126
q7	2212	1771	1872	1771
q8	3268	3481	3419	3419
q9	8705	8742	8778	8742
q10	4113	3913	3698	3698
q11	601	495	498	495
q12	836	636	616	616
q13	15845	3167	3143	3143
q14	304	285	261	261
q15	526	471	495	471
q16	485	423	450	423
q17	1857	1522	1519	1519
q18	8251	7613	7437	7437
q19	1768	1510	1607	1510
q20	3029	1789	1772	1772
q21	7109	4743	4847	4743
q22	710	536	561	536
Total cold run time: 75460 ms
Total hot run time: 55489 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172407 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 d50a848eb5f589e49e9f9232f90a388c2e541423, data reload: false

query1	933	378	374	374
query2	6444	2444	2335	2335
query3	6662	210	205	205
query4	19423	17443	17260	17260
query5	4164	463	451	451
query6	242	159	160	159
query7	4591	298	299	298
query8	308	299	292	292
query9	8504	2444	2434	2434
query10	452	293	292	292
query11	10587	10146	9853	9853
query12	135	84	83	83
query13	1630	366	362	362
query14	10043	7391	7568	7391
query15	227	188	186	186
query16	7579	263	252	252
query17	1318	513	513	513
query18	1940	276	272	272
query19	192	149	148	148
query20	91	87	83	83
query21	203	132	124	124
query22	4263	4249	3967	3967
query23	33505	33085	33022	33022
query24	11233	2952	2730	2730
query25	631	368	348	348
query26	1414	153	155	153
query27	3038	334	329	329
query28	7491	2071	2081	2071
query29	959	608	589	589
query30	290	154	159	154
query31	961	768	744	744
query32	100	54	56	54
query33	749	296	317	296
query34	913	463	465	463
query35	753	637	641	637
query36	1103	955	958	955
query37	160	73	72	72
query38	2855	2742	2714	2714
query39	878	805	806	805
query40	208	127	126	126
query41	56	55	54	54
query42	118	100	97	97
query43	588	548	588	548
query44	1215	726	746	726
query45	194	164	166	164
query46	1058	722	728	722
query47	1850	1786	1781	1781
query48	382	293	299	293
query49	984	406	412	406
query50	784	393	387	387
query51	6810	6630	6533	6533
query52	111	96	88	88
query53	361	289	294	289
query54	891	455	444	444
query55	74	79	72	72
query56	279	250	258	250
query57	1114	1071	1095	1071
query58	278	277	247	247
query59	3608	3325	3137	3137
query60	298	273	275	273
query61	89	86	86	86
query62	662	438	446	438
query63	314	288	287	287
query64	10020	2237	1727	1727
query65	3146	3080	3123	3080
query66	1248	333	330	330
query67	15458	14923	14957	14923
query68	4555	543	536	536
query69	513	380	337	337
query70	1184	1135	1061	1061
query71	395	279	270	270
query72	7074	5658	5293	5293
query73	751	323	316	316
query74	5889	5510	5467	5467
query75	3364	2666	2671	2666
query76	2392	986	872	872
query77	497	296	292	292
query78	10470	9945	9679	9679
query79	1608	513	511	511
query80	1906	470	464	464
query81	598	218	220	218
query82	938	108	102	102
query83	291	171	168	168
query84	272	84	85	84
query85	1191	275	259	259
query86	380	312	304	304
query87	3246	3055	3082	3055
query88	3065	2355	2353	2353
query89	465	382	400	382
query90	1760	194	188	188
query91	126	98	97	97
query92	58	50	51	50
query93	1323	517	501	501
query94	1224	195	188	188
query95	400	304	316	304
query96	591	266	265	265
query97	3192	3051	3045	3045
query98	228	202	202	202
query99	1280	829	835	829
Total cold run time: 270388 ms
Total hot run time: 172407 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.23	0.05	0.06
query4	1.66	0.09	0.10
query5	0.54	0.49	0.48
query6	1.12	0.72	0.73
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.54	0.48	0.50
query10	0.56	0.54	0.54
query11	0.16	0.12	0.11
query12	0.14	0.12	0.12
query13	0.59	0.60	0.60
query14	0.76	0.80	0.77
query15	0.84	0.81	0.82
query16	0.36	0.37	0.38
query17	0.96	1.01	1.01
query18	0.26	0.22	0.25
query19	1.88	1.77	1.73
query20	0.02	0.01	0.01
query21	15.73	0.64	0.64
query22	4.20	6.40	1.96
query23	18.31	1.42	1.35
query24	2.11	0.24	0.20
query25	0.16	0.10	0.10
query26	0.27	0.17	0.17
query27	0.08	0.08	0.07
query28	13.21	1.01	1.00
query29	13.78	3.29	3.21
query30	0.24	0.05	0.06
query31	2.87	0.39	0.39
query32	3.29	0.47	0.47
query33	3.02	2.92	2.84
query34	17.13	4.37	4.42
query35	4.46	4.47	4.60
query36	0.65	0.49	0.46
query37	0.17	0.15	0.15
query38	0.15	0.15	0.14
query39	0.05	0.03	0.04
query40	0.15	0.14	0.14
query41	0.09	0.04	0.04
query42	0.05	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 111.02 s
Total hot run time: 30.56 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.37% (8988/24710)
Line Coverage: 27.92% (73415/262983)
Region Coverage: 27.35% (38010/138982)
Branch Coverage: 23.95% (19286/80530)
Coverage Report: http://coverage.selectdb-in.cc/coverage/d50a848eb5f589e49e9f9232f90a388c2e541423_d50a848eb5f589e49e9f9232f90a388c2e541423/report/index.html

@xinyiZzz
Copy link
Contributor Author

xinyiZzz commented Jun 6, 2024

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2024

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (8973/24615)
Line Coverage: 27.97% (73311/262073)
Region Coverage: 27.38% (38003/138818)
Branch Coverage: 23.99% (19294/80422)
Coverage Report: http://coverage.selectdb-in.cc/coverage/d36a39a35457bc1e5c48919e5ad3d6a1310de291_d36a39a35457bc1e5c48919e5ad3d6a1310de291/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17624	4407	4315	4315
q2	2018	192	201	192
q3	10454	1240	1148	1148
q4	10186	874	818	818
q5	7494	2732	3102	2732
q6	227	136	134	134
q7	969	626	602	602
q8	9213	2174	2125	2125
q9	9518	6722	6780	6722
q10	9721	3918	3845	3845
q11	448	234	247	234
q12	497	246	247	246
q13	17425	3229	3345	3229
q14	265	219	221	219
q15	519	460	460	460
q16	520	393	387	387
q17	1008	677	673	673
q18	8499	7800	7905	7800
q19	6893	1225	1542	1225
q20	636	336	323	323
q21	5117	4034	4143	4034
q22	401	350	345	345
Total cold run time: 119652 ms
Total hot run time: 41808 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4675	4497	4473	4473
q2	386	267	275	267
q3	3163	2976	2801	2801
q4	1924	1610	1700	1610
q5	5554	5538	5503	5503
q6	224	128	129	128
q7	2204	1832	1810	1810
q8	3302	3407	3369	3369
q9	8703	8740	8713	8713
q10	4091	3757	3725	3725
q11	604	495	494	494
q12	794	684	634	634
q13	15892	3156	3228	3156
q14	296	264	260	260
q15	536	485	483	483
q16	479	433	446	433
q17	1868	1516	1519	1516
q18	7917	7636	7312	7312
q19	1704	1504	1595	1504
q20	2056	1755	1793	1755
q21	7761	4798	4793	4793
q22	628	564	534	534
Total cold run time: 74761 ms
Total hot run time: 55273 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173277 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 d36a39a35457bc1e5c48919e5ad3d6a1310de291, data reload: false

query1	921	379	369	369
query2	6469	2331	2309	2309
query3	6641	211	220	211
query4	19804	17283	17322	17283
query5	4167	453	457	453
query6	265	163	153	153
query7	4594	300	305	300
query8	327	289	276	276
query9	8489	2424	2396	2396
query10	457	300	283	283
query11	10517	10110	10005	10005
query12	149	89	89	89
query13	1643	363	390	363
query14	9259	7777	7522	7522
query15	250	190	192	190
query16	7872	261	262	261
query17	1735	528	511	511
query18	1966	272	267	267
query19	203	168	154	154
query20	90	83	82	82
query21	215	137	147	137
query22	4621	3925	4089	3925
query23	33897	33307	33078	33078
query24	10907	2778	2848	2778
query25	630	354	350	350
query26	1196	156	154	154
query27	2790	315	314	314
query28	7275	2061	2061	2061
query29	928	609	620	609
query30	262	149	150	149
query31	957	737	716	716
query32	92	52	56	52
query33	742	289	280	280
query34	931	471	483	471
query35	718	606	583	583
query36	1109	921	941	921
query37	145	72	70	70
query38	2873	2771	2796	2771
query39	861	815	799	799
query40	202	124	130	124
query41	54	52	59	52
query42	122	98	98	98
query43	594	541	573	541
query44	1179	727	739	727
query45	202	165	168	165
query46	1063	710	741	710
query47	1870	1786	1817	1786
query48	355	298	303	298
query49	978	416	411	411
query50	780	384	392	384
query51	6738	6583	6601	6583
query52	103	93	93	93
query53	356	291	287	287
query54	886	467	455	455
query55	73	75	72	72
query56	285	266	266	266
query57	1170	1074	1062	1062
query58	259	260	246	246
query59	3404	3254	3123	3123
query60	297	289	274	274
query61	133	92	84	84
query62	641	430	431	430
query63	318	288	294	288
query64	8819	2173	1709	1709
query65	3230	3112	3117	3112
query66	883	332	344	332
query67	15484	15086	15012	15012
query68	4502	558	588	558
query69	451	302	305	302
query70	1108	1129	1049	1049
query71	396	273	272	272
query72	7341	5558	5619	5558
query73	733	324	323	323
query74	5956	5499	5601	5499
query75	3390	2698	2618	2618
query76	2240	967	952	952
query77	486	304	301	301
query78	10389	9841	9792	9792
query79	1847	513	512	512
query80	2041	472	463	463
query81	590	234	217	217
query82	1052	109	104	104
query83	282	173	184	173
query84	261	89	89	89
query85	1301	297	313	297
query86	465	317	326	317
query87	3333	3114	3044	3044
query88	3472	2376	2363	2363
query89	463	391	382	382
query90	1891	185	186	185
query91	136	99	98	98
query92	69	52	52	52
query93	2063	521	512	512
query94	1300	191	190	190
query95	401	310	319	310
query96	577	262	265	262
query97	3214	3047	3011	3011
query98	218	201	200	200
query99	1332	866	853	853
Total cold run time: 270745 ms
Total hot run time: 173277 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.08	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.07	0.07
query5	0.51	0.49	0.48
query6	1.12	0.72	0.72
query7	0.02	0.01	0.02
query8	0.05	0.04	0.04
query9	0.54	0.51	0.49
query10	0.54	0.56	0.54
query11	0.16	0.12	0.12
query12	0.14	0.12	0.13
query13	0.59	0.59	0.60
query14	0.75	0.80	0.77
query15	0.83	0.82	0.80
query16	0.36	0.38	0.35
query17	0.97	0.98	0.97
query18	0.21	0.26	0.25
query19	1.84	1.67	1.72
query20	0.01	0.00	0.01
query21	15.73	0.70	0.66
query22	4.58	6.70	1.99
query23	18.35	1.39	1.24
query24	2.01	0.24	0.22
query25	0.14	0.08	0.07
query26	0.26	0.17	0.18
query27	0.08	0.08	0.07
query28	13.21	1.02	1.01
query29	13.79	3.33	3.30
query30	0.23	0.05	0.06
query31	2.88	0.39	0.38
query32	3.26	0.47	0.47
query33	2.85	2.94	2.91
query34	17.24	4.37	4.38
query35	4.44	4.50	4.61
query36	0.66	0.48	0.47
query37	0.17	0.15	0.15
query38	0.15	0.14	0.14
query39	0.05	0.03	0.04
query40	0.16	0.14	0.13
query41	0.09	0.04	0.04
query42	0.06	0.04	0.05
query43	0.04	0.03	0.04
Total cold run time: 111.1 s
Total hot run time: 30.55 s

Copy link
Contributor

@wangbo wangbo left a comment

Choose a reason for hiding this comment

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

LGTM

@dataroaring dataroaring merged commit 2b1f47b into apache:master Jun 7, 2024
dataroaring pushed a commit that referenced this pull request Jun 7, 2024
…ption (#35965)

add conf enable_stacktrace_in_allocator_check_failed, if true, allocator
check failed log stacktrace if not catch exception

```
I20240606 16:10:05.376622 3763531 allocator.cpp:109] Query:e35a88cfda634e66-b8664c46ff06b58a waiting for enough memory in thread id:140604421146368, maximum 1000ms, Allocator sys memory check failed: Cannot alloc:4096, consuming tracker:<Query#Id=e35a88cfda634e66-b8664c46
ff06b58a>, peak used 1178636808, current used 919127432, exec node:<>, process memory used 4.61 GB exceed limit 3.01 GB or sys available memory 145.57 GB less than low water mark 1.60 GB.
Alloc Stacktrace:

        0#  Allocator<false, false, false>::sys_memory_check(unsigned long) const at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:1946
        1#  Allocator<false, false, false>::alloc_impl(unsigned long, unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/vec/common/allocator.cpp:197
        2#  doris::FunctionContext::FunctionContext() at /mnt/disk2/liyifan/doris/core/be/src/vec/common/arena.h:62
        3#  doris::FunctionContext::create_context(doris::RuntimeState*, doris::TypeDescriptor const&, std::vector<doris::TypeDescriptor, std::allocator<doris::TypeDescriptor> > const&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../
../include/c++/11/bits/unique_ptr.h:155
        4#  doris::FunctionContext::clone() at /mnt/disk2/liyifan/doris/core/be/src/udf/udf.cpp:57
        5#  doris::vectorized::VExprContext::clone(doris::RuntimeState*, std::shared_ptr<doris::vectorized::VExprContext>&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/vector.tcc:112
        6#  doris::pipeline::PipelineXLocalState<doris::pipeline::FakeSharedState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        7#  doris::pipeline::ScanLocalState<doris::pipeline::OlapScanLocalState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        8#  doris::pipeline::PipelineTask::_open() at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:180
        9#  doris::pipeline::PipelineTask::execute(bool*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        10# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:388
        11# doris::ThreadPool::dispatch_thread() at /mnt/disk2/liyifan/doris/core/be/src/util/threadpool.cpp:0
        12# doris::Thread::supervise_thread(void*) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../usr/include/pthread.h:562
        13# start_thread
        14# __clone
```
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Jul 11, 2024
…ption (apache#35965)

add conf enable_stacktrace_in_allocator_check_failed, if true, allocator
check failed log stacktrace if not catch exception

```
I20240606 16:10:05.376622 3763531 allocator.cpp:109] Query:e35a88cfda634e66-b8664c46ff06b58a waiting for enough memory in thread id:140604421146368, maximum 1000ms, Allocator sys memory check failed: Cannot alloc:4096, consuming tracker:<Query#Id=e35a88cfda634e66-b8664c46
ff06b58a>, peak used 1178636808, current used 919127432, exec node:<>, process memory used 4.61 GB exceed limit 3.01 GB or sys available memory 145.57 GB less than low water mark 1.60 GB.
Alloc Stacktrace:

        0#  Allocator<false, false, false>::sys_memory_check(unsigned long) const at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:1946
        1#  Allocator<false, false, false>::alloc_impl(unsigned long, unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/vec/common/allocator.cpp:197
        2#  doris::FunctionContext::FunctionContext() at /mnt/disk2/liyifan/doris/core/be/src/vec/common/arena.h:62
        3#  doris::FunctionContext::create_context(doris::RuntimeState*, doris::TypeDescriptor const&, std::vector<doris::TypeDescriptor, std::allocator<doris::TypeDescriptor> > const&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../
../include/c++/11/bits/unique_ptr.h:155
        4#  doris::FunctionContext::clone() at /mnt/disk2/liyifan/doris/core/be/src/udf/udf.cpp:57
        5#  doris::vectorized::VExprContext::clone(doris::RuntimeState*, std::shared_ptr<doris::vectorized::VExprContext>&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/vector.tcc:112
        6#  doris::pipeline::PipelineXLocalState<doris::pipeline::FakeSharedState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        7#  doris::pipeline::ScanLocalState<doris::pipeline::OlapScanLocalState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        8#  doris::pipeline::PipelineTask::_open() at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:180
        9#  doris::pipeline::PipelineTask::execute(bool*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        10# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:388
        11# doris::ThreadPool::dispatch_thread() at /mnt/disk2/liyifan/doris/core/be/src/util/threadpool.cpp:0
        12# doris::Thread::supervise_thread(void*) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../usr/include/pthread.h:562
        13# start_thread
        14# __clone
```
xinyiZzz added a commit to xinyiZzz/incubator-doris that referenced this pull request Jul 11, 2024
…ption (apache#35965)

add conf enable_stacktrace_in_allocator_check_failed, if true, allocator
check failed log stacktrace if not catch exception

```
I20240606 16:10:05.376622 3763531 allocator.cpp:109] Query:e35a88cfda634e66-b8664c46ff06b58a waiting for enough memory in thread id:140604421146368, maximum 1000ms, Allocator sys memory check failed: Cannot alloc:4096, consuming tracker:<Query#Id=e35a88cfda634e66-b8664c46
ff06b58a>, peak used 1178636808, current used 919127432, exec node:<>, process memory used 4.61 GB exceed limit 3.01 GB or sys available memory 145.57 GB less than low water mark 1.60 GB.
Alloc Stacktrace:

        0#  Allocator<false, false, false>::sys_memory_check(unsigned long) const at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:1946
        1#  Allocator<false, false, false>::alloc_impl(unsigned long, unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/vec/common/allocator.cpp:197
        2#  doris::FunctionContext::FunctionContext() at /mnt/disk2/liyifan/doris/core/be/src/vec/common/arena.h:62
        3#  doris::FunctionContext::create_context(doris::RuntimeState*, doris::TypeDescriptor const&, std::vector<doris::TypeDescriptor, std::allocator<doris::TypeDescriptor> > const&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../
../include/c++/11/bits/unique_ptr.h:155
        4#  doris::FunctionContext::clone() at /mnt/disk2/liyifan/doris/core/be/src/udf/udf.cpp:57
        5#  doris::vectorized::VExprContext::clone(doris::RuntimeState*, std::shared_ptr<doris::vectorized::VExprContext>&) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/vector.tcc:112
        6#  doris::pipeline::PipelineXLocalState<doris::pipeline::FakeSharedState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        7#  doris::pipeline::ScanLocalState<doris::pipeline::OlapScanLocalState>::open(doris::RuntimeState*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        8#  doris::pipeline::PipelineTask::_open() at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:180
        9#  doris::pipeline::PipelineTask::execute(bool*) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:492
        10# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /mnt/disk2/liyifan/doris/core/be/src/common/status.h:388
        11# doris::ThreadPool::dispatch_thread() at /mnt/disk2/liyifan/doris/core/be/src/util/threadpool.cpp:0
        12# doris::Thread::supervise_thread(void*) at /mnt/disk2/liyifan/doris/ldb_toolchain/bin/../usr/include/pthread.h:562
        13# start_thread
        14# __clone
```
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.5-merged dev/3.0.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants