You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "w41ter (via GitHub)" <gi...@apache.org> on 2025/12/17 07:12:00 UTC

[PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

w41ter opened a new pull request, #59110:
URL: https://github.com/apache/doris/pull/59110

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Problem Summary:
   
   The deregister_hook function acquires the entity's lock, which is already held by the caller of JvmMetrics::update, leading to a deadlock. Moving deregister_hook to the destructor ensures proper lock acquisition order and resolves the deadlock condition.
   
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] 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 <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3664407509

   
   <details>
   <summary>ClickBench: <b>Total hot run time: 27.47 s</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
   ClickBench test result on commit 195c1634f08391844d85a5a18c309f780ab55ec5, data reload: false
   
   query1	0.06	0.05	0.05
   query2	0.09	0.05	0.05
   query3	0.26	0.08	0.08
   query4	1.61	0.12	0.12
   query5	0.26	0.25	0.27
   query6	1.15	0.62	0.64
   query7	0.03	0.02	0.02
   query8	0.06	0.05	0.04
   query9	0.60	0.51	0.51
   query10	0.55	0.55	0.55
   query11	0.16	0.11	0.11
   query12	0.15	0.12	0.11
   query13	0.62	0.59	0.61
   query14	0.99	0.99	0.97
   query15	0.81	0.79	0.81
   query16	0.40	0.41	0.40
   query17	1.00	1.07	1.02
   query18	0.24	0.21	0.22
   query19	1.82	1.84	1.87
   query20	0.02	0.02	0.01
   query21	15.44	0.31	0.15
   query22	4.80	0.05	0.05
   query23	16.04	0.28	0.09
   query24	1.25	0.62	0.32
   query25	0.07	0.08	0.10
   query26	0.14	0.14	0.14
   query27	0.08	0.05	0.04
   query28	3.67	1.24	1.03
   query29	12.62	4.07	3.31
   query30	0.28	0.14	0.13
   query31	2.81	0.62	0.40
   query32	3.23	0.56	0.45
   query33	2.96	3.07	2.99
   query34	17.00	5.20	4.49
   query35	4.58	4.60	4.61
   query36	0.65	0.50	0.50
   query37	0.10	0.06	0.07
   query38	0.07	0.05	0.04
   query39	0.05	0.03	0.03
   query40	0.17	0.14	0.14
   query41	0.08	0.04	0.03
   query42	0.04	0.03	0.03
   query43	0.05	0.04	0.03
   Total cold run time: 97.06 s
   Total hot run time: 27.47 s
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3665197830

   # BE Regression && UT Coverage Report
   Increment line coverage `75.00% (6/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/59110_195c1634f08391844d85a5a18c309f780ab55ec5_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/59110_195c1634f08391844d85a5a18c309f780ab55ec5_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 72.25% (24966/34556) |
   | Line Coverage     | 59.03% (262290/444320) |
   | Region Coverage   | 53.99% (218296/404357) |
   | Branch Coverage   | 55.43% (93389/168480) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "w41ter (via GitHub)" <gi...@apache.org>.
w41ter merged PR #59110:
URL: https://github.com/apache/doris/pull/59110


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3663990501

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/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?
       


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3666750184

   PR approved by anyone and no changes requested.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3666750055

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3664678037

   # BE UT Coverage Report
   Increment line coverage `0.00% (0/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/195c1634f08391844d85a5a18c309f780ab55ec5_195c1634f08391844d85a5a18c309f780ab55ec5/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/195c1634f08391844d85a5a18c309f780ab55ec5_195c1634f08391844d85a5a18c309f780ab55ec5/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 53.39% (18827/35263) |
   | Line Coverage     | 39.18% (174339/444939) |
   | Region Coverage   | 33.76% (134955/399730) |
   | Branch Coverage   | 34.65% (58092/167669) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "w41ter (via GitHub)" <gi...@apache.org>.
w41ter commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3663992818

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3664336678

   
   <details>
   <summary>TPC-H: <b>Total hot run time: 35068 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
   Tpch sf100 test result on commit 195c1634f08391844d85a5a18c309f780ab55ec5, data reload: false
   
   ------ Round 1 ----------------------------------
   q1	17629	4383	4222	4222
   q2	2039	349	234	234
   q3	10204	1324	756	756
   q4	10226	926	318	318
   q5	7534	2169	1918	1918
   q6	189	175	134	134
   q7	994	866	708	708
   q8	9364	1455	1115	1115
   q9	7363	5296	5327	5296
   q10	6863	2388	1975	1975
   q11	531	317	292	292
   q12	703	741	594	594
   q13	17793	3707	3062	3062
   q14	298	291	270	270
   q15	610	528	512	512
   q16	709	691	633	633
   q17	688	812	573	573
   q18	8406	7032	7028	7028
   q19	1528	975	605	605
   q20	393	370	248	248
   q21	4215	3939	3619	3619
   q22	1003	994	956	956
   Total cold run time: 109282 ms
   Total hot run time: 35068 ms
   
   ----- Round 2, with runtime_filter_mode=off -----
   q1	4165	4067	4031	4031
   q2	336	406	304	304
   q3	2176	2665	2319	2319
   q4	1336	1757	1361	1361
   q5	4243	4890	4645	4645
   q6	232	178	133	133
   q7	2009	2012	1849	1849
   q8	2663	2604	2501	2501
   q9	7498	7487	7488	7487
   q10	3117	3205	2891	2891
   q11	598	525	602	525
   q12	702	768	621	621
   q13	3593	4225	3206	3206
   q14	307	324	294	294
   q15	562	505	509	505
   q16	677	699	673	673
   q17	1201	1530	1429	1429
   q18	7770	7694	7540	7540
   q19	886	862	897	862
   q20	2172	2038	1916	1916
   q21	4872	4363	4082	4082
   q22	1089	1048	990	990
   Total cold run time: 52204 ms
   Total hot run time: 50164 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3668055460

   # BE Regression && UT Coverage Report
   Increment line coverage `75.00% (6/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/59110_195c1634f08391844d85a5a18c309f780ab55ec5_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/59110_195c1634f08391844d85a5a18c309f780ab55ec5_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 72.25% (24966/34556) |
   | Line Coverage     | 59.03% (262290/444320) |
   | Region Coverage   | 53.99% (218296/404357) |
   | Branch Coverage   | 55.43% (93389/168480) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3668301772

   # BE Regression && UT Coverage Report
   Increment line coverage `75.00% (6/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/59110_195c1634f08391844d85a5a18c309f780ab55ec5_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/59110_195c1634f08391844d85a5a18c309f780ab55ec5_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 72.29% (24979/34556) |
   | Line Coverage     | 59.07% (262475/444320) |
   | Region Coverage   | 54.02% (218429/404357) |
   | Branch Coverage   | 55.48% (93472/168480) |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [fix](metrics) resolve deadlock by moving deregister_hook to destructor [doris]

Posted by "doris-robot (via GitHub)" <gi...@apache.org>.
doris-robot commented on PR #59110:
URL: https://github.com/apache/doris/pull/59110#issuecomment-3664387842

   
   <details>
   <summary>TPC-DS: <b>Total hot run time: 177684 ms</b></summary>
   
   ```
   machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
   scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
   TPC-DS sf100 test result on commit 195c1634f08391844d85a5a18c309f780ab55ec5, data reload: false
   
   query5	4729	603	442	442
   query6	346	221	199	199
   query7	4218	480	274	274
   query8	323	244	259	244
   query9	8777	2528	2493	2493
   query10	493	383	325	325
   query11	15241	15064	14847	14847
   query12	171	128	124	124
   query13	1288	502	389	389
   query14	5474	2982	2725	2725
   query14_1	2634	2635	2602	2602
   query15	214	204	184	184
   query16	850	471	433	433
   query17	1124	714	618	618
   query18	2445	444	352	352
   query19	257	235	209	209
   query20	124	116	111	111
   query21	253	139	116	116
   query22	3921	3950	3824	3824
   query23	16752	16162	15934	15934
   query23_1	16078	16032	16011	16011
   query24	7339	1647	1230	1230
   query24_1	1229	1213	1246	1213
   query25	552	469	413	413
   query26	1255	264	156	156
   query27	2773	462	304	304
   query28	4468	2126	2122	2122
   query29	786	546	437	437
   query30	319	251	218	218
   query31	808	703	625	625
   query32	74	70	66	66
   query33	531	349	302	302
   query34	906	895	539	539
   query35	771	805	728	728
   query36	872	903	812	812
   query37	120	93	76	76
   query38	2857	2866	2797	2797
   query39	747	752	731	731
   query39_1	703	685	725	685
   query40	223	134	117	117
   query41	65	61	62	61
   query42	101	104	106	104
   query43	434	429	409	409
   query44	1350	744	737	737
   query45	193	195	179	179
   query46	878	966	611	611
   query47	1626	1703	1599	1599
   query48	316	322	246	246
   query49	619	438	348	348
   query50	658	286	227	227
   query51	3822	3801	3778	3778
   query52	105	109	96	96
   query53	319	360	291	291
   query54	282	259	245	245
   query55	80	74	72	72
   query56	283	284	289	284
   query57	1149	1133	1069	1069
   query58	272	264	254	254
   query59	2444	2540	2373	2373
   query60	310	303	290	290
   query61	164	160	153	153
   query62	707	656	601	601
   query63	325	290	307	290
   query64	5030	1303	993	993
   query65	4009	3959	3955	3955
   query66	1482	448	312	312
   query67	15034	14949	14592	14592
   query68	2996	1046	752	752
   query69	490	346	308	308
   query70	1054	974	969	969
   query71	326	306	270	270
   query72	6194	4968	5361	4968
   query73	572	726	315	315
   query74	8824	8854	8615	8615
   query75	3189	3183	2803	2803
   query76	3455	1138	726	726
   query77	529	404	302	302
   query78	9508	9531	8867	8867
   query79	1004	936	634	634
   query80	1145	688	604	604
   query81	561	274	239	239
   query82	230	136	105	105
   query83	409	261	250	250
   query84	257	126	106	106
   query85	1097	504	459	459
   query86	325	300	295	295
   query87	3019	2988	2898	2898
   query88	3192	2281	2260	2260
   query89	475	418	383	383
   query90	1922	160	150	150
   query91	170	164	147	147
   query92	74	69	58	58
   query93	978	907	564	564
   query94	497	304	276	276
   query95	570	321	350	321
   query96	594	491	207	207
   query97	2242	2326	2192	2192
   query98	212	200	187	187
   query99	1263	1258	1180	1180
   Total cold run time: 252086 ms
   Total hot run time: 177684 ms
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org