Closed std3lqi closed 7 years ago
It seems be the case that your system has run out of resources (semaphores/shared memory).
One way to free these resources is to use the ipcrm
command.
ipcs
will list what exactly is being used.
Many thanks! I can see many semaphores not freed with ipcs
. After freeing them all, I can run npm
and node
now.
However, after I pressing Ctrl+C
to stop node, I still can see some semaphores not freed. Is it expected?
My app still hit this assertion failure, after freeing semaphores all. Maybe related specific node modules? Still on the way looking into it. Any hint would be helpful. Thanks!
Here is my ulimit output.
ulimit -a
core file size (blocks, -c) 4096
data seg size (kbytes, -d) unlimited
file size (blocks, -f) 8589934588
open files (-n) 64000
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 5000
virtual memory (kbytes, -v) unlimited
We expect semaphores won't be freed if the application closes unexpectedly (e.g. seg fault). However, I noticed that they aren't freed when the application is closed via CTRL-C which is not expected. We are looking into fixing that.
Can you share the output of ipcs -y
?
Here is my output.
>node test
CEE5206S The signal SIGINT was received.
>ipcs | grep TEST
s 69669 0x00000000 --ra------- TEST OS390
s 69670 0x00000000 --ra------- TEST OS390
s 69671 0x00000000 --ra------- TEST OS390
s 69672 0x00000000 --ra------- TEST OS390
s 69673 0x00000000 --ra------- TEST OS390
s 69674 0x00000000 --ra------- TEST OS390
s 69675 0x00000000 --ra------- TEST OS390
s 69676 0x00000000 --ra------- TEST OS390
s 69677 0x00000000 --ra------- TEST OS390
s 69678 0x00000000 --ra------- TEST OS390
s 69679 0x00000000 --ra------- TEST OS390
s 69680 0x00000000 --ra------- TEST OS390
s 69681 0x00000000 --ra------- TEST OS390
s 69682 0x00000000 --ra------- TEST OS390
s 69683 0x00000000 --ra------- TEST OS390
>ipcs -y
IPC status as of Mon Jan 16 10:35:06 2017
Message Queues:
MNIDS HWIDS CIDSA CPRIV CKEY GETEX MAXQB QMNUM ENOMEM
1000 355 657 214 129 0 262144 10000 0
Shared Memory:
MNIDS HWIDS CIDSA CPRIV CKEY GETEX TPAGES SPAGES SEGPR CPAGES MAXSEG
500 4 497 0 3 0 262144 262144 50 3 1
Semaphores:
MNIDS HWIDS CIDSA CPRIV CKEY GETEX MNSEMS MNOPS CSBYTES
500 48 482 15 3 0 25 25 100000000
What about
ipcs | wc -l
It seems like you didn't get the assert btw, right?
The node test
is a hello world, which works well, except some semaphores are not freed as expected.
The app I'd like to port to z/OS uses more node modules, which seemed exhausting semaphore resource and got assert failure.
>ipcs | wc -l
372
Thanks!
I got my app to work to some extends, without assert failure related to semaphores. But I still think some semaphores are freed, because, occasionally, assert failure showed up after restarting node.js server a couple of times during debugging.
Thanks!
Tech preview 5 is available which cleans up system semaphores. It is available for download here Do re-open this issue if you see hanging system semaphores with the new version.
Thanks for fixing this!
I tried ibm-1.2.0.16-ea3-node-v0.12.17-os390-s390x.pax.Z on z/OS one week ago, which worked well with hello world. Then I tried to move my app on z/OS, doing npm install and so on. After excluding some node modules I think maybe not working on z/OS, I kept getting the following failure.
Assertion faied: %s, fie: %s, ine: %d
What confused me is my original hello world got this failure too. Whatever I did to clean my environment, and tried to bring hello world back to work, I failed with same assertion failure.
Then I tried ibm-1.2.0.17-ea4-node-v0.12.18-os390-s390x.pax.Z. Same assertion failure. Here is the stack I got from dbx.
Thanks!