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

[ub](pod array) fix applying non-zero offset 16 to null pointer #36086

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

Mryange
Copy link
Contributor

@Mryange Mryange commented Jun 10, 2024

Proposed changes

/root/doris/be/src/vec/common/pod_array.h:448:13: runtime error: applying non-zero offset 16 to null pointer
    #0 0x562f904159f3 in void doris::vectorized::PODArray<doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::PatternAction, 64ul, AllocatorWithStackMemory<Allocator<false, false, false>, 64ul, 8ul>, 0ul, 0ul>::emplace_back<doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::PatternActionType>(doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::PatternActionType&&) /root/doris/be/src/vec/common/pod_array.h:448:13
    #1 0x562f90412d6a in doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::parse_pattern() /root/doris/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h:208:17
    #2 0x562f9040a824 in doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long) /root/doris/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h:95:13

this->c_end may be nullptr

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

@Mryange
Copy link
Contributor Author

Mryange commented Jun 10, 2024

run buildall

Copy link
Contributor

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17614	4325	4243	4243
q2	2016	196	188	188
q3	10445	1148	1175	1148
q4	10180	766	783	766
q5	7504	2640	2633	2633
q6	217	134	135	134
q7	963	600	594	594
q8	9223	2061	2033	2033
q9	8998	6483	6466	6466
q10	9021	3690	3680	3680
q11	433	246	239	239
q12	501	232	228	228
q13	18746	3012	3001	3001
q14	265	224	219	219
q15	526	469	464	464
q16	498	370	371	370
q17	957	723	690	690
q18	7974	7446	7334	7334
q19	6992	1526	1515	1515
q20	640	320	317	317
q21	4831	3893	3273	3273
q22	381	332	332	332
Total cold run time: 118925 ms
Total hot run time: 39867 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4431	4226	4246	4226
q2	365	272	259	259
q3	3041	2901	2871	2871
q4	1951	1719	1710	1710
q5	5514	5514	5425	5425
q6	221	129	128	128
q7	2220	1896	1832	1832
q8	3246	3435	3392	3392
q9	8710	8735	8653	8653
q10	4185	3699	3805	3699
q11	590	487	508	487
q12	800	658	628	628
q13	16213	3149	3152	3149
q14	300	283	292	283
q15	529	491	490	490
q16	521	438	439	438
q17	1800	1539	1502	1502
q18	8177	7923	7801	7801
q19	1878	1661	1612	1612
q20	3148	1866	1847	1847
q21	5074	4947	4629	4629
q22	642	564	552	552
Total cold run time: 73556 ms
Total hot run time: 55613 ms

@doris-robot
Copy link

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

query1	935	376	375	375
query2	6466	2425	2282	2282
query3	6652	205	207	205
query4	18894	17257	17353	17257
query5	3590	457	442	442
query6	238	173	158	158
query7	4595	292	291	291
query8	322	299	296	296
query9	8590	2388	2396	2388
query10	564	298	308	298
query11	10585	10039	10150	10039
query12	115	94	83	83
query13	1628	355	367	355
query14	10029	7376	7675	7376
query15	236	190	188	188
query16	7766	256	264	256
query17	1910	540	519	519
query18	1953	270	269	269
query19	184	151	148	148
query20	98	82	84	82
query21	212	130	130	130
query22	4524	4217	3972	3972
query23	33706	33774	33671	33671
query24	10756	2762	2921	2762
query25	562	351	355	351
query26	705	148	147	147
query27	2268	317	318	317
query28	5961	2034	2004	2004
query29	847	587	622	587
query30	229	144	147	144
query31	956	736	730	730
query32	97	54	53	53
query33	680	281	268	268
query34	864	470	467	467
query35	742	632	611	611
query36	1091	951	949	949
query37	133	69	68	68
query38	2926	2848	2857	2848
query39	881	847	846	846
query40	220	130	124	124
query41	60	50	54	50
query42	125	99	101	99
query43	588	561	579	561
query44	1138	770	757	757
query45	190	186	178	178
query46	1116	750	736	736
query47	1952	1840	1848	1840
query48	386	310	296	296
query49	886	449	450	449
query50	797	390	398	390
query51	6903	6837	6676	6676
query52	107	86	96	86
query53	359	290	287	287
query54	864	432	434	432
query55	77	74	72	72
query56	271	252	260	252
query57	1135	1053	1040	1040
query58	232	243	238	238
query59	3293	3286	3199	3199
query60	296	281	260	260
query61	84	85	89	85
query62	619	450	434	434
query63	312	285	285	285
query64	8466	2177	1732	1732
query65	3161	3105	3130	3105
query66	738	323	326	323
query67	15326	14900	14908	14900
query68	4757	537	529	529
query69	606	485	405	405
query70	1118	1130	1104	1104
query71	405	277	275	275
query72	7958	5916	2732	2732
query73	754	316	317	316
query74	5868	5523	5530	5523
query75	3465	2708	2687	2687
query76	2858	891	951	891
query77	598	289	294	289
query78	10551	9842	9790	9790
query79	1688	524	502	502
query80	691	461	450	450
query81	575	219	218	218
query82	736	104	100	100
query83	184	163	162	162
query84	235	85	80	80
query85	1193	273	256	256
query86	459	296	331	296
query87	3290	3100	3111	3100
query88	3936	2337	2322	2322
query89	457	383	382	382
query90	1694	192	195	192
query91	126	93	98	93
query92	60	47	48	47
query93	1773	499	509	499
query94	968	187	185	185
query95	465	310	306	306
query96	592	267	259	259
query97	3169	3009	3025	3009
query98	214	200	199	199
query99	1231	853	844	844
Total cold run time: 265865 ms
Total hot run time: 171160 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.08	0.03	0.04
query3	0.24	0.05	0.05
query4	1.68	0.07	0.08
query5	0.51	0.49	0.49
query6	1.12	0.71	0.72
query7	0.02	0.02	0.01
query8	0.04	0.04	0.04
query9	0.53	0.51	0.49
query10	0.55	0.56	0.54
query11	0.15	0.11	0.12
query12	0.14	0.11	0.12
query13	0.59	0.59	0.60
query14	0.78	0.77	0.79
query15	0.83	0.82	0.82
query16	0.37	0.36	0.36
query17	1.03	0.98	1.04
query18	0.19	0.27	0.20
query19	1.88	1.69	1.85
query20	0.02	0.01	0.01
query21	15.41	0.67	0.67
query22	4.18	7.84	1.72
query23	18.28	1.35	1.23
query24	2.12	0.23	0.21
query25	0.15	0.09	0.09
query26	0.27	0.18	0.17
query27	0.08	0.08	0.10
query28	13.21	1.00	1.00
query29	12.57	3.27	3.25
query30	0.25	0.06	0.07
query31	2.84	0.38	0.38
query32	3.28	0.48	0.46
query33	2.87	2.89	2.84
query34	16.94	4.37	4.48
query35	4.47	4.50	4.49
query36	0.66	0.46	0.47
query37	0.17	0.15	0.14
query38	0.15	0.15	0.14
query39	0.04	0.03	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.04	0.04	0.04
Total cold run time: 109.1 s
Total hot run time: 30.17 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.44% (8976/24630)
Line Coverage: 27.98% (73360/262199)
Region Coverage: 27.38% (38021/138860)
Branch Coverage: 24.00% (19309/80450)
Coverage Report: http://coverage.selectdb-in.cc/coverage/ba6d8065861bb9704560e04820303da0658235e6_ba6d8065861bb9704560e04820303da0658235e6/report/index.html

@Mryange Mryange marked this pull request as draft June 11, 2024 02:39
@Mryange Mryange marked this pull request as ready for review June 12, 2024 02:18
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 12, 2024
Copy link
Contributor

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

Copy link
Contributor

PR approved by anyone and no changes requested.

@BiteTheDDDDt BiteTheDDDDt merged commit 9b6d50b into apache:master Jun 12, 2024
27 of 30 checks passed
dataroaring pushed a commit that referenced this pull request Jun 13, 2024
## Proposed changes

```
/root/doris/be/src/vec/common/pod_array.h:448:13: runtime error: applying non-zero offset 16 to null pointer
    #0 0x562f904159f3 in void doris::vectorized::PODArray<doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::PatternAction, 64ul, AllocatorWithStackMemory<Allocator<false, false, false>, 64ul, 8ul>, 0ul, 0ul>::emplace_back<doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::PatternActionType>(doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::PatternActionType&&) /root/doris/be/src/vec/common/pod_array.h:448:13
    #1 0x562f90412d6a in doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::parse_pattern() /root/doris/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h:208:17
    #2 0x562f9040a824 in doris::vectorized::AggregateFunctionSequenceMatchData<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long, doris::vectorized::AggregateFunctionSequenceMatch<doris::DateV2Value<doris::DateTimeV2ValueType>, unsigned long> >::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned long) /root/doris/be/src/vec/aggregate_functions/aggregate_function_sequence_match.h:95:13
```

this->c_end may be nullptr
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/3.0.0-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants