Skip to content

[Fix](memory) Add try catch block for call to DorisCallOnce::call()#47605

Closed
bobhan1 wants to merge 3 commits into
apache:masterfrom
bobhan1:catch-for-load_pk_index_and_bf
Closed

[Fix](memory) Add try catch block for call to DorisCallOnce::call()#47605
bobhan1 wants to merge 3 commits into
apache:masterfrom
bobhan1:catch-for-load_pk_index_and_bf

Conversation

@bobhan1
Copy link
Copy Markdown
Contributor

@bobhan1 bobhan1 commented Feb 7, 2025

What problem does this PR solve?

Currently, memory allocation failure exception will only be thrown when there exists RETURN_IF_CATCH_EXCEPTION/... in some frame in the calling stack. However, DorisCallOnce will catch and store the exception thrown by inner function and re-throw it for later calls in maybe different calling stack in which there is no try catch block. In this case, it will cause coredump. So this PR add try catch block for every call to DorisCallOnce::call() to avoid coredump.

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

@hello-stephen
Copy link
Copy Markdown
Contributor

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?

@bobhan1
Copy link
Copy Markdown
Contributor Author

bobhan1 commented Feb 7, 2025

run buildall

@doris-robot
Copy link
Copy Markdown

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

------ Round 1 ----------------------------------
q1	17565	5340	5062	5062
q2	2054	292	164	164
q3	10428	1248	749	749
q4	10216	1010	539	539
q5	7528	2697	2379	2379
q6	187	167	136	136
q7	912	756	596	596
q8	9308	1341	1098	1098
q9	4821	4855	4568	4568
q10	6817	2320	1889	1889
q11	491	271	255	255
q12	344	348	211	211
q13	17792	3698	3076	3076
q14	231	224	210	210
q15	523	458	459	458
q16	631	625	588	588
q17	558	870	333	333
q18	6712	6353	6250	6250
q19	1216	964	535	535
q20	317	321	188	188
q21	2792	2323	1918	1918
q22	361	330	296	296
Total cold run time: 101804 ms
Total hot run time: 31498 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5121	5161	5118	5118
q2	247	332	233	233
q3	2145	2667	2326	2326
q4	1423	1825	1326	1326
q5	4219	4196	4205	4196
q6	205	166	124	124
q7	1909	1842	1726	1726
q8	2628	2580	2598	2580
q9	7306	7228	7198	7198
q10	3035	3199	2807	2807
q11	606	501	517	501
q12	699	778	651	651
q13	3379	3967	3259	3259
q14	292	321	269	269
q15	510	481	471	471
q16	653	681	652	652
q17	1130	1655	1302	1302
q18	7631	7409	7303	7303
q19	776	782	992	782
q20	1979	2101	1850	1850
q21	5558	5096	4766	4766
q22	629	591	550	550
Total cold run time: 52080 ms
Total hot run time: 49990 ms

@doris-robot
Copy link
Copy Markdown

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

query1	1320	962	937	937
query2	6206	1917	1891	1891
query3	10971	4555	4627	4555
query4	53892	25860	23302	23302
query5	5218	532	482	482
query6	360	184	175	175
query7	5131	523	287	287
query8	322	240	237	237
query9	6458	2526	2515	2515
query10	408	315	243	243
query11	15357	15087	14877	14877
query12	150	110	104	104
query13	1166	511	369	369
query14	10596	6881	6663	6663
query15	209	193	192	192
query16	6980	636	467	467
query17	1082	707	563	563
query18	1514	410	293	293
query19	196	190	155	155
query20	136	127	122	122
query21	208	123	105	105
query22	4564	4589	4571	4571
query23	34000	33503	33311	33311
query24	6063	2399	2430	2399
query25	465	463	416	416
query26	622	274	158	158
query27	1766	494	335	335
query28	2797	2442	2437	2437
query29	566	563	459	459
query30	222	188	161	161
query31	901	876	818	818
query32	76	66	62	62
query33	448	382	310	310
query34	765	892	513	513
query35	840	878	768	768
query36	975	1030	912	912
query37	125	107	85	85
query38	4217	4233	4291	4233
query39	1535	1472	1612	1472
query40	220	120	108	108
query41	55	61	53	53
query42	125	106	107	106
query43	490	530	491	491
query44	1305	805	815	805
query45	181	173	208	173
query46	900	1088	647	647
query47	1853	1869	1764	1764
query48	386	409	303	303
query49	693	485	420	420
query50	746	744	427	427
query51	4292	4309	4237	4237
query52	108	101	99	99
query53	245	261	190	190
query54	489	481	412	412
query55	86	86	86	86
query56	259	292	258	258
query57	1183	1189	1130	1130
query58	249	240	237	237
query59	2717	3041	2814	2814
query60	278	277	260	260
query61	121	119	123	119
query62	733	759	670	670
query63	228	198	189	189
query64	1373	1045	673	673
query65	3213	3190	3137	3137
query66	761	387	292	292
query67	16033	15580	15493	15493
query68	5524	756	504	504
query69	584	297	259	259
query70	1253	1098	1126	1098
query71	450	287	282	282
query72	5527	3698	3842	3698
query73	1154	750	350	350
query74	8964	9235	8892	8892
query75	3207	3171	2691	2691
query76	3930	1183	742	742
query77	545	349	276	276
query78	10214	10234	9355	9355
query79	2901	800	580	580
query80	849	525	436	436
query81	534	280	232	232
query82	412	148	129	129
query83	186	168	147	147
query84	286	100	77	77
query85	773	345	301	301
query86	433	318	305	305
query87	4415	4586	4345	4345
query88	3692	2158	2124	2124
query89	401	310	280	280
query90	1712	188	189	188
query91	132	135	107	107
query92	76	59	59	59
query93	2723	1005	565	565
query94	715	375	293	293
query95	344	266	259	259
query96	475	579	263	263
query97	2781	2864	2739	2739
query98	237	213	205	205
query99	1340	1390	1290	1290
Total cold run time: 294918 ms
Total hot run time: 190618 ms

@doris-robot
Copy link
Copy Markdown

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.08
query4	1.61	0.09	0.10
query5	0.42	0.43	0.39
query6	1.16	0.65	0.66
query7	0.02	0.02	0.01
query8	0.04	0.04	0.03
query9	0.58	0.52	0.54
query10	0.58	0.58	0.57
query11	0.14	0.11	0.11
query12	0.15	0.11	0.11
query13	0.62	0.60	0.61
query14	2.69	2.70	2.67
query15	0.91	0.86	0.86
query16	0.39	0.37	0.38
query17	1.04	1.02	1.03
query18	0.22	0.19	0.20
query19	1.90	1.79	1.96
query20	0.01	0.01	0.02
query21	15.37	0.92	0.55
query22	0.74	1.19	0.59
query23	15.02	1.35	0.62
query24	6.99	1.37	0.81
query25	0.51	0.20	0.17
query26	0.60	0.16	0.14
query27	0.06	0.05	0.05
query28	9.42	0.90	0.44
query29	12.52	3.97	3.32
query30	0.24	0.08	0.06
query31	2.82	0.58	0.38
query32	3.23	0.54	0.46
query33	2.96	3.03	3.03
query34	15.63	5.08	4.45
query35	4.56	4.49	4.55
query36	0.66	0.50	0.47
query37	0.09	0.07	0.07
query38	0.05	0.03	0.03
query39	0.03	0.02	0.02
query40	0.17	0.14	0.13
query41	0.09	0.03	0.02
query42	0.04	0.02	0.03
query43	0.04	0.03	0.03
Total cold run time: 104.66 s
Total hot run time: 30.47 s

@doris-robot
Copy link
Copy Markdown

TeamCity be ut coverage result:
Function Coverage: 42.06% (11018/26193)
Line Coverage: 32.33% (92993/287635)
Region Coverage: 31.51% (47699/151389)
Branch Coverage: 27.52% (24125/87674)
Coverage Report: http://coverage.selectdb-in.cc/coverage/cad2c5f4d7b8d872d31aac332a420867db412455_cad2c5f4d7b8d872d31aac332a420867db412455/report/index.html

dataroaring
dataroaring previously approved these changes Feb 7, 2025
Copy link
Copy Markdown
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 Feb 7, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 7, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 7, 2025

PR approved by anyone and no changes requested.

zhannngchen
zhannngchen previously approved these changes Feb 8, 2025
Copy link
Copy Markdown
Contributor

@zhannngchen zhannngchen left a comment

Choose a reason for hiding this comment

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

LGTM

@bobhan1 bobhan1 dismissed stale reviews from zhannngchen and dataroaring via d9024f1 February 8, 2025 05:13
@bobhan1 bobhan1 force-pushed the catch-for-load_pk_index_and_bf branch from cad2c5f to d9024f1 Compare February 8, 2025 05:13
@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label Feb 8, 2025
@bobhan1 bobhan1 changed the title [Fix](memory) Catch exception for insert_many_continuous_binary_data() [Fix](memory) Add try catch block for call to DorisCallOnce::call() Feb 8, 2025
@bobhan1 bobhan1 force-pushed the catch-for-load_pk_index_and_bf branch from d617079 to 2f22f6c Compare February 8, 2025 06:33
@bobhan1 bobhan1 closed this Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants