# Unable to terminate kernel

**URL:** <https://community.deeplearning.ai/t/unable-to-terminate-kernel/333359>\
**Category:** Introduction to TF for Artificial Intelligence ...\
**Tags:** week-module-4\
**Created:** [May 12, 2023, 4:18pm UTC](https://community.deeplearning.ai/t/unable-to-terminate-kernel/333359 "2023-05-12T16:18:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Om\_Agrawal1](https://avatars.discourse-cdn.com/v4/letter/o/58956e/32.png) [@Om\_Agrawal1](https://community.deeplearning.ai/u/Om_Agrawal1)\
**Post date:** [May 12, 2023, 4:18pm UTC](https://community.deeplearning.ai/t/unable-to-terminate-kernel/333359/1 "2023-05-12T16:18:12Z")

</div>

```auto
import os, signal
os.kill(os.getpid(), signal.SIGKILL)

```

after running this line of code in Colab, I am getting the following message “Your session restarted after a crash. Diagnosing…”, and then it says the session must be restarted and the reason for crash was unknown. Anyone have any ideas? The rest of my code works fine.

---

<div class="post-metadata">

**Author:** ![balaji.ambresh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/balaji.ambresh/32/128697_2.png) [@balaji.ambresh](https://community.deeplearning.ai/u/balaji.ambresh)\
**Post date:** [May 13, 2023, 7:13am UTC](https://community.deeplearning.ai/t/unable-to-terminate-kernel/333359/2 "2023-05-13T07:13:24Z")

</div>

Please try this:

![image](https://global.discourse-cdn.com/dlai/original/3X/e/1/e14605f9c568d5d93e6c54a4aaf00dd24f2b7f14.png)
