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

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

2 Likes

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.

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!

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 :slight_smile: - 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]

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,

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

Ah yes, of course. Thanks.

@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.

1 Like

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

1 Like

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:

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

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. :wink:

I will test this out, thanks!