libuv1 calls readlink() with buffer size zero for /proc/self (nodejs test-case failure on s390x and LXD)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libuv1 (Ubuntu) |
Fix Released
|
Undecided
|
Mauricio Faria de Oliveira |
Bug Description
The Debian patch 'path_max' causes failures when
readlink'ing symlinks that involve /proc/self
(and potentially other symlinks in /proc)
which report st_size == 0.
It uses st_size as a buffer size for readlink(),
which then fails with EINVAL.
This breaks the nodejs test-case test-fs-
on s390x and LXD containers (which symlink /dev/stdin
to /proc/self/fd/0 vs. fd/0 as in amd64 non-container):
$ strace -E LD_LIBRARY_
node test/parallel/
[pid 17785] lstat("/dev", {st_mode=
[pid 17786] lstat("/dev/stdin", {st_mode=
[pid 17788] lstat("/dev/stdin", {st_mode=
[pid 17788] readlink(
[pid 17785] lstat("/proc", {st_mode=
[pid 17786] lstat("/proc/self", {st_mode=
[pid 17788] lstat("/proc/self", {st_mode=
[pid 17788] readlink(
I'll submit a patch shortly.
summary: |
- fix nodejs test-case failure on s390x and LXD + libuv1 calls readlink() with buffer size zero for /proc/self (nodejs + test-case failure on s390x and LXD) |
This has been verified on a PPA to resolve the nodejs test-case failure on s390x.