Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] _cur_reader can be null in exception cases in VFileScanner #40273

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

Vallishp
Copy link
Contributor

@Vallishp Vallishp commented Sep 2, 2024

Proposed changes

Issue Number: close #xxx

cur_reader pointer can be null in VFileScanner. can cause BE crash

[ RUN ] VfileScannerExcepTest.failure_case
AddressSanitizer:DEADLYSIGNAL

==1892247==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x5cdbe26eb5f8 bp 0x7ffed6728610 sp 0x7ffed67277a0 T0)
==1892247==The signal is caused by a READ memory access.
==1892247==Hint: address points to the zero page.
#0 0x5cdbe26eb5f8 in doris::vectorized::VFileScanner::_get_next_reader() /root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:980:9
#1 0x5cdbe26e3512 in doris::vectorized::VFileScanner::_get_block_wrapped(doris::RuntimeState*, doris::vectorized::Block*, bool*) /root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:286:25
#2 0x5cdbe26e2e46 in doris::vectorized::VFileScanner::_get_block_impl(doris::RuntimeState*, doris::vectorized::Block*, bool*) /root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:252:17
#3 0x5cdbe28e05ce in doris::vectorized::VScanner::get_block(doris::RuntimeState*, doris::vectorized::Block*, bool*) /root/doris/workspace/doris/be/src/vec/exec/scan/vscanner.cpp:117:17
#4 0x5cdbc405a922 in doris::vectorized::VfileScannerExcepTest_failure_case_Test::TestBody() /root/doris/workspace/doris/be/test/vec/exec/vfile_scanner_excep_test.cpp:309:24
#5 0x5cdbff5b191a in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::)(), char const) (/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51eb491a) (BuildId: 21d41a2d207823b9)
#6 0x5cdbff59f989 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::)(), char const) (/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51ea2989) (BuildId: 21d41a2d207823b9)
#7 0x5cdbff57a9c2 in testing::Test::Run() (/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7d9c2) (BuildId: 21d41a2d207823b9)
#8 0x5cdbff57b708 in testing::TestInfo::Run() (/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7e708) (BuildId: 21d41a2d207823b9)
#9 0x5cdbff57bec3 in testing::TestSuite::Run() (/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7eec3) (BuildId: 21d41a2d207823b9)

After fix:

I20240902 09:11:07.722273 1946048 run_all_tests.cpp:67] init config 1
Note: Google Test filter = VfileScannerE*
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from VfileScannerExceptionTest
[ RUN ] VfileScannerExceptionTest.failure_case
msg = [INTERNAL_ERROR]cur path: . Failed to create reader for file format: 11
[ OK ] VfileScannerExceptionTest.failure_case (3 ms)
[----------] 1 test from VfileScannerExceptionTest (3 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (3 ms total)
[ PASSED ] 1 test.
=== Finished. Gtest output: /root/doris/workspace/doris/be/ut_build_ASAN/gtest_output

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

@Vallishp
Copy link
Contributor Author

Vallishp commented Sep 2, 2024

run buildall

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
#include <gtest/gtest.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'gtest/gtest.h' file not found [clang-diagnostic-error]

#include <gtest/gtest.h>
         ^

Comment on lines +35 to +37
namespace doris {

namespace vectorized {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces]

Suggested change
namespace doris {
namespace vectorized {
namespace doris::vectorized {

be/test/vec/exec/vfile_scanner_exception_test.cpp:304:

- } // namespace vectorized
- } // namespace doris
+ } // namespace doris

WARN_IF_ERROR(_scan_node->close(&_runtime_state), "fail to close scan_node")
}

protected:
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override]

Suggested change
protected:
void SetUp() override {}

std::unique_ptr<ShardedKVCache> _kv_cache = nullptr;
std::unique_ptr<TMasterInfo> _master_info = nullptr;
};

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function '_init_desc_table' exceeds recommended size/complexity thresholds [readability-function-size]

