Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node keeps self terminating #899

Closed
bizmindx opened this issue Oct 30, 2019 · 3 comments
Closed

node keeps self terminating #899

bizmindx opened this issue Oct 30, 2019 · 3 comments

Comments

@bizmindx
Copy link

bizmindx commented Oct 30, 2019

bcoin node on AWS keeps self terminating

Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-1096-aws x86_64)
ive been having this issue for more than a week on all environment ( testnet, mainnet )

this is what i get after running on foreground


commit hash `commit 916509630e97ea51ba56cd89736e65db5f93c83d`


[debug] (net) Received 601 headers from peer (185.154.156.50:8333).

<--- Last few GCs --->

[23098:0x29c8e50]  2796463 ms: Mark-sweep 1395.6 (1430.3) -> 1395.6 (1434.8) MB, 1817.0 / 28.3 ms  allocation failure GC in old space requested
[23098:0x29c8e50]  2798243 ms: Mark-sweep 1395.6 (1434.8) -> 1395.6 (1427.8) MB, 1779.8 / 20.1 ms  last resort GC in old space requested
[23098:0x29c8e50]  2800061 ms: Mark-sweep 1395.6 (1427.8) -> 1395.6 (1427.8) MB, 1818.0 / 11.9 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x1c80fe25749 <JSObject>
    1: set(this=0x238cc237f009 <Map map = 0x3fdf0a8848d9>,0xdfcb2cb6491 <String[32]\: @\xee[\x8b\xa7\x052y\x89\x16f\xdcK\xf3\x83\x8b8|.\xde\x8e\x84\xbce1\x06\x00\x00\x00\x00\x00\x00>,0x18a38cb15da1 <Uint8Array map = 0xc1f63472f61>)
    2: getBlock [/home/ubuntu/bcoin/lib/net/pool.js:~3222] [pc=0x2d4d564dd04e](this=0x36659a338da9 <EventEmitter map = 0x252d751976a9>,peer=0x61aba6b1309 <EventEmitter...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [bcoin]
 2: 0x11e1ffc [bcoin]
 3: v8::Utils::ReportOOMFailure(char const*, bool) [bcoin]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [bcoin]
 5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [bcoin]
 6: v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Allocate(v8::internal::Isolate*, int, v8::internal::PretenureFlag) [bcoin]
 7: v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Rehash(v8::internal::Handle<v8::internal::OrderedHashMap>, int) [bcoin]
 8: v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::EnsureGrowable(v8::internal::Handle<v8::internal::OrderedHashMap>) [bcoin]
 9: v8::internal::Runtime_MapGrow(int, v8::internal::Object**, v8::internal::Isolate*) [bcoin]
10: 0x2d4d562042fd
Aborted (core dumped)

server details

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0         7:0    0   18M  1 loop /snap/amazon-ssm-agent
loop1         7:1    0   89M  1 loop /snap/core
loop2         7:2    0 89.1M  1 loop /snap/core
loop3         7:3    0   18M  1 loop /snap/amazon-ssm-agent/..
nvme0n1     259:1    0   30G  0 disk
└─nvme0n1p1 259:2    0   30G  0 part /
nvme1n1     259:0    0  500G  0 disk

when i run df -h

Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           391M   11M  380M   3% /run
/dev/nvme0n1p1   30G  3.3G   26G  12% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/loop0       18M   18M     0 100% /snap/amazon-ssm-agent/1455
/dev/loop1       90M   90M     0 100% /snap/core/7713
/dev/loop2       90M   90M     0 100% /snap/core/7917
/dev/loop3       18M   18M     0 100% /snap/amazon-ssm-agent/1480
tmpfs           391M     0  391M   0% /run/user/1000

bcoin.conf

network: main
prefix: ~/.bcoin
api-key: test
prune: true

wallet.conf

network: main
wallet-auth: true
api-key: test
@tynes
Copy link
Member

tynes commented Oct 30, 2019

This should fix it #868

Edit: see comments below

@braydonf
Copy link
Contributor

braydonf commented Oct 30, 2019

The nodejs version isn't mentioned in this issue, however it's likely a duplicate of #754.

@braydonf
Copy link
Contributor

braydonf commented Oct 30, 2019

Also related, such errors are not visible unless the process is run in the foreground, see #747 which can make visibility of errors difficulty to debug.

@bizmindx bizmindx closed this as completed Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants