nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.43k stars 29.53k forks source link

Tests failed in ubuntu inside the docker #30278

Closed alexahdp closed 3 years ago

alexahdp commented 4 years ago

I think it is very easy to reproduce. My OS: MacOS Catalina 10.15.1.

What I did:

docker pull ubuntu
docker run -ti -v /path-to-folder-with-node:/opt/node ubuntu bash

After that, inside docker:

apt-get update
apt-get install g++ make gcc mc
apt install python2.7 python-pip
apt-get install wget

wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
source ~/.bashrc
nvm install v12
nvm use v12

npm i -g node-gyp

At this step everything was fine. After that, I ran compiling nodejs from sources:

./configure
make -j4

And nodejs was compiled without any errors. I ran tests and got errors:

make test-only

# many tests ended successfully
# ran make jstest

g++ -o /opt/node/out/Release/node -pthread -rdynamic -m64 -Wl,--whole-archive /opt/node/out/Release/obj.target/libnode.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a -Wl,--no-whole-archive -Wl,--whole-archive /opt/node/out/Release/obj.target/deps/zlib/libzlib.a -Wl,--no-whole-archive -Wl,--whole-archive /opt/node/out/Release/obj.target/deps/uv/libuv.a -Wl,--no-whole-archive -Wl,-z,noexecstack -Wl,--whole-archive /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_snapshot.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now -Wl,--whole-archive,/opt/node/out/Release/obj.target/deps/openssl/libopenssl.a -Wl,--no-whole-archive -pthread  -Wl,--start-group /opt/node/out/Release/obj.target/node/src/node_main.o /opt/node/out/Release/obj.target/node/gen/node_code_cache.o /opt/node/out/Release/obj.target/node/gen/node_snapshot.o /opt/node/out/Release/obj.target/deps/histogram/libhistogram.a /opt/node/out/Release/obj.target/libnode.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_libplatform.a /opt/node/out/Release/obj.target/tools/icu/libicui18n.a /opt/node/out/Release/obj.target/deps/zlib/libzlib.a /opt/node/out/Release/obj.target/deps/llhttp/libllhttp.a /opt/node/out/Release/obj.target/deps/cares/libcares.a /opt/node/out/Release/obj.target/deps/uv/libuv.a /opt/node/out/Release/obj.target/deps/nghttp2/libnghttp2.a /opt/node/out/Release/obj.target/deps/brotli/libbrotli.a /opt/node/out/Release/obj.target/deps/openssl/libopenssl.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a /opt/node/out/Release/obj.target/tools/icu/libicuucx.a /opt/node/out/Release/obj.target/tools/icu/libicudata.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_libsampler.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_compiler.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_snapshot.a /opt/node/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers.a -ldl -lm -Wl,--end-group
rm ec57878e965f2a3f5ac57decd854f756643dc8e3.intermediate 6a34cda905a1b86903b29b10a6d1d7540ca96250.intermediate d4a077f7e71bfee4268c1985d6ea51d3ca7d40c3.intermediate 1a9599779c280ee4e536d9cccd2ca45490731fb2.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
/usr/bin/python2.7 tools/test.py -J --mode=release \
    --skip-tests= \
    default \
    addons js-native-api node-api
=== release test-cluster-net-listen-relative-path ===                         
Path: parallel/test-cluster-net-listen-relative-path
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: bind ENAMETOOLONG AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    at listenOnMasterHandle (net.js:1368:16)
    at rr (internal/cluster/child.js:129:12)
    at Worker.<anonymous> (internal/cluster/child.js:96:7)
    at process.onInternalMessage (internal/cluster/utils.js:43:8)
    at process.emit (events.js:215:7)
    at emit (internal/child_process.js:883:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)
Emitted 'error' event on Server instance at:
    at listenOnMasterHandle (net.js:1369:21)
    at rr (internal/cluster/child.js:129:12)
    [... lines matching original stack trace ...]
    at processTicksAndRejections (internal/process/task_queues.js:81:21) {
  errno: -36,
  code: 'ENAMETOOLONG',
  syscall: 'bind',
  address: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
  port: -1
}
assert.js:93
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

1 !== 0

    at Worker.<anonymous> (/opt/node/test/parallel/test-cluster-net-listen-relative-path.js:32:12)
    at Worker.<anonymous> (/opt/node/test/common/index.js:371:15)
    at Worker.emit (events.js:210:5)
    at ChildProcess.<anonymous> (internal/cluster/master.js:187:12)
    at Object.onceWrapper (events.js:300:26)
    at ChildProcess.emit (events.js:210:5)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 1,
  expected: 0,
  operator: 'strictEqual'
}
Command: out/Release/node /opt/node/test/parallel/test-cluster-net-listen-relative-path.js
=== release test-fs-readdir-ucs2 ===                                          
Path: parallel/test-fs-readdir-ucs2
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "tools/test.py", line 202, in RunSingle
    self.HasRun(output)
  File "tools/test.py", line 436, in HasRun
    print(self.templates['stderr'] % stderr)
UnicodeEncodeError: 'ascii' codec can't encode character u'\ufffd' in position 136: ordinal not in range(128)

And here tests stopped and nothing happened more. I interrupted the process by CMD+C.

Node version:

sam-github commented 4 years ago

I couldn't repro, but I'm using Ubuntu 19.04 as a host. Its possible this is OS X or Catalina specific.

I suggest you retry without the mounting of the external OS X filesystem into the image as a volume -- do a git clone in the container onto the containers fs.

Named pipes are created in the FS on Linux systems, and your FS is mounted from an external FS. That seems a bit dicy, IMO, and the fact that you are running in Linux, but the FS is not a Linux FS could be responsible for what you are seeing.

gireeshpunathil commented 4 years ago

@alexahdp - are you able to resolve this with no mounting from the host?

targos commented 3 years ago

Closing for lack of activity