# Worker Dies

**URL:** <https://mediasoup.discourse.group/t/worker-dies/2925>\
**Category:** mediasoup libraries\
**Created:** [June 13, 2021, 5:11pm UTC](https://mediasoup.discourse.group/t/worker-dies/2925 "2021-06-13T17:11:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mainisameer](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/mainisameer/32/537_2.png) [@mainisameer](https://mediasoup.discourse.group/u/mainisameer)\
**Post date:** [June 13, 2021, 5:11pm UTC](https://mediasoup.discourse.group/t/worker-dies/2925/1 "2021-06-13T17:11:15Z")

</div>

We are having and issue were worker is dies unexpectedly . We tried creating the core dump files as mentioned in the [mediasoup :: Support](https://mediasoup.org/support/)  
We did the  
$ mkdir /tmp/cores  
$ chmod 777 /tmp/cores  
$ echo “/tmp/cores/core.%e.sig%s.%p” \> /proc/sys/kernel/core\_pattern  
$ ulimit -c unlimited

## and started the process using pm2 and it didnt create the core file we then started the process using node but no luck. If we kill the process manually using kill -s SIGSEGV the file get produced. So stuck not sure where to go from here Our platform is as follows node v14.15.1 mediasoup-3.7.14 gcc 9.3.0 g++ 9.3.0 c++ 9.3.0 –The log before 2021-06-13T15:42:59: 2021-06-13T22:42:59.432Z mediasoup:ERROR:Channel Producer Channel error: Error: write EPIPE 2021-06-13T15:42:59: xxxxxxxxxxxxxx 2021-06-13T15:42:59: 2021-06-13T22:42:59.433Z mediasoup:Transport consume() 2021-06-13T15:42:59: 2021-06-13T22:42:59.433Z mediasoup:Channel request() [method:transport.consume, id:5912] 2021-06-13T15:42:59: xxxxxxxxxxxxxx 2021-06-13T15:42:59: 2021-06-13T22:42:59.434Z mediasoup:Transport consume() 2021-06-13T15:42:59: 2021-06-13T22:42:59.434Z mediasoup:Channel request() [method:transport.consume, id:5913] 2021-06-13T15:42:59: 2021-06-13T22:42:59.436Z mediasoup:Channel Consumer Channel ended by the worker process 2021-06-13T15:42:59: 2021-06-13T22:42:59.443Z mediasoup:PayloadChannel Consumer PayloadChannel ended by the worker process 2021-06-13T15:42:59: 2021-06-13T22:42:59.443Z mediasoup:PayloadChannel Producer PayloadChannel ended by the worker process 2021-06-13T15:42:59: 2021-06-13T22:42:59.445Z mediasoup:Worker close()

May be this Error write EPIPE may be the issue. Our best guess is that the event is ahppeneing when a user is trying to share their screen.  
Trying to figure out how we can core dump file , any help would be much appreciated

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [June 14, 2021, 12:53am UTC](https://mediasoup.discourse.group/t/worker-dies/2925/2 "2021-06-14T00:53:42Z")

</div>

It doesn’t crash with memory issue or anything like that, hence there is no crash dump.

When does this happen exactly?

---

<div class="post-metadata">

**Author:** ![mainisameer](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/mainisameer/32/537_2.png) [@mainisameer](https://mediasoup.discourse.group/u/mainisameer)\
**Post date:** [June 14, 2021, 1:42am UTC](https://mediasoup.discourse.group/t/worker-dies/2925/3 "2021-06-14T01:42:51Z")

</div>

Nazar  
Thank you for your prompt response, we believe it is happening when user(s) are sharing screens. Our business case is to allow users to share screens so , after a few users have shared their screens in quick succession the worker crashes. not sure if this piece of log helps but we see

## 2021-06-13T15:42:59: 2021-06-13T22:42:59.432Z mediasoup:ERROR:Channel Producer Channel error: Error: write EPIPE

2021-06-13T15:42:59: xxxxxxxxxxxxxx  
and then the crash

We also see a lot of

6|Mediasou | 2021-06-13T18:44:41: 2021-06-14T01:44:41.965Z mediasoup:Channel [pid:3544] RTC::RTCP::XR::Parse() | unknown RTCP XR block type [blockType:42]  
6|Mediasou | 2021-06-13T18:44:42: 2021-06-14T01:44:42.462Z mediasoup:Channel [pid:3544] RTC::RTCP::XR::Parse() | unknown RTCP XR block type [blockType:42]

in our log file when we do screen sharing .. not sure if these issues are inter related

---

<div class="post-metadata">

**Author:** ![nazar-pc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/nazar-pc/32/369_2.png) [@nazar-pc](https://mediasoup.discourse.group/u/nazar-pc)\
**Post date:** [June 14, 2021, 1:58am UTC](https://mediasoup.discourse.group/t/worker-dies/2925/4 "2021-06-14T01:58:26Z")

</div>

> [@mainisameer](#):
>
> We also see a lot of
> 
> 6|Mediasou | 2021-06-13T18:44:41: 2021-06-14T01:44:41.965Z mediasoup:Channel [pid:3544] RTC::RTCP::XR::Parse() | unknown RTCP XR block type [blockType:42]  
> 6|Mediasou | 2021-06-13T18:44:42: 2021-06-14T01:44:42.462Z mediasoup:Channel [pid:3544] RTC::RTCP::XR::Parse() | unknown RTCP XR block type [blockType:42]

Those are harmless.

EPIPE indicates that the channel you’re writing to is already closed. Not sure why that is happening, but is shoudn’t be related to screen sharing as mediasoup doesn’t care what kind of video you’re sending.

Check application logic in case you accidentally close worker.

---

<div class="post-metadata">

**Author:** ![mainisameer](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/mainisameer/32/537_2.png) [@mainisameer](https://mediasoup.discourse.group/u/mainisameer)\
**Post date:** [June 14, 2021, 2:41am UTC](https://mediasoup.discourse.group/t/worker-dies/2925/5 "2021-06-14T02:41:54Z")

</div>

not the application but linux OOM was killing it…whew I was getting a bit nervous about this…Thank you Nazar for brain storming with me … thats what made me look at the platform… what is not clear is why memory spike was not showing high in metrics but adding 1 GB swap did the trick

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [June 14, 2021, 8:04am UTC](https://mediasoup.discourse.group/t/worker-dies/2925/6 "2021-06-14T08:04:34Z")

</div>

If there is more info about this please let’s move it to [Crash when sharing screen from Chrome using VP9 SVC · Issue #588 · versatica/mediasoup · GitHub](https://github.com/versatica/mediasoup/issues/588)

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [June 14, 2021, 8:16am UTC](https://mediasoup.discourse.group/t/worker-dies/2925/7 "2021-06-14T08:16:46Z")

</div>

> [@ibc](#):
>
> If there is more info about this please let’s move it to [Crash when sharing screen from Chrome using VP9 SVC · Issue #588 · versatica/mediasoup · GitHub](https://github.com/versatica/mediasoup/issues/588)

Sorry, ignore it. Not related.

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [June 14, 2021, 8:21am UTC](https://mediasoup.discourse.group/t/worker-dies/2925/8 "2021-06-14T08:21:03Z")

</div>

If you kill mediasoup-worker process with a SIGABRT signal it will generate a core dump (assuming you have set those properly). I cannot help if PM2 is in use, but I think it should not make any different.
