# Debian OS "nodered.service: Main process exited, code=killed, status=5/TRAP"

**URL:** https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714
**Category:** General
**Created:** [27 July 2022 17:25 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714 "2022-07-27T17:25:54Z")
**Posts on this page:** 12
**Page:** 2

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [29 July 2022 07:35 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/21 "2022-07-29T07:35:37Z")

</div>

I have a theory that perhaps a 32 bit version of nodejs has been installed, in which case the 4GB space setting might be truncated to 0, which I guess would be a bad thing.  
In fact running `node-red-pi --max_old_space_size=4096` on a 32 bit pi causes a similar crash on startup.  
@raspberry, what does this show?  
`apt policy nodejs`

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [29 July 2022 08:02 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/22 "2022-07-29T08:02:02Z")

</div>

Nice one @Colin - yes that would make sense ! (he did report that LONG\_BIT was 32 so it would indeed have installed the 32 bit version) - so setting it back to 2048 should fix it.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [29 July 2022 08:13 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/23 "2022-07-29T08:13:33Z")

</div>

And in fact the version of raspbian shown in the link posted in the first post does say it is 32 bit. I don't understand how `top` is showing 8GB. Also `uname -m` reports x86\_64 and /proc/meminfo is showing MemTotal as 8GB!

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [29 July 2022 08:19 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/24 "2022-07-29T08:19:55Z")

</div>

As although he calls himself raspberry the hardware in question is probably an old laptop... with the 32 bit Raspbian x86 desktop version... (a great thing for old laptops but confusing for the install script 🙂 - hopefully now fixed in latest/current version.

> What hardware are you actually running on ?

Intel Core i3-8145UE  
Memory 8 GB DDR4 SO-DIMM  
Storage 256 GB mSATA SSD  
[/quote]

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [29 July 2022 08:30 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/25 "2022-07-29T08:30:19Z")

</div>

Right, but I don't understand how the OS is recognising 8GB RAM, as shown by `top`. I thought a 32 bit OS would only see 4GB,

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [29 July 2022 08:35 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/26 "2022-07-29T08:35:48Z")

</div>

The bare OS can use PAE to see more - but each process can only see/address 4GB.  
eg see [memory - How does PAE (Physical Address Extension) enable an address space larger than 4GB? - Stack Overflow](https://stackoverflow.com/questions/8373944/how-does-pae-physical-address-extension-enable-an-address-space-larger-than-4g)

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [29 July 2022 08:50 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/27 "2022-07-29T08:50:51Z")

</div>

Ah yes, of course. Thanks.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [29 July 2022 08:53 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/28 "2022-07-29T08:53:21Z")

</div>

@raspberry if you would like to check that the install script now performs correctly you could delete the service file and re-run the script. That should replace it with one with the space option set (I guess) to 2048 and it should run ok.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [29 July 2022 08:57 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/29 "2022-07-29T08:57:32Z")

</div>

(or as it's Friday... just hand edit it and move on 🙂 save the drama for the next time )

---

<div class="post-metadata">

### Author: ![raspberry](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@raspberry](https://discourse.nodered.org/u/raspberry)
#### Post date: [29 July 2022 16:55 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/30 "2022-07-29T16:55:44Z")

</div>

> [@Colin](#):
>
> I have a theory that perhaps a 32 bit version of nodejs has been installed, in which case the 4GB space setting might be truncated to 0, which I guess would be a bad thing.  
> In fact running `node-red-pi --max_old_space_size=4096` on a 32 bit pi causes a similar crash on startup.  
> @raspberry, what does this show?  
> `apt policy nodejs`

That sounds extremely likely! Good catch. Yeah, this Debian OS installation is 32 bit yet there's 8GB RAM on this PC. Here is `apt policy nodejs`:

```auto
apt policy nodejs
nodejs:
  Installed: (none)
  Candidate: 12.22.12~dfsg-1~deb11u1
  Version table:
     12.22.12~dfsg-1~deb11u1 500
        500 http://deb.debian.org/debian-security bullseye-security/main i386 Packages
     12.22.5~dfsg-2~11u1 500
        500 http://deb.debian.org/debian bullseye/main i386 Packages

```

---

<div class="post-metadata">

### Author: ![raspberry](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@raspberry](https://discourse.nodered.org/u/raspberry)
#### Post date: [29 July 2022 17:00 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/31 "2022-07-29T17:00:12Z")

</div>

> [@dceejay](#):
>
> As although he calls himself raspberry the hardware in question is probably an old laptop... with the 32 bit Raspbian x86 desktop version... (a great thing for old laptops but confusing for the install script 🙂 - hopefully now fixed in latest/current version.

We're having to be clever to get around the raspberry pi shortages. First time using an industrial PC for IoT instead of our usual RPI! So far so good except for this small installation hiccup. 😉

> [@Colin](#):
>
> @raspberry if you would like to check that the install script now performs correctly you could delete the service file and re-run the script. That should replace it with one with the space option set (I guess) to 2048 and it should run ok.

I will test this out, thanks!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 September 2022 17:00 UTC](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714/32 "2022-09-27T17:00:53Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.nodered.org/t/debian-os-nodered-service-main-process-exited-code-killed-status-5-trap/65714.md?page=1)
