-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[SR-15890] [Concurrency] swift_task_alloc crashes on Linux Armv7 #58151
Comments
Script to build for Debian 11 Armv7 Hello, world! (LLDB)
(lldb) thread backtrace
|
Attaching build environment and diagnostic messages. OS: Debian GNU/Linux bookworm/sid aarch64 Host: MediaTek krane sku176 board Kernel: 5.17.0-rc3-cadmium CPU: (8) @ 1.989GHz Memory: 1766MiB / 3891MiB Linux lenovo-duet 5.17.0-rc3-cadmium #1 SMP PREEMPT Fri Feb 11 00:51:25 PST 2022 aarch64 GNU/Linux |
This is the output when running via `qemu-arm-static` with concurrency debug logs enabled in a Debian 11 VM on MacBook Pro (M1 Pro) coleman@macbook-linux:~/Developer/buildroot$ sudo chroot ~/Developer/buildroot/output/target /usr/bin/qemu-arm-static /usr/bin/hello coleman@macbook-linux:~/Developer/buildroot$ sudo chroot ~/Developer/buildroot/output/target /usr/bin/qemu-arm-static /usr/bin/hello |
[3070162544] [../stdlib/public/Concurrency/Task.cpp:567](swift_task_create_commonImpl) allocate task 0x1c280a0, parent = (nil), slab 512 [3070162544] [../stdlib/public/Concurrency/Task.cpp:646](swift_task_create_commonImpl) creating task 0x1c280a0 with parent (nil) [3070162544] [../stdlib/public/Concurrency/VoucherSupport.h:36](VoucherManager) [0xbe8bfba0] Constructing VoucherManager [3070162544] [../stdlib/public/Concurrency/Actor.cpp:1458](swift_job_runImpl) swift_job_runImpl(0x1c280a0) [3070162544] [../stdlib/public/Concurrency/TaskPrivate.h:369](flagAsRunning) 0x1c280a0->flagAsRunning() [3070162544] [../stdlib/public/Concurrency/VoucherSupport.h:65](swapToJob) [0xbe8bfba0] Swapping jobs to 0x1c280a0 [3070162544] [../stdlib/public/Concurrency/VoucherSupport.h:73](swapToJob) [0xbe8bfba0] Swapping jobs to 0x1c280a0, adopting voucher (nil) [3070162544] [../stdlib/public/Concurrency/VoucherSupport.h:91](swapToJob) [0xbe8bfba0] Saved original voucher (nil) [3070162544] [../stdlib/public/Concurrency/Actor.cpp:1850](swift_task_switchImpl) trying to switch from executor 0xb54d0540 to 0xb54d0540 Hello, world! [3070162544] [../stdlib/public/Concurrency/Task.cpp:567](swift_task_create_commonImpl) allocate task 0x1c28f78, parent = (nil), slab 512 [3070162544] [../stdlib/public/Concurrency/Task.cpp:646](swift_task_create_commonImpl) creating task 0x1c28f78 with parent (nil) [3070162544] [../stdlib/public/Concurrency/Actor.cpp:1907](swift_task_enqueueImpl) enqueue job 0x1c28f78 on executor (nil) [3070162544] [../stdlib/public/Concurrency/Task.cpp:567](swift_task_create_commonImpl) allocate task 0x1c29288, parent = (nil), slab 512 [3070162544] [../stdlib/public/Concurrency/Task.cpp:646](swift_task_create_commonImpl) creating task 0x1c29288 with parent (nil) [3070162544] [../stdlib/public/Concurrency/TaskPrivate.h:399](flagAsSuspended) 0x1c280a0->flagAsSuspended() [3070162544] [../stdlib/public/Concurrency/VoucherSupport.h:103](restoreVoucher) [0xbe8bfba0] Restoring voucher on task 0x1c280a0 [3070162544] [../stdlib/public/Concurrency/VoucherSupport.h:55](leave) [0xbe8bfba0] Leaving empty VoucherManager [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:36](VoucherManager) [0xb30dd860] Constructing VoucherManager [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1458](swift_job_runImpl) swift_job_runImpl(0x1c28f78) [3004031856] [../stdlib/public/Concurrency/TaskPrivate.h:369](flagAsRunning) 0x1c28f78->flagAsRunning() [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:65](swapToJob) [0xb30dd860] Swapping jobs to 0x1c28f78 [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:73](swapToJob) [0xb30dd860] Swapping jobs to 0x1c28f78, adopting voucher (nil) [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:91](swapToJob) [0xb30dd860] Saved original voucher (nil) Will throw [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1850](swift_task_switchImpl) trying to switch from executor (nil) to 0xb54d0540 [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1887](swift_task_switchImpl) switch failed, task 0x1c28f78 enqueued on executor 0xb54d0540 [3004031856] [../stdlib/public/Concurrency/TaskPrivate.h:399](flagAsSuspended) 0x1c28f78->flagAsSuspended() [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:103](restoreVoucher) [0xb30dd860] Restoring voucher on task 0x1c28f78 [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1907](swift_task_enqueueImpl) enqueue job 0x1c28f78 on executor 0xb54d0540 [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:55](leave) [0xb30dd860] Leaving empty VoucherManager [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:36](VoucherManager) [0xb14fe268] Constructing VoucherManager [2974806896] [../stdlib/public/Concurrency/Actor.cpp:1458](swift_job_runImpl) swift_job_runImpl(0x1c28f78) [2974806896] [../stdlib/public/Concurrency/TaskPrivate.h:369](flagAsRunning) 0x1c28f78->flagAsRunning() [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:65](swapToJob) [0xb14fe268] Swapping jobs to 0x1c28f78 [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:73](swapToJob) [0xb14fe268] Swapping jobs to 0x1c28f78, adopting voucher (nil) [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:91](swapToJob) [0xb14fe268] Saved original voucher (nil) Task ran [2974806896] [../stdlib/public/Concurrency/Task.cpp:328](completeTaskImpl) task 0x1c28f78 completed [2974806896] [../stdlib/public/Concurrency/Task.cpp:161](completeFuture) complete future = 0x1c28f78 [2974806896] [../stdlib/public/Concurrency/Task.cpp:198](completeFuture) task 0x1c28f78 had no waiting tasks [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:46](leave) [0xb14fe268] Restoring original voucher (nil) [2995639152] [../stdlib/public/Concurrency/VoucherSupport.h:36](VoucherManager) [0xb28dc1e0] Constructing VoucherManager [2995639152] [../stdlib/public/Concurrency/Actor.cpp:1458](swift_job_runImpl) swift_job_runImpl(0x1c29288) [2995639152] [../stdlib/public/Concurrency/TaskPrivate.h:369](flagAsRunning) 0x1c29288->flagAsRunning() [2995639152] [../stdlib/public/Concurrency/VoucherSupport.h:65](swapToJob) [0xb28dc1e0] Swapping jobs to 0x1c29288 [2995639152] [../stdlib/public/Concurrency/VoucherSupport.h:73](swapToJob) [0xb28dc1e0] Swapping jobs to 0x1c29288, adopting voucher (nil) [2995639152] [../stdlib/public/Concurrency/VoucherSupport.h:91](swapToJob) [0xb28dc1e0] Saved original voucher (nil) [2995639152] [../stdlib/public/Concurrency/Actor.cpp:1907](swift_task_enqueueImpl) enqueue job 0x1c280a0 on executor (nil) [2995639152] [../stdlib/public/Concurrency/Task.cpp:328](completeTaskImpl) task 0x1c29288 completed [2995639152] [../stdlib/public/Concurrency/Task.cpp:161](completeFuture) complete future = 0x1c29288 [2995639152] [../stdlib/public/Concurrency/Task.cpp:198](completeFuture) task 0x1c29288 had no waiting tasks [2995639152] [../stdlib/public/Concurrency/TaskPrivate.h:432](flagAsCompleted) task completed 0x1c29288 [2995639152] [../stdlib/public/Concurrency/Task.cpp:255](destroyTask) destroy task 0x1c29288 [2995639152] [../stdlib/public/Concurrency/VoucherSupport.h:46](leave) [0xb28dc1e0] Restoring original voucher (nil) [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:36](VoucherManager) [0xb30dd860] Constructing VoucherManager [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1458](swift_job_runImpl) swift_job_runImpl(0x1c280a0) [3004031856] [../stdlib/public/Concurrency/TaskPrivate.h:369](flagAsRunning) 0x1c280a0->flagAsRunning() [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:65](swapToJob) [0xb30dd860] Swapping jobs to 0x1c280a0 [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:73](swapToJob) [0xb30dd860] Swapping jobs to 0x1c280a0, adopting voucher (nil) [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:91](swapToJob) [0xb30dd860] Saved original voucher (nil) [3004031856] [../stdlib/public/Concurrency/TaskStatus.cpp:358](swift_task_removeStatusRecordImpl) remove status record = 0x1c28350, from current task = 0x1c280a0 [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1850](swift_task_switchImpl) trying to switch from executor (nil) to 0xb54d0540 [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1887](swift_task_switchImpl) switch failed, task 0x1c280a0 enqueued on executor 0xb54d0540 [3004031856] [../stdlib/public/Concurrency/TaskPrivate.h:399](flagAsSuspended) 0x1c280a0->flagAsSuspended() [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:103](restoreVoucher) [0xb30dd860] Restoring voucher on task 0x1c280a0 [3004031856] [../stdlib/public/Concurrency/Actor.cpp:1907](swift_task_enqueueImpl) enqueue job 0x1c280a0 on executor 0xb54d0540 [3004031856] [../stdlib/public/Concurrency/VoucherSupport.h:55](leave) [0xb30dd860] Leaving empty VoucherManager [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:36](VoucherManager) [0xb14fe268] Constructing VoucherManager [2974806896] [../stdlib/public/Concurrency/Actor.cpp:1458](swift_job_runImpl) swift_job_runImpl(0x1c280a0) [2974806896] [../stdlib/public/Concurrency/TaskPrivate.h:369](flagAsRunning) 0x1c280a0->flagAsRunning() [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:65](swapToJob) [0xb14fe268] Swapping jobs to 0x1c280a0 [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:73](swapToJob) [0xb14fe268] Swapping jobs to 0x1c280a0, adopting voucher (nil) [2974806896] [../stdlib/public/Concurrency/VoucherSupport.h:91](swapToJob) [0xb14fe268] Saved original voucher (nil) [2974806896] [../stdlib/public/Concurrency/TaskPrivate.h:432](flagAsCompleted) task completed 0x1c28f78 [2974806896] [../stdlib/public/Concurrency/Task.cpp:255](destroyTask) destroy task 0x1c28f78 [2974806896] [../stdlib/public/Concurrency/Actor.cpp:1850](swift_task_switchImpl) trying to switch from executor 0xb54d0540 to 0xb54d0540 |
The issue is not present when building the Std Lib in `Debug` mode, only when building in `Release` with cmake. |
[3069515376] [../stdlib/public/Concurrency/Task.cpp:567] allocate task 0x1ea8888, parent = (nil), slab 512 [3069515376] [../stdlib/public/Concurrency/Task.cpp:646] creating task 0x1ea8888 with parent (nil) [3069515376] [../stdlib/public/Concurrency/VoucherSupport.h:36] [0xbec83bbc] Constructing VoucherManager [3069515376] [../stdlib/public/Concurrency/Actor.cpp:1458] swift_job_runImpl(0x1ea8888) [3069515376] [../stdlib/public/Concurrency/TaskPrivate.h:369] 0x1ea8888->flagAsRunning() [3069515376] [../stdlib/public/Concurrency/VoucherSupport.h:65] [0xbec83bbc] Swapping jobs to 0x1ea8888 [3069515376] [../stdlib/public/Concurrency/VoucherSupport.h:73] [0xbec83bbc] Swapping jobs to 0x1ea8888, adopting voucher (nil) [3069515376] [../stdlib/public/Concurrency/VoucherSupport.h:91] [0xbec83bbc] Saved original voucher (nil) [3069515376] [../stdlib/public/Concurrency/Actor.cpp:1850] trying to switch from executor 0xb6083100 to 0xb6083100 Hello, world! [3069515376] [../stdlib/public/Concurrency/Task.cpp:567] allocate task 0x1ea9388, parent = (nil), slab 512 [3069515376] [../stdlib/public/Concurrency/Task.cpp:646] creating task 0x1ea9388 with parent (nil) [3069515376] [../stdlib/public/Concurrency/Actor.cpp:1907] enqueue job 0x1ea9388 on executor (nil) [3069515376] [../stdlib/public/Concurrency/Task.cpp:567] allocate task 0x1ea96a8, parent = (nil), slab 512 [3069515376] [../stdlib/public/Concurrency/Task.cpp:646] creating task 0x1ea96a8 with parent (nil) [3069515376] [../stdlib/public/Concurrency/TaskPrivate.h:399] 0x1ea8888->flagAsSuspended() [3069515376] [../stdlib/public/Concurrency/VoucherSupport.h:103] [0xbec83bbc] Restoring voucher on task 0x1ea8888 [3069515376] [../stdlib/public/Concurrency/VoucherSupport.h:55] [0xbec83bbc] Leaving empty VoucherManager [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:36] [0xb3cc2c0c] Constructing VoucherManager [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1458] swift_job_runImpl(0x1ea9388) [3016504176] [../stdlib/public/Concurrency/TaskPrivate.h:369] 0x1ea9388->flagAsRunning() [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:65] [0xb3cc2c0c] Swapping jobs to 0x1ea9388 [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:73] [0xb3cc2c0c] Swapping jobs to 0x1ea9388, adopting voucher (nil) [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:91] [0xb3cc2c0c] Saved original voucher (nil) Will throw [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1850] trying to switch from executor (nil) to 0xb6083100 [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1887] switch failed, task 0x1ea9388 enqueued on executor 0xb6083100 [3016504176] [../stdlib/public/Concurrency/TaskPrivate.h:399] 0x1ea9388->flagAsSuspended() [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:103] [0xb3cc2c0c] Restoring voucher on task 0x1ea9388 [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1907] enqueue job 0x1ea9388 on executor 0xb6083100 [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:55] [0xb3cc2c0c] Leaving empty VoucherManager [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:36] [0xb18fdb5c] Constructing VoucherManager [2978997104] [../stdlib/public/Concurrency/Actor.cpp:1458] swift_job_runImpl(0x1ea9388) [2978997104] [../stdlib/public/Concurrency/TaskPrivate.h:369] 0x1ea9388->flagAsRunning() [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:65] [0xb18fdb5c] Swapping jobs to 0x1ea9388 [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:73] [0xb18fdb5c] Swapping jobs to 0x1ea9388, adopting voucher (nil) [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:91] [0xb18fdb5c] Saved original voucher (nil) Task ran [2978997104] [../stdlib/public/Concurrency/Task.cpp:328] task 0x1ea9388 completed [2978997104] [../stdlib/public/Concurrency/Task.cpp:161] complete future = 0x1ea9388 [2978997104] [../stdlib/public/Concurrency/Task.cpp:198] task 0x1ea9388 had no waiting tasks [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:46] [0xb18fdb5c] Restoring original voucher (nil) [3008111472] [../stdlib/public/Concurrency/VoucherSupport.h:36] [0xb34c1b24] Constructing VoucherManager [3008111472] [../stdlib/public/Concurrency/Actor.cpp:1458] swift_job_runImpl(0x1ea96a8) [3008111472] [../stdlib/public/Concurrency/TaskPrivate.h:369] 0x1ea96a8->flagAsRunning() [3008111472] [../stdlib/public/Concurrency/VoucherSupport.h:65] [0xb34c1b24] Swapping jobs to 0x1ea96a8 [3008111472] [../stdlib/public/Concurrency/VoucherSupport.h:73] [0xb34c1b24] Swapping jobs to 0x1ea96a8, adopting voucher (nil) [3008111472] [../stdlib/public/Concurrency/VoucherSupport.h:91] [0xb34c1b24] Saved original voucher (nil) [3008111472] [../stdlib/public/Concurrency/Actor.cpp:1907] enqueue job 0x1ea8888 on executor (nil) [3008111472] [../stdlib/public/Concurrency/Task.cpp:328] task 0x1ea96a8 completed [3008111472] [../stdlib/public/Concurrency/Task.cpp:161] complete future = 0x1ea96a8 [3008111472] [../stdlib/public/Concurrency/Task.cpp:198] task 0x1ea96a8 had no waiting tasks [3008111472] [../stdlib/public/Concurrency/TaskPrivate.h:432] task completed 0x1ea96a8 [3008111472] [../stdlib/public/Concurrency/Task.cpp:255] destroy task 0x1ea96a8 [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:36] [0xb3cc2c0c] Constructing VoucherManager [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1458] swift_job_runImpl(0x1ea8888) [3016504176] [../stdlib/public/Concurrency/TaskPrivate.h:369] 0x1ea8888->flagAsRunning() [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:65] [0xb3cc2c0c] Swapping jobs to 0x1ea8888 [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:73] [0xb3cc2c0c] Swapping jobs to 0x1ea8888, adopting voucher (nil) [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:91] [0xb3cc2c0c] Saved original voucher (nil) [3016504176] [../stdlib/public/Concurrency/TaskStatus.cpp:358] remove status record = 0x1ea8ec0, from current task = 0x1ea8888 [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1850] trying to switch from executor (nil) to 0xb6083100 [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1887] switch failed, task 0x1ea8888 enqueued on executor 0xb6083100 [3016504176] [../stdlib/public/Concurrency/TaskPrivate.h:399] 0x1ea8888->flagAsSuspended() [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:103] [0xb3cc2c0c] Restoring voucher on task 0x1ea8888 [3016504176] [../stdlib/public/Concurrency/Actor.cpp:1907] enqueue job 0x1ea8888 on executor 0xb6083100 [3016504176] [../stdlib/public/Concurrency/VoucherSupport.h:55] [0xb3cc2c0c] Leaving empty VoucherManager [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:36] [0xb18fdb5c] Constructing VoucherManager [2978997104] [../stdlib/public/Concurrency/Actor.cpp:1458] swift_job_runImpl(0x1ea8888) [2978997104] [../stdlib/public/Concurrency/TaskPrivate.h:369] 0x1ea8888->flagAsRunning() [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:65] [0xb18fdb5c] Swapping jobs to 0x1ea8888 [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:73] [0xb18fdb5c] Swapping jobs to 0x1ea8888, adopting voucher (nil) [2978997104] [../stdlib/public/Concurrency/VoucherSupport.h:91] [0xb18fdb5c] Saved original voucher (nil) Segmentation fault (core dumped) |
|
@buttaface is this reproducible on Android? It's only reproducible for me with debug builds on Swift 5.5 - 5.6. |
I don't build the debug stdlib for armv7 unless I'm debugging something in particular, which I haven't been lately. I will build it and let you know. |
Not reproducible with Swift 5.7.1 built with |
Environment
Swift 5.5.3 StdLib cross compiled for Armv7 (Debian 11)
Additional Detail from JIRA
md5: 7bf4f333a4be27a31c1af5ff268782fd
Issue Description:
Swift concurrency is crashing on 32-bit ARM.
The text was updated successfully, but these errors were encountered: