Repository navigation
nodejs on AIX 7.2 os.networkInterfaces throws system error #30504
Description
Activity
Works for me, and works in our CI. Which doesn't mean it works everywhere, obviously, but I'll need more information.
ifconfig -awould help. Do you have interfaces?- addedaixIssues and PRs related to the AIX platform.Issues and PRs related to the AIX platform.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.
on Nov 16, 2019 libuv/libuv@810377f is the only sinilar bug I can recall, but it doesn't seem directly related.
@nodejs/platform-aix
Thanks for the answer. It is AIX 7.2 TL3 SP3 LPAR in IBM cloud. It has interfaces:
# lsdev -Cc if en0 Available Standard Ethernet Network Interface en1 Available Standard Ethernet Network Interface en2 Available Standard Ethernet Network Interface et0 Defined IEEE 802.3 Ethernet Network Interface et1 Defined IEEE 802.3 Ethernet Network Interface et2 Defined IEEE 802.3 Ethernet Network Interface lo0 Available Loopback Network Interface# ifconfig -a en0: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 192.168.2.246 netmask 0xfffffff0 broadcast 192.168.2.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 en1: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 10.0.0.26 netmask 0xfffffff0 broadcast 10.0.0.31 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 en2: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet6 fe80::24b7:8dff:fecd:4142/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 sit0: flags=8100041<UP,RUNNING,LINK0> inet6 ::/96 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255 inet6 ::1%1/128 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1It looks like the problem is in sit0. I removed sit0 and it works (v13.1.0):
# ./node -e 'const os = require("os"); const interfaces = os.networkInterfaces(); for (const interface in interfaces) {console.> en0 192.168.2.246 en1 10.0.0.26 lo0 127.0.0.1 ::1Not only on sit0, but on any interface without IP address:
# ifconfig -a en0: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 192.168.2.246 netmask 0xfffffff0 broadcast 192.168.2.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 en1: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 10.0.0.26 netmask 0xfffffff0 broadcast 10.0.0.31 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 en2: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet6 fe80::24b7:8dff:fecd:4142/64 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255 inet6 ::1%1/128 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1 # ./node -e 'const os = require("os"); const interfaces = os.networkInterfaces(); for (const interface in interfaces) {console.> os.js:61 throw new ERR_SYSTEM_ERROR(ctx); ^ SystemError [ERR_SYSTEM_ERROR]: A system error occurred: undefined returned undefined (undefined) at Object.networkInterfaces (os.js:195:16) at [eval]:1:49 at Script.runInThisContext (vm.js:116:20) at Object.runInThisContext (vm.js:306:38) at Object.<anonymous> ([eval]-wrapper:9:26) at Module._compile (internal/modules/cjs/loader.js:1063:30) at evalScript (internal/process/execution.js:80:25) at internal/main/eval_string.js:23:3 { code: 'ERR_SYSTEM_ERROR', info: {}, errno: [Getter/Setter: undefined], syscall: [Getter/Setter: undefined] }I'll see if I can repro, its probably an assumption far-down that interfaces have IPv4 addresses if they are up.
Do you have any suggestions on how to create an ifx without an address? If there's a non-destructive way, it would save some time. All the AIX I have access to are remote, so I can't take the addresses off the regular interfaces!
I could try to take the addr off of my lo0, but I'm a bit worried about bricking the LPAR:
$ ifconfig -a en0: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 129.33.196.193 netmask 0xfffffff0 broadcast 129.33.196.207 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255 inet6 ::1%1/64 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1The problem is with interfaces which have IPv6 address, but no IPv4 address.
The way to create a virtual interface on AIX without any IP (no problems with nodejs):
mkdev -c if -s VI -t vi -a state='up'with IPv6 address but without IPv4 (the error above):
mkdev -c if -s VI -t vi -a state='up' -a netaddr6='fe80::58b1:b0ff:fee4:5583' -a prefixlen=64with IPv6 and IPv4 addresses (no problems):
mkdev -c if -s VI -t vi -a state='up' -a netaddr6='fe80::58b1:b0ff:fee4:5583' -a prefixlen=64 -a netaddr=172.16.1.1 -a netmask=255.255.255.0I think libuv/libuv#2545 should fix this. Would it be possible for you to test it?
- addedlibuvIssues and PRs related to the libuv dependency or the uv binding.Issues and PRs related to the libuv dependency or the uv binding.
on Nov 19, 2019 I'm not so deep in details of node.js functionality. How can I test it? Should I first compile libuv and then nodejs? or run some test with libuv?
roughly:
git clone node, checkout the branch you want to use,
cd ./deps; rm -rf uv;then git clone richards' branch of libuv intodeps/uv.Follow the standard node.js build instructions after that: https://github.com/nodejs/node/blob/master/BUILDING.md
@aklyachkin Patch
deps/libuvwith the changes in that PR and then rebuild Node.js.@sam-github @richardlau thank you for the explanation! I will try to compile it.
Reacted by Richard LauI compiled v13.1.0 and it works:
en0 192.168.3.6 en1 10.0.0.4 en2 0.0.0.0 fe80::fcb1:beff:fe92:636e sit0 :: lo0 127.0.0.1 ::1ifconfig output to compare:
en0: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 192.168.3.6 netmask 0xfffffff0 broadcast 192.168.3.15 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 en1: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 10.0.0.4 netmask 0xffffff00 broadcast 10.0.0.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 en2: flags=1e084863,814c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet6 fe80::fcb1:beff:fe92:636e/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 sit0: flags=8100041<UP,RUNNING,LINK0> inet6 ::/96 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255 inet6 ::1%1/128 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1If you see, it shows all IPv6 addresses correct, but I'm not sure if it is correct to show IPv4 address 0.0.0.0 for en2. It has no IPv4 address. Anyway it works! Thank you @richardlau!
- added 2 commits that reference this issue
on Dec 4, 2019 - added a commit that references this issue
on Feb 6, 2020 - added 2 commits that reference this issue
on Feb 26, 2020
The simple check:
NodeJS 10.17.0 returns nothing.
NodesJS 11.15.0, 12.13.0, 13.10 return:
As a consequence - yarn doesn't work.