# Seastar - assertion \`thread' failed

**URL:** <https://forum.scylladb.com/t/seastar-assertion-thread-failed/2926>\
**Category:** ScyllaDB\
**Tags:** seastar\
**Created:** [September 20, 2024, 3:14pm UTC](https://forum.scylladb.com/t/seastar-assertion-thread-failed/2926 "2024-09-20T15:14:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Q](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/alex_q/32/1174_2.png) [@Alex\_Q](https://forum.scylladb.com/u/Alex_Q)\
**Post date:** [September 20, 2024, 3:14pm UTC](https://forum.scylladb.com/t/seastar-assertion-thread-failed/2926/1 "2024-09-20T15:14:50Z")

</div>

Hello everyone,

The question is more about seastar programming but since it connected to ScyllaDB development would ask here. Could please somebody explain me the situation:  
when I use construction similar to this  
seastar::future\<\> foo3() {  
return seastar::make\_ready\_future\<\>();  
}

seastar::future\<\> foo1() {  
return seastar::make\_ready\_future\<\>();  
}

seastar::future\<\> foo2() {  
return foo3().then( {  
});  
}

seastar::future\<\> work() {  
return foo1().then( {  
foo2().get();  
//…

at runtime I get an assertion and the process ends  
“future.cc:248: void seastar::internal::future\_base::do\_wait(): Assertion `thread’ failed”

I suspect the source of problem but can’t guess how to resolve it. Tried to wrap functions to seastar::async but it doesn’t work.  
Would appreciate any help.  
Thank you.

---

<div class="post-metadata">

**Author:** ![tzach](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/tzach/32/172_2.png) [@tzach](https://forum.scylladb.com/u/tzach)\
**Post date:** [September 23, 2024, 6:19am UTC](https://forum.scylladb.com/t/seastar-assertion-thread-failed/2926/2 "2024-09-23T06:19:04Z")

</div>

You can also try on the seastar group  
[https://groups.google.com/g/seastar-dev](https://groups.google.com/g/seastar-dev)

---

<div class="post-metadata">

**Author:** ![Botond\_Denes](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.scylladb.com/botond_denes/32/163_2.png) [@Botond\_Denes](https://forum.scylladb.com/u/Botond_Denes)\
**Post date:** [September 24, 2024, 5:28am UTC](https://forum.scylladb.com/t/seastar-assertion-thread-failed/2926/3 "2024-09-24T05:28:10Z")

</div>

> [@Alex\_Q](#):
>
> seastar::future\<\> work() {  
> return foo1().then( {  
> foo2().get();  
> //…

You cannot use `get()` outside of a seastar thread context. A seastar thread can be created by:

```auto
return async([] {
   f.get(); // here, it is legal to call future<>::get()
});

```