void VfileScannerExceptionTest::_init_desc_table() {
                                ^
Additional context

be/test/vec/exec/vfile_scanner_exception_test.cpp:111: 117 lines including whitespace and comments (threshold 80)

void VfileScannerExceptionTest::_init_desc_table() {
                                ^

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

Comment on lines +35 to +37
namespace doris {

namespace vectorized {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: nested namespaces can be concatenated [modernize-concat-nested-namespaces]

Suggested change
namespace doris {
namespace vectorized {
namespace doris::vectorized {

be/test/vec/exec/vfile_scanner_exception_test.cpp:305:

- } // namespace vectorized
- } // namespace doris
+ } // namespace doris

}

protected:
virtual void SetUp() override {}
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override]

Suggested change
virtual void SetUp() override {}
void SetUp() override {}

std::unique_ptr<TMasterInfo> _master_info = nullptr;
};

void VfileScannerExceptionTest::_init_desc_table() {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: function '_init_desc_table' exceeds recommended size/complexity thresholds [readability-function-size]

void VfileScannerExceptionTest::_init_desc_table() {
                                ^
Additional context

be/test/vec/exec/vfile_scanner_exception_test.cpp:112: 117 lines including whitespace and comments (threshold 80)

void VfileScannerExceptionTest::_init_desc_table() {
                                ^

dataroaring
dataroaring previously approved these changes Sep 5, 2024
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

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

github-actions bot commented Sep 5, 2024

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

Copy link
Contributor

github-actions bot commented Sep 5, 2024

PR approved by anyone and no changes requested.

yiguolei
yiguolei previously approved these changes Sep 10, 2024
@yiguolei
Copy link
Contributor

run buildall

@yiguolei
Copy link
Contributor

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17641	5161	4472	4472
q2	2041	192	206	192
q3	11445	961	1140	961
q4	10522	800	765	765
q5	7759	2876	2763	2763
q6	231	141	142	141
q7	970	620	632	620
q8	9362	2099	2089	2089
q9	7274	6551	6530	6530
q10	7010	2232	2258	2232
q11	453	242	255	242
q12	401	223	231	223
q13	17764	3124	3095	3095
q14	279	245	244	244
q15	541	511	491	491
q16	549	428	410	410
q17	995	719	746	719
q18	7398	7024	6889	6889
q19	1392	1180	1090	1090
q20	655	327	335	327
q21	3966	2957	2893	2893
q22	1143	996	1006	996
Total cold run time: 109791 ms
Total hot run time: 38384 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4427	4396	4426	4396
q2	393	294	276	276
q3	2922	2658	2676	2658
q4	1916	1657	1633	1633
q5	5751	5734	5781	5734
q6	231	134	139	134
q7	2213	1849	1848	1848
q8	3328	3455	3574	3455
q9	8920	8988	8976	8976
q10	3735	3379	3323	3323
q11	607	502	516	502
q12	825	652	675	652
q13	15453	3270	3331	3270
q14	323	293	274	274
q15	541	500	500	500
q16	566	505	514	505
q17	1874	1587	1587	1587
q18	8319	7931	8040	7931
q19	1753	1618	1707	1618
q20	2195	1908	1944	1908
q21	5716	5517	5493	5493
q22	1120	1081	1053	1053
Total cold run time: 73128 ms
Total hot run time: 57726 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197232 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 1266aa83520714f90ee9ad8cf5be79ea3f8b3e3a, data reload: false

query1	1246	890	881	881
query2	6428	1885	1853	1853
query3	10603	3875	3811	3811
query4	59147	24349	23320	23320
query5	4944	505	504	504
query6	398	172	178	172
query7	5617	290	282	282
query8	308	216	219	216
query9	7499	2465	2468	2465
query10	422	275	257	257
query11	17145	15298	15224	15224
query12	157	101	101	101
query13	1458	418	380	380
query14	10440	6969	7009	6969
query15	205	195	177	177
query16	6735	463	469	463
query17	1135	573	567	567
query18	1475	293	292	292
query19	201	150	151	150
query20	127	116	112	112
query21	208	104	103	103
query22	4594	4437	4430	4430
query23	34572	34103	33551	33551
query24	6016	2846	2819	2819
query25	495	395	380	380
query26	596	154	152	152
query27	1587	272	275	272
query28	3753	2036	2008	2008
query29	642	398	402	398
query30	221	155	155	155
query31	939	757	786	757
query32	71	53	52	52
query33	441	283	281	281
query34	872	481	455	455
query35	845	727	710	710
query36	1041	916	928	916
query37	147	84	82	82
query38	3965	3923	3885	3885
query39	1451	1408	1407	1407
query40	201	115	116	115
query41	49	49	45	45
query42	125	102	102	102
query43	498	466	462	462
query44	1103	750	745	745
query45	198	171	171	171
query46	1090	716	715	715
query47	1868	1816	1807	1807
query48	369	288	304	288
query49	782	469	469	469
query50	830	410	404	404
query51	7063	6859	6850	6850
query52	101	88	91	88
query53	251	183	189	183
query54	564	458	457	457
query55	76	79	75	75
query56	284	273	264	264
query57	1183	1047	1060	1047
query58	232	234	236	234
query59	3059	2874	2864	2864
query60	302	293	278	278
query61	123	123	120	120
query62	750	667	660	660
query63	221	184	189	184
query64	1468	763	725	725
query65	3252	3183	3192	3183
query66	642	350	350	350
query67	15940	15468	15289	15289
query68	1461	857	859	857
query69	426	331	334	331
query70	1211	1167	1185	1167
query71	346	345	340	340
query72	4942	3774	3488	3488
query73	578	575	571	571
query74	9111	8915	8891	8891
query75	3034	2962	2894	2894
query76	992	839	842	839
query77	510	389	405	389
query78	9505	9276	9278	9276
query79	902	856	834	834
query80	808	816	798	798
query81	453	260	262	260
query82	270	267	272	267
query83	191	190	190	190
query84	201	102	105	102
query85	673	385	374	374
query86	318	293	313	293
query87	4317	4318	4283	4283
query88	4342	4031	4019	4019
query89	381	359	364	359
query90	1542	307	306	306
query91	120	126	123	123
query92	79	77	76	76
query93	913	907	906	906
query94	527	355	374	355
query95	410	407	403	403
query96	466	466	466	466
query97	3089	3090	3119	3090
query98	236	222	225	222
query99	1320	1294	1280	1280
Total cold run time: 294444 ms
Total hot run time: 197232 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.04
query2	0.08	0.04	0.04
query3	0.22	0.05	0.05
query4	1.67	0.08	0.07
query5	0.51	0.50	0.49
query6	1.14	0.74	0.74
query7	0.02	0.02	0.02
query8	0.06	0.05	0.05
query9	0.55	0.48	0.49
query10	0.54	0.55	0.54
query11	0.16	0.12	0.11
query12	0.16	0.13	0.12
query13	0.62	0.60	0.60
query14	1.40	1.38	1.44
query15	0.87	0.85	0.83
query16	0.38	0.39	0.39
query17	1.01	1.08	1.05
query18	0.21	0.20	0.20
query19	1.93	1.79	1.87
query20	0.02	0.01	0.01
query21	15.40	0.66	0.65
query22	4.75	6.68	2.06
query23	18.30	1.35	1.30
query24	2.11	0.22	0.21
query25	0.15	0.09	0.08
query26	0.26	0.18	0.18
query27	0.09	0.08	0.08
query28	13.26	1.06	1.03
query29	12.65	3.39	3.38
query30	0.24	0.05	0.06
query31	2.88	0.41	0.42
query32	3.23	0.51	0.50
query33	3.03	3.06	3.04
query34	17.20	4.49	4.54
query35	4.55	4.49	4.56
query36	0.68	0.48	0.48
query37	0.20	0.17	0.15
query38	0.16	0.14	0.14
query39	0.04	0.03	0.04
query40	0.16	0.12	0.12
query41	0.10	0.05	0.05
query42	0.06	0.05	0.04
query43	0.05	0.05	0.04
Total cold run time: 111.15 s
Total hot run time: 32 s

@Vallishp
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17630	4424	4355	4355
q2	2031	216	210	210
q3	10788	1286	1087	1087
q4	10482	767	740	740
q5	8127	2909	2863	2863
q6	232	144	147	144
q7	995	638	639	638
q8	9707	2142	2118	2118
q9	7385	6652	6683	6652
q10	7352	2296	2213	2213
q11	463	251	249	249
q12	401	229	232	229
q13	17773	3135	3081	3081
q14	287	242	251	242
q15	547	505	484	484
q16	519	434	441	434
q17	1003	759	670	670
q18	7331	6953	6900	6900
q19	1404	954	1049	954
q20	696	354	327	327
q21	4063	3067	2856	2856
q22	1116	1039	1008	1008
Total cold run time: 110332 ms
Total hot run time: 38454 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4402	4321	4310	4310
q2	370	277	275	275
q3	2928	2699	2686	2686
q4	1979	1692	1683	1683
q5	5704	5765	5701	5701
q6	231	145	144	144
q7	2227	1818	1816	1816
q8	3414	3518	3462	3462
q9	8979	8842	8879	8842
q10	3633	3320	3358	3320
q11	630	523	523	523
q12	818	672	654	654
q13	10803	3315	3305	3305
q14	335	333	299	299
q15	541	478	495	478
q16	523	488	497	488
q17	1881	1558	1539	1539
q18	8367	7897	7872	7872
q19	1737	1618	1639	1618
q20	2194	1878	1845	1845
q21	5679	5533	5627	5533
q22	1132	1085	1095	1085
Total cold run time: 68507 ms
Total hot run time: 57478 ms

@doris-robot
Copy link

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

query1	1277	889	878	878
query2	6093	1995	1919	1919
query3	10622	4043	3937	3937
query4	59498	24312	23536	23536
query5	4971	523	516	516
query6	395	162	174	162
query7	5633	310	305	305
query8	324	218	207	207
query9	7700	2513	2511	2511
query10	402	294	265	265
query11	17332	15115	15185	15115
query12	165	108	108	108
query13	1459	407	375	375
query14	10857	7726	7296	7296
query15	214	189	175	175
query16	6799	485	432	432
query17	1115	568	568	568
query18	1606	292	295	292
query19	194	155	146	146
query20	122	114	113	113
query21	221	116	114	114
query22	4632	4559	4346	4346
query23	34396	33845	33599	33599
query24	6009	2911	2942	2911
query25	497	386	389	386
query26	629	156	158	156
query27	1613	276	285	276
query28	3543	2053	2035	2035
query29	650	434	412	412
query30	236	153	151	151
query31	940	766	740	740
query32	68	52	52	52
query33	470	291	302	291
query34	867	492	484	484
query35	850	715	735	715
query36	1076	942	947	942
query37	145	90	85	85
query38	4073	3889	3862	3862
query39	1438	1377	1399	1377
query40	203	115	117	115
query41	47	49	44	44
query42	117	98	95	95
query43	518	487	460	460
query44	1114	762	748	748
query45	195	166	163	163
query46	1079	736	756	736
query47	1883	1776	1771	1771
query48	384	301	328	301
query49	812	479	468	468
query50	837	433	433	433
query51	7016	6789	6950	6789
query52	101	89	89	89
query53	261	182	183	182
query54	584	486	476	476
query55	82	77	78	77
query56	288	285	270	270
query57	1205	1087	1086	1086
query58	233	258	236	236
query59	2989	2882	2751	2751
query60	306	287	286	286
query61	127	124	119	119
query62	742	655	672	655
query63	228	200	196	196
query64	1452	770	764	764
query65	3309	3187	3214	3187
query66	691	356	352	352
query67	15718	15522	15121	15121
query68	2125	866	846	846
query69	450	332	318	318
query70	1137	1143	1164	1143
query71	351	350	358	350
query72	4739	3846	3625	3625
query73	593	589	590	589
query74	9074	8901	9077	8901
query75	3019	2993	2976	2976
query76	972	880	865	865
query77	504	403	406	403
query78	9634	9210	9239	9210
query79	924	886	865	865
query80	813	841	819	819
query81	445	260	272	260
query82	262	265	267	265
query83	189	186	188	186
query84	200	107	104	104
query85	611	404	385	385
query86	331	306	317	306
query87	4274	4377	4289	4289
query88	4296	4202	4201	4201
query89	379	363	368	363
query90	859	314	313	313
query91	124	135	123	123
query92	77	75	75	75
query93	921	926	927	926
query94	396	359	386	359
query95	426	415	415	415
query96	477	486	479	479
query97	3059	3135	3111	3111
query98	230	240	234	234
query99	1333	1296	1237	1237
Total cold run time: 294876 ms
Total hot run time: 198301 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.04
query2	0.07	0.04	0.03
query3	0.23	0.05	0.05
query4	1.67	0.08	0.08
query5	0.51	0.50	0.49
query6	1.13	0.73	0.72
query7	0.02	0.01	0.01
query8	0.05	0.05	0.05
query9	0.55	0.50	0.49
query10	0.55	0.58	0.56
query11	0.16	0.11	0.12
query12	0.15	0.13	0.12
query13	0.61	0.60	0.58
query14	1.42	1.41	1.40
query15	0.85	0.83	0.83
query16	0.38	0.38	0.38
query17	1.05	1.06	1.01
query18	0.21	0.20	0.21
query19	1.98	1.83	1.86
query20	0.01	0.00	0.01
query21	15.39	0.66	0.65
query22	4.04	7.13	2.23
query23	18.34	1.33	1.27
query24	2.13	0.21	0.22
query25	0.15	0.09	0.08
query26	0.26	0.18	0.17
query27	0.08	0.08	0.07
query28	13.28	1.02	1.01
query29	12.60	3.42	3.39
query30	0.26	0.05	0.06
query31	2.89	0.40	0.40
query32	3.23	0.48	0.47
query33	3.01	3.03	3.02
query34	17.04	4.34	4.40
query35	4.49	4.43	4.49
query36	0.67	0.48	0.47
query37	0.19	0.16	0.15
query38	0.15	0.15	0.14
query39	0.05	0.04	0.04
query40	0.17	0.13	0.13
query41	0.09	0.05	0.05
query42	0.06	0.04	0.04
query43	0.05	0.04	0.04
Total cold run time: 110.26 s
Total hot run time: 31.83 s

@Vallishp
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Sep 11, 2024
@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.88% (9449/25624)
Line Coverage: 28.25% (77744/275159)
Region Coverage: 27.65% (40124/145119)
Branch Coverage: 24.28% (20397/84024)
Coverage Report: http://coverage.selectdb-in.cc/coverage/eee77b554a91e8f1e41feadd8c35759b58b8dc11_eee77b554a91e8f1e41feadd8c35759b58b8dc11/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17657	4360	4296	4296
q2	2015	193	191	191
q3	11853	975	1127	975
q4	10533	727	880	727
q5	7741	2832	2857	2832
q6	224	138	138	138
q7	968	638	618	618
q8	9337	2066	2102	2066
q9	7195	6544	6493	6493
q10	7014	2235	2224	2224
q11	477	244	254	244
q12	398	222	224	222
q13	17952	3191	3070	3070
q14	296	248	245	245
q15	532	489	474	474
q16	516	440	421	421
q17	975	686	740	686
q18	7425	6824	6730	6730
q19	1383	1088	1099	1088
q20	685	356	359	356
q21	3965	3152	3071	3071
q22	1119	1015	1038	1015
Total cold run time: 110260 ms
Total hot run time: 38182 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4396	4355	4337	4337
q2	382	263	267	263
q3	2921	2657	2687	2657
q4	1985	1661	1675	1661
q5	5723	5752	5725	5725
q6	227	135	140	135
q7	2219	1815	1845	1815
q8	3313	3494	3486	3486
q9	8897	8904	8822	8822
q10	3582	3453	3387	3387
q11	612	529	529	529
q12	849	699	646	646
q13	16384	3293	3303	3293
q14	325	307	303	303
q15	548	489	490	489
q16	545	493	505	493
q17	1847	1585	1527	1527
q18	8074	7951	7976	7951
q19	1742	1524	1803	1524
q20	2185	1907	1938	1907
q21	5746	5522	5538	5522
q22	1144	1049	1022	1022
Total cold run time: 73646 ms
Total hot run time: 57494 ms

@doris-robot
Copy link

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

query1	1249	882	892	882
query2	6342	1863	1824	1824
query3	10769	4279	4088	4088
query4	60611	26335	23220	23220
query5	5002	503	496	496
query6	405	166	158	158
query7	5621	296	292	292
query8	312	216	218	216
query9	7707	2502	2494	2494
query10	410	292	264	264
query11	16663	15073	15293	15073
query12	170	111	109	109
query13	1463	412	420	412
query14	10668	7413	7381	7381
query15	215	181	185	181
query16	6815	501	477	477
query17	1074	590	586	586
query18	1583	288	292	288
query19	200	146	169	146
query20	133	113	112	112
query21	207	113	112	112
query22	4734	4471	4510	4471
query23	34289	33475	33633	33475
query24	6005	2952	2831	2831
query25	479	371	379	371
query26	602	153	155	153
query27	1600	275	284	275
query28	3866	2063	2040	2040
query29	648	400	397	397
query30	235	151	152	151
query31	949	771	784	771
query32	69	53	53	53
query33	454	281	274	274
query34	864	479	462	462
query35	829	728	712	712
query36	1083	940	927	927
query37	141	92	84	84
query38	4014	3846	3876	3846
query39	1474	1403	1403	1403
query40	203	147	112	112
query41	46	45	44	44
query42	116	95	94	94
query43	508	480	456	456
query44	1072	753	731	731
query45	195	163	165	163
query46	1087	730	747	730
query47	1881	1794	1858	1794
query48	364	295	291	291
query49	764	428	425	425
query50	822	403	416	403
query51	7022	6910	6804	6804
query52	99	89	86	86
query53	253	194	180	180
query54	571	449	481	449
query55	75	73	78	73
query56	280	252	251	251
query57	1205	1075	1060	1060
query58	221	242	231	231
query59	2949	2802	2778	2778
query60	284	269	262	262
query61	103	102	106	102
query62	740	653	645	645
query63	216	189	182	182
query64	1358	675	686	675
query65	3204	3171	3160	3160
query66	684	342	338	338
query67	15750	15439	15169	15169
query68	1931	574	560	560
query69	406	281	276	276
query70	1142	1113	1158	1113
query71	329	276	269	269
query72	4621	4007	3925	3925
query73	731	320	319	319
query74	9161	8942	8888	8888
query75	3350	2738	2673	2673
query76	1303	981	1046	981
query77	551	322	314	314
query78	9748	9327	9321	9321
query79	920	889	852	852
query80	821	786	799	786
query81	463	262	267	262
query82	266	263	259	259
query83	199	200	196	196
query84	262	114	112	112
query85	756	479	386	386
query86	324	310	314	310
query87	4269	4233	4338	4233
query88	4675	4023	4029	4023
query89	370	361	362	361
query90	2221	312	302	302
query91	120	130	122	122
query92	78	75	73	73
query93	910	922	913	913
query94	748	359	347	347
query95	443	407	413	407
query96	465	464	465	464
query97	3150	3147	3152	3147
query98	224	228	234	228
query99	1457	1274	1273	1273
Total cold run time: 298440 ms
Total hot run time: 196890 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.03
query3	0.22	0.06	0.05
query4	1.68	0.09	0.08
query5	0.51	0.50	0.50
query6	1.13	0.74	0.74
query7	0.01	0.01	0.01
query8	0.05	0.05	0.04
query9	0.54	0.49	0.48
query10	0.55	0.53	0.54
query11	0.15	0.12	0.11
query12	0.15	0.13	0.13
query13	0.60	0.59	0.59
query14	1.41	1.41	1.44
query15	0.87	0.83	0.83
query16	0.36	0.37	0.38
query17	0.99	1.07	1.03
query18	0.17	0.17	0.18
query19	1.85	1.77	1.77
query20	0.02	0.01	0.01
query21	15.39	0.69	0.68
query22	3.67	7.60	2.36
query23	18.32	1.32	1.29
query24	2.08	0.23	0.24
query25	0.16	0.09	0.08
query26	0.26	0.18	0.18
query27	0.07	0.07	0.07
query28	13.18	1.02	1.00
query29	12.66	3.34	3.33
query30	0.24	0.06	0.05
query31	2.87	0.41	0.39
query32	3.25	0.47	0.48
query33	2.99	3.03	3.00
query34	16.83	4.47	4.50
query35	4.52	4.51	4.52
query36	0.66	0.46	0.47
query37	0.18	0.16	0.15
query38	0.14	0.14	0.14
query39	0.04	0.04	0.04
query40	0.15	0.13	0.12
query41	0.09	0.05	0.05
query42	0.06	0.05	0.05
query43	0.05	0.04	0.04
Total cold run time: 109.25 s
Total hot run time: 32.08 s

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

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

@Vallishp
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.89% (9455/25629)
Line Coverage: 28.25% (77784/275302)
Region Coverage: 27.66% (40157/145193)
Branch Coverage: 24.27% (20406/84082)
Coverage Report: http://coverage.selectdb-in.cc/coverage/814ac0e5615dff7254ab675910d5e23d48e07881_814ac0e5615dff7254ab675910d5e23d48e07881/report/index.html

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17617	4592	4473	4473
q2	2023	187	187	187
q3	11795	987	1081	987
q4	10520	740	794	740
q5	7749	2905	2897	2897
q6	231	142	139	139
q7	977	642	600	600
q8	9344	2136	2098	2098
q9	7059	6672	6669	6669
q10	7020	2262	2282	2262
q11	464	247	254	247
q12	397	245	241	241
q13	17771	3165	3131	3131
q14	288	235	241	235
q15	532	506	483	483
q16	509	440	439	439
q17	991	665	739	665
q18	7345	6762	6985	6762
q19	1404	986	920	920
q20	689	344	336	336
q21	4062	3200	3043	3043
q22	1129	1054	1012	1012
Total cold run time: 109916 ms
Total hot run time: 38566 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4439	4418	4313	4313
q2	395	271	282	271
q3	2937	2721	2721	2721
q4	1947	1651	1721	1651
q5	5772	5759	5830	5759
q6	229	133	140	133
q7	2263	1945	1824	1824
q8	3334	3461	3554	3461
q9	8955	8963	8945	8945
q10	3642	3456	3473	3456
q11	607	531	522	522
q12	859	687	718	687
q13	15898	3333	3346	3333
q14	321	306	315	306
q15	536	515	490	490
q16	572	513	489	489
q17	1835	1567	1562	1562
q18	8166	8003	8072	8003
q19	1782	1594	1615	1594
q20	2166	1934	1947	1934
q21	5939	5501	5487	5487
q22	1164	1065	1060	1060
Total cold run time: 73758 ms
Total hot run time: 58001 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 199066 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 814ac0e5615dff7254ab675910d5e23d48e07881, data reload: false

query1	1268	899	872	872
query2	6447	1909	1899	1899
query3	10615	3934	3909	3909
query4	59805	24758	23379	23379
query5	4993	536	528	528
query6	412	181	184	181
query7	5619	308	305	305
query8	324	231	220	220
query9	7589	2556	2528	2528
query10	417	280	271	271
query11	15638	15300	15317	15300
query12	176	112	113	112
query13	1454	397	390	390
query14	10796	7582	8233	7582
query15	217	178	189	178
query16	6554	491	508	491
query17	1105	592	600	592
query18	961	318	304	304
query19	208	163	156	156
query20	125	115	117	115
query21	223	107	119	107
query22	4625	4408	4335	4335
query23	34939	33999	33757	33757
query24	5950	2910	2888	2888
query25	510	401	419	401
query26	616	154	152	152
query27	1613	275	288	275
query28	3380	2060	2020	2020
query29	654	426	431	426
query30	240	152	153	152
query31	949	789	795	789
query32	74	56	55	55
query33	449	295	298	295
query34	867	461	471	461
query35	836	724	737	724
query36	1096	956	935	935
query37	143	87	84	84
query38	4077	3957	4029	3957
query39	1453	1449	1393	1393
query40	197	118	118	118
query41	48	49	47	47
query42	116	101	98	98
query43	518	482	465	465
query44	1082	765	743	743
query45	200	172	174	172
query46	1125	753	758	753
query47	1920	1812	1848	1812
query48	474	291	296	291
query49	777	452	449	449
query50	838	421	410	410
query51	6973	6903	6854	6854
query52	103	88	90	88
query53	249	180	184	180
query54	580	457	454	454
query55	77	74	75	74
query56	271	260	265	260
query57	1212	1093	1102	1093
query58	229	251	231	231
query59	2974	2857	2829	2829
query60	314	280	275	275
query61	117	122	98	98
query62	759	657	656	656
query63	212	186	190	186
query64	1380	671	675	671
query65	3282	3177	3228	3177
query66	659	335	337	335
query67	15952	15595	15372	15372
query68	2044	560	540	540
query69	404	268	276	268
query70	1097	1135	1152	1135
query71	332	269	279	269
query72	5241	4021	3974	3974
query73	751	320	323	320
query74	9253	8883	8930	8883
query75	3340	2766	2686	2686
query76	1357	1031	965	965
query77	526	326	323	323
query78	10760	9576	9919	9576
query79	1017	898	865	865
query80	1027	816	805	805
query81	496	264	266	264
query82	838	264	265	264
query83	222	190	189	189
query84	264	106	106	106
query85	702	395	381	381
query86	319	343	317	317
query87	4481	4511	4479	4479
query88	4608	4084	4085	4084
query89	391	371	374	371
query90	1507	317	311	311
query91	119	120	121	120
query92	79	74	76	74
query93	954	932	936	932
query94	561	350	382	350
query95	446	419	416	416
query96	476	473	472	472
query97	3161	3109	3098	3098
query98	247	242	233	233
query99	1495	1287	1322	1287
Total cold run time: 298570 ms
Total hot run time: 199066 ms

@doris-robot
Copy link

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

query1	0.05	0.05	0.04
query2	0.09	0.05	0.04
query3	0.22	0.05	0.05
query4	1.68	0.08	0.08
query5	0.52	0.50	0.51
query6	1.12	0.74	0.74
query7	0.02	0.01	0.02
query8	0.05	0.04	0.05
query9	0.54	0.49	0.48
query10	0.55	0.56	0.55
query11	0.16	0.12	0.12
query12	0.15	0.13	0.13
query13	0.60	0.60	0.60
query14	1.42	1.41	1.40
query15	0.85	0.83	0.83
query16	0.38	0.38	0.38
query17	1.06	1.02	1.06
query18	0.19	0.18	0.18
query19	1.90	1.76	1.82
query20	0.02	0.01	0.01
query21	15.39	0.68	0.68
query22	4.27	7.97	1.45
query23	18.28	1.34	1.33
query24	2.20	0.22	0.20
query25	0.15	0.09	0.08
query26	0.26	0.19	0.18
query27	0.09	0.08	0.08
query28	13.17	1.04	1.01
query29	12.62	3.42	3.40
query30	0.24	0.05	0.05
query31	2.87	0.41	0.40
query32	3.24	0.49	0.48
query33	3.00	3.05	3.05
query34	17.38	4.39	4.41
query35	4.55	4.48	4.44
query36	0.67	0.49	0.48
query37	0.18	0.15	0.16
query38	0.17	0.14	0.14
query39	0.05	0.04	0.04
query40	0.16	0.14	0.13
query41	0.09	0.04	0.05
query42	0.06	0.04	0.05
query43	0.04	0.04	0.04
Total cold run time: 110.7 s
Total hot run time: 31.24 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

@dataroaring dataroaring merged commit 4f9aa55 into apache:master Sep 12, 2024
22 of 26 checks passed
dataroaring pushed a commit that referenced this pull request Oct 9, 2024
)

## Proposed changes

Issue Number: close #xxx

cur_reader pointer can be null in VFileScanner. can cause BE crash



[ RUN      ] VfileScannerExcepTest.failure_case
AddressSanitizer:DEADLYSIGNAL
=================================================================
==1892247==ERROR: AddressSanitizer: SEGV on unknown address
0x000000000000 (pc 0x5cdbe26eb5f8 bp 0x7ffed6728610 sp 0x7ffed67277a0
T0)
==1892247==The signal is caused by a READ memory access.
==1892247==Hint: address points to the zero page.
#0 0x5cdbe26eb5f8 in doris::vectorized::VFileScanner::_get_next_reader()
/root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:980:9
#1 0x5cdbe26e3512 in
doris::vectorized::VFileScanner::_get_block_wrapped(doris::RuntimeState*,
doris::vectorized::Block*, bool*)
/root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:286:25
#2 0x5cdbe26e2e46 in
doris::vectorized::VFileScanner::_get_block_impl(doris::RuntimeState*,
doris::vectorized::Block*, bool*)
/root/doris/workspace/doris/be/src/vec/exec/scan/vfile_scanner.cpp:252:17
#3 0x5cdbe28e05ce in
doris::vectorized::VScanner::get_block(doris::RuntimeState*,
doris::vectorized::Block*, bool*)
/root/doris/workspace/doris/be/src/vec/exec/scan/vscanner.cpp:117:17
#4 0x5cdbc405a922 in
doris::vectorized::VfileScannerExcepTest_failure_case_Test::TestBody()
/root/doris/workspace/doris/be/test/vec/exec/vfile_scanner_excep_test.cpp:309:24
#5 0x5cdbff5b191a in void
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test,
void>(testing::Test*, void (testing::Test::*)(), char const*)
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51eb491a)
(BuildId: 21d41a2d207823b9)
#6 0x5cdbff59f989 in void
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,
void>(testing::Test*, void (testing::Test::*)(), char const*)
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51ea2989)
(BuildId: 21d41a2d207823b9)
#7 0x5cdbff57a9c2 in testing::Test::Run()
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7d9c2)
(BuildId: 21d41a2d207823b9)
#8 0x5cdbff57b708 in testing::TestInfo::Run()
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7e708)
(BuildId: 21d41a2d207823b9)
#9 0x5cdbff57bec3 in testing::TestSuite::Run()
(/root/doris/workspace/doris/be/ut_build_ASAN/test/doris_be_test+0x51e7eec3)
(BuildId: 21d41a2d207823b9)



After fix:

I20240902 09:11:07.722273 1946048 run_all_tests.cpp:67] init config 1
Note: Google Test filter = VfileScannerE*
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from VfileScannerExceptionTest
[ RUN      ] VfileScannerExceptionTest.failure_case
msg = [INTERNAL_ERROR]cur path: . Failed to create reader for file
format: 11
[       OK ] VfileScannerExceptionTest.failure_case (3 ms)
[----------] 1 test from VfileScannerExceptionTest (3 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (3 ms total)
[  PASSED  ] 1 test.
=== Finished. Gtest output:
/root/doris/workspace/doris/be/ut_build_ASAN/gtest_output
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.x dev/3.0.3-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants