Closed hassila closed 11 months ago
==================
WARNING: ThreadSanitizer: data race (pid=6386)
Read of size 8 at 0x564faeb56ad0 by thread T5
:
#0 _swift_alloc_object_hook shims.c:? (BenchmarkPackageTests.xctest+0x347403)
#1 $ss32_copyCollectionToContiguousArrayys0dE0Vy7ElementQzGxSlRzlFSRy13SystemPackage0G4CharVG_Tg5 crtstuff.c:? (BenchmarkPackageTests.xctest+0x354b3b)
#2 $sSS11withCStringyxxSPys4Int8VGKXEKlF13SystemPackage0D6StringV_Tg504$s13d10Package0A6f16VyACSScfcACSPys4C7VGXEfU_Tf1cn_n crtstuff.c:? (BenchmarkPackageTests.xctest+0x35b4a7)
#3 $s13SystemPackage8FilePathV13stringLiteralACSS_tcfC ??:? (BenchmarkPackageTests.xctest+0x35a0f8)
#4 $s9Benchmark28OperatingSystemStatsProducerC011readProcessD0So07processD0VyF ??:? (BenchmarkPackageTests.xctest+0x29f848)
#5 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a085d)
#6 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_TA ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x23acc7)
#7 $sIeg_IeyB_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2259b6)
#8 __tsan::invoke_and_release_block(void*) tsan_interceptors_libdispatch.cpp:? (BenchmarkPackageTests.xctest+0x11c4c6)
#9 _dispatch_worker_thread queue.c:? (libdispatch.so+0x3631c)
Previous write of size 8 at 0x564faeb56ad0 by main thread:
#0 swift_runtime_set_alloc_object_hook ??:? (BenchmarkPackageTests.xctest+0x347352)
#1 $s9Benchmark16ARCStatsProducerC4hookyyFZ ??:? (BenchmarkPackageTests.xctest+0x21bb08)
#2 $s14BenchmarkTests024OperatingSystemAndMallocB0C20testARCStatsProduceryyKF ??:? (BenchmarkPackageTests.xctest+0x2bc26f)
#3 $s14BenchmarkTests024OperatingSystemAndMallocB0C0a17PackageDiscoveredB0E05__allb2__cdefB033_401C251555669E6E1CBAF3A82C1C3395LLSaySS_yyKcACctGvpZfiyyKcACcfu_yyKcfu0_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a592b)
#4 $s14BenchmarkTests024OperatingSystemAndMallocB0C0a17PackageDiscoveredB0E05__allb2__cdefB033_401C251555669E6E1CBAF3A82C1C3395LLSaySS_yyKcACctGvpZfiyyKcACcfu_yyKcfu0_TA BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6408)
#5 $ss5Error_pIegzo_ytsAA_pIegrzo_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a4ecd)
#6 $ss5Error_pIegzo_ytsAA_pIegrzo_TRTATm BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6be6)
#7 $ss5Error_pIegzo_ytsAA_pIegrzo_TRTA.32 BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6445)
#8 __libc_init_first ??:? (libc.so.6+0x29d8f) (BuildId: a43bfc8428df6623cd498c9c0caeb91aec9be4f9)
As if synchronized via sleep:
#0 usleep ??:? (BenchmarkPackageTests.xctest+0x92987)
#1 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a084e)
#2 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_TA ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x23acc7)
#3 $sIeg_IeyB_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2259b6)
#4 __tsan::invoke_and_release_block(void*) tsan_interceptors_libdispatch.cpp:? (BenchmarkPackageTests.xctest+0x11c4c6)
#5 _dispatch_worker_thread queue.c:? (libdispatch.so+0x3631c)
Location is global '<null>' at 0x000000000000 (BenchmarkPackageTests.xctest+0x140bad0)
Thread T5 (tid=6395, running) created by thread T3 at:
#0 pthread_create ??:? (BenchmarkPackageTests.xctest+0x95afb)
#1 _dispatch_root_queue_poke_slow queue.c:? (libdispatch.so+0x32d35)
#2 $s8Dispatch0A5QueueC5async5group3qos5flags7executeyAA0A5GroupCSg_AA0A3QoSVAA0A13WorkItemFlagsVyyXBtF ??:? (libswiftDispatch.so+0x1cbf6)
#3 $s9Benchmark0A6RunnerV3runyyYaKFTY0_ ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x25baef)
#4 swift::runJobInEstablishedExecutorContext(swift::Job*) crtstuff.c:? (libswift_Concurrency.so+0x4954c)
#5 _dispatch_continuation_pop :? (libdispatch.so+0x2b478)
SUMMARY: ThreadSanitizer: data race shims.c:? in _swift_alloc_object_hook
==================
==================
WARNING: ThreadSanitizer: data race (pid=6386)
Read of size 8 at 0x564faeb56ae0 by thread T4:
#0 _swift_alloc_object_hook shims.c:? (BenchmarkPackageTests.xctest+0x347434)
#1 $ss32_copyCollectionToContiguousArrayys0dE0Vy7ElementQzGxSlRzlFSRy13SystemPackage0G4CharVG_Tg5 crtstuff.c:? (BenchmarkPackageTests.xctest+0x354b3b)
#2 $sSS11withCStringyxxSPys4Int8VGKXEKlF13SystemPackage0D6StringV_Tg504$s13d10Package0A6f16VyACSScfcACSPys4C7VGXEfU_Tf1cn_n crtstuff.c:? (BenchmarkPackageTests.xctest+0x35b4a7)
#3 $s13SystemPackage8FilePathV13stringLiteralACSS_tcfC ??:? (BenchmarkPackageTests.xctest+0x35a0f8)
#4 $s9Benchmark28OperatingSystemStatsProducerC011readProcessD0So07processD0VyF ??:? (BenchmarkPackageTests.xctest+0x29f848)
#5 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a085d)
#6 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_TA ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x23acc7)
#7 $sIeg_IeyB_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2259b6)
#8 __tsan::invoke_and_release_block(void*) tsan_interceptors_libdispatch.cpp:? (BenchmarkPackageTests.xctest+0x11c4c6)
#9 _dispatch_worker_thread queue.c:? (libdispatch.so+0x3631c)
Previous write of size 8 at 0x564faeb56ae0 by main thread:
#0 swift_runtime_set_alloc_object_hook ??:? (BenchmarkPackageTests.xctest+0x347378)
#1 $s9Benchmark16ARCStatsProducerC4hookyyFZ ??:? (BenchmarkPackageTests.xctest+0x21bb08)
#2 $s14BenchmarkTests024OperatingSystemAndMallocB0C20testARCStatsProduceryyKF ??:? (BenchmarkPackageTests.xctest+0x2bc26f)
#3 $s14BenchmarkTests024OperatingSystemAndMallocB0C0a17PackageDiscoveredB0E05__allb2__cdefB033_401C251555669E6E1CBAF3A82C1C3395LLSaySS_yyKcACctGvpZfiyyKcACcfu_yyKcfu0_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a592b)
#4 $s14BenchmarkTests024OperatingSystemAndMallocB0C0a17PackageDiscoveredB0E05__allb2__cdefB033_401C251555669E6E1CBAF3A82C1C3395LLSaySS_yyKcACctGvpZfiyyKcACcfu_yyKcfu0_TA BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6408)
#5 $ss5Error_pIegzo_ytsAA_pIegrzo_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a4ecd)
#6 $ss5Error_pIegzo_ytsAA_pIegrzo_TRTATm BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6be6)
#7 $ss5Error_pIegzo_ytsAA_pIegrzo_TRTA.32 BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6445)
#8 __libc_init_first ??:? (libc.so.6+0x29d8f) (BuildId: a43bfc8428df6623cd498c9c0caeb91aec9be4f9)
As if synchronized via sleep:
#0 usleep ??:? (BenchmarkPackageTests.xctest+0x92987)
#1 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a084e)
#2 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_TA ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x23acc7)
#3 $sIeg_IeyB_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2259b6)
#4 __tsan::invoke_and_release_block(void*) tsan_interceptors_libdispatch.cpp:? (BenchmarkPackageTests.xctest+0x11c4c6)
#5 _dispatch_worker_thread queue.c:? (libdispatch.so+0x3631c)
Location is global '<null>' at 0x000000000000 (BenchmarkPackageTests.xctest+0x140bae0)
Thread T4 (tid=6394, running) created by thread T3 at:
#0 pthread_create ??:? (BenchmarkPackageTests.xctest+0x95afb)
#1 _dispatch_root_queue_poke_slow queue.c:? (libdispatch.so+0x32d35)
#2 $s8Dispatch0A5QueueC5async5group3qos5flags7executeyAA0A5GroupCSg_AA0A3QoSVAA0A13WorkItemFlagsVyyXBtF ??:? (libswiftDispatch.so+0x1cbf6)
#3 $s9Benchmark0A6RunnerV3runyyYaKFTY0_ ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x25baef)
#4 swift::runJobInEstablishedExecutorContext(swift::Job*) crtstuff.c:? (libswift_Concurrency.so+0x4954c)
#5 _dispatch_continuation_pop :? (libdispatch.so+0x2b478)
SUMMARY: ThreadSanitizer: data race shims.c:? in _swift_alloc_object_hook
==================
==================
WARNING: ThreadSanitizer: data race (pid=6386)
Read of size 8 at 0x564faeb56ad8 by thread T7:
#0 _swift_alloc_object_hook shims.c:? (BenchmarkPackageTests.xctest+0x347421)
#1 $ss32_copyCollectionToContiguousArrayys0dE0Vy7ElementQzGxSlRzlFSRy13SystemPackage0G4CharVG_Tg5 crtstuff.c:? (BenchmarkPackageTests.xctest+0x354b3b)
#2 $sSS11withCStringyxxSPys4Int8VGKXEKlF13SystemPackage0D6StringV_Tg504$s13d10Package0A6f16VyACSScfcACSPys4C7VGXEfU_Tf1cn_n crtstuff.c:? (BenchmarkPackageTests.xctest+0x35b4a7)
#3 $s13SystemPackage8FilePathV13stringLiteralACSS_tcfC ??:? (BenchmarkPackageTests.xctest+0x35a0f8)
#4 $s9Benchmark28OperatingSystemStatsProducerC011readProcessD0So07processD0VyF ??:? (BenchmarkPackageTests.xctest+0x29f848)
#5 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a085d)
#6 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_TA ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x23acc7)
#7 $sIeg_IeyB_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2259b6)
#8 __tsan::invoke_and_release_block(void*) tsan_interceptors_libdispatch.cpp:? (BenchmarkPackageTests.xctest+0x11c4c6)
#9 _dispatch_worker_thread queue.c:? (libdispatch.so+0x3631c)
Previous write of size 8 at 0x564faeb56ad8 by main thread:
#0 swift_runtime_set_alloc_object_hook ??:? (BenchmarkPackageTests.xctest+0x347365)
#1 $s9Benchmark16ARCStatsProducerC4hookyyFZ ??:? (BenchmarkPackageTests.xctest+0x21bb08)
#2 $s14BenchmarkTests024OperatingSystemAndMallocB0C20testARCStatsProduceryyKF ??:? (BenchmarkPackageTests.xctest+0x2bc26f)
#3 $s14BenchmarkTests024OperatingSystemAndMallocB0C0a17PackageDiscoveredB0E05__allb2__cdefB033_401C251555669E6E1CBAF3A82C1C3395LLSaySS_yyKcACctGvpZfiyyKcACcfu_yyKcfu0_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a592b)
#4 $s14BenchmarkTests024OperatingSystemAndMallocB0C0a17PackageDiscoveredB0E05__allb2__cdefB033_401C251555669E6E1CBAF3A82C1C3395LLSaySS_yyKcACctGvpZfiyyKcACcfu_yyKcfu0_TA BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6408)
#5 $ss5Error_pIegzo_ytsAA_pIegrzo_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a4ecd)
#6 $ss5Error_pIegzo_ytsAA_pIegrzo_TRTATm BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6be6)
#7 $ss5Error_pIegzo_ytsAA_pIegrzo_TRTA.32 BenchmarkTests.swift.o:? (BenchmarkPackageTests.xctest+0x2a6445)
#8 __libc_init_first ??:? (libc.so.6+0x29d8f) (BuildId: a43bfc8428df6623cd498c9c0caeb91aec9be4f9)
As if synchronized via sleep:
#0 usleep ??:? (BenchmarkPackageTests.xctest+0x92987)
#1 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_ crtstuff.c:? (BenchmarkPackageTests.xctest+0x2a084e)
#2 $s9Benchmark28OperatingSystemStatsProducerC13startSamplingyySiFyycfU_TA ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x23acc7)
#3 $sIeg_IeyB_TR crtstuff.c:? (BenchmarkPackageTests.xctest+0x2259b6)
#4 __tsan::invoke_and_release_block(void*) tsan_interceptors_libdispatch.cpp:? (BenchmarkPackageTests.xctest+0x11c4c6)
#5 _dispatch_worker_thread queue.c:? (libdispatch.so+0x3631c)
Location is global '<null>' at 0x000000000000 (BenchmarkPackageTests.xctest+0x140bad8)
Thread T7 (tid=6397, running) created by thread T3 at:
#0 pthread_create ??:? (BenchmarkPackageTests.xctest+0x95afb)
#1 _dispatch_root_queue_poke_slow queue.c:? (libdispatch.so+0x32d35)
#2 $s8Dispatch0A5QueueC5async5group3qos5flags7executeyAA0A5GroupCSg_AA0A3QoSVAA0A13WorkItemFlagsVyyXBtF ??:? (libswiftDispatch.so+0x1cbf6)
#3 $s9Benchmark0A6RunnerV3runyyYaKFTY0_ ARCStats.swift.o:? (BenchmarkPackageTests.xctest+0x25baef)
#4 swift::runJobInEstablishedExecutorContext(swift::Job*) crtstuff.c:? (libswift_Concurrency.so+0x4954c)
#5 _dispatch_continuation_pop :? (libdispatch.so+0x2b478)
SUMMARY: ThreadSanitizer: data race shims.c:? in _swift_alloc_object_hook
==================
Fixed with 1.14.0
For ARC hooks;
https://github.com/ordo-one/package-benchmark/actions/runs/6867542443/job/18676117502?pr=200