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

[Linux] Run only one GLib main event loop #23320

Merged
merged 10 commits into from
Nov 4, 2022

Conversation

arkq
Copy link
Contributor

@arkq arkq commented Oct 24, 2022

Problem

When Linux platform uses WiFi (wpa_supplicant) and BLE (BlueZ) it runs one GLib main event loop per remote D-Bus service (one for wpa_supplicant and one for BlueZ). It is possible to handle all D-Bus related processing in one event loop - it's not required to start new thread for every D-Bus connection (D-Bus socket messages are handled in only one context any way - D-Bus connection is shared). Also, new WiFi address changer thread is started every time the PlatformManagerImpl::_InitChipStack() is called, but previous one is not terminated when calling PlatformManagerImpl::_Shutdown() - thread leakage can be seen when running ./tests/TestPlatformMgr test.

Changes

  • run only one GLib main event loop per Matter SDK
  • stop GLib main event loop thread when calling PlatformManagerImpl::_Shutdown()
  • added workaround for TSAN false positive when initializing CHIP stack (fix related to Copious TSAN warnings on Linux #14710)
  • run WiFi IP address change listener in GLib main loop
  • remove unused functions/defines

Testing

Tested locally with chip-tool and lighting-app.
CI should also check correctness of this PR.

Copy link
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

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

From the history in MainLoop.cpp, it was added for python support.

Can we confirm that this does not break pychip.ble.adapter ?

@arkq
Copy link
Contributor Author

arkq commented Oct 24, 2022

From the history in MainLoop.cpp, it was added for python support.

OK, thanks for info. I'll check that.

EDIT: It seems that the MainLoop.h was included in the python module code, but non of its functions were used. I've simply removed the include and CI does not report any errors. So, I think that its safe to assume that MainLoop is not needed for python support - at least not any more.

@arkq arkq force-pushed the linux-glib-main-loop branch from b1617e4 to 1f9c43c Compare October 24, 2022 19:31
@arkq arkq force-pushed the linux-glib-main-loop branch 3 times, most recently from 3ac0239 to 624e26c Compare October 27, 2022 15:01
@github-actions
Copy link

github-actions bot commented Oct 27, 2022

PR #23320: Size comparison from 51a5082 to 624e26c

Increases above 0.2%:

platform target config section 51a5082 624e26c change % change
linux lighting-app debug+rpc .got 4600 4624 24 0.5
tv-app debug .got 4976 4992 16 0.3
tv-casting-app debug .got 4896 4912 16 0.3
Increases (8 builds for bl602, esp32, linux, psoc6, telink)
platform target config section 51a5082 624e26c change % change
bl602 lighting-app bl602+rpc .text 1101414 1101416 2 0.0
esp32 all-clusters-app c3devkit (read/write) 1788470 1788478 8 0.0
.flash.rodata 258024 258032 8 0.0
linux lighting-app debug+rpc (read/write) 132248 132272 24 0.0
.got 4600 4624 24 0.5
thermostat-no-ble arm64 (read/write) 143665 143777 112 0.1
.bss 55377 55425 48 0.1
.rodata 144548 144724 176 0.1
tv-app debug .got 4976 4992 16 0.3
tv-casting-app debug .got 4896 4912 16 0.3
psoc6 lock cy8ckit_062s2_43012 .debug_info 22330841 22330842 1 0.0
telink lighting-app tlsr9518adk80d (read/write) 806060 806068 8 0.0
text 566412 566414 2 0.0
Decreases (18 builds for esp32, linux, nrfconnect, psoc6)
platform target config section 51a5082 624e26c change % change
esp32 all-clusters-app c3devkit (read only) 1223972 1223970 -2 -0.0
.flash.text 1223972 1223970 -2 -0.0
m5stack (read/write) 564404 564396 -8 -0.0
.flash.rodata 315104 315096 -8 -0.0
linux all-clusters-app debug (read only) 3086657 3083385 -3272 -0.1
(read/write) 158360 158288 -72 -0.0
.data.rel.ro 87016 86968 -48 -0.1
.got 4776 4760 -16 -0.3
.init_array 1200 1192 -8 -0.7
.rodata 281419 280939 -480 -0.2
.text 2620850 2618322 -2528 -0.1
all-clusters-minimal-app debug (read only) 2912449 2909081 -3368 -0.1
(read/write) 149792 149720 -72 -0.0
.data.rel.ro 79384 79336 -48 -0.1
.got 4696 4672 -24 -0.5
.init_array 1176 1168 -8 -0.7
.rodata 280907 280427 -480 -0.2
.text 2450098 2447570 -2528 -0.1
bridge-app debug+rpc (read only) 2412801 2409009 -3792 -0.2
(read/write) 129560 129488 -72 -0.1
.data.rel.ro 68680 68632 -48 -0.1
.got 4600 4560 -40 -0.9
.init_array 848 840 -8 -0.9
.rodata 211232 210784 -448 -0.2
.text 2034018 2031234 -2784 -0.1
chip-tool debug (read only) 11081345 11077777 -3568 -0.0
(read/write) 658440 658336 -104 -0.0
.data.rel.ro 623080 623048 -32 -0.0
.got 5216 5176 -40 -0.8
.init_array 776 768 -8 -1.0
.rodata 592221 591773 -448 -0.1
.text 8965204 8962692 -2512 -0.0
chip-tool-ipv6only arm64 (read only) 10436396 10431436 -4960 -0.0
(read/write) 706465 706337 -128 -0.0
.data.rel.ro 650720 650624 -96 -0.0
.got 13928 13912 -16 -0.1
.rodata 518220 518076 -144 -0.0
.text 8262340 8258228 -4112 -0.0
lighting-app debug+rpc (read only) 2640233 2639913 -320 -0.0
.init_array 944 936 -8 -0.8
.rodata 228096 227648 -448 -0.2
.text 2236162 2235938 -224 -0.0
lock-app debug (read only) 2602241 2599017 -3224 -0.1
(read/write) 127296 127224 -72 -0.1
.data.rel.ro 70728 70680 -48 -0.1
.got 4672 4656 -16 -0.3
.init_array 920 912 -8 -0.9
.rodata 244328 243880 -448 -0.2
.text 2186306 2183794 -2512 -0.1
ota-provider-app debug (read only) 2398777 2395441 -3336 -0.1
(read/write) 120824 120752 -72 -0.1
.data.rel.ro 64648 64600 -48 -0.1
.got 4696 4672 -24 -0.5
.init_array 784 776 -8 -1.0
.rodata 216904 216456 -448 -0.2
.text 2013330 2010802 -2528 -0.1
ota-requestor-app debug (read only) 2563961 2560641 -3320 -0.1
(read/write) 129136 129064 -72 -0.1
.data.rel.ro 69992 69944 -48 -0.1
.got 4688 4664 -24 -0.5
.init_array 872 864 -8 -0.9
.rodata 223952 223504 -448 -0.2
.text 2162370 2159858 -2512 -0.1
shell debug (read only) 2626433 2623241 -3192 -0.1
(read/write) 143016 142944 -72 -0.1
.data.rel.ro 78064 78016 -48 -0.1
.got 4136 4120 -16 -0.4
.init_array 1048 1040 -8 -0.8
.rodata 240178 239762 -416 -0.2
.text 2226610 2224098 -2512 -0.1
thermostat-no-ble arm64 (read only) 2392844 2389868 -2976 -0.1
.text 2005296 2001904 -3392 -0.2
tv-app debug (read only) 3236713 3234913 -1800 -0.1
(read/write) 261752 261744 -8 -0.0
.data.rel.ro 80272 80240 -32 -0.0
.init_array 1080 1072 -8 -0.7
.rodata 268184 267768 -416 -0.2
.text 2775186 2773618 -1568 -0.1
tv-casting-app debug (read only) 5585641 5583753 -1888 -0.0
(read/write) 161896 161856 -40 -0.0
.data.rel.ro 101224 101192 -32 -0.0
.init_array 1064 1056 -8 -0.8
.rodata 355961 355481 -480 -0.1
.text 4954226 4952642 -1584 -0.0
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 802188 802184 -4 -0.0
psoc6 all-clusters-minimal cy8ckit_062s2_43012 .debug_info 26636122 26636121 -1 -0.0
light cy8ckit_062s2_43012 .debug_info 22097476 22097475 -1 -0.0
Full report (49 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 51a5082 624e26c change % change
bl602 lighting-app bl602 (read/write) 1390518 1390518 0 0.0
.bss 90745 90745 0 0.0
.data 9936 9936 0 0.0
.text 1069810 1069810 0 0.0
bl602+rpc (read/write) 1435974 1435974 0 0.0
.bss 98177 98177 0 0.0
.data 10320 10320 0 0.0
.text 1101414 1101416 2 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1189323 1189323 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67134 67134 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4280 4280 0 0.0
.debug_abbrev 1509373 1509373 0 0.0
.debug_aranges 132040 132040 0 0.0
.debug_frame 484428 484428 0 0.0
.debug_info 37964827 37964827 0 0.0
.debug_line 5257208 5257208 0 0.0
.debug_loc 3366388 3366388 0 0.0
.debug_ranges 358064 358064 0 0.0
.debug_str 3451542 3451542 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116616 116616 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565954 565954 0 0.0
.symtab 171968 171968 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
957778 957778 0 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1285251 1285251 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75166 75166 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4816 4816 0 0.0
.debug_abbrev 1646772 1646772 0 0.0
.debug_aranges 139544 139544 0 0.0
.debug_frame 509800 509800 0 0.0
.debug_info 41877795 41877795 0 0.0
.debug_line 5632788 5632788 0 0.0
.debug_loc 3559215 3559215 0 0.0
.debug_ranges 380864 380864 0 0.0
.debug_str 3847670 3847670 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130024 130024 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 625127 625127 0 0.0
.symtab 189776 189776 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1031484 1031484 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 677871 677871 0 0.0
(read/write) 173688 173688 0 0.0
.bss 81252 81252 0 0.0
.data 3380 3380 0 0.0
.rodata 89887 89887 0 0.0
.text 587672 587672 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642119 642119 0 0.0
(read/write) 158020 158020 0 0.0
.bss 80524 80524 0 0.0
.data 3380 3380 0 0.0
.rodata 79023 79023 0 0.0
.text 562776 562776 0 0.0
lock-ftd LP_CC2652R7 (read only) 676379 676379 0 0.0
(read/write) 172316 172316 0 0.0
.bss 78476 78476 0 0.0
.data 3304 3304 0 0.0
.rodata 77411 77411 0 0.0
.text 598488 598488 0 0.0
lock-mtd LP_CC2652R7 (read only) 660167 660167 0 0.0
(read/write) 184216 184216 0 0.0
.bss 74164 74164 0 0.0
.data 3304 3304 0 0.0
.rodata 103263 103263 0 0.0
.text 556424 556424 0 0.0
pump-app LP_CC2652R7 (read only) 688635 688635 0 0.0
(read/write) 160796 160796 0 0.0
.bss 78444 78444 0 0.0
.data 3296 3296 0 0.0
.rodata 90859 90859 0 0.0
.text 597292 597292 0 0.0
pump-controller-app LP_CC2652R7 (read only) 672911 672911 0 0.0
(read/write) 176616 176616 0 0.0
.bss 78540 78540 0 0.0
.data 3292 3292 0 0.0
.rodata 86407 86407 0 0.0
.text 586024 586024 0 0.0
shell LP_CC2652R7 (read only) 668890 668890 0 0.0
(read/write) 184988 184988 0 0.0
.bss 83572 83572 0 0.0
.data 3376 3376 0 0.0
.rodata 86594 86594 0 0.0
.text 581980 581980 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 588542 588542 0 0.0
.app_xip_area 465128 465128 0 0.0
.bss 65832 65832 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592590 592590 0 0.0
.app_xip_area 463880 463880 0 0.0
.bss 71120 71120 0 0.0
.data 768 768 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544482 544482 0 0.0
.app_xip_area 426148 426148 0 0.0
.bss 60800 60800 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974732 974732 0 0.0
.bss 152276 152276 0 0.0
.data 2248 2248 0 0.0
.text 820188 820188 0 0.0
BRD4161A+rs911x (read/write) 1034672 1034672 0 0.0
.bss 186744 186744 0 0.0
.data 2092 2092 0 0.0
.text 845812 845812 0 0.0
BRD4187C (read/write) 1146720 1146720 0 0.0
.bss 138664 138664 0 0.0
.data 2596 2596 0 0.0
.text 980864 980864 0 0.0
lock-app BRD4161A+wf200 (read/write) 1160424 1160424 0 0.0
.bss 158272 158272 0 0.0
.data 2100 2100 0 0.0
.text 1000032 1000032 0 0.0
window-app BRD4187C (read/write) 1139940 1139940 0 0.0
.bss 140080 140080 0 0.0
.data 2620 2620 0 0.0
.text 972644 972644 0 0.0
esp32 all-clusters-app c3devkit (read only) 1223972 1223970 -2 -0.0
(read/write) 1788470 1788478 8 0.0
.dram0.bss 76960 76960 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 258024 258032 8 0.0
.flash.text 1223972 1223970 -2 -0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1234039 1234039 0 0.0
(read/write) 564404 564396 -8 -0.0
.dram0.bss 82336 82336 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 315104 315096 -8 -0.0
.flash.text 1228655 1228655 0 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 661676 661676 0 0.0
.bss 77040 77040 0 0.0
.data 2104 2104 0 0.0
.text 563420 563420 0 0.0
light k32w0+release (read/write) 672008 672008 0 0.0
.bss 74840 74840 0 0.0
.data 2060 2060 0 0.0
.text 592380 592380 0 0.0
lock k32w0+release (read/write) 633484 633484 0 0.0
.bss 75600 75600 0 0.0
.data 2080 2080 0 0.0
.text 553076 553076 0 0.0
linux all-clusters-app debug (read only) 3086657 3083385 -3272 -0.1
(read/write) 158360 158288 -72 -0.0
.bss 62464 62464 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 87016 86968 -48 -0.1
.dynamic 608 608 0 0.0
.got 4776 4760 -16 -0.3
.init 27 27 0 0.0
.init_array 1200 1192 -8 -0.7
.rodata 281419 280939 -480 -0.2
.text 2620850 2618322 -2528 -0.1
all-clusters-minimal-app debug (read only) 2912449 2909081 -3368 -0.1
(read/write) 149792 149720 -72 -0.0
.bss 61664 61664 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 79384 79336 -48 -0.1
.dynamic 608 608 0 0.0
.got 4696 4672 -24 -0.5
.init 27 27 0 0.0
.init_array 1176 1168 -8 -0.7
.rodata 280907 280427 -480 -0.2
.text 2450098 2447570 -2528 -0.1
bridge-app debug+rpc (read only) 2412801 2409009 -3792 -0.2
(read/write) 129560 129488 -72 -0.1
.bss 51008 51008 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 68680 68632 -48 -0.1
.dynamic 608 608 0 0.0
.got 4600 4560 -40 -0.9
.init 27 27 0 0.0
.init_array 848 840 -8 -0.9
.rodata 211232 210784 -448 -0.2
.text 2034018 2031234 -2784 -0.1
chip-tool debug (read only) 11081345 11077777 -3568 -0.0
(read/write) 658440 658336 -104 -0.0
.bss 25944 25944 0 0.0
.data 2754 2754 0 0.0
.data.rel.ro 623080 623048 -32 -0.0
.dynamic 608 608 0 0.0
.got 5216 5176 -40 -0.8
.init 27 27 0 0.0
.init_array 776 768 -8 -1.0
.rodata 592221 591773 -448 -0.1
.text 8965204 8962692 -2512 -0.0
chip-tool-ipv6only arm64 (read only) 10436396 10431436 -4960 -0.0
(read/write) 706465 706337 -128 -0.0
.bss 33953 33953 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650720 650624 -96 -0.0
.dynamic 560 560 0 0.0
.got 13928 13912 -16 -0.1
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518220 518076 -144 -0.0
.text 8262340 8258228 -4112 -0.0
lighting-app debug+rpc (read only) 2640233 2639913 -320 -0.0
(read/write) 132248 132272 24 0.0
.bss 49984 49984 0 0.0
.data 2288 2288 0 0.0
.data.rel.ro 73800 73800 0 0.0
.dynamic 608 608 0 0.0
.got 4600 4624 24 0.5
.init 27 27 0 0.0
.init_array 944 936 -8 -0.8
.rodata 228096 227648 -448 -0.2
.text 2236162 2235938 -224 -0.0
lock-app debug (read only) 2602241 2599017 -3224 -0.1
(read/write) 127296 127224 -72 -0.1
.bss 48416 48416 0 0.0
.data 1904 1904 0 0.0
.data.rel.ro 70728 70680 -48 -0.1
.dynamic 608 608 0 0.0
.got 4672 4656 -16 -0.3
.init 27 27 0 0.0
.init_array 920 912 -8 -0.9
.rodata 244328 243880 -448 -0.2
.text 2186306 2183794 -2512 -0.1
ota-provider-app debug (read only) 2398777 2395441 -3336 -0.1
(read/write) 120824 120752 -72 -0.1
.bss 47936 47936 0 0.0
.data 2128 2128 0 0.0
.data.rel.ro 64648 64600 -48 -0.1
.dynamic 608 608 0 0.0
.got 4696 4672 -24 -0.5
.init 27 27 0 0.0
.init_array 784 776 -8 -1.0
.rodata 216904 216456 -448 -0.2
.text 2013330 2010802 -2528 -0.1
ota-requestor-app debug (read only) 2563961 2560641 -3320 -0.1
(read/write) 129136 129064 -72 -0.1
.bss 50464 50464 0 0.0
.data 2496 2496 0 0.0
.data.rel.ro 69992 69944 -48 -0.1
.dynamic 608 608 0 0.0
.got 4688 4664 -24 -0.5
.init 27 27 0 0.0
.init_array 872 864 -8 -0.9
.rodata 223952 223504 -448 -0.2
.text 2162370 2159858 -2512 -0.1
shell debug (read only) 2626433 2623241 -3192 -0.1
(read/write) 143016 142944 -72 -0.1
.bss 57864 57864 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78064 78016 -48 -0.1
.dynamic 608 608 0 0.0
.got 4136 4120 -16 -0.4
.init 27 27 0 0.0
.init_array 1048 1040 -8 -0.8
.rodata 240178 239762 -416 -0.2
.text 2226610 2224098 -2512 -0.1
thermostat-no-ble arm64 (read only) 2392844 2389868 -2976 -0.1
(read/write) 143665 143777 112 0.1
.bss 55377 55425 48 0.1
.data 1816 1816 0 0.0
.data.rel.ro 77280 77280 0 0.0
.dynamic 560 560 0 0.0
.got 5184 5184 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144548 144724 176 0.1
.text 2005296 2001904 -3392 -0.2
tv-app debug (read only) 3236713 3234913 -1800 -0.1
(read/write) 261752 261744 -8 -0.0
.bss 170552 170552 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 80272 80240 -32 -0.0
.dynamic 608 608 0 0.0
.got 4976 4992 16 0.3
.init 27 27 0 0.0
.init_array 1080 1072 -8 -0.7
.rodata 268184 267768 -416 -0.2
.text 2775186 2773618 -1568 -0.1
tv-casting-app debug (read only) 5585641 5583753 -1888 -0.0
(read/write) 161896 161856 -40 -0.0
.bss 52120 52120 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 101224 101192 -32 -0.0
.dynamic 608 608 0 0.0
.got 4896 4912 16 0.3
.init 27 27 0 0.0
.init_array 1064 1056 -8 -0.8
.rodata 355961 355481 -480 -0.1
.text 4954226 4952642 -1584 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452768 2452768 0 0.0
.bss 215028 215028 0 0.0
.data 5872 5872 0 0.0
.text 1415412 1415412 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1182135 1182135 0 0.0
bss 144457 144457 0 0.0
rodata 144488 144488 0 0.0
text 814292 814292 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1160803 1160803 0 0.0
bss 143684 143684 0 0.0
rodata 136060 136060 0 0.0
text 802188 802184 -4 -0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841952 841952 0 0.0
(read/write) 1745940 1745940 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188728 188728 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1231262 1231262 0 0.0
.debug_aranges 110712 110712 0 0.0
.debug_frame 371204 371204 0 0.0
.debug_info 26899491 26899491 0 0.0
.debug_line 3673871 3673871 0 0.0
.debug_loc 3588816 3588816 0 0.0
.debug_ranges 337960 337960 0 0.0
.debug_str 3435299 3435299 0 0.0
.heap 841952 841952 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 570460 570460 0 0.0
.symtab 421744 421744 0 0.0
.text 1546160 1546160 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842688 842688 0 0.0
(read/write) 1688548 1688548 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187992 187992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1223105 1223105 0 0.0
.debug_aranges 110184 110184 0 0.0
.debug_frame 374284 374284 0 0.0
.debug_info 26636122 26636121 -1 -0.0
.debug_line 3694663 3694663 0 0.0
.debug_loc 3576453 3576453 0 0.0
.debug_ranges 336576 336576 0 0.0
.debug_str 3424320 3424320 0 0.0
.heap 842688 842688 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 534549 534549 0 0.0
.symtab 408176 408176 0 0.0
.text 1489504 1489504 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850872 850872 0 0.0
(read/write) 1607004 1607004 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180016 180016 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1057613 1057613 0 0.0
.debug_aranges 102384 102384 0 0.0
.debug_frame 344600 344600 0 0.0
.debug_info 22097476 22097475 -1 -0.0
.debug_line 3264197 3264197 0 0.0
.debug_loc 3274179 3274179 0 0.0
.debug_ranges 301872 301872 0 0.0
.debug_str 3229759 3229759 0 0.0
.heap 850872 850872 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 470874 470874 0 0.0
.symtab 376560 376560 0 0.0
.text 1416144 1416144 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845880 845880 0 0.0
(read/write) 1640780 1640780 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184992 184992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1059619 1059619 0 0.0
.debug_aranges 102784 102784 0 0.0
.debug_frame 346472 346472 0 0.0
.debug_info 22330841 22330842 1 0.0
.debug_line 3261187 3261187 0 0.0
.debug_loc 3301773 3301773 0 0.0
.debug_ranges 303816 303816 0 0.0
.debug_str 3249234 3249234 0 0.0
.heap 845880 845880 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 473277 473277 0 0.0
.symtab 378240 378240 0 0.0
.text 1444928 1444928 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1149312 1149312 0 0.0
.bss 110580 110580 0 0.0
.data 832 832 0 0.0
.text 596412 596412 0 0.0
lock-app qpg6105+debug (read/write) 1114248 1114248 0 0.0
.bss 106372 106372 0 0.0
.data 836 836 0 0.0
.text 561344 561344 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 790820 790820 0 0.0
bss 72480 72480 0 0.0
noinit 43520 43520 0 0.0
text 554264 554264 0 0.0
lighting-app tlsr9518adk80d (read/write) 806060 806068 8 0.0
bss 73240 73240 0 0.0
noinit 43520 43520 0 0.0
text 566412 566414 2 0.0
ota-requestor-app tlsr9518adk80d (read/write) 804952 804952 0 0.0
bss 74052 74052 0 0.0
noinit 43520 43520 0 0.0
text 565284 565284 0 0.0

arkq added 9 commits October 27, 2022 18:42
The D-Bus connection handler stored in the PlatformManager is not
used anywhere. It's not required to pre-connect to D-Bus, because
the connection (for given bus type) returned by the g_bus_get_sync()
function is shared with other callers.
It is not necessary to start new GLib main event loop for every new
D-Bus communication with external service. Single main event loop can
handle all such communication.
TSAN thinks that memory accessed before the call to g_source_attach()
(which is internally used by e.g. g_main_context_invoke() and
g_idle_add()) needs to be guarded by a mutex, otherwise that's a race
condition between the thread that is creating shared data (the current
thread) and the glib main event loop thread. In fact such race condition
does not occur because g_source_attach() acts here as pthread_create() -
code is not executed on the other thread before the g_source_attach() is
called.
@arkq arkq force-pushed the linux-glib-main-loop branch from 624e26c to a1de3ca Compare October 27, 2022 16:43
@github-actions
Copy link

github-actions bot commented Oct 27, 2022

PR #23320: Size comparison from 51a5082 to a1de3ca

Increases above 0.2%:

platform target config section 51a5082 a1de3ca change % change
linux lighting-app debug+rpc .got 4600 4624 24 0.5
tv-app debug .got 4976 4992 16 0.3
tv-casting-app debug .got 4896 4912 16 0.3
Increases (10 builds for bl602, bl702, esp32, linux, telink)
platform target config section 51a5082 a1de3ca change % change
bl602 lighting-app bl602 .text 1069810 1069814 4 0.0
bl702 lighting-app bl702 .debug_info 37964827 37964828 1 0.0
.text 957778 957780 2 0.0
esp32 all-clusters-app c3devkit (read/write) 1788470 1788478 8 0.0
.flash.rodata 258024 258032 8 0.0
linux lighting-app debug+rpc (read/write) 132248 132272 24 0.0
.got 4600 4624 24 0.5
thermostat-no-ble arm64 (read/write) 143665 143777 112 0.1
.bss 55377 55425 48 0.1
.rodata 144548 144724 176 0.1
tv-app debug .got 4976 4992 16 0.3
tv-casting-app debug .got 4896 4912 16 0.3
telink light-switch-app tlsr9518adk80d text 554264 554266 2 0.0
lighting-app tlsr9518adk80d (read/write) 806060 806068 8 0.0
text 566412 566416 4 0.0
ota-requestor-app tlsr9518adk80d text 565284 565286 2 0.0
Decreases (19 builds for cc13x2_26x2, esp32, k32w, linux, psoc6)
platform target config section 51a5082 a1de3ca change % change
cc13x2_26x2 all-clusters-minimal-app LP_CC2652R7 (read only) 642119 642111 -8 -0.0
.text 562776 562768 -8 -0.0
esp32 all-clusters-app c3devkit (read only) 1223972 1223968 -4 -0.0
.flash.text 1223972 1223968 -4 -0.0
m5stack (read/write) 564404 564396 -8 -0.0
.flash.rodata 315104 315096 -8 -0.0
k32w light k32w0+release (read/write) 672008 671992 -16 -0.0
.text 592380 592364 -16 -0.0
linux all-clusters-app debug (read only) 3086657 3083385 -3272 -0.1
(read/write) 158360 158288 -72 -0.0
.data.rel.ro 87016 86968 -48 -0.1
.got 4776 4760 -16 -0.3
.init_array 1200 1192 -8 -0.7
.rodata 281419 280939 -480 -0.2
.text 2620850 2618322 -2528 -0.1
all-clusters-minimal-app debug (read only) 2912449 2909081 -3368 -0.1
(read/write) 149792 149720 -72 -0.0
.data.rel.ro 79384 79336 -48 -0.1
.got 4696 4672 -24 -0.5
.init_array 1176 1168 -8 -0.7
.rodata 280907 280427 -480 -0.2
.text 2450098 2447570 -2528 -0.1
bridge-app debug+rpc (read only) 2412801 2409009 -3792 -0.2
(read/write) 129560 129488 -72 -0.1
.data.rel.ro 68680 68632 -48 -0.1
.got 4600 4560 -40 -0.9
.init_array 848 840 -8 -0.9
.rodata 211232 210784 -448 -0.2
.text 2034018 2031234 -2784 -0.1
chip-tool debug (read only) 11081345 11077777 -3568 -0.0
(read/write) 658440 658336 -104 -0.0
.data.rel.ro 623080 623048 -32 -0.0
.got 5216 5176 -40 -0.8
.init_array 776 768 -8 -1.0
.rodata 592221 591773 -448 -0.1
.text 8965204 8962692 -2512 -0.0
chip-tool-ipv6only arm64 (read only) 10436396 10431436 -4960 -0.0
(read/write) 706465 706337 -128 -0.0
.data.rel.ro 650720 650624 -96 -0.0
.got 13928 13912 -16 -0.1
.rodata 518220 518076 -144 -0.0
.text 8262340 8258228 -4112 -0.0
lighting-app debug+rpc (read only) 2640233 2639913 -320 -0.0
.init_array 944 936 -8 -0.8
.rodata 228096 227648 -448 -0.2
.text 2236162 2235938 -224 -0.0
lock-app debug (read only) 2602241 2599017 -3224 -0.1
(read/write) 127296 127224 -72 -0.1
.data.rel.ro 70728 70680 -48 -0.1
.got 4672 4656 -16 -0.3
.init_array 920 912 -8 -0.9
.rodata 244328 243880 -448 -0.2
.text 2186306 2183794 -2512 -0.1
ota-provider-app debug (read only) 2398777 2395441 -3336 -0.1
(read/write) 120824 120752 -72 -0.1
.data.rel.ro 64648 64600 -48 -0.1
.got 4696 4672 -24 -0.5
.init_array 784 776 -8 -1.0
.rodata 216904 216456 -448 -0.2
.text 2013330 2010802 -2528 -0.1
ota-requestor-app debug (read only) 2563961 2560641 -3320 -0.1
(read/write) 129136 129064 -72 -0.1
.data.rel.ro 69992 69944 -48 -0.1
.got 4688 4664 -24 -0.5
.init_array 872 864 -8 -0.9
.rodata 223952 223504 -448 -0.2
.text 2162370 2159858 -2512 -0.1
shell debug (read only) 2626433 2623241 -3192 -0.1
(read/write) 143016 142944 -72 -0.1
.data.rel.ro 78064 78016 -48 -0.1
.got 4136 4120 -16 -0.4
.init_array 1048 1040 -8 -0.8
.rodata 240178 239762 -416 -0.2
.text 2226610 2224098 -2512 -0.1
thermostat-no-ble arm64 (read only) 2392844 2389868 -2976 -0.1
.text 2005296 2001904 -3392 -0.2
tv-app debug (read only) 3236713 3234913 -1800 -0.1
(read/write) 261752 261744 -8 -0.0
.data.rel.ro 80272 80240 -32 -0.0
.init_array 1080 1072 -8 -0.7
.rodata 268184 267768 -416 -0.2
.text 2775186 2773618 -1568 -0.1
tv-casting-app debug (read only) 5585641 5583753 -1888 -0.0
(read/write) 161896 161856 -40 -0.0
.data.rel.ro 101224 101192 -32 -0.0
.init_array 1064 1056 -8 -0.8
.rodata 355961 355481 -480 -0.1
.text 4954226 4952642 -1584 -0.0
psoc6 all-clusters-minimal cy8ckit_062s2_43012 .debug_info 26636122 26636120 -2 -0.0
light cy8ckit_062s2_43012 .debug_info 22097476 22097475 -1 -0.0
Full report (49 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section 51a5082 a1de3ca change % change
bl602 lighting-app bl602 (read/write) 1390518 1390518 0 0.0
.bss 90745 90745 0 0.0
.data 9936 9936 0 0.0
.text 1069810 1069814 4 0.0
bl602+rpc (read/write) 1435974 1435974 0 0.0
.bss 98177 98177 0 0.0
.data 10320 10320 0 0.0
.text 1101414 1101414 0 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1189323 1189323 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67134 67134 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4280 4280 0 0.0
.debug_abbrev 1509373 1509373 0 0.0
.debug_aranges 132040 132040 0 0.0
.debug_frame 484428 484428 0 0.0
.debug_info 37964827 37964828 1 0.0
.debug_line 5257208 5257208 0 0.0
.debug_loc 3366388 3366388 0 0.0
.debug_ranges 358064 358064 0 0.0
.debug_str 3451542 3451542 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116616 116616 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565954 565954 0 0.0
.symtab 171968 171968 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
957778 957780 2 0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1285251 1285251 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75166 75166 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4816 4816 0 0.0
.debug_abbrev 1646772 1646772 0 0.0
.debug_aranges 139544 139544 0 0.0
.debug_frame 509800 509800 0 0.0
.debug_info 41877795 41877795 0 0.0
.debug_line 5632788 5632788 0 0.0
.debug_loc 3559215 3559215 0 0.0
.debug_ranges 380864 380864 0 0.0
.debug_str 3847670 3847670 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130024 130024 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 625127 625127 0 0.0
.symtab 189776 189776 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1031484 1031484 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 677871 677871 0 0.0
(read/write) 173688 173688 0 0.0
.bss 81252 81252 0 0.0
.data 3380 3380 0 0.0
.rodata 89887 89887 0 0.0
.text 587672 587672 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642119 642111 -8 -0.0
(read/write) 158020 158020 0 0.0
.bss 80524 80524 0 0.0
.data 3380 3380 0 0.0
.rodata 79023 79023 0 0.0
.text 562776 562768 -8 -0.0
lock-ftd LP_CC2652R7 (read only) 676379 676379 0 0.0
(read/write) 172316 172316 0 0.0
.bss 78476 78476 0 0.0
.data 3304 3304 0 0.0
.rodata 77411 77411 0 0.0
.text 598488 598488 0 0.0
lock-mtd LP_CC2652R7 (read only) 660167 660167 0 0.0
(read/write) 184216 184216 0 0.0
.bss 74164 74164 0 0.0
.data 3304 3304 0 0.0
.rodata 103263 103263 0 0.0
.text 556424 556424 0 0.0
pump-app LP_CC2652R7 (read only) 688635 688635 0 0.0
(read/write) 160796 160796 0 0.0
.bss 78444 78444 0 0.0
.data 3296 3296 0 0.0
.rodata 90859 90859 0 0.0
.text 597292 597292 0 0.0
pump-controller-app LP_CC2652R7 (read only) 672911 672911 0 0.0
(read/write) 176616 176616 0 0.0
.bss 78540 78540 0 0.0
.data 3292 3292 0 0.0
.rodata 86407 86407 0 0.0
.text 586024 586024 0 0.0
shell LP_CC2652R7 (read only) 668890 668890 0 0.0
(read/write) 184988 184988 0 0.0
.bss 83572 83572 0 0.0
.data 3376 3376 0 0.0
.rodata 86594 86594 0 0.0
.text 581980 581980 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 588542 588542 0 0.0
.app_xip_area 465128 465128 0 0.0
.bss 65832 65832 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592590 592590 0 0.0
.app_xip_area 463880 463880 0 0.0
.bss 71120 71120 0 0.0
.data 768 768 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544482 544482 0 0.0
.app_xip_area 426148 426148 0 0.0
.bss 60800 60800 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974732 974732 0 0.0
.bss 152276 152276 0 0.0
.data 2248 2248 0 0.0
.text 820188 820188 0 0.0
BRD4161A+rs911x (read/write) 1034672 1034672 0 0.0
.bss 186744 186744 0 0.0
.data 2092 2092 0 0.0
.text 845812 845812 0 0.0
BRD4187C (read/write) 1146720 1146720 0 0.0
.bss 138664 138664 0 0.0
.data 2596 2596 0 0.0
.text 980864 980864 0 0.0
lock-app BRD4161A+wf200 (read/write) 1160424 1160424 0 0.0
.bss 158272 158272 0 0.0
.data 2100 2100 0 0.0
.text 1000032 1000032 0 0.0
window-app BRD4187C (read/write) 1139940 1139940 0 0.0
.bss 140080 140080 0 0.0
.data 2620 2620 0 0.0
.text 972644 972644 0 0.0
esp32 all-clusters-app c3devkit (read only) 1223972 1223968 -4 -0.0
(read/write) 1788470 1788478 8 0.0
.dram0.bss 76960 76960 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 258024 258032 8 0.0
.flash.text 1223972 1223968 -4 -0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1234039 1234039 0 0.0
(read/write) 564404 564396 -8 -0.0
.dram0.bss 82336 82336 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 315104 315096 -8 -0.0
.flash.text 1228655 1228655 0 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 661676 661676 0 0.0
.bss 77040 77040 0 0.0
.data 2104 2104 0 0.0
.text 563420 563420 0 0.0
light k32w0+release (read/write) 672008 671992 -16 -0.0
.bss 74840 74840 0 0.0
.data 2060 2060 0 0.0
.text 592380 592364 -16 -0.0
lock k32w0+release (read/write) 633484 633484 0 0.0
.bss 75600 75600 0 0.0
.data 2080 2080 0 0.0
.text 553076 553076 0 0.0
linux all-clusters-app debug (read only) 3086657 3083385 -3272 -0.1
(read/write) 158360 158288 -72 -0.0
.bss 62464 62464 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 87016 86968 -48 -0.1
.dynamic 608 608 0 0.0
.got 4776 4760 -16 -0.3
.init 27 27 0 0.0
.init_array 1200 1192 -8 -0.7
.rodata 281419 280939 -480 -0.2
.text 2620850 2618322 -2528 -0.1
all-clusters-minimal-app debug (read only) 2912449 2909081 -3368 -0.1
(read/write) 149792 149720 -72 -0.0
.bss 61664 61664 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 79384 79336 -48 -0.1
.dynamic 608 608 0 0.0
.got 4696 4672 -24 -0.5
.init 27 27 0 0.0
.init_array 1176 1168 -8 -0.7
.rodata 280907 280427 -480 -0.2
.text 2450098 2447570 -2528 -0.1
bridge-app debug+rpc (read only) 2412801 2409009 -3792 -0.2
(read/write) 129560 129488 -72 -0.1
.bss 51008 51008 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 68680 68632 -48 -0.1
.dynamic 608 608 0 0.0
.got 4600 4560 -40 -0.9
.init 27 27 0 0.0
.init_array 848 840 -8 -0.9
.rodata 211232 210784 -448 -0.2
.text 2034018 2031234 -2784 -0.1
chip-tool debug (read only) 11081345 11077777 -3568 -0.0
(read/write) 658440 658336 -104 -0.0
.bss 25944 25944 0 0.0
.data 2754 2754 0 0.0
.data.rel.ro 623080 623048 -32 -0.0
.dynamic 608 608 0 0.0
.got 5216 5176 -40 -0.8
.init 27 27 0 0.0
.init_array 776 768 -8 -1.0
.rodata 592221 591773 -448 -0.1
.text 8965204 8962692 -2512 -0.0
chip-tool-ipv6only arm64 (read only) 10436396 10431436 -4960 -0.0
(read/write) 706465 706337 -128 -0.0
.bss 33953 33953 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650720 650624 -96 -0.0
.dynamic 560 560 0 0.0
.got 13928 13912 -16 -0.1
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518220 518076 -144 -0.0
.text 8262340 8258228 -4112 -0.0
lighting-app debug+rpc (read only) 2640233 2639913 -320 -0.0
(read/write) 132248 132272 24 0.0
.bss 49984 49984 0 0.0
.data 2288 2288 0 0.0
.data.rel.ro 73800 73800 0 0.0
.dynamic 608 608 0 0.0
.got 4600 4624 24 0.5
.init 27 27 0 0.0
.init_array 944 936 -8 -0.8
.rodata 228096 227648 -448 -0.2
.text 2236162 2235938 -224 -0.0
lock-app debug (read only) 2602241 2599017 -3224 -0.1
(read/write) 127296 127224 -72 -0.1
.bss 48416 48416 0 0.0
.data 1904 1904 0 0.0
.data.rel.ro 70728 70680 -48 -0.1
.dynamic 608 608 0 0.0
.got 4672 4656 -16 -0.3
.init 27 27 0 0.0
.init_array 920 912 -8 -0.9
.rodata 244328 243880 -448 -0.2
.text 2186306 2183794 -2512 -0.1
ota-provider-app debug (read only) 2398777 2395441 -3336 -0.1
(read/write) 120824 120752 -72 -0.1
.bss 47936 47936 0 0.0
.data 2128 2128 0 0.0
.data.rel.ro 64648 64600 -48 -0.1
.dynamic 608 608 0 0.0
.got 4696 4672 -24 -0.5
.init 27 27 0 0.0
.init_array 784 776 -8 -1.0
.rodata 216904 216456 -448 -0.2
.text 2013330 2010802 -2528 -0.1
ota-requestor-app debug (read only) 2563961 2560641 -3320 -0.1
(read/write) 129136 129064 -72 -0.1
.bss 50464 50464 0 0.0
.data 2496 2496 0 0.0
.data.rel.ro 69992 69944 -48 -0.1
.dynamic 608 608 0 0.0
.got 4688 4664 -24 -0.5
.init 27 27 0 0.0
.init_array 872 864 -8 -0.9
.rodata 223952 223504 -448 -0.2
.text 2162370 2159858 -2512 -0.1
shell debug (read only) 2626433 2623241 -3192 -0.1
(read/write) 143016 142944 -72 -0.1
.bss 57864 57864 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78064 78016 -48 -0.1
.dynamic 608 608 0 0.0
.got 4136 4120 -16 -0.4
.init 27 27 0 0.0
.init_array 1048 1040 -8 -0.8
.rodata 240178 239762 -416 -0.2
.text 2226610 2224098 -2512 -0.1
thermostat-no-ble arm64 (read only) 2392844 2389868 -2976 -0.1
(read/write) 143665 143777 112 0.1
.bss 55377 55425 48 0.1
.data 1816 1816 0 0.0
.data.rel.ro 77280 77280 0 0.0
.dynamic 560 560 0 0.0
.got 5184 5184 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144548 144724 176 0.1
.text 2005296 2001904 -3392 -0.2
tv-app debug (read only) 3236713 3234913 -1800 -0.1
(read/write) 261752 261744 -8 -0.0
.bss 170552 170552 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 80272 80240 -32 -0.0
.dynamic 608 608 0 0.0
.got 4976 4992 16 0.3
.init 27 27 0 0.0
.init_array 1080 1072 -8 -0.7
.rodata 268184 267768 -416 -0.2
.text 2775186 2773618 -1568 -0.1
tv-casting-app debug (read only) 5585641 5583753 -1888 -0.0
(read/write) 161896 161856 -40 -0.0
.bss 52120 52120 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 101224 101192 -32 -0.0
.dynamic 608 608 0 0.0
.got 4896 4912 16 0.3
.init 27 27 0 0.0
.init_array 1064 1056 -8 -0.8
.rodata 355961 355481 -480 -0.1
.text 4954226 4952642 -1584 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452768 2452768 0 0.0
.bss 215028 215028 0 0.0
.data 5872 5872 0 0.0
.text 1415412 1415412 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1182135 1182135 0 0.0
bss 144457 144457 0 0.0
rodata 144488 144488 0 0.0
text 814292 814292 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1160803 1160803 0 0.0
bss 143684 143684 0 0.0
rodata 136060 136060 0 0.0
text 802188 802188 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841952 841952 0 0.0
(read/write) 1745940 1745940 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188728 188728 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1231262 1231262 0 0.0
.debug_aranges 110712 110712 0 0.0
.debug_frame 371204 371204 0 0.0
.debug_info 26899491 26899491 0 0.0
.debug_line 3673871 3673871 0 0.0
.debug_loc 3588816 3588816 0 0.0
.debug_ranges 337960 337960 0 0.0
.debug_str 3435299 3435299 0 0.0
.heap 841952 841952 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 570460 570460 0 0.0
.symtab 421744 421744 0 0.0
.text 1546160 1546160 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842688 842688 0 0.0
(read/write) 1688548 1688548 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187992 187992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1223105 1223105 0 0.0
.debug_aranges 110184 110184 0 0.0
.debug_frame 374284 374284 0 0.0
.debug_info 26636122 26636120 -2 -0.0
.debug_line 3694663 3694663 0 0.0
.debug_loc 3576453 3576453 0 0.0
.debug_ranges 336576 336576 0 0.0
.debug_str 3424320 3424320 0 0.0
.heap 842688 842688 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 534549 534549 0 0.0
.symtab 408176 408176 0 0.0
.text 1489504 1489504 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850872 850872 0 0.0
(read/write) 1607004 1607004 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180016 180016 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1057613 1057613 0 0.0
.debug_aranges 102384 102384 0 0.0
.debug_frame 344600 344600 0 0.0
.debug_info 22097476 22097475 -1 -0.0
.debug_line 3264197 3264197 0 0.0
.debug_loc 3274179 3274179 0 0.0
.debug_ranges 301872 301872 0 0.0
.debug_str 3229759 3229759 0 0.0
.heap 850872 850872 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 470874 470874 0 0.0
.symtab 376560 376560 0 0.0
.text 1416144 1416144 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845880 845880 0 0.0
(read/write) 1640780 1640780 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184992 184992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1059619 1059619 0 0.0
.debug_aranges 102784 102784 0 0.0
.debug_frame 346472 346472 0 0.0
.debug_info 22330841 22330841 0 0.0
.debug_line 3261187 3261187 0 0.0
.debug_loc 3301773 3301773 0 0.0
.debug_ranges 303816 303816 0 0.0
.debug_str 3249234 3249234 0 0.0
.heap 845880 845880 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 473277 473277 0 0.0
.symtab 378240 378240 0 0.0
.text 1444928 1444928 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1149312 1149312 0 0.0
.bss 110580 110580 0 0.0
.data 832 832 0 0.0
.text 596412 596412 0 0.0
lock-app qpg6105+debug (read/write) 1114248 1114248 0 0.0
.bss 106372 106372 0 0.0
.data 836 836 0 0.0
.text 561344 561344 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 790820 790820 0 0.0
bss 72480 72480 0 0.0
noinit 43520 43520 0 0.0
text 554264 554266 2 0.0
lighting-app tlsr9518adk80d (read/write) 806060 806068 8 0.0
bss 73240 73240 0 0.0
noinit 43520 43520 0 0.0
text 566412 566416 4 0.0
ota-requestor-app tlsr9518adk80d (read/write) 804952 804952 0 0.0
bss 74052 74052 0 0.0
noinit 43520 43520 0 0.0
text 565284 565286 2 0.0

@pullapprove pullapprove bot requested a review from yufengwangca October 27, 2022 17:17
@project-chip project-chip deleted a comment from github-actions bot Oct 27, 2022
@project-chip project-chip deleted a comment from github-actions bot Oct 27, 2022
@project-chip project-chip deleted a comment from github-actions bot Oct 27, 2022
@project-chip project-chip deleted a comment from github-actions bot Oct 27, 2022
@github-actions
Copy link

github-actions bot commented Oct 29, 2022

PR #23320: Size comparison from f1ebea8 to 564dc0a

Increases above 0.2%:

platform target config section f1ebea8 564dc0a change % change
linux lighting-app debug+rpc .got 4600 4624 24 0.5
tv-app debug .got 4976 4992 16 0.3
tv-casting-app debug .got 4896 4912 16 0.3
Increases (9 builds for esp32, linux, psoc6, qpg, telink)
platform target config section f1ebea8 564dc0a change % change
esp32 all-clusters-app c3devkit (read/write) 1788470 1788478 8 0.0
.flash.rodata 258024 258032 8 0.0
linux lighting-app debug+rpc (read/write) 132248 132272 24 0.0
.got 4600 4624 24 0.5
thermostat-no-ble arm64 (read/write) 143665 143777 112 0.1
.bss 55377 55425 48 0.1
.rodata 144548 144724 176 0.1
tv-app debug .got 4976 4992 16 0.3
tv-casting-app debug .got 4896 4912 16 0.3
psoc6 light cy8ckit_062s2_43012 .debug_info 22097475 22097476 1 0.0
qpg lighting-app qpg6105+debug (read/write) 1149960 1149968 8 0.0
.text 597060 597068 8 0.0
telink light-switch-app tlsr9518adk80d text 554264 554266 2 0.0
ota-requestor-app tlsr9518adk80d text 565284 565286 2 0.0
Decreases (17 builds for bl702, cyw30739, k32w, linux)
platform target config section f1ebea8 564dc0a change % change
bl702 lighting-app bl702 .debug_info 37964829 37964827 -2 -0.0
.text 957782 957778 -4 -0.0
bl702+rpc .debug_info 41877796 41877795 -1 -0.0
.text 1031486 1031484 -2 -0.0
cyw30739 ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544482 544474 -8 -0.0
.app_xip_area 426148 426140 -8 -0.0
k32w light k32w0+release (read/write) 672008 671992 -16 -0.0
.text 592380 592364 -16 -0.0
linux all-clusters-app debug (read only) 3086657 3083385 -3272 -0.1
(read/write) 158360 158288 -72 -0.0
.data.rel.ro 87016 86968 -48 -0.1
.got 4776 4760 -16 -0.3
.init_array 1200 1192 -8 -0.7
.rodata 281419 280939 -480 -0.2
.text 2620850 2618322 -2528 -0.1
all-clusters-minimal-app debug (read only) 2912449 2909081 -3368 -0.1
(read/write) 149792 149720 -72 -0.0
.data.rel.ro 79384 79336 -48 -0.1
.got 4696 4672 -24 -0.5
.init_array 1176 1168 -8 -0.7
.rodata 280907 280427 -480 -0.2
.text 2450098 2447570 -2528 -0.1
bridge-app debug+rpc (read only) 2412801 2409009 -3792 -0.2
(read/write) 129560 129488 -72 -0.1
.data.rel.ro 68680 68632 -48 -0.1
.got 4600 4560 -40 -0.9
.init_array 848 840 -8 -0.9
.rodata 211232 210784 -448 -0.2
.text 2034018 2031234 -2784 -0.1
chip-tool debug (read only) 11081345 11077777 -3568 -0.0
(read/write) 658440 658336 -104 -0.0
.data.rel.ro 623080 623048 -32 -0.0
.got 5216 5176 -40 -0.8
.init_array 776 768 -8 -1.0
.rodata 592221 591773 -448 -0.1
.text 8965204 8962692 -2512 -0.0
chip-tool-ipv6only arm64 (read only) 10436396 10431436 -4960 -0.0
(read/write) 706465 706337 -128 -0.0
.data.rel.ro 650720 650624 -96 -0.0
.got 13928 13912 -16 -0.1
.rodata 518220 518076 -144 -0.0
.text 8262340 8258228 -4112 -0.0
lighting-app debug+rpc (read only) 2640233 2639913 -320 -0.0
.init_array 944 936 -8 -0.8
.rodata 228096 227648 -448 -0.2
.text 2236162 2235938 -224 -0.0
lock-app debug (read only) 2602241 2599017 -3224 -0.1
(read/write) 127296 127224 -72 -0.1
.data.rel.ro 70728 70680 -48 -0.1
.got 4672 4656 -16 -0.3
.init_array 920 912 -8 -0.9
.rodata 244328 243880 -448 -0.2
.text 2186306 2183794 -2512 -0.1
ota-provider-app debug (read only) 2398777 2395441 -3336 -0.1
(read/write) 120824 120752 -72 -0.1
.data.rel.ro 64648 64600 -48 -0.1
.got 4696 4672 -24 -0.5
.init_array 784 776 -8 -1.0
.rodata 216904 216456 -448 -0.2
.text 2013330 2010802 -2528 -0.1
ota-requestor-app debug (read only) 2563961 2560641 -3320 -0.1
(read/write) 129136 129064 -72 -0.1
.data.rel.ro 69992 69944 -48 -0.1
.got 4688 4664 -24 -0.5
.init_array 872 864 -8 -0.9
.rodata 223952 223504 -448 -0.2
.text 2162370 2159858 -2512 -0.1
shell debug (read only) 2626433 2623241 -3192 -0.1
(read/write) 143016 142944 -72 -0.1
.data.rel.ro 78064 78016 -48 -0.1
.got 4136 4120 -16 -0.4
.init_array 1048 1040 -8 -0.8
.rodata 240178 239762 -416 -0.2
.text 2226610 2224098 -2512 -0.1
thermostat-no-ble arm64 (read only) 2392844 2389868 -2976 -0.1
.text 2005296 2001904 -3392 -0.2
tv-app debug (read only) 3236713 3234913 -1800 -0.1
(read/write) 261752 261744 -8 -0.0
.data.rel.ro 80272 80240 -32 -0.0
.init_array 1080 1072 -8 -0.7
.rodata 268184 267768 -416 -0.2
.text 2775186 2773618 -1568 -0.1
tv-casting-app debug (read only) 5585641 5583753 -1888 -0.0
(read/write) 161896 161856 -40 -0.0
.data.rel.ro 101224 101192 -32 -0.0
.init_array 1064 1056 -8 -0.8
.rodata 355961 355481 -480 -0.1
.text 4954226 4952642 -1584 -0.0
Full report (49 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
platform target config section f1ebea8 564dc0a change % change
bl602 lighting-app bl602 (read/write) 1390518 1390518 0 0.0
.bss 90745 90745 0 0.0
.data 9936 9936 0 0.0
.text 1069812 1069812 0 0.0
bl602+rpc (read/write) 1435974 1435974 0 0.0
.bss 98177 98177 0 0.0
.data 10320 10320 0 0.0
.text 1101414 1101414 0 0.0
bl702 lighting-app bl702 (read only) 3262 3262 0 0.0
(read/write) 1189323 1189323 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 67134 67134 0 0.0
.bss_psram 29696 29696 0 0.0
.comment 48 48 0 0.0
.data 4280 4280 0 0.0
.debug_abbrev 1509373 1509373 0 0.0
.debug_aranges 132040 132040 0 0.0
.debug_frame 484428 484428 0 0.0
.debug_info 37964829 37964827 -2 -0.0
.debug_line 5257208 5257208 0 0.0
.debug_loc 3366388 3366388 0 0.0
.debug_ranges 358064 358064 0 0.0
.debug_str 3451542 3451542 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 144 144 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 116616 116616 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 565954 565954 0 0.0
.symtab 171968 171968 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
957782 957778 -4 -0.0
bl702+rpc (read only) 3262 3262 0 0.0
(read/write) 1285251 1285251 0 0.0
.bleromro 6296 6296 0 0.0
.bleromrw 124 124 0 0.0
.boot2 688 688 0 0.0
.bss 75166 75166 0 0.0
.bss_psram 29936 29936 0 0.0
.comment 48 48 0 0.0
.data 4816 4816 0 0.0
.debug_abbrev 1646772 1646772 0 0.0
.debug_aranges 139544 139544 0 0.0
.debug_frame 509800 509800 0 0.0
.debug_info 41877796 41877795 -1 -0.0
.debug_line 5632788 5632788 0 0.0
.debug_loc 3559215 3559215 0 0.0
.debug_ranges 380864 380864 0 0.0
.debug_str 3847670 3847670 0 0.0
.hbn 509 509 0 0.0
.hbn_noinit 260 260 0 0.0
.init 342 342 0 0.0
.init_array 160 160 0 0.0
.psram 0 0 0 0.0
.riscv.attributes 47 47 0 0.0
.rodata 130024 130024 0 0.0
.rsvd 3188 3188 0 0.0
.shstrtab 293 293 0 0.0
.stack 2048 2048 0 0.0
.strtab 625127 625127 0 0.0
.symtab 189776 189776 0 0.0
.tcm_data 36 36 0 0.0
.tcmcode 3262 3262 0 0.0
.text 0 0 0 0.0
1031486 1031484 -2 -0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 677871 677871 0 0.0
(read/write) 173688 173688 0 0.0
.bss 81252 81252 0 0.0
.data 3380 3380 0 0.0
.rodata 89887 89887 0 0.0
.text 587672 587672 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 642119 642119 0 0.0
(read/write) 158020 158020 0 0.0
.bss 80524 80524 0 0.0
.data 3380 3380 0 0.0
.rodata 79023 79023 0 0.0
.text 562776 562776 0 0.0
lock-ftd LP_CC2652R7 (read only) 676379 676379 0 0.0
(read/write) 172316 172316 0 0.0
.bss 78476 78476 0 0.0
.data 3304 3304 0 0.0
.rodata 77411 77411 0 0.0
.text 598488 598488 0 0.0
lock-mtd LP_CC2652R7 (read only) 660167 660167 0 0.0
(read/write) 184216 184216 0 0.0
.bss 74164 74164 0 0.0
.data 3304 3304 0 0.0
.rodata 103263 103263 0 0.0
.text 556424 556424 0 0.0
pump-app LP_CC2652R7 (read only) 688635 688635 0 0.0
(read/write) 160796 160796 0 0.0
.bss 78444 78444 0 0.0
.data 3296 3296 0 0.0
.rodata 90859 90859 0 0.0
.text 597292 597292 0 0.0
pump-controller-app LP_CC2652R7 (read only) 672911 672911 0 0.0
(read/write) 176616 176616 0 0.0
.bss 78540 78540 0 0.0
.data 3292 3292 0 0.0
.rodata 86407 86407 0 0.0
.text 586024 586024 0 0.0
shell LP_CC2652R7 (read only) 668890 668890 0 0.0
(read/write) 184988 184988 0 0.0
.bss 83572 83572 0 0.0
.data 3376 3376 0 0.0
.rodata 86594 86594 0 0.0
.text 581980 581980 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 588542 588542 0 0.0
.app_xip_area 465128 465128 0 0.0
.bss 65832 65832 0 0.0
.data 760 760 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 592590 592590 0 0.0
.app_xip_area 463880 463880 0 0.0
.bss 71120 71120 0 0.0
.data 768 768 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 544482 544474 -8 -0.0
.app_xip_area 426148 426140 -8 -0.0
.bss 60800 60800 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rpc (read/write) 974732 974732 0 0.0
.bss 152276 152276 0 0.0
.data 2248 2248 0 0.0
.text 820188 820188 0 0.0
BRD4161A+rs911x (read/write) 1034672 1034672 0 0.0
.bss 186744 186744 0 0.0
.data 2092 2092 0 0.0
.text 845812 845812 0 0.0
BRD4187C (read/write) 1146720 1146720 0 0.0
.bss 138664 138664 0 0.0
.data 2596 2596 0 0.0
.text 980864 980864 0 0.0
lock-app BRD4161A+wf200 (read/write) 1160424 1160424 0 0.0
.bss 158272 158272 0 0.0
.data 2100 2100 0 0.0
.text 1000032 1000032 0 0.0
window-app BRD4187C (read/write) 1139940 1139940 0 0.0
.bss 140080 140080 0 0.0
.data 2620 2620 0 0.0
.text 972644 972644 0 0.0
esp32 all-clusters-app c3devkit (read only) 1223970 1223970 0 0.0
(read/write) 1788470 1788478 8 0.0
.dram0.bss 76960 76960 0 0.0
.dram0.data 13840 13840 0 0.0
.flash.rodata 258024 258032 8 0.0
.flash.text 1223970 1223970 0 0.0
.iram0.text 65204 65204 0 0.0
m5stack (read only) 1234039 1234039 0 0.0
(read/write) 564396 564396 0 0.0
.dram0.bss 82336 82336 0 0.0
.dram0.data 34296 34296 0 0.0
.flash.rodata 315096 315096 0 0.0
.flash.text 1228655 1228655 0 0.0
.iram0.text 123939 123939 0 0.0
k32w contact k32w0+release (read/write) 661676 661676 0 0.0
.bss 77040 77040 0 0.0
.data 2104 2104 0 0.0
.text 563420 563420 0 0.0
light k32w0+release (read/write) 672008 671992 -16 -0.0
.bss 74840 74840 0 0.0
.data 2060 2060 0 0.0
.text 592380 592364 -16 -0.0
lock k32w0+release (read/write) 633484 633484 0 0.0
.bss 75600 75600 0 0.0
.data 2080 2080 0 0.0
.text 553076 553076 0 0.0
linux all-clusters-app debug (read only) 3086657 3083385 -3272 -0.1
(read/write) 158360 158288 -72 -0.0
.bss 62464 62464 0 0.0
.data 2272 2272 0 0.0
.data.rel.ro 87016 86968 -48 -0.1
.dynamic 608 608 0 0.0
.got 4776 4760 -16 -0.3
.init 27 27 0 0.0
.init_array 1200 1192 -8 -0.7
.rodata 281419 280939 -480 -0.2
.text 2620850 2618322 -2528 -0.1
all-clusters-minimal-app debug (read only) 2912449 2909081 -3368 -0.1
(read/write) 149792 149720 -72 -0.0
.bss 61664 61664 0 0.0
.data 2240 2240 0 0.0
.data.rel.ro 79384 79336 -48 -0.1
.dynamic 608 608 0 0.0
.got 4696 4672 -24 -0.5
.init 27 27 0 0.0
.init_array 1176 1168 -8 -0.7
.rodata 280907 280427 -480 -0.2
.text 2450098 2447570 -2528 -0.1
bridge-app debug+rpc (read only) 2412801 2409009 -3792 -0.2
(read/write) 129560 129488 -72 -0.1
.bss 51008 51008 0 0.0
.data 3792 3792 0 0.0
.data.rel.ro 68680 68632 -48 -0.1
.dynamic 608 608 0 0.0
.got 4600 4560 -40 -0.9
.init 27 27 0 0.0
.init_array 848 840 -8 -0.9
.rodata 211232 210784 -448 -0.2
.text 2034018 2031234 -2784 -0.1
chip-tool debug (read only) 11081345 11077777 -3568 -0.0
(read/write) 658440 658336 -104 -0.0
.bss 25944 25944 0 0.0
.data 2754 2754 0 0.0
.data.rel.ro 623080 623048 -32 -0.0
.dynamic 608 608 0 0.0
.got 5216 5176 -40 -0.8
.init 27 27 0 0.0
.init_array 776 768 -8 -1.0
.rodata 592221 591773 -448 -0.1
.text 8965204 8962692 -2512 -0.0
chip-tool-ipv6only arm64 (read only) 10436396 10431436 -4960 -0.0
(read/write) 706465 706337 -128 -0.0
.bss 33953 33953 0 0.0
.data 2768 2768 0 0.0
.data.rel.ro 650720 650624 -96 -0.0
.dynamic 560 560 0 0.0
.got 13928 13912 -16 -0.1
.init 24 24 0 0.0
.init_array 208 208 0 0.0
.rodata 518220 518076 -144 -0.0
.text 8262340 8258228 -4112 -0.0
lighting-app debug+rpc (read only) 2640233 2639913 -320 -0.0
(read/write) 132248 132272 24 0.0
.bss 49984 49984 0 0.0
.data 2288 2288 0 0.0
.data.rel.ro 73800 73800 0 0.0
.dynamic 608 608 0 0.0
.got 4600 4624 24 0.5
.init 27 27 0 0.0
.init_array 944 936 -8 -0.8
.rodata 228096 227648 -448 -0.2
.text 2236162 2235938 -224 -0.0
lock-app debug (read only) 2602241 2599017 -3224 -0.1
(read/write) 127296 127224 -72 -0.1
.bss 48416 48416 0 0.0
.data 1904 1904 0 0.0
.data.rel.ro 70728 70680 -48 -0.1
.dynamic 608 608 0 0.0
.got 4672 4656 -16 -0.3
.init 27 27 0 0.0
.init_array 920 912 -8 -0.9
.rodata 244328 243880 -448 -0.2
.text 2186306 2183794 -2512 -0.1
ota-provider-app debug (read only) 2398777 2395441 -3336 -0.1
(read/write) 120824 120752 -72 -0.1
.bss 47936 47936 0 0.0
.data 2128 2128 0 0.0
.data.rel.ro 64648 64600 -48 -0.1
.dynamic 608 608 0 0.0
.got 4696 4672 -24 -0.5
.init 27 27 0 0.0
.init_array 784 776 -8 -1.0
.rodata 216904 216456 -448 -0.2
.text 2013330 2010802 -2528 -0.1
ota-requestor-app debug (read only) 2563961 2560641 -3320 -0.1
(read/write) 129136 129064 -72 -0.1
.bss 50464 50464 0 0.0
.data 2496 2496 0 0.0
.data.rel.ro 69992 69944 -48 -0.1
.dynamic 608 608 0 0.0
.got 4688 4664 -24 -0.5
.init 27 27 0 0.0
.init_array 872 864 -8 -0.9
.rodata 223952 223504 -448 -0.2
.text 2162370 2159858 -2512 -0.1
shell debug (read only) 2626433 2623241 -3192 -0.1
(read/write) 143016 142944 -72 -0.1
.bss 57864 57864 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 78064 78016 -48 -0.1
.dynamic 608 608 0 0.0
.got 4136 4120 -16 -0.4
.init 27 27 0 0.0
.init_array 1048 1040 -8 -0.8
.rodata 240178 239762 -416 -0.2
.text 2226610 2224098 -2512 -0.1
thermostat-no-ble arm64 (read only) 2392844 2389868 -2976 -0.1
(read/write) 143665 143777 112 0.1
.bss 55377 55425 48 0.1
.data 1816 1816 0 0.0
.data.rel.ro 77280 77280 0 0.0
.dynamic 560 560 0 0.0
.got 5184 5184 0 0.0
.init 24 24 0 0.0
.init_array 440 440 0 0.0
.rodata 144548 144724 176 0.1
.text 2005296 2001904 -3392 -0.2
tv-app debug (read only) 3236713 3234913 -1800 -0.1
(read/write) 261752 261744 -8 -0.0
.bss 170552 170552 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 80272 80240 -32 -0.0
.dynamic 608 608 0 0.0
.got 4976 4992 16 0.3
.init 27 27 0 0.0
.init_array 1080 1072 -8 -0.7
.rodata 268184 267768 -416 -0.2
.text 2775186 2773618 -1568 -0.1
tv-casting-app debug (read only) 5585641 5583753 -1888 -0.0
(read/write) 161896 161856 -40 -0.0
.bss 52120 52120 0 0.0
.data 1936 1936 0 0.0
.data.rel.ro 101224 101192 -32 -0.0
.dynamic 608 608 0 0.0
.got 4896 4912 16 0.3
.init 27 27 0 0.0
.init_array 1064 1056 -8 -0.8
.rodata 355961 355481 -480 -0.1
.text 4954226 4952642 -1584 -0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2452768 2452768 0 0.0
.bss 215028 215028 0 0.0
.data 5872 5872 0 0.0
.text 1415412 1415412 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1188191 1188191 0 0.0
bss 145301 145301 0 0.0
rodata 144836 144836 0 0.0
text 816996 816996 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1167475 1167475 0 0.0
bss 144528 144528 0 0.0
rodata 136576 136576 0 0.0
text 805334 805334 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 841952 841952 0 0.0
(read/write) 1745940 1745940 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 188728 188728 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1231262 1231262 0 0.0
.debug_aranges 110712 110712 0 0.0
.debug_frame 371204 371204 0 0.0
.debug_info 26899490 26899490 0 0.0
.debug_line 3673871 3673871 0 0.0
.debug_loc 3588816 3588816 0 0.0
.debug_ranges 337960 337960 0 0.0
.debug_str 3435299 3435299 0 0.0
.heap 841952 841952 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 570460 570460 0 0.0
.symtab 421744 421744 0 0.0
.text 1546160 1546160 0 0.0
.zero.table 8 8 0 0.0
text 0 0 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 842688 842688 0 0.0
(read/write) 1688548 1688548 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 187992 187992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2664 2664 0 0.0
.debug_abbrev 1223105 1223105 0 0.0
.debug_aranges 110184 110184 0 0.0
.debug_frame 374284 374284 0 0.0
.debug_info 26636120 26636120 0 0.0
.debug_line 3694663 3694663 0 0.0
.debug_loc 3576453 3576453 0 0.0
.debug_ranges 336576 336576 0 0.0
.debug_str 3424320 3424320 0 0.0
.heap 842688 842688 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 534549 534549 0 0.0
.symtab 408176 408176 0 0.0
.text 1489504 1489504 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
light cy8ckit_062s2_43012 (read only) 850872 850872 0 0.0
(read/write) 1607004 1607004 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 180016 180016 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2456 2456 0 0.0
.debug_abbrev 1057613 1057613 0 0.0
.debug_aranges 102384 102384 0 0.0
.debug_frame 344600 344600 0 0.0
.debug_info 22097475 22097476 1 0.0
.debug_line 3264197 3264197 0 0.0
.debug_loc 3274179 3274179 0 0.0
.debug_ranges 301872 301872 0 0.0
.debug_str 3229759 3229759 0 0.0
.heap 850872 850872 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 470874 470874 0 0.0
.symtab 376560 376560 0 0.0
.text 1416144 1416144 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
lock cy8ckit_062s2_43012 (read only) 845880 845880 0 0.0
(read/write) 1640780 1640780 0 0.0
.ARM.attributes 46 46 0 0.0
.ARM.exidx 8 8 0 0.0
.bss 184992 184992 0 0.0
.comment 204 204 0 0.0
.copy.table 24 24 0 0.0
.cy_m0p_image 6216 6216 0 0.0
.cy_sharedmem 8 8 0 0.0
.data 2472 2472 0 0.0
.debug_abbrev 1059619 1059619 0 0.0
.debug_aranges 102784 102784 0 0.0
.debug_frame 346472 346472 0 0.0
.debug_info 22330842 22330842 0 0.0
.debug_line 3261187 3261187 0 0.0
.debug_loc 3301773 3301773 0 0.0
.debug_ranges 303816 303816 0 0.0
.debug_str 3249234 3249234 0 0.0
.heap 845880 845880 0 0.0
.noinit 148 148 0 0.0
.ramVectors 736 736 0 0.0
.shstrtab 288 288 0 0.0
.stab 156 156 0 0.0
.stabstr 335 335 0 0.0
.stack_dummy 4096 4096 0 0.0
.strtab 473277 473277 0 0.0
.symtab 378240 378240 0 0.0
.text 1444928 1444928 0 0.0
.zero.table 0 0 0 0.0
8 8 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1149960 1149968 8 0.0
.bss 110612 110612 0 0.0
.data 848 848 0 0.0
.text 597060 597068 8 0.0
lock-app qpg6105+debug (read/write) 1114760 1114760 0 0.0
.bss 106388 106388 0 0.0
.data 836 836 0 0.0
.text 561856 561856 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 790820 790820 0 0.0
bss 72480 72480 0 0.0
noinit 43520 43520 0 0.0
text 554264 554266 2 0.0
lighting-app tlsr9518adk80d (read/write) 806068 806068 0 0.0
bss 73240 73240 0 0.0
noinit 43520 43520 0 0.0
text 566414 566414 0 0.0
ota-requestor-app tlsr9518adk80d (read/write) 804952 804952 0 0.0
bss 74052 74052 0 0.0
noinit 43520 43520 0 0.0
text 565284 565286 2 0.0

@andy31415 andy31415 merged commit 0e41b19 into project-chip:master Nov 4, 2022
@msandstedt
Copy link
Contributor

Problem

When Linux platform uses WiFi (wpa_supplicant) and BLE (BlueZ) it runs one GLib main event loop per remote D-Bus service (one for wpa_supplicant and one for BlueZ). It is possible to handle all D-Bus related processing in one event loop - it's not required to start new thread for every D-Bus connection (D-Bus socket messages are handled in only one context any way - D-Bus connection is shared). Also, new WiFi address changer thread is started every time the PlatformManagerImpl::_InitChipStack() is called, but previous one is not terminated when calling PlatformManagerImpl::_Shutdown() - thread leakage can be seen when running ./tests/TestPlatformMgr test.

@arkq ,

I suspect this fixes #9214. Can you confirm?

@arkq
Copy link
Contributor Author

arkq commented Nov 8, 2022

@msandstedt It will definitely "fix" that issue, because the MainLoop::EnsureStarted() is gone :D

Right now there will be only one thread started and it's joined in the PlatformManagerImpl::_Shutdown() so there should be no leakage (as long as _Shutdown() will be called before calling _InitChipStack() again, but I assume that calling _InitChipStack() twice or more should be treated as programmer error).

@msandstedt
Copy link
Contributor

@msandstedt It will definitely "fix" that issue, because the MainLoop::EnsureStarted() is gone :D

Right now there will be only one thread started and it's joined in the PlatformManagerImpl::_Shutdown() so there should be no leakage (as long as _Shutdown() will be called before calling _InitChipStack() again, but I assume that calling _InitChipStack() twice or more should be treated as programmer error).

OK, that is great.

But just to check, can we still do this?

_InitChipStack() 
_Shutdown() 
_InitChipStack() 
_Shutdown()

@arkq
Copy link
Contributor Author

arkq commented Nov 8, 2022

Yes, such pattern is possible. Twice or trice in a row I should say :)

adbridge pushed a commit to ARM-software/connectedhomeip that referenced this pull request Nov 18, 2022
* Unregister from BlueZ when shutting down BLE manager

* Return CHIP_ERROR from all BlueZ helper functions

* Remove not used class method

* Remove D-Bus connection handler from PlatformManager

The D-Bus connection handler stored in the PlatformManager is not
used anywhere. It's not required to pre-connect to D-Bus, because
the connection (for given bus type) returned by the g_bus_get_sync()
function is shared with other callers.

* Run only one GLib main event loop per Matter SDK

It is not necessary to start new GLib main event loop for every new
D-Bus communication with external service. Single main event loop can
handle all such communication.

* Run WiFi IP address change listener in GLib main loop

* Properly release cancellable object on cleanup

* Explicitly wait for glib main thread to exit

* Workaround for TSAN false positive reports with glib

TSAN thinks that memory accessed before the call to g_source_attach()
(which is internally used by e.g. g_main_context_invoke() and
g_idle_add()) needs to be guarded by a mutex, otherwise that's a race
condition between the thread that is creating shared data (the current
thread) and the glib main event loop thread. In fact such race condition
does not occur because g_source_attach() acts here as pthread_create() -
code is not executed on the other thread before the g_source_attach() is
called.

Co-authored-by: Andrei Litvin <[email protected]>
adbridge pushed a commit to ARM-software/connectedhomeip that referenced this pull request Nov 18, 2022
* Unregister from BlueZ when shutting down BLE manager

* Return CHIP_ERROR from all BlueZ helper functions

* Remove not used class method

* Remove D-Bus connection handler from PlatformManager

The D-Bus connection handler stored in the PlatformManager is not
used anywhere. It's not required to pre-connect to D-Bus, because
the connection (for given bus type) returned by the g_bus_get_sync()
function is shared with other callers.

* Run only one GLib main event loop per Matter SDK

It is not necessary to start new GLib main event loop for every new
D-Bus communication with external service. Single main event loop can
handle all such communication.

* Run WiFi IP address change listener in GLib main loop

* Properly release cancellable object on cleanup

* Explicitly wait for glib main thread to exit

* Workaround for TSAN false positive reports with glib

TSAN thinks that memory accessed before the call to g_source_attach()
(which is internally used by e.g. g_main_context_invoke() and
g_idle_add()) needs to be guarded by a mutex, otherwise that's a race
condition between the thread that is creating shared data (the current
thread) and the glib main event loop thread. In fact such race condition
does not occur because g_source_attach() acts here as pthread_create() -
code is not executed on the other thread before the g_source_attach() is
called.

Co-authored-by: Andrei Litvin <[email protected]>
@yzm157
Copy link
Contributor

yzm157 commented Mar 22, 2023

If using glib main loop, can't initChipStack in GUI application, such as Qt/Gtk

@arkq
Copy link
Contributor Author

arkq commented Mar 22, 2023

@yzm157 what do you mean "can't initChipStack in GUI application"? There is a deadlock, segfault, etc. Do you got any logs?

@yzm157
Copy link
Contributor

yzm157 commented Mar 22, 2023

@yzm157 what do you mean "can't initChipStack in GUI application"? There is a deadlock, segfault, etc. Do you got any logs?

I created an application using pyqt5,
failed to exit after calling chip.native.Init(0), it seems to be deadlocked.
This issue was not found on the v1.0-branch branch

@arkq
Copy link
Contributor Author

arkq commented Mar 22, 2023

Can you attach to deadlocked process with gdb and dump backtraces of all threads gdb -p <PID> -ex 'thread apply all bt' ?

@yzm157
Copy link
Contributor

yzm157 commented Mar 22, 2023

@arkq
Below is the gdb log:

GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 2538949
[New LWP 2538950]
[New LWP 2538951]
[New LWP 2538952]
[New LWP 2538953]
[New LWP 2538954]
[New LWP 2538955]
[New LWP 2538956]
[New LWP 2538957]
[New LWP 2538958]
[New LWP 2538959]
[New LWP 2538960]
[New LWP 2538961]
[New LWP 2538962]
[New LWP 2538963]
[New LWP 2538964]
[New LWP 2538965]
[New LWP 2538966]
[New LWP 2538967]
[New LWP 2538968]
[New LWP 2538969]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
__futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fffd7673998) at ./nptl/futex-internal.c:57

Thread 21 (Thread 0x7f5c8ddff640 (LWP 2538969) "gmain-matter"):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00007f5cc9b6a1d3 in g_cond_wait () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f5cc9b19235 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f5cc9b1b318 in g_main_loop_run () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f5c8e4f0c09 in chip::DeviceLayer::(anonymous namespace)::GLibMainLoopThread(void*) (loop=0x559e8ddf9a60) at ../../src/platform/Linux/PlatformManagerImpl.cpp:61
#5  0x00007f5cc9b4aa51 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#7  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 20 (Thread 0x7f5c8effd640 (LWP 2538968) "python3:disk$0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8cb86de8) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8cb86de8) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8cb86de8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8cb86d98, cond=0x559e8cb86dc0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8cb86dc0, mutex=0x559e8cb86d98) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad2be35b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 19 (Thread 0x7f5c8f7fe640 (LWP 2538967) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 18 (Thread 0x7f5c8ffff640 (LWP 2538966) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 17 (Thread 0x7f5c94ff9640 (LWP 2538965) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 16 (Thread 0x7f5c957fa640 (LWP 2538964) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 15 (Thread 0x7f5c95ffb640 (LWP 2538963) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 14 (Thread 0x7f5c967fc640 (LWP 2538962) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 13 (Thread 0x7f5c96ffd640 (LWP 2538961) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 12 (Thread 0x7f5c977fe640 (LWP 2538960) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8d14a6e0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8d14a6e0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8d14a690, cond=0x559e8d14a6b8) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8d14a6b8, mutex=0x559e8d14a690) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8bb903 in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 11 (Thread 0x7f5c97fff640 (LWP 2538959) "llvmpipe-7"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad2908) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad2908) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad2908, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad28b8, cond=0x559e8dad28e0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad28e0, mutex=0x559e8dad28b8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 10 (Thread 0x7f5c9c9fa640 (LWP 2538958) "llvmpipe-6"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad27a8) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad27a8) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad27a8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad2758, cond=0x559e8dad2780) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad2780, mutex=0x559e8dad2758) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 9 (Thread 0x7f5c9d1fb640 (LWP 2538957) "llvmpipe-5"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad2648) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad2648) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad2648, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad25f8, cond=0x559e8dad2620) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad2620, mutex=0x559e8dad25f8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 8 (Thread 0x7f5c9d9fc640 (LWP 2538956) "llvmpipe-4"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad24e8) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad24e8) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad24e8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad2498, cond=0x559e8dad24c0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad24c0, mutex=0x559e8dad2498) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 7 (Thread 0x7f5c9e1fd640 (LWP 2538955) "llvmpipe-3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad2388) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad2388) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad2388, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad2338, cond=0x559e8dad2360) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad2360, mutex=0x559e8dad2338) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 6 (Thread 0x7f5c9e9fe640 (LWP 2538954) "llvmpipe-2"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad2228) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad2228) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad2228, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad21d8, cond=0x559e8dad2200) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad2200, mutex=0x559e8dad21d8) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 5 (Thread 0x7f5c9f1ff640 (LWP 2538953) "llvmpipe-1"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad20c8) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad20c8) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad20c8, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad2078, cond=0x559e8dad20a0) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad20a0, mutex=0x559e8dad2078) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 4 (Thread 0x7f5cacde8640 (LWP 2538952) "llvmpipe-0"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x559e8dad1f68) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x559e8dad1f68) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x559e8dad1f68, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x559e8dad1f18, cond=0x559e8dad1f40) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x559e8dad1f40, mutex=0x559e8dad1f18) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5cad30aced in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#6  0x00007f5cad8becfb in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#7  0x00007f5cad30ac1b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#8  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#9  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 3 (Thread 0x7f5caf533640 (LWP 2538951) "QXcbEventQueue"):
#0  0x00007f5cccb18d7f in __GI___poll (fds=0x7f5caf532c78, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f5cca76b7e2 in  () at /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f5cca76d22c in xcb_wait_for_event () at /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f5caf5e2448 in  () at /usr/local/lib/python3.10/dist-packages/PySide6/Qt/plugins/platforms/../../lib/libQt6XcbQpa.so.6
#4  0x00007f5cc06cabbf in  () at /usr/local/lib/python3.10/dist-packages/PySide6/Qt/lib/libQt6Core.so.6
#5  0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#6  0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 2 (Thread 0x7f5ccafff640 (LWP 2538950) "python3"):
#0  __futex_abstimed_wait_common64 (private=<optimized out>, cancel=true, abstime=0x7f5ccaffe320, op=137, expected=0, futex_word=0x7f5cc4000dc0) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=<optimized out>, abstime=0x7f5ccaffe320, clockid=0, expected=0, futex_word=0x7f5cc4000dc0) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7f5cc4000dc0, expected=expected@entry=0, clockid=clockid@entry=1, abstime=abstime@entry=0x7f5ccaffe320, private=<optimized out>) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca9bf50 in do_futex_wait (sem=sem@entry=0x7f5cc4000dc0, clockid=clockid@entry=1, abstime=abstime@entry=0x7f5ccaffe320) at ./nptl/sem_waitcommon.c:111
#4  0x00007f5ccca9bffe in __new_sem_wait_slow64 (sem=0x7f5cc4000dc0, clockid=1, abstime=0x7f5ccaffe320) at ./nptl/sem_waitcommon.c:183
#5  0x0000559e8b48009b in PyThread_acquire_lock_timed ()
#6  0x0000559e8b4d8464 in  ()
#7  0x0000559e8b4c30a9 in  ()
#8  0x0000559e8b4aa8cb in _PyEval_EvalFrameDefault ()
#9  0x0000559e8b4c21ec in _PyFunction_Vectorcall ()
#10 0x0000559e8b4aa8cb in _PyEval_EvalFrameDefault ()
#11 0x0000559e8b4cfe91 in  ()
#12 0x0000559e8b4acaf0 in _PyEval_EvalFrameDefault ()
#13 0x0000559e8b4c21ec in _PyFunction_Vectorcall ()
#14 0x0000559e8b4aa8cb in _PyEval_EvalFrameDefault ()
#15 0x0000559e8b4c21ec in _PyFunction_Vectorcall ()
#16 0x0000559e8b4aa8cb in _PyEval_EvalFrameDefault ()
#17 0x0000559e8b4cfe91 in  ()
#18 0x0000559e8b5fbe5b in  ()
#19 0x0000559e8b5f1f58 in  ()
#20 0x00007f5ccca94b43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#21 0x00007f5cccb26a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Thread 1 (Thread 0x7f5cccd4f000 (LWP 2538949) "python3"):
#0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fffd7673998) at ./nptl/futex-internal.c:57
#1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7fffd7673998) at ./nptl/futex-internal.c:87
#2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fffd7673998, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
#3  0x00007f5ccca93ac1 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7f5c8e698640 <chip::DeviceLayer::PlatformManagerImpl::sInstance+384>, cond=0x7fffd7673970) at ./nptl/pthread_cond_wait.c:503
#4  ___pthread_cond_wait (cond=0x7fffd7673970, mutex=0x7f5c8e698640 <chip::DeviceLayer::PlatformManagerImpl::sInstance+384>) at ./nptl/pthread_cond_wait.c:627
#5  0x00007f5c8e4f1d67 in std::condition_variable::wait<chip::DeviceLayer::PlatformManagerImpl::CallbackIndirection::Wait(std::unique_lock<std::mutex>&)::<lambda()> >(std::unique_lock<std::mutex> &, struct {...}) (this=0x7fffd7673970, __lock=..., __p=...) at /usr/include/c++/11/condition_variable:103
#6  0x00007f5c8e4f18a3 in chip::DeviceLayer::PlatformManagerImpl::CallbackIndirection::Wait(std::unique_lock<std::mutex>&) (this=0x7fffd7673960, lock=...) at ../../src/platform/Linux/PlatformManagerImpl.cpp:264
#7  0x00007f5c8e4f1501 in chip::DeviceLayer::PlatformManagerImpl::_InitChipStack() (this=0x7f5c8e6984c0 <chip::DeviceLayer::PlatformManagerImpl::sInstance>) at ../../src/platform/Linux/PlatformManagerImpl.cpp:203
#8  0x00007f5c8e256d90 in chip::DeviceLayer::PlatformManager::InitChipStack() (this=0x7f5c8e6984c0 <chip::DeviceLayer::PlatformManagerImpl::sInstance>) at ../../src/include/platform/PlatformManager.h:373
#9  0x00007f5c8e256f48 in pychip_CommonStackInit(PyCommonStackInitParams const*) (aParams=0x7f5caf7eae40) at ../../src/controller/python/chip/native/CommonStackInit.cpp:74
#10 0x00007f5cccc4ee2e in  () at /lib/x86_64-linux-gnu/libffi.so.8
#11 0x00007f5cccc4b493 in  () at /lib/x86_64-linux-gnu/libffi.so.8
#12 0x00007f5cccc7d451 in  () at /usr/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so
#13 0x00007f5cccc7ca68 in  () at /usr/lib/python3.10/lib-dynload/_ctypes.cpython-310-x86_64-linux-gnu.so
#14 0x0000559e8b4b84ab in _PyObject_MakeTpCall ()
#15 0x0000559e8b4b0e66 in _PyEval_EvalFrameDefault ()
#16 0x0000559e8b4c21ec in _PyFunction_Vectorcall ()
#17 0x0000559e8b4b0462 in _PyEval_EvalFrameDefault ()
#18 0x0000559e8b4a6ed6 in  ()
#19 0x0000559e8b59d366 in PyEval_EvalCode ()
#20 0x0000559e8b5ca108 in  ()
#21 0x0000559e8b5c2f5b in  ()
#22 0x0000559e8b5c9e55 in  ()
#23 0x0000559e8b5c9338 in _PyRun_SimpleFileObject ()
#24 0x0000559e8b5c9033 in _PyRun_AnyFileObject ()
#25 0x0000559e8b5ba2de in Py_RunMain ()
#26 0x0000559e8b59032d in Py_BytesMain ()
#27 0x00007f5ccca29d90 in __libc_start_call_main (main=main@entry=0x559e8b5902f0, argc=argc@entry=3, argv=argv@entry=0x7fffd7674588) at ../sysdeps/nptl/libc_start_call_main.h:58
#28 0x00007f5ccca29e40 in __libc_start_main_impl (main=0x559e8b5902f0, argc=3, argv=0x7fffd7674588, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffd7674578) at ../csu/libc-start.c:392
#29 0x0000559e8b590225 in _start ()

The following Python code can reproduce this problem:

import chip.native
from PySide6.QtWidgets import QApplication

app = QApplication(sys.argv)
chip.native.Init(0)    # deadlock
app.exec()

@yzm157
Copy link
Contributor

yzm157 commented Mar 22, 2023

@arkq

Looks like it's caused by mutex lock, could removing the lock cause other problems?

CHIP_ERROR PlatformManagerImpl::_InitChipStack()
{
#if CHIP_DEVICE_CONFIG_WITH_GLIB_MAIN_LOOP

    mGLibMainLoop       = g_main_loop_new(nullptr, FALSE);
    mGLibMainLoopThread = g_thread_new("gmain-matter", GLibMainLoopThread, mGLibMainLoop);

//    {
//        std::unique_lock<std::mutex> lock(mGLibMainLoopCallbackIndirectionMutex);
//        CallbackIndirection startedInd([](void *) { return G_SOURCE_REMOVE; }, nullptr);
//        g_idle_add(G_SOURCE_FUNC(&CallbackIndirection::Callback), &startedInd);
//        startedInd.Wait(lock);
//    }

#endif

#if CHIP_DEVICE_CONFIG_ENABLE_WIFI
    ReturnErrorOnFailure(RunWiFiIPChangeListener());
#endif

    // Initialize the configuration system.
    ReturnErrorOnFailure(Internal::PosixConfig::Init());

    // Call _InitChipStack() on the generic implementation base class
    // to finish the initialization process.
    ReturnErrorOnFailure(Internal::GenericPlatformManagerImpl_POSIX<PlatformManagerImpl>::_InitChipStack());

    // Now set up our device instance info provider.  We couldn't do that
    // earlier, because the generic implementation sets a generic one.
    SetDeviceInstanceInfoProvider(&DeviceInstanceInfoProviderMgrImpl());

    mStartTime = System::SystemClock().GetMonotonicTimestamp();

    return CHIP_NO_ERROR;
}

@arkq
Copy link
Contributor Author

arkq commented Mar 22, 2023

Yes, however, this block of code is more or less required. Right now I've got some other important work to do, but I'll try to investigate this issue tomorrow. Sorry for inconvenience.

One thing you can check is whether the [](void *) { return G_SOURCE_REMOVE; } is executed, and if yes, on which thread - simply add ChipLogError into that lambda.

@yzm157
Copy link
Contributor

yzm157 commented Mar 23, 2023

One thing you can check is whether the [](void *) { return G_SOURCE_REMOVE; } is executed, and if yes, on which thread - simply add ChipLogError into that lambda.

No, not executed

@arkq
Copy link
Contributor Author

arkq commented Mar 23, 2023

OK, I think the problem is with app = QApplication(sys.argv) locking glib default context, but the event loop is not running yet because app.exec() is not executed. However, chip.native.Init(0) requires event loop to be running.... As a quick workaround, maybe you can somehow run chip.native.Init(0) after app.exec(), or simply keep this "wait" code block commented out (for now). Currently, I'm working on Tizen platform, but in the same area (glib event loop). As a next task (hopefully starting on Monday) I will get this deadlock issue - the core problem is (I think) the nullptr in the mGLibMainLoop = g_main_loop_new(nullptr, FALSE); which attaches Matter glib main event loop to the default context (Qt does the same thing, hence the conflict). I will try to rewrite glib main loop to use matter-dedicated context.

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.

4 participants