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](beut) fix core in exchange sink test #47926

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

Mryange
Copy link
Contributor

@Mryange Mryange commented Feb 14, 2025

What problem does this PR solve?

In BE_TEST, a query context is not initialized, resulting in a core dump.

==1732796==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000001e0 (pc 0x55c664a74e74 bp 0x7ffcc76e9d20 sp 0x7ffcc76e9cf0 T0)
==1732796==The signal is caused by a READ memory access.
==1732796==Hint: address points to the zero page.
    #0 0x55c664a74e74 in std::__shared_ptr<doris::ResourceContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<doris::ResourceContext, (__gnu_cxx::_Lock_policy)2> const&) /mnt/disk6/common/ldb_toolchain_robin/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1522:7
    #1 0x55c664a74e0e in std::shared_ptr<doris::ResourceContext>::shared_ptr(std::shared_ptr<doris::ResourceContext> const&) /mnt/disk6/common/ldb_toolchain_robin/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:204:7
    #2 0x55c66878ff18 in doris::QueryContext::resource_ctx() /mnt/disk12/yanxuecheng/doris/be/src/runtime/query_context.h:292:62
    #3 0x55c69a2f2c19 in doris::vectorized::BlockSerializer::serialize_block(doris::vectorized::Block const*,

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Mryange
Copy link
Contributor Author

Mryange commented Feb 14, 2025

run buildall

@Thearas
Copy link
Contributor

Thearas commented Feb 14, 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?

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17586	5208	5120	5120
q2	2049	297	172	172
q3	10400	1342	716	716
q4	10219	1005	538	538
q5	7518	2435	2345	2345
q6	201	167	137	137
q7	896	738	600	600
q8	9307	1331	1108	1108
q9	4982	4793	4771	4771
q10	6840	2329	1884	1884
q11	462	283	259	259
q12	346	348	221	221
q13	17773	3765	3138	3138
q14	229	221	204	204
q15	506	473	462	462
q16	613	615	570	570
q17	580	881	344	344
q18	6643	6222	6225	6222
q19	1213	953	558	558
q20	325	331	196	196
q21	3052	2153	2024	2024
q22	360	333	317	317
Total cold run time: 102100 ms
Total hot run time: 31906 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5166	5158	5195	5158
q2	231	323	231	231
q3	2184	2709	2228	2228
q4	1451	1870	1368	1368
q5	4236	4156	4169	4156
q6	208	164	126	126
q7	1877	1819	1736	1736
q8	2643	2709	2634	2634
q9	7194	7083	7090	7083
q10	2995	3180	2758	2758
q11	573	521	487	487
q12	683	761	617	617
q13	3484	3976	3262	3262
q14	277	289	265	265
q15	501	460	463	460
q16	641	684	639	639
q17	1114	1617	1331	1331
q18	7427	7341	7204	7204
q19	801	835	877	835
q20	1932	1989	1891	1891
q21	5416	4952	4751	4751
q22	627	581	576	576
Total cold run time: 51661 ms
Total hot run time: 49796 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 183512 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 54306f56cfdaf9130947ef92add296cfb509a22d, data reload: false

query1	969	392	372	372
query2	6548	1912	1834	1834
query3	6788	217	211	211
query4	26485	23751	23057	23057
query5	4343	667	499	499
query6	299	199	218	199
query7	4610	500	313	313
query8	281	220	213	213
query9	8607	2504	2492	2492
query10	452	308	255	255
query11	15697	15182	14927	14927
query12	160	107	105	105
query13	1657	493	364	364
query14	9078	6822	6112	6112
query15	202	196	180	180
query16	7161	592	477	477
query17	1186	719	566	566
query18	1934	405	328	328
query19	192	192	158	158
query20	118	116	114	114
query21	209	123	103	103
query22	4157	4299	4305	4299
query23	34465	33339	32948	32948
query24	7894	2445	2449	2445
query25	582	467	416	416
query26	1258	271	156	156
query27	2419	482	343	343
query28	4164	2400	2372	2372
query29	795	572	463	463
query30	237	180	155	155
query31	937	893	779	779
query32	72	72	63	63
query33	547	356	293	293
query34	786	858	503	503
query35	802	803	739	739
query36	978	1019	915	915
query37	122	102	71	71
query38	4103	4092	4106	4092
query39	1423	1378	1390	1378
query40	205	112	109	109
query41	56	53	105	53
query42	120	107	101	101
query43	527	528	520	520
query44	1291	780	775	775
query45	176	170	155	155
query46	861	1038	643	643
query47	1772	1793	1712	1712
query48	380	415	298	298
query49	771	485	402	402
query50	676	717	429	429
query51	4127	4191	4087	4087
query52	106	103	92	92
query53	220	254	201	201
query54	490	513	403	403
query55	79	78	81	78
query56	267	281	254	254
query57	1154	1122	1064	1064
query58	250	226	245	226
query59	2868	3047	2833	2833
query60	281	275	256	256
query61	115	116	110	110
query62	769	723	657	657
query63	226	186	188	186
query64	4428	986	647	647
query65	3213	3133	3122	3122
query66	1117	393	295	295
query67	15961	15554	15465	15465
query68	8062	764	493	493
query69	485	289	271	271
query70	1195	1119	1133	1119
query71	385	302	302	302
query72	5704	3552	3921	3552
query73	755	725	347	347
query74	8966	9109	8863	8863
query75	3137	3121	2697	2697
query76	3258	1174	768	768
query77	468	379	282	282
query78	9985	10241	9335	9335
query79	2011	800	588	588
query80	762	539	461	461
query81	542	323	240	240
query82	436	124	95	95
query83	172	174	150	150
query84	246	91	74	74
query85	743	353	295	295
query86	408	313	293	293
query87	4447	4402	4346	4346
query88	2885	2209	2183	2183
query89	379	365	280	280
query90	1875	193	194	193
query91	139	134	106	106
query92	79	59	59	59
query93	1641	1049	580	580
query94	717	411	302	302
query95	363	272	261	261
query96	481	554	265	265
query97	2788	2845	2741	2741
query98	228	207	214	207
query99	1316	1382	1282	1282
Total cold run time: 270281 ms
Total hot run time: 183512 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.03
query3	0.25	0.06	0.06
query4	1.61	0.10	0.10
query5	0.42	0.42	0.39
query6	1.17	0.66	0.66
query7	0.02	0.02	0.02
query8	0.04	0.03	0.04
query9	0.59	0.52	0.52
query10	0.58	0.59	0.57
query11	0.16	0.11	0.11
query12	0.14	0.11	0.12
query13	0.62	0.60	0.61
query14	2.71	2.71	2.73
query15	0.92	0.87	0.85
query16	0.37	0.38	0.37
query17	1.02	1.04	1.05
query18	0.21	0.19	0.19
query19	1.91	1.81	1.97
query20	0.01	0.01	0.01
query21	15.39	0.93	0.56
query22	0.76	1.17	0.69
query23	14.90	1.39	0.64
query24	8.03	2.12	1.32
query25	0.50	0.26	0.17
query26	0.67	0.18	0.14
query27	0.06	0.05	0.04
query28	9.22	0.90	0.43
query29	12.58	3.95	3.36
query30	0.25	0.09	0.06
query31	2.84	0.59	0.39
query32	3.22	0.56	0.46
query33	3.06	2.98	3.03
query34	15.74	5.15	4.54
query35	4.55	4.58	4.59
query36	0.67	0.49	0.49
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.02
query40	0.16	0.13	0.12
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.03	0.04	0.03
Total cold run time: 105.77 s
Total hot run time: 31.38 s

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 43.34% (11317/26110)
Line Coverage: 33.34% (95009/284975)
Region Coverage: 32.14% (48717/151555)
Branch Coverage: 27.96% (24562/87850)
Coverage Report: http://coverage.selectdb-in.cc/coverage/54306f56cfdaf9130947ef92add296cfb509a22d_54306f56cfdaf9130947ef92add296cfb509a22d/report/index.html

Copy link
Member

@airborne12 airborne12 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 Feb 14, 2025
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 68662f9 into apache:master Feb 14, 2025
29 of 32 checks passed
lzyy2024 pushed a commit to lzyy2024/doris that referenced this pull request Feb 21, 2025
### What problem does this PR solve?

In BE_TEST, a query context is not initialized, resulting in a core
dump.
```
==1732796==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000001e0 (pc 0x55c664a74e74 bp 0x7ffcc76e9d20 sp 0x7ffcc76e9cf0 T0)
==1732796==The signal is caused by a READ memory access.
==1732796==Hint: address points to the zero page.
    #0 0x55c664a74e74 in std::__shared_ptr<doris::ResourceContext, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<doris::ResourceContext, (__gnu_cxx::_Lock_policy)2> const&) /mnt/disk6/common/ldb_toolchain_robin/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr_base.h:1522:7
    apache#1 0x55c664a74e0e in std::shared_ptr<doris::ResourceContext>::shared_ptr(std::shared_ptr<doris::ResourceContext> const&) /mnt/disk6/common/ldb_toolchain_robin/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/shared_ptr.h:204:7
    apache#2 0x55c66878ff18 in doris::QueryContext::resource_ctx() /mnt/disk12/yanxuecheng/doris/be/src/runtime/query_context.h:292:62
    apache#3 0x55c69a2f2c19 in doris::vectorized::BlockSerializer::serialize_block(doris::vectorized::Block const*,
```

Problem Summary:

### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [x] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [x] Confirm the release note
- [x] Confirm test cases
- [x] Confirm document
- [x] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
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. reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants