Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #53018

…rflow error (#53018)

### What problem does this PR solve?
Problem Summary:

```
==2403213==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x506001097220 at pc 0x55837edd7fe9 bp 0x7f7efe2dc830 sp 0x7f7efe2dbff8
READ of size 63 at 0x506001097220 thread T1262 (brpc_light)
    #0 0x55837edd7fe8 in strlen (/mnt/disk8/zhangsida/doris/output/be/lib/doris_be+0x2c8d7fe8) (BuildId: 5acbe48773972a88)
    #1 0x5583bd3ff969 in fmt::v7::detail::buffer_appender<char> fmt::v7::detail::write<char, fmt::v7::detail::buffer_appender<char>>(fmt::v7::detail::buffer_appender<char>, char const*) (/mnt/disk8/zhangsida/doris/output/be/lib/doris_be+0x6aeff969) (BuildId: 5acbe48773972a88)
    #2 0x5583bd41640e in char const* fmt::v7::detail::parse_replacement_field<char, fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&>(char const*, char const*, fmt::v7::detail::format_handler<fmt::v7::detail::buffer_appender<char>, char, fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<char>, char>>&) (/mnt/disk8/zhangsida/doris/output/be/lib/doris_be+0x6af1640e) (BuildId: 5acbe48773972a88)
    #3 0x5583bd416c7f in void fmt::v7::detail::vformat_to<char>(fmt::v7::detail::buffer<char>&, fmt::v7::basic_string_view<char>, fmt::v7::basic_format_args<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<fmt::v7::type_identity<char>::type>, fmt::v7::type_identity<char>::type>>, fmt::v7::detail::locale_ref) (/mnt/disk8/zhangsida/doris/output/be/lib/doris_be+0x6af16c7f) (BuildId: 5acbe48773972a88)
    #4 0x5583bd3f74aa in fmt::v7::detail::vformat[abi:cxx11](fmt::v7::basic_string_view<char>, fmt::v7::format_args) (/mnt/disk8/zhangsida/doris/output/be/lib/doris_be+0x6aef74aa) (BuildId: 5acbe48773972a88)
    #5 0x5583a6b4d3bb in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> fmt::v7::format<char [45], char const*&, char>(char const (&) [45], char const*&) /mnt/disk8/zhangsida/doris/thirdparty/installed/include/fmt/core.h:2076:10
    #6 0x5583a6b4d3bb in doris::vectorized::BitmapFromBase64::vector(doris::vectorized::PODArray<unsigned char, 4096ul, doris::Allocator<false, false, false, doris::NoTrackingDefaultMemoryAllocator>, 16ul, 15ul> const&, doris::vectorized::PODArray<unsigned int, 4096ul, doris::Allocator<false, false, false, doris::NoTrackingDefaultMemoryAllocator>, 16ul, 15ul> const&, std::vector<doris::BitmapValue, std::allocator<doris::BitmapValue>>&, doris::vectorized::PODArray<unsigned char, 4096ul, doris::Allocator<false, false, false, doris::NoTrackingDefaultMemoryAllocator>, 16ul, 15ul>&, unsigned long) /mnt/disk8/zhangsida/doris/be/src/vec/functions/function_bitmap.cpp:310:29
    #7 0x5583a6b4b93b in doris::vectorized::FunctionBitmapAlwaysNull<doris::vectorized::BitmapFromBase64>::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int, unsigned long) const /mnt/disk8/zhangsida/doris/be/src/vec/functions/function_bitmap.cpp:381:13
    #8 0x5583a02062ef in doris::vectorized::DefaultExecutable::execute_impl(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int, unsigned long) const /mnt/disk8/zhangsida/doris/be/src/vec/functions/function.h:459:26
    #9 0x5583a49d77e3 in doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int, unsigned long, bool) const /mnt/disk8/zhangsida/doris/be/src/vec/functions/function.cpp
    #10 0x5583a49d0bf8 in doris::vectorized::PreparedFunctionImpl::default_implementation_for_constant_arguments(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int, unsigned long, bool, bool*) const /mnt/disk8/zhangsida/doris/be/src/vec/functions/function.cpp:168:5
    #11 0x5583a49d3324 in doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns(doris::FunctionContext*, doris::vectorized::Block&, std::vector<unsigned int, std::allocator<unsigned int>> const&, unsigned int, unsigned long, bool) const /mnt/disk8/zhangsida/doris/be/src/vec/functions/function.cpp:237:5
```
@github-actions github-actions bot requested a review from dataroaring as a code owner July 10, 2025 07:06
@Thearas
Copy link
Contributor

Thearas commented Jul 10, 2025

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

Please clearly describe your PR:

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

@dataroaring dataroaring reopened this Jul 10, 2025
@Thearas
Copy link
Contributor

Thearas commented Jul 10, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17619	6687	6599	6599
q2	2055	196	210	196
q3	10476	1130	1153	1130
q4	10228	793	760	760
q5	7763	2828	2760	2760
q6	219	134	130	130
q7	960	617	605	605
q8	9356	1943	1987	1943
q9	6682	6392	6363	6363
q10	7008	2243	2292	2243
q11	466	259	261	259
q12	401	215	211	211
q13	17776	2986	2976	2976
q14	243	214	212	212
q15	517	483	474	474
q16	514	392	376	376
q17	963	543	596	543
q18	7165	6725	6762	6725
q19	1399	1045	1043	1043
q20	479	198	197	197
q21	3959	3313	3125	3125
q22	1071	936	965	936
Total cold run time: 107319 ms
Total hot run time: 39806 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6585	6582	6548	6548
q2	320	233	232	232
q3	2920	2854	2933	2854
q4	2036	1812	1782	1782
q5	5721	5755	5714	5714
q6	212	127	129	127
q7	2206	1856	1806	1806
q8	3364	3534	3517	3517
q9	8788	8917	8940	8917
q10	3611	3559	3547	3547
q11	606	509	495	495
q12	825	631	621	621
q13	9451	3192	3134	3134
q14	303	282	288	282
q15	511	463	478	463
q16	478	450	444	444
q17	1845	1641	1621	1621
q18	8217	7722	7750	7722
q19	1661	1602	1580	1580
q20	2073	1817	1799	1799
q21	5084	4999	5003	4999
q22	1127	1044	990	990
Total cold run time: 67944 ms
Total hot run time: 59194 ms

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 0.00% (0/2) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 41.21% (10948/26567)
Line Coverage 31.97% (93763/293312)
Region Coverage 31.12% (48354/155393)
Branch Coverage 27.56% (24769/89886)

@doris-robot
Copy link

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

query1	1312	914	911	911
query2	6289	2023	1945	1945
query3	10863	4441	4519	4441
query4	33541	23507	23803	23507
query5	3880	461	457	457
query6	289	183	193	183
query7	3990	317	340	317
query8	290	226	229	226
query9	9548	2585	2587	2585
query10	489	260	258	258
query11	17892	15345	15156	15156
query12	154	112	105	105
query13	1562	419	437	419
query14	9586	7111	7069	7069
query15	236	173	180	173
query16	8017	463	482	463
query17	1585	591	573	573
query18	2159	315	305	305
query19	231	167	154	154
query20	127	118	116	116
query21	198	105	105	105
query22	4829	4321	4471	4321
query23	34568	34347	34178	34178
query24	11650	2933	2915	2915
query25	700	422	410	410
query26	1393	175	167	167
query27	2715	355	360	355
query28	8137	2192	2180	2180
query29	930	468	449	449
query30	265	162	170	162
query31	1005	832	831	831
query32	107	56	54	54
query33	814	329	308	308
query34	1121	511	513	511
query35	853	754	721	721
query36	1105	944	923	923
query37	127	70	70	70
query38	4051	3917	3970	3917
query39	1512	1500	1473	1473
query40	254	109	102	102
query41	50	50	49	49
query42	109	105	107	105
query43	539	470	478	470
query44	1285	860	825	825
query45	186	165	165	165
query46	1159	733	753	733
query47	1964	1891	1936	1891
query48	494	380	404	380
query49	1107	426	401	401
query50	868	429	430	429
query51	7550	7194	7233	7194
query52	101	88	97	88
query53	265	184	195	184
query54	1163	459	464	459
query55	79	87	79	79
query56	276	259	247	247
query57	1314	1190	1211	1190
query58	234	207	208	207
query59	3265	3080	3098	3080
query60	286	265	261	261
query61	138	114	110	110
query62	862	702	681	681
query63	217	197	205	197
query64	5076	697	631	631
query65	3393	3300	3300	3300
query66	1294	302	292	292
query67	15723	15631	15571	15571
query68	4708	587	577	577
query69	433	265	263	263
query70	1154	1088	1083	1083
query71	322	265	252	252
query72	6218	4126	4022	4022
query73	757	355	356	355
query74	10417	8983	8961	8961
query75	3387	2674	2668	2668
query76	2664	1133	1124	1124
query77	392	285	290	285
query78	10445	9680	9593	9593
query79	1538	621	619	619
query80	832	434	428	428
query81	550	219	252	219
query82	732	90	90	90
query83	243	143	142	142
query84	240	75	84	75
query85	1546	302	290	290
query86	466	311	290	290
query87	4356	4240	4244	4240
query88	4304	2392	2393	2392
query89	418	289	293	289
query90	1881	184	198	184
query91	182	147	146	146
query92	61	51	49	49
query93	2485	559	550	550
query94	763	308	291	291
query95	368	250	255	250
query96	615	279	292	279
query97	3302	3145	3157	3145
query98	220	204	202	202
query99	1504	1275	1309	1275
Total cold run time: 304874 ms
Total hot run time: 197362 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.02
query2	0.06	0.04	0.03
query3	0.23	0.06	0.06
query4	1.63	0.10	0.10
query5	0.51	0.53	0.52
query6	1.14	0.72	0.72
query7	0.02	0.01	0.02
query8	0.04	0.03	0.04
query9	0.56	0.50	0.53
query10	0.56	0.56	0.59
query11	0.15	0.10	0.11
query12	0.14	0.11	0.10
query13	0.60	0.59	0.62
query14	0.77	0.81	0.81
query15	0.83	0.84	0.83
query16	0.40	0.39	0.38
query17	1.05	1.02	1.00
query18	0.22	0.21	0.21
query19	1.93	1.71	1.81
query20	0.01	0.01	0.01
query21	15.40	0.57	0.58
query22	2.74	2.51	1.67
query23	16.78	1.01	0.74
query24	2.81	0.78	1.18
query25	0.16	0.08	0.19
query26	0.45	0.13	0.13
query27	0.04	0.04	0.05
query28	10.82	0.48	0.47
query29	12.57	3.23	3.26
query30	0.24	0.06	0.05
query31	2.86	0.39	0.40
query32	3.23	0.48	0.46
query33	3.01	2.98	2.96
query34	17.09	4.44	4.44
query35	4.50	4.56	4.50
query36	0.67	0.50	0.47
query37	0.08	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.02	0.02
query40	0.15	0.14	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 104.72 s
Total hot run time: 29.57 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 1af1dcb into branch-3.0 Jul 11, 2025
22 of 25 checks passed
@github-actions github-actions bot deleted the auto-pick-53018-branch-3.0 branch July 11, 2025 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants