Re: node: Cannot allocate memory
So just to eliminate the off variable I updated my snapshot. Updated packages, etc, etc And now node works fine... Ken On Wed, Jun 06, 2018 at 09:28:39PM -0400, Ken M wrote: > On Wed, Jun 06, 2018 at 09:10:59PM -0400, Thomas Frohwein wrote: > > > > I run ksh. Doubt that bash is the cause though... > > Might wanna check if you have the same problem with ksh. > > > > I tried in sh before submitting and got the same problem, I just tried ksh and > the same. Sorry for omitting that I tried to eliminate bash from the equation > first. > > > > > ... still, you provided rather little information to understand what might > > be > > particular about your system. In most cases, including a dmesg is MVP to > > understand this better. > > > > Sorry, I wasn't thinking a dmesg would be useful in this case. I will put at > the > end of this as well as the kdump from a ktrace on this. > > > > > Yes? what about your ulimit? > > I put myself in the staff user group so... > > $ ulimit -a > core file size (blocks, -c) unlimited > data seg size (kbytes, -d) 2097152 > file size (blocks, -f) unlimited > max locked memory (kbytes, -l) 1244372 > max memory size (kbytes, -m) 3710004 > open files (-n) 512 > pipe size(512 bytes, -p) 1 > stack size (kbytes, -s) 4096 > cpu time (seconds, -t) unlimited > max user processes (-u) 256 > virtual memory (kbytes, -v) 2101248 > > I also tried setting ulimit -d to my total memory size and no luck there. > > kdump of ktrace: > > $ kdump -f kt-node.out > 7097 ktrace RET ktrace 0 > 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) > 7097 ktrace NAMI "/bin/node" > 7097 ktrace RET execve -1 errno 2 No such file or directory > 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) > 7097 ktrace NAMI "/usr/bin/node" > 7097 ktrace RET execve -1 errno 2 No such file or directory > 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) > 7097 ktrace NAMI "/sbin/node" > 7097 ktrace RET execve -1 errno 2 No such file or directory > 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) > 7097 ktrace NAMI "/usr/sbin/node" > 7097 ktrace RET execve -1 errno 2 No such file or directory > 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) > 7097 ktrace NAMI "/usr/X11R6/bin/node" > 7097 ktrace RET execve -1 errno 2 No such file or directory > 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) > 7097 ktrace NAMI "/usr/local/bin/node" > 7097 ktrace RET execve -1 errno 12 Cannot allocate memory > 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x3) > 7097 ktrace RET mprotect 0 > 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x1) > 7097 ktrace RET mprotect 0 > 7097 ktrace CALL write(2,0x7f7eb1e0,0x8) > 7097 ktrace GIO fd 2 wrote 8 bytes >"ktrace: " > 7097 ktrace RET write 8 > 7097 ktrace CALL write(2,0x7f7eb2c0,0x15) > 7097 ktrace GIO fd 2 wrote 21 bytes >"exec of 'node' failed" > 7097 ktrace RET write 21/0x15 > 7097 ktrace CALL write(2,0x7f7eb1e0,0x2) > 7097 ktrace GIO fd 2 wrote 2 bytes >": " > 7097 ktrace RET write 2 > 7097 ktrace CALL write(2,0x7f7eb1e0,0x17) > 7097 ktrace GIO fd 2 wrote 23 bytes >"Cannot allocate memory >" > 7097 ktrace RET write 23/0x17 > 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x3) > 7097 ktrace RET mprotect 0 > 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x1) > 7097 ktrace RET mprotect 0 > 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x3) > 7097 ktrace RET mprotect 0 > 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x1) > 7097 ktrace RET mprotect 0 > 7097 ktrace CALL munmap(0xe36158b1000,0x1000) > 7097 ktrace RET munmap 0 > 7097 ktrace CALL exit(1) > > > dmesg: > > $ dmesg > OpenBSD 6.3-current (GENERIC.MP) #57: Thu May 31 15:57:20 MDT 2018 > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > real mem = 3950682112 (3767MB) > avail mem = 3822796800 (3645MB) > mpath0 at root > scsibus0 at mpath0: 256 targets > mainbus0 at root > bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdccb3000 (61 entries) > bios0: vendor LENOVO version "GJET98WW (2.48 )" date 03/20/2018 > bios0: LENOVO 20B7S41700 > acpi0 at bios0: rev 2 > acpi0: sleep states S0 S3 S4 S5 > acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT > SSDT SSDT SSDT SSDT PCCT SSDT UEFI MSDM ASF! BATB FPDT UEFI DMAR > acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpiec0 at acpi0 > acpihpet0 at acpi0: 14318179 Hz > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat > cpu0
Re: node: Cannot allocate memory
On Wed, Jun 06, 2018 at 09:10:59PM -0400, Thomas Frohwein wrote: > > I run ksh. Doubt that bash is the cause though... > Might wanna check if you have the same problem with ksh. > I tried in sh before submitting and got the same problem, I just tried ksh and the same. Sorry for omitting that I tried to eliminate bash from the equation first. > > ... still, you provided rather little information to understand what might be > particular about your system. In most cases, including a dmesg is MVP to > understand this better. > Sorry, I wasn't thinking a dmesg would be useful in this case. I will put at the end of this as well as the kdump from a ktrace on this. > > Yes? what about your ulimit? I put myself in the staff user group so... $ ulimit -a core file size (blocks, -c) unlimited data seg size (kbytes, -d) 2097152 file size (blocks, -f) unlimited max locked memory (kbytes, -l) 1244372 max memory size (kbytes, -m) 3710004 open files (-n) 512 pipe size(512 bytes, -p) 1 stack size (kbytes, -s) 4096 cpu time (seconds, -t) unlimited max user processes (-u) 256 virtual memory (kbytes, -v) 2101248 I also tried setting ulimit -d to my total memory size and no luck there. kdump of ktrace: $ kdump -f kt-node.out 7097 ktrace RET ktrace 0 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) 7097 ktrace NAMI "/bin/node" 7097 ktrace RET execve -1 errno 2 No such file or directory 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) 7097 ktrace NAMI "/usr/bin/node" 7097 ktrace RET execve -1 errno 2 No such file or directory 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) 7097 ktrace NAMI "/sbin/node" 7097 ktrace RET execve -1 errno 2 No such file or directory 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) 7097 ktrace NAMI "/usr/sbin/node" 7097 ktrace RET execve -1 errno 2 No such file or directory 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) 7097 ktrace NAMI "/usr/X11R6/bin/node" 7097 ktrace RET execve -1 errno 2 No such file or directory 7097 ktrace CALL execve(0x7f7eb5d0,0x7f7ebb60,0x7f7ebb78) 7097 ktrace NAMI "/usr/local/bin/node" 7097 ktrace RET execve -1 errno 12 Cannot allocate memory 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x3) 7097 ktrace RET mprotect 0 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x1) 7097 ktrace RET mprotect 0 7097 ktrace CALL write(2,0x7f7eb1e0,0x8) 7097 ktrace GIO fd 2 wrote 8 bytes "ktrace: " 7097 ktrace RET write 8 7097 ktrace CALL write(2,0x7f7eb2c0,0x15) 7097 ktrace GIO fd 2 wrote 21 bytes "exec of 'node' failed" 7097 ktrace RET write 21/0x15 7097 ktrace CALL write(2,0x7f7eb1e0,0x2) 7097 ktrace GIO fd 2 wrote 2 bytes ": " 7097 ktrace RET write 2 7097 ktrace CALL write(2,0x7f7eb1e0,0x17) 7097 ktrace GIO fd 2 wrote 23 bytes "Cannot allocate memory " 7097 ktrace RET write 23/0x17 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x3) 7097 ktrace RET mprotect 0 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x1) 7097 ktrace RET mprotect 0 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x3) 7097 ktrace RET mprotect 0 7097 ktrace CALL mprotect(0xe36158b1000,0x1000,0x1) 7097 ktrace RET mprotect 0 7097 ktrace CALL munmap(0xe36158b1000,0x1000) 7097 ktrace RET munmap 0 7097 ktrace CALL exit(1) dmesg: $ dmesg OpenBSD 6.3-current (GENERIC.MP) #57: Thu May 31 15:57:20 MDT 2018 dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 3950682112 (3767MB) avail mem = 3822796800 (3645MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xdccb3000 (61 entries) bios0: vendor LENOVO version "GJET98WW (2.48 )" date 03/20/2018 bios0: LENOVO 20B7S41700 acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SLIC DBGP ECDT HPET APIC MCFG SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT PCCT SSDT UEFI MSDM ASF! BATB FPDT UEFI DMAR acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpiec0 at acpi0 acpihpet0 at acpi0: 14318179 Hz acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz, 798.30 MHz cpu0:
Re: node: Cannot allocate memory
I can't reproduce this on -current amd64, neither with a snapshot from last week, nor after updating today. thfr@e5570:~$ node -v v8.11.1 thfr@e5570:~$ node > console.log('test log'); test log undefined > .exit thfr@e5570:~$ > node -v > bash: /usr/local/bin/node: Cannot allocate memory I run ksh. Doubt that bash is the cause though... Might wanna check if you have the same problem with ksh. > I am on current, last grabbed the snapshot last Friday I think. ... still, you provided rather little information to understand what might be particular about your system. In most cases, including a dmesg is MVP to understand this better. > Plenty of swap and memory available Yes? what about your ulimit?
node: Cannot allocate memory
The subject is the problem: node -v bash: /usr/local/bin/node: Cannot allocate memory I am on current, last grabbed the snapshot last Friday I think. Plenty of swap and memory available vmstat procsmemory pagedisk traps cpu r s avm fre flt re pi po fr sr sd0 int sys cs us sy id 1 180 543M 1802M 1263 0 0 0 0 0 38 235 5252 781 3 1 95 swapctl -l Device 512-blocks UsedAvail Capacity Priority /dev/sd0b 82415360 8241536 0%0 Last I checked on a 6.3 release install node was working. Last I checked it was working in 6.3 so not sure what is going on here. Nothing else is giving me any problems. Ken