Skip to content

Conversation

@kaka11chen
Copy link
Contributor

@kaka11chen kaka11chen commented Jun 20, 2024

Proposed changes

Issue

SIGSEGV address not mapped to object (@0x8) received by PID 2264997 (TID 2267559 OR 0x7ff60b2a4640) from PID 8; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/common/signal_handler.h:421
 1# PosixSignals::chained_handler(int, siginfo*, 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# 0x00007FFB96D77520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::vectorized::Block::clear_column_data(int) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/core/block.cpp:705
 5# doris::vectorized::OrcReader::get_next_block_impl(doris::vectorized::Block*, unsigned long*, bool*) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
 6# doris::vectorized::OrcReader::get_next_block(doris::vectorized::Block*, unsigned long*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/format/orc/vorc_reader.cpp:1533
 7# doris::vectorized::VFileScanner::_get_block_wrapped(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vfile_scanner.cpp:355
 8# doris::vectorized::VFileScanner::_get_block_impl(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vfile_scanner.cpp:298
 9# doris::vectorized::VScanner::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
10# doris::vectorized::VScanner::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vscanner.cpp:96
11# doris::vectorized::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::ScanTask>) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/scanner_scheduler.cpp:258

Root cause

It is found that when executing conjuncts expressions when there is insufficient memory, column names and types may be inserted, but the columns are not inserted into the block, which eventually leads to a crash.

If an exception occurs after block->insert({nullptr, _data_type, _expr_name});, it will lead to the situation mentioned above

Status VectorizedFnCall::_do_execute(doris::vectorized::VExprContext* context,
                                     doris::vectorized::Block* block, int* result_column_id,
                                     std::vector<size_t>& args) {
   ...
    // prepare a column to save result
    block->insert({nullptr, _data_type, _expr_name});
    if (_can_fast_execute) {
        auto can_fast_execute = fast_execute(*block, args, num_columns_without_result,
                                             block->rows(), _function->get_name());
        if (can_fast_execute) {
            *result_column_id = num_columns_without_result;
            return Status::OK();
        }
    }

Solution

#37086

@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.

@kaka11chen kaka11chen force-pushed the fix_low_mem_core_in_orc_parquet_reader branch from 0b15d2a to 234af45 Compare June 20, 2024 02:37
@github-actions
Copy link
Contributor

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

1 similar comment
@github-actions
Copy link
Contributor

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

@kaka11chen
Copy link
Contributor Author

run buildall

morningman pushed a commit that referenced this pull request Jun 22, 2024
…er low mem exception. (#36575)

## Proposed changes

Backport #36574.
@morningman morningman force-pushed the fix_low_mem_core_in_orc_parquet_reader branch from 234af45 to 5926dd3 Compare June 22, 2024 03:29
@morningman
Copy link
Contributor

run buildall

@github-actions
Copy link
Contributor

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17759	4354	4300	4300
q2	2023	194	192	192
q3	10848	1106	1115	1106
q4	10672	850	792	792
q5	7493	2685	2627	2627
q6	225	137	137	137
q7	951	629	609	609
q8	9228	2084	2060	2060
q9	9179	6570	6525	6525
q10	8943	3731	3764	3731
q11	460	246	231	231
q12	436	234	226	226
q13	17999	3168	3153	3153
q14	274	239	234	234
q15	540	480	501	480
q16	546	416	410	410
q17	965	697	668	668
q18	8814	8076	7400	7400
q19	10131	1547	1573	1547
q20	1164	320	339	320
q21	5011	3198	3996	3198
q22	390	348	345	345
Total cold run time: 124051 ms
Total hot run time: 40291 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4402	4273	4467	4273
q2	380	285	276	276
q3	3164	2875	2915	2875
q4	2001	1643	1713	1643
q5	5467	5534	5545	5534
q6	223	134	130	130
q7	2235	1878	1861	1861
q8	3316	3446	3433	3433
q9	8851	8733	8706	8706
q10	4058	3851	3798	3798
q11	586	509	496	496
q12	832	652	634	634
q13	16561	3169	3129	3129
q14	299	287	276	276
q15	526	488	491	488
q16	542	436	443	436
q17	1804	1500	1528	1500
q18	8031	8011	7759	7759
q19	1751	1631	1621	1621
q20	2182	1849	1869	1849
q21	7988	4834	4822	4822
q22	688	589	573	573
Total cold run time: 75887 ms
Total hot run time: 56112 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 174994 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 5926dd3832b3dccc1b28c67bc68439f0f265bcde, data reload: false

query1	928	380	383	380
query2	6366	2356	2384	2356
query3	6644	210	217	210
query4	18902	17307	17380	17307
query5	3654	474	478	474
query6	241	159	161	159
query7	4580	317	297	297
query8	312	306	294	294
query9	8678	2373	2351	2351
query10	583	312	284	284
query11	10558	10086	10015	10015
query12	115	96	87	87
query13	1651	364	361	361
query14	10043	7697	7564	7564
query15	246	196	193	193
query16	7801	273	272	272
query17	1760	555	542	542
query18	1905	285	285	285
query19	201	167	161	161
query20	99	86	86	86
query21	215	129	125	125
query22	4606	4118	4048	4048
query23	33866	33546	33649	33546
query24	10229	2962	2965	2962
query25	626	407	396	396
query26	730	162	160	160
query27	2337	334	327	327
query28	5536	2152	2117	2117
query29	924	669	636	636
query30	285	159	160	159
query31	997	768	754	754
query32	97	63	59	59
query33	688	308	319	308
query34	905	484	480	480
query35	735	687	656	656
query36	1120	992	977	977
query37	152	76	72	72
query38	2988	2834	2846	2834
query39	919	856	846	846
query40	217	139	136	136
query41	60	58	56	56
query42	108	106	106	106
query43	627	563	564	563
query44	1090	734	753	734
query45	195	167	174	167
query46	1067	722	719	719
query47	1910	1764	1780	1764
query48	384	300	304	300
query49	874	417	430	417
query50	786	404	404	404
query51	6893	6773	6724	6724
query52	110	89	98	89
query53	362	292	288	288
query54	908	453	457	453
query55	79	78	75	75
query56	294	278	284	278
query57	1108	1071	1082	1071
query58	267	257	350	257
query59	3441	3235	3092	3092
query60	297	272	277	272
query61	95	105	90	90
query62	593	439	438	438
query63	319	287	285	285
query64	8535	2269	1746	1746
query65	3148	3125	3090	3090
query66	755	317	324	317
query67	15806	15261	14974	14974
query68	8481	556	549	549
query69	742	457	403	403
query70	1322	1109	1123	1109
query71	524	277	268	268
query72	8731	5726	5326	5326
query73	2145	329	327	327
query74	5974	5497	5487	5487
query75	4801	2713	2676	2676
query76	4509	954	898	898
query77	783	290	293	290
query78	10450	10043	9833	9833
query79	7428	523	519	519
query80	827	475	476	475
query81	553	222	224	222
query82	264	106	107	106
query83	346	172	166	166
query84	272	87	90	87
query85	890	281	266	266
query86	342	307	293	293
query87	3328	3079	3121	3079
query88	4587	2472	2478	2472
query89	524	389	381	381
query90	1969	228	194	194
query91	129	101	99	99
query92	63	48	48	48
query93	5226	509	504	504
query94	1302	185	192	185
query95	410	313	317	313
query96	602	270	270	270
query97	3214	3052	3074	3052
query98	207	210	203	203
query99	1194	853	849	849
Total cold run time: 285689 ms
Total hot run time: 174994 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.05	0.04
query3	0.22	0.05	0.04
query4	1.68	0.07	0.07
query5	0.50	0.50	0.49
query6	1.12	0.73	0.72
query7	0.02	0.02	0.01
query8	0.05	0.05	0.05
query9	0.54	0.51	0.50
query10	0.57	0.55	0.55
query11	0.16	0.12	0.11
query12	0.14	0.12	0.12
query13	0.60	0.58	0.60
query14	0.78	0.76	0.80
query15	0.86	0.81	0.81
query16	0.35	0.37	0.36
query17	1.02	0.99	0.98
query18	0.21	0.27	0.23
query19	1.82	1.75	1.81
query20	0.02	0.01	0.01
query21	15.40	0.66	0.66
query22	4.60	6.94	1.95
query23	18.31	1.41	1.28
query24	2.12	0.25	0.22
query25	0.15	0.09	0.09
query26	0.27	0.18	0.17
query27	0.08	0.08	0.09
query28	13.24	1.03	1.00
query29	12.60	3.34	3.30
query30	0.26	0.07	0.06
query31	2.85	0.38	0.39
query32	3.30	0.47	0.47
query33	2.91	2.88	2.84
query34	16.97	4.41	4.40
query35	4.48	4.53	4.50
query36	0.65	0.47	0.48
query37	0.18	0.16	0.16
query38	0.16	0.15	0.15
query39	0.05	0.04	0.04
query40	0.17	0.15	0.14
query41	0.10	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.74 s
Total hot run time: 30.71 s

@kaka11chen kaka11chen force-pushed the fix_low_mem_core_in_orc_parquet_reader branch from 5926dd3 to 8083e36 Compare June 22, 2024 14:42
@kaka11chen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17647	4280	4220	4220
q2	2016	184	185	184
q3	10502	1093	1161	1093
q4	10202	822	883	822
q5	7530	2659	2624	2624
q6	223	135	131	131
q7	938	600	592	592
q8	9222	2061	2047	2047
q9	8894	6444	6463	6444
q10	9062	3697	3685	3685
q11	430	240	227	227
q12	442	225	219	219
q13	18686	2951	2971	2951
q14	270	213	213	213
q15	520	480	473	473
q16	482	372	379	372
q17	953	682	724	682
q18	7954	7440	7320	7320
q19	8273	1486	1466	1466
q20	652	324	324	324
q21	4729	3103	3948	3103
q22	410	346	349	346
Total cold run time: 120037 ms
Total hot run time: 39538 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4362	4236	4233	4233
q2	378	267	273	267
q3	3076	2873	2919	2873
q4	1957	1718	1702	1702
q5	5544	5485	5438	5438
q6	228	131	128	128
q7	2220	1830	1846	1830
q8	3295	3394	3393	3393
q9	8636	8717	8714	8714
q10	4095	3707	3692	3692
q11	584	499	497	497
q12	824	656	623	623
q13	16362	3136	3117	3117
q14	311	270	290	270
q15	520	492	482	482
q16	476	422	431	422
q17	1798	1496	1502	1496
q18	8176	7810	7923	7810
q19	1807	1651	1768	1651
q20	3125	1870	1860	1860
q21	5084	4937	4812	4812
q22	804	577	549	549
Total cold run time: 73662 ms
Total hot run time: 55859 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 173519 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 8083e36d4cdf7a9c3ff0c69dbdd40de82294e91d, data reload: false

query1	919	381	372	372
query2	6443	2337	2432	2337
query3	6637	207	219	207
query4	22907	17302	17285	17285
query5	3645	468	468	468
query6	234	165	166	165
query7	4590	304	299	299
query8	322	280	314	280
query9	8500	2390	2353	2353
query10	575	308	291	291
query11	10421	9929	9791	9791
query12	118	84	81	81
query13	1646	375	370	370
query14	9010	6885	7743	6885
query15	237	202	195	195
query16	7511	268	264	264
query17	1449	546	538	538
query18	1969	269	270	269
query19	187	152	148	148
query20	91	81	80	80
query21	204	124	123	123
query22	4300	4067	3994	3994
query23	33668	33578	33595	33578
query24	10829	2971	2900	2900
query25	606	393	361	361
query26	716	158	156	156
query27	2254	324	326	324
query28	5995	2114	2124	2114
query29	911	704	611	611
query30	269	165	152	152
query31	1004	750	738	738
query32	98	55	54	54
query33	659	286	286	286
query34	903	495	483	483
query35	750	642	645	642
query36	1143	976	948	948
query37	147	70	83	70
query38	2929	2820	2763	2763
query39	890	826	844	826
query40	224	140	129	129
query41	58	55	52	52
query42	116	99	100	99
query43	607	535	560	535
query44	1090	746	740	740
query45	206	167	167	167
query46	1070	723	709	709
query47	1842	1736	1751	1736
query48	383	323	310	310
query49	846	419	418	418
query50	779	391	394	391
query51	6790	6747	6747	6747
query52	103	94	96	94
query53	366	295	292	292
query54	874	455	458	455
query55	76	76	76	76
query56	305	277	276	276
query57	1119	1066	1046	1046
query58	250	260	244	244
query59	3414	3185	3024	3024
query60	310	289	284	284
query61	113	107	110	107
query62	602	452	457	452
query63	326	298	304	298
query64	8639	2328	1895	1895
query65	3291	3080	3098	3080
query66	760	318	327	318
query67	15611	14931	15051	14931
query68	8389	575	550	550
query69	721	492	436	436
query70	1222	1166	1104	1104
query71	459	281	282	281
query72	8636	5396	5434	5396
query73	1741	328	326	326
query74	5928	5354	5455	5354
query75	4590	2644	2633	2633
query76	4289	955	939	939
query77	744	300	313	300
query78	10326	10025	9790	9790
query79	6542	519	516	516
query80	1626	490	482	482
query81	563	220	221	220
query82	265	102	109	102
query83	274	171	169	169
query84	274	84	86	84
query85	853	282	265	265
query86	349	301	310	301
query87	3308	3098	3113	3098
query88	4859	2452	2441	2441
query89	489	384	375	375
query90	1888	192	194	192
query91	128	102	158	102
query92	62	49	58	49
query93	5582	502	509	502
query94	1312	188	188	188
query95	409	311	314	311
query96	623	272	271	271
query97	3170	3044	3026	3026
query98	219	195	188	188
query99	1136	824	822	822
Total cold run time: 286832 ms
Total hot run time: 173519 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.07	0.04	0.05
query3	0.23	0.06	0.05
query4	1.66	0.08	0.08
query5	0.50	0.48	0.49
query6	1.14	0.72	0.72
query7	0.02	0.01	0.02
query8	0.04	0.04	0.05
query9	0.54	0.48	0.49
query10	0.53	0.52	0.54
query11	0.15	0.11	0.12
query12	0.15	0.12	0.12
query13	0.59	0.57	0.60
query14	0.76	0.77	0.78
query15	0.84	0.81	0.81
query16	0.34	0.36	0.35
query17	0.95	1.00	0.96
query18	0.24	0.24	0.24
query19	1.80	1.73	1.69
query20	0.01	0.01	0.01
query21	15.46	0.67	0.66
query22	3.98	6.55	2.87
query23	18.32	1.40	1.24
query24	2.13	0.23	0.22
query25	0.15	0.09	0.09
query26	0.28	0.18	0.17
query27	0.07	0.08	0.08
query28	13.19	1.01	1.00
query29	12.60	3.32	3.31
query30	0.26	0.07	0.06
query31	2.86	0.41	0.41
query32	3.23	0.47	0.47
query33	2.88	2.93	2.89
query34	17.18	4.41	4.44
query35	4.53	4.51	4.47
query36	0.66	0.48	0.47
query37	0.18	0.16	0.15
query38	0.16	0.15	0.15
query39	0.05	0.04	0.03
query40	0.16	0.14	0.14
query41	0.10	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.14 s
Total hot run time: 31.51 s

@kaka11chen
Copy link
Contributor Author

run p0

1 similar comment
@kaka11chen
Copy link
Contributor Author

run p0

Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor

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 27, 2024
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

AshinGau
AshinGau previously approved these changes Jun 27, 2024
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

2.1 has reverted this PR #37086

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jul 1, 2024
@kaka11chen kaka11chen marked this pull request as draft July 1, 2024 15:22
@kaka11chen kaka11chen force-pushed the fix_low_mem_core_in_orc_parquet_reader branch from 8083e36 to 1b27117 Compare July 11, 2024 01:36
@kaka11chen kaka11chen force-pushed the fix_low_mem_core_in_orc_parquet_reader branch from 1b27117 to b6b50e5 Compare July 11, 2024 01:38
@kaka11chen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17614	4308	4265	4265
q2	2012	188	191	188
q3	10447	1140	1107	1107
q4	10187	769	743	743
q5	7537	2639	2727	2639
q6	219	135	135	135
q7	961	599	619	599
q8	9222	2082	2043	2043
q9	8631	6535	6508	6508
q10	8840	3768	3757	3757
q11	475	232	237	232
q12	451	229	234	229
q13	17759	3000	2982	2982
q14	281	241	242	241
q15	519	488	494	488
q16	495	376	385	376
q17	947	618	710	618
q18	8045	7420	7395	7395
q19	8315	1514	1507	1507
q20	696	311	317	311
q21	4934	3067	3244	3067
q22	386	329	331	329
Total cold run time: 118973 ms
Total hot run time: 39759 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4426	4264	4277	4264
q2	390	269	271	269
q3	3011	2858	2918	2858
q4	1962	1635	1666	1635
q5	5602	5499	5503	5499
q6	238	133	129	129
q7	2255	1875	1872	1872
q8	3242	3421	3449	3421
q9	8770	8829	8815	8815
q10	4153	3686	3871	3686
q11	589	496	503	496
q12	793	675	634	634
q13	16014	3122	3211	3122
q14	309	297	291	291
q15	524	477	489	477
q16	505	421	434	421
q17	1830	1535	1508	1508
q18	8147	7987	7845	7845
q19	1824	1570	1426	1426
q20	2154	1859	1836	1836
q21	5000	4868	4735	4735
q22	608	567	536	536
Total cold run time: 72346 ms
Total hot run time: 55775 ms

@doris-robot
Copy link

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

query1	945	379	364	364
query2	6474	2544	2598	2544
query3	6639	205	216	205
query4	28616	17515	17252	17252
query5	3659	475	482	475
query6	298	164	170	164
query7	4583	293	296	293
query8	303	292	293	292
query9	8455	2425	2402	2402
query10	425	289	280	280
query11	11054	9960	9988	9960
query12	115	88	81	81
query13	1630	353	357	353
query14	10006	7333	7747	7333
query15	238	186	189	186
query16	7666	309	318	309
query17	1744	560	538	538
query18	1936	285	281	281
query19	203	152	153	152
query20	92	81	86	81
query21	211	133	128	128
query22	4343	4137	3949	3949
query23	33766	33727	33481	33481
query24	10985	2883	2922	2883
query25	604	417	409	409
query26	706	155	153	153
query27	2339	274	286	274
query28	5871	2177	2157	2157
query29	918	661	670	661
query30	262	154	155	154
query31	988	758	735	735
query32	101	59	62	59
query33	739	328	318	318
query34	924	498	505	498
query35	711	602	591	591
query36	1141	1000	990	990
query37	152	87	92	87
query38	2922	2867	2779	2779
query39	915	857	806	806
query40	208	120	121	120
query41	55	55	51	51
query42	119	99	101	99
query43	618	553	566	553
query44	1222	737	742	737
query45	200	171	165	165
query46	1093	744	730	730
query47	1874	1751	1768	1751
query48	370	297	312	297
query49	840	416	428	416
query50	779	393	400	393
query51	6845	6815	6789	6789
query52	103	100	90	90
query53	365	291	288	288
query54	906	452	463	452
query55	79	77	76	76
query56	305	286	295	286
query57	1128	1052	1057	1052
query58	248	263	259	259
query59	3295	3183	3358	3183
query60	320	290	298	290
query61	131	115	114	114
query62	792	660	649	649
query63	319	287	294	287
query64	9542	2206	1666	1666
query65	3153	3110	3106	3106
query66	729	330	331	330
query67	15785	14973	14896	14896
query68	8588	553	545	545
query69	730	483	369	369
query70	1449	1112	1063	1063
query71	531	278	276	276
query72	9014	5847	5678	5678
query73	2221	323	324	323
query74	5910	5513	5475	5475
query75	5195	2674	2691	2674
query76	5116	939	934	934
query77	791	306	330	306
query78	10040	9755	8886	8886
query79	10403	528	524	524
query80	986	485	501	485
query81	581	221	216	216
query82	290	136	136	136
query83	332	170	166	166
query84	277	85	85	85
query85	944	355	293	293
query86	347	326	310	310
query87	3343	3079	3109	3079
query88	4916	2363	2388	2363
query89	499	379	392	379
query90	2119	194	192	192
query91	130	102	100	100
query92	68	49	48	48
query93	5668	510	501	501
query94	1435	218	212	212
query95	398	323	320	320
query96	605	273	272	272
query97	3159	3011	3026	3011
query98	216	194	195	194
query99	1516	1264	1244	1244
Total cold run time: 302919 ms
Total hot run time: 174441 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.22	0.05	0.05
query4	1.68	0.06	0.08
query5	0.48	0.47	0.47
query6	1.13	0.72	0.72
query7	0.01	0.01	0.02
query8	0.05	0.04	0.05
query9	0.55	0.48	0.48
query10	0.53	0.52	0.54
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.59	0.58	0.59
query14	0.78	0.77	0.77
query15	0.85	0.80	0.80
query16	0.37	0.36	0.37
query17	0.99	1.04	1.04
query18	0.22	0.20	0.21
query19	1.85	1.72	1.73
query20	0.01	0.01	0.01
query21	15.40	0.78	0.67
query22	4.59	7.45	1.63
query23	18.28	1.30	1.26
query24	2.07	0.25	0.23
query25	0.16	0.09	0.09
query26	0.29	0.20	0.20
query27	0.45	0.23	0.23
query28	13.27	1.00	0.99
query29	12.60	3.31	3.28
query30	0.25	0.06	0.06
query31	2.89	0.40	0.39
query32	3.26	0.47	0.47
query33	2.85	2.88	2.91
query34	16.94	4.36	4.33
query35	4.45	4.43	4.47
query36	0.66	0.46	0.47
query37	0.19	0.16	0.15
query38	0.16	0.15	0.15
query39	0.04	0.04	0.03
query40	0.15	0.13	0.13
query41	0.10	0.05	0.05
query42	0.05	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.89 s
Total hot run time: 30.33 s

@kaka11chen kaka11chen marked this pull request as ready for review July 11, 2024 13:34
@kaka11chen kaka11chen requested a review from morningman July 12, 2024 01:23
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

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

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

@morningman morningman merged commit efb73c3 into apache:master Jul 13, 2024
seawinde pushed a commit to seawinde/doris that referenced this pull request Jul 17, 2024
…er low mem exception. (apache#36574)

## Proposed changes

### Issue

```
SIGSEGV address not mapped to object (@0x8) received by PID 2264997 (TID 2267559 OR 0x7ff60b2a4640) from PID 8; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/common/signal_handler.h:421
 1# PosixSignals::chained_handler(int, siginfo*, 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# 0x00007FFB96D77520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::vectorized::Block::clear_column_data(int) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/core/block.cpp:705
 5# doris::vectorized::OrcReader::get_next_block_impl(doris::vectorized::Block*, unsigned long*, bool*) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
 6# doris::vectorized::OrcReader::get_next_block(doris::vectorized::Block*, unsigned long*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/format/orc/vorc_reader.cpp:1533
 7# doris::vectorized::VFileScanner::_get_block_wrapped(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vfile_scanner.cpp:355
 8# doris::vectorized::VFileScanner::_get_block_impl(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vfile_scanner.cpp:298
 9# doris::vectorized::VScanner::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
10# doris::vectorized::VScanner::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vscanner.cpp:96
11# doris::vectorized::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::ScanTask>) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/scanner_scheduler.cpp:258
```
### Root cause
It is found that when executing conjuncts expressions when there is
insufficient memory, column names and types may be inserted, but the
columns are not inserted into the block, which eventually leads to a
crash.

If an exception occurs after `block->insert({nullptr, _data_type,
_expr_name});`, it will lead to the situation mentioned above
```
Status VectorizedFnCall::_do_execute(doris::vectorized::VExprContext* context,
                                     doris::vectorized::Block* block, int* result_column_id,
                                     std::vector<size_t>& args) {
   ...
    // prepare a column to save result
    block->insert({nullptr, _data_type, _expr_name});
    if (_can_fast_execute) {
        auto can_fast_execute = fast_execute(*block, args, num_columns_without_result,
                                             block->rows(), _function->get_name());
        if (can_fast_execute) {
            *result_column_id = num_columns_without_result;
            return Status::OK();
        }
    }
```

### Solution
apache#37086
dataroaring pushed a commit that referenced this pull request Jul 17, 2024
…er low mem exception. (#36574)

## Proposed changes

### Issue

```
SIGSEGV address not mapped to object (@0x8) received by PID 2264997 (TID 2267559 OR 0x7ff60b2a4640) from PID 8; stack trace: ***
 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/common/signal_handler.h:421
 1# PosixSignals::chained_handler(int, siginfo*, 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# 0x00007FFB96D77520 in /lib/x86_64-linux-gnu/libc.so.6
 4# doris::vectorized::Block::clear_column_data(int) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/core/block.cpp:705
 5# doris::vectorized::OrcReader::get_next_block_impl(doris::vectorized::Block*, unsigned long*, bool*) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
 6# doris::vectorized::OrcReader::get_next_block(doris::vectorized::Block*, unsigned long*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/format/orc/vorc_reader.cpp:1533
 7# doris::vectorized::VFileScanner::_get_block_wrapped(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vfile_scanner.cpp:355
 8# doris::vectorized::VFileScanner::_get_block_impl(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vfile_scanner.cpp:298
 9# doris::vectorized::VScanner::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) in /mnt/hdd01/PERFORMANCE_ENV/be/lib/doris_be
10# doris::vectorized::VScanner::get_block_after_projects(doris::RuntimeState*, doris::vectorized::Block*, bool*) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/vscanner.cpp:96
11# doris::vectorized::ScannerScheduler::_scanner_scan(std::shared_ptr<doris::vectorized::ScannerContext>, std::shared_ptr<doris::vectorized::ScanTask>) at /home/zcp/repo_center/doris_branch-2.1/doris/be/src/vec/exec/scan/scanner_scheduler.cpp:258
```
### Root cause
It is found that when executing conjuncts expressions when there is
insufficient memory, column names and types may be inserted, but the
columns are not inserted into the block, which eventually leads to a
crash.

If an exception occurs after `block->insert({nullptr, _data_type,
_expr_name});`, it will lead to the situation mentioned above
```
Status VectorizedFnCall::_do_execute(doris::vectorized::VExprContext* context,
                                     doris::vectorized::Block* block, int* result_column_id,
                                     std::vector<size_t>& args) {
   ...
    // prepare a column to save result
    block->insert({nullptr, _data_type, _expr_name});
    if (_can_fast_execute) {
        auto can_fast_execute = fast_execute(*block, args, num_columns_without_result,
                                             block->rows(), _function->get_name());
        if (can_fast_execute) {
            *result_column_id = num_columns_without_result;
            return Status::OK();
        }
    }
```

### Solution
#37086
@gavinchou gavinchou mentioned this pull request Aug 19, 2024
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.4-merged dev/3.0.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants