# Cannot stat a runtime from within a runtime

**URL:** <https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931>\
**Category:** Testing\
**Created:** [September 29, 2023, 5:26pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931 "2023-09-29T17:26:06Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![SeryogaLeshii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/seryogaleshii/32/551_2.png) [@SeryogaLeshii](https://forum.autonomys.xyz/u/SeryogaLeshii)\
**Post date:** [September 29, 2023, 5:26pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/1 "2023-09-29T17:26:06Z")

</div>

After upgrading to gemini-3f-2023-sep-29, numerous errors of this sort started appearing:

```plaintext
thread 'plotting#0' panicked at 'Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.', /root/subspace/crates/subspace-farmer/src/single_disk_farm/plotting.rs:226:28

```

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 5:16am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/2 "2023-09-30T05:16:25Z")

</div>

Hm, I have not seen it and wouldn’t expect, will need to investigate.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 5:29am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/3 "2023-09-30T05:29:45Z")

</div>

Can you run it with `RUST_BACKTRACE=1` and see what backrtace it has? I do not see how this could happen right now. Do you have any code changes applied or is this an official build?

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 5:41am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/4 "2023-09-30T05:41:25Z")

</div>

Found where and when it may happen. Interesting edge-case, working on a fix.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 5:56am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/5 "2023-09-30T05:56:22Z")

</div>

It’d help if you could run an app with `RUST_BACKTRACE=1` to see the backtrace of this panic.

I tried to reproduce what I thought was happening with a small app and it worked just fine, so I’m confused how this may have happened.

---

<div class="post-metadata">

**Author:** ![SeryogaLeshii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/seryogaleshii/32/551_2.png) [@SeryogaLeshii](https://forum.autonomys.xyz/u/SeryogaLeshii)\
**Post date:** [September 30, 2023, 10:50am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/6 "2023-09-30T10:50:37Z")

</div>

This is an unaltered release compiled from sources. The person with this problem said he would not be able to provide output with `RUST_BACKTRACE` until later. He is using 9 plots of 2300G, the plotting is not complete.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 11:02am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/7 "2023-09-30T11:02:45Z")

</div>

I see that this line corresponds to plotting, I have plotted some sectors with the same codebase and wasn’t able to reproduce the issue. Backtrace would really help to figure out how this is even possible. Would they be able to try official build as well and see if the same issue can be reproduced there?

---

<div class="post-metadata">

**Author:** ![SeryogaLeshii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/seryogaleshii/32/551_2.png) [@SeryogaLeshii](https://forum.autonomys.xyz/u/SeryogaLeshii)\
**Post date:** [September 30, 2023, 4:32pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/8 "2023-09-30T16:32:29Z")

</div>

Unfortunately, getting output with `RUST_BACKTRACE=1` failed, as it takes too long to initialise the farmer, and after an hour of waiting he decided to roll back.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 11:22pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/9 "2023-09-30T23:22:18Z")

</div>

Why does it take an hour to initialize? It really shouldn’t. And there will be no fix for following snapshots and next Gemini version unless I can reproduce it or get the backtrace. This is what testnet is for 😕

---

<div class="post-metadata">

**Author:** ![SeryogaLeshii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/seryogaleshii/32/551_2.png) [@SeryogaLeshii](https://forum.autonomys.xyz/u/SeryogaLeshii)\
**Post date:** [September 30, 2023, 11:29pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/10 "2023-09-30T23:29:03Z")

</div>

I don’t know that. He gets this behaviour when using gemini-3f-2023-sep-29 and `RUST_BACKTRACE=1`. The first attempt took about 45 minutes, after the farmer was restarted, and the subsequent attempt took about an hour.

---

<div class="post-metadata">

**Author:** ![SeryogaLeshii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/seryogaleshii/32/551_2.png) [@SeryogaLeshii](https://forum.autonomys.xyz/u/SeryogaLeshii)\
**Post date:** [September 30, 2023, 11:31pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/11 "2023-09-30T23:31:07Z")

</div>

I’ll try to reproduce it at my place, but I don’t have much free space on my drives (about 2TiB). At the very least, it’s worth a try.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 11:44pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/12 "2023-09-30T23:44:25Z")

</div>

What do you mean by “initialize” specifically, how do you identify that farmer is “initialized”?

---

<div class="post-metadata">

**Author:** ![SeryogaLeshii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/seryogaleshii/32/551_2.png) [@SeryogaLeshii](https://forum.autonomys.xyz/u/SeryogaLeshii)\
**Post date:** [September 30, 2023, 11:53pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/13 "2023-09-30T23:53:27Z")

</div>

I used the wrong word though. In this case, by “end of initialisation” I meant the first appearances of plotted messages (e.g. information about plotted sectors). This usually takes about 15 minutes on this server.

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [September 30, 2023, 11:58pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/14 "2023-09-30T23:58:38Z")

</div>

You can try building latest version of `gemini-3f-maintenance` branch (or I can trigger CI build), it has some more improvements, but I’m waiting to fix this regression before making another release.

---

<div class="post-metadata">

**Author:** ![SeryogaLeshii](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/seryogaleshii/32/551_2.png) [@SeryogaLeshii](https://forum.autonomys.xyz/u/SeryogaLeshii)\
**Post date:** [October 1, 2023, 12:30am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/15 "2023-10-01T00:30:53Z")

</div>

I’ll report back if I get any results.

---

<div class="post-metadata">

**Author:** ![xorinox](https://avatars.discourse-cdn.com/v4/letter/x/e68b1a/32.png) [@xorinox](https://forum.autonomys.xyz/u/xorinox)\
**Post date:** [October 1, 2023, 3:29am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/16 "2023-10-01T03:29:15Z")

</div>

> Blockquote  
> 2023-10-01T03:06:12.001744Z INFO single\_disk\_farm{disk\_farm\_index=4}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (0.03%) sector\_index=0  
> 2023-10-01T03:06:13.599021Z INFO single\_disk\_farm{disk\_farm\_index=8}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (89.55%) sector\_index=3144  
> 2023-10-01T03:06:16.696080Z INFO single\_disk\_farm{disk\_farm\_index=9}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (13.21%) sector\_index=463  
> 2023-10-01T03:06:17.041838Z INFO single\_disk\_farm{disk\_farm\_index=3}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (6.52%) sector\_index=228  
> 2023-10-01T03:06:20.193227Z INFO single\_disk\_farm{disk\_farm\_index=0}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (26.50%) sector\_index=371  
> thread ‘plotting#23’ panicked at ‘Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.’, /home/srv\_subspace2/subspace/crates/subspace-farmer/src/single\_disk\_farm/plotting.rs:226:28  
> stack backtrace:  
> thread ‘plotting#0’ panicked at ‘Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.’, /home/srv\_subspace2/subspace/crates/subspace-farmer/src/single\_disk\_farm/plotting.rs:226:28  
> 0: rust\_begin\_unwind  
> 1: core::panicking::panic\_fmt  
> 2: tokio::runtime::context::runtime::enter\_runtime  
> 3: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 4: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 5: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 6: rayon\_core::join::join\_context::{{closure}}  
> 7: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 8: rayon\_core::join::join\_context::{{closure}}  
> 9: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 10: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 11: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 12: rayon\_core::join::join\_context::{{closure}}  
> 13: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 14: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 15: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 16: rayon\_core::join::join\_context::{{closure}}  
> 17: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 18: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 19: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 20: rayon\_core::join::join\_context::{{closure}}  
> 21: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 22: rayon\_core::join::join\_context::{{closure}}  
> 23: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 24: rayon\_core::join::join\_context::{{closure}}  
> 25: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 26: rayon\_core::join::join\_context::{{closure}}  
> 27: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 28: subspace\_farmer\_components::plotting::plot\_sector::{{closure}}  
> 29: tokio::runtime::context::runtime::enter\_runtime  
> 30: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 31: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 32: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 33: rayon\_core::join::join\_context::{{closure}}  
> 34: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 35: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 36: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 37: rayon\_core::join::join\_context::{{closure}}  
> 38: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 39: rayon\_core::join::join\_context::{{closure}}  
> 40: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 41: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 42: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 43: rayon\_core::join::join\_context::{{closure}}  
> 44: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 45: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 46: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.  
> stack backtrace:  
> 0: rust\_begin\_unwind  
> 1: core::panicking::panic\_fmt  
> 2: tokio::runtime::context::runtime::enter\_runtime  
> 3: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 4: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 5: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 6: rayon\_core::join::join\_context::{{closure}}  
> 7: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 8: rayon\_core::join::join\_context::{{closure}}  
> 9: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 10: rayon\_core::join::join\_context::{{closure}}  
> 11: blst\_rust::data\_availability\_sampling::::das\_fft\_extension\_stride  
> 12: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 13: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 14: rayon\_core::join::join\_context::{{closure}}  
> 15: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 16: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 17: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 18: rayon\_core::join::join\_context::{{closure}}  
> 19: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 20: rayon\_core::join::join\_context::{{closure}}  
> 21: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 22: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 23: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 24: rayon\_core::join::join\_context::{{closure}}  
> 25: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 26: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 27: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 28: rayon\_core::join::join\_context::{{closure}}  
> 29: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 30: rayon\_core::join::join\_context::{{closure}}  
> 31: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 32: rayon\_core::join::join\_context::{{closure}}  
> 33: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 34: subspace\_proof\_of\_space::chiapos::tables::TablesGeneric\<_\>::create\_parallel  
> 35: subspace\_farmer\_components::plotting::plot\_sector::{{closure}}  
> 36: tokio::runtime::context::runtime::enter\_runtime  
> 37: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 38: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 39: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.  
> 2023-10-01T03:06:21.625066Z INFO single\_disk\_farm{disk\_farm\_index=6}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (85.17%) sector\_index=2990  
> 2023-10-01T03:08:48.311517Z INFO single\_disk\_farm{disk\_farm\_index=1}: subspace\_farmer::single\_disk\_farm::plotting: Sector replotted successfully sector\_index=268  
> 2023-10-01T03:09:50.583093Z INFO single\_disk\_farm{disk\_farm\_index=9}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (13.24%) sector\_index=464  
> 2023-10-01T03:09:55.274369Z INFO single\_disk\_farm{disk\_farm\_index=8}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (89.58%) sector\_index=3145  
> 2023-10-01T03:09:57.802504Z INFO single\_disk\_farm{disk\_farm\_index=6}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (85.19%) sector\_index=2991  
> thread ‘plotting#3’ panicked at ‘Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.’, /home/srv\_subspace2/subspace/crates/subspace-farmer/src/single\_disk\_farm/plotting.rs:226:28  
> stack backtrace:  
> 0: rust\_begin\_unwind  
> 1: core::panicking::panic\_fmt  
> 2: tokio::runtime::context::runtime::enter\_runtime  
> 3: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 4: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 5: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 6: rayon\_core::join::join\_context::{{closure}}  
> 7: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 8: rayon\_core::join::join\_context::{{closure}}  
> 9: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 10: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 11: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 12: rayon\_core::join::join\_context::{{closure}}  
> 13: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 14: rayon\_core::join::join\_context::{{closure}}  
> 15: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 16: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 17: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 18: rayon\_core::join::join\_context::{{closure}}  
> 19: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 20: rayon\_core::join::join\_context::{{closure}}  
> 21: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 22: rayon\_core::join::join\_context::{{closure}}  
> 23: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 24: rayon\_core::join::join\_context::{{closure}}  
> 25: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 26: rayon\_core::join::join\_context::{{closure}}  
> 27: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 28: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 29: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 30: rayon\_core::join::join\_context::{{closure}}  
> 31: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 32: rayon\_core::join::join\_context::{{closure}}  
> 33: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 34: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 35: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 36: rayon\_core::join::join\_context::{{closure}}  
> 37: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 38: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 39: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 40: rayon\_core::join::join\_context::{{closure}}  
> 41: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 42: rayon\_core::join::join\_context::{{closure}}  
> 43: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 44: rayon\_core::join::join\_context::{{closure}}  
> 45: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 46: rayon\_core::join::join\_context::{{closure}}  
> 47: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 48: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 49: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 50: rayon\_core::join::join\_context::{{closure}}  
> 51: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 52: rayon\_core::join::join\_context::{{closure}}  
> 53: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 54: rayon\_core::join::join\_context::{{closure}}  
> 55: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 56: rayon\_core::join::join\_context::{{closure}}  
> 57: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 58: subspace\_proof\_of\_space::chiapos::tables::TablesGeneric\<_\>::create\_parallel  
> 59: subspace\_farmer\_components::plotting::plot\_sector::{{closure}}  
> 60: tokio::runtime::context::runtime::enter\_runtime  
> 61: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 62: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 63: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.  
> 2023-10-01T03:12:16.057993Z INFO single\_disk\_farm{disk\_farm\_index=1}: subspace\_farmer::single\_disk\_farm::plotting: Sector replotted successfully sector\_index=409  
> 2023-10-01T03:13:01.012521Z INFO single\_disk\_farm{disk\_farm\_index=6}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (85.22%) sector\_index=2992  
> thread ‘plotting#0’ panicked at ‘Cannot start a runtime from within a runtime. This happens because a function (like `block_on`) attempted to block the current thread while the thread is being used to drive asynchronous tasks.’, /home/srv\_subspace2/subspace/crates/subspace-farmer/src/single\_disk\_farm/plotting.rs:226:28  
> stack backtrace:  
> 0: rust\_begin\_unwind  
> 1: core::panicking::panic\_fmt  
> 2: tokio::runtime::context::runtime::enter\_runtime  
> 3: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 4: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 5: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> 6: rayon\_core::join::join\_context::{{closure}}  
> 7: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 8: rayon\_core::join::join\_context::{{closure}}  
> 9: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 10: rayon\_core::join::join\_context::{{closure}}  
> 11: rayon::iter::plumbing::bridge\_producer\_consumer::helper  
> 12: subspace\_proof\_of\_space::chiapos::tables::TablesGeneric\<\_\>::create\_parallel  
> 13: subspace\_farmer\_components::plotting::plot\_sector::{{closure}}  
> 14: tokio::runtime::context::runtime::enter\_runtime  
> 15: rayon\_core::thread\_pool::ThreadPool::install::{{closure}}  
> 16: \<rayon\_core::job::StackJob\<L,F,R\> as rayon\_core::job::Job\>::execute  
> 17: rayon\_core::registry::WorkerThread::wait\_until\_cold  
> note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.  
> 2023-10-01T03:15:30.647429Z INFO single\_disk\_farm{disk\_farm\_index=2}: subspace\_farmer::single\_disk\_farm::plotting: Sector replotted successfully sector\_index=202  
> 2023-10-01T03:16:06.714774Z INFO single\_disk\_farm{disk\_farm\_index=4}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (0.06%) sector\_index=1  
> 2023-10-01T03:16:10.700005Z INFO single\_disk\_farm{disk\_farm\_index=5}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (7.29%) sector\_index=255  
> 2023-10-01T03:18:46.269860Z INFO single\_disk\_farm{disk\_farm\_index=2}: subspace\_farmer::single\_disk\_farm::plotting: Sector replotted successfully sector\_index=228  
> 2023-10-01T03:19:00.342971Z INFO single\_disk\_farm{disk\_farm\_index=5}: subspace\_farmer::single\_disk\_farm::plotting: Sector plotted successfully (7.32%) sector\_index=256  
> 2023-10-01T03:19:20.431437Z INFO single\_disk\_farm{disk\_farm\_index=1}: subspace\_farmer::single\_disk\_farm::plotting: Sector replotted successfully sector\_index=434  
> 2023-10-01T03:22:12

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [October 1, 2023, 4:25am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/17 "2023-10-01T04:25:12Z")

</div>

Fix for this issue: [Fix tokio re-entrance due to rayon thread pool behavior by nazar-pc · Pull Request #2029 · subspace/subspace · GitHub](https://github.com/subspace/subspace/pull/2029)  
Backport into Gemini 3f: [Gemini 3f backport: Fix tokio re-entrance due to rayon thread pool behavior by nazar-pc · Pull Request #2030 · subspace/subspace · GitHub](https://github.com/subspace/subspace/pull/2030)

Will be included in the next release (probably later today after someone reviews the changes).

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.autonomys.xyz/nazar-pc/32/6_2.png) [@nazar-pc](https://forum.autonomys.xyz/u/nazar-pc)\
**Post date:** [October 1, 2023, 8:54am UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/18 "2023-10-01T08:54:48Z")

</div>

Should be fixed as of this release: [Release gemini-3f-2023-oct-01 · subspace/subspace · GitHub](https://github.com/subspace/subspace/releases/tag/gemini-3f-2023-oct-01)

---

<div class="post-metadata">

**Author:** ![xorinox](https://avatars.discourse-cdn.com/v4/letter/x/e68b1a/32.png) [@xorinox](https://forum.autonomys.xyz/u/xorinox)\
**Post date:** [October 1, 2023, 1:53pm UTC](https://forum.autonomys.xyz/t/cannot-stat-a-runtime-from-within-a-runtime/1931/19 "2023-10-01T13:53:57Z")

</div>

On it, trying it out. Got team, you rock! Patching on the weekend weeee!!!
