[Bug 1792647] [NEW] fix nodejs test-case failure on s390x and LXD
Mauricio Faria de Oliveira
mfo at canonical.com
Fri Sep 14 22:22:10 UTC 2018
Public bug reported:
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-realpath-pipe.js
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_PATH=/usr/local/lib/ -f -e lstat,readlink \
node test/parallel/test-fs-realpath-pipe.js
[pid 17785] lstat("/dev", {st_mode=S_IFDIR|0755, st_size=480, ...}) = 0
[pid 17786] lstat("/dev/stdin", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
[pid 17788] lstat("/dev/stdin", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
[pid 17788] readlink("/dev/stdin", "/proc/self/fd/0", 15) = 15
[pid 17785] lstat("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
[pid 17786] lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
[pid 17788] lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
[pid 17788] readlink("/proc/self", 0x7f2a6c000b40, 0) = -1 EINVAL (Invalid argument)
I'll submit a patch shortly.
** Affects: libuv1 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to libuv1 in Ubuntu.
https://bugs.launchpad.net/bugs/1792647
Title:
fix nodejs test-case failure on s390x and LXD
Status in libuv1 package in Ubuntu:
New
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-realpath-pipe.js
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_PATH=/usr/local/lib/ -f -e lstat,readlink \
node test/parallel/test-fs-realpath-pipe.js
[pid 17785] lstat("/dev", {st_mode=S_IFDIR|0755, st_size=480, ...}) = 0
[pid 17786] lstat("/dev/stdin", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
[pid 17788] lstat("/dev/stdin", {st_mode=S_IFLNK|0777, st_size=15, ...}) = 0
[pid 17788] readlink("/dev/stdin", "/proc/self/fd/0", 15) = 15
[pid 17785] lstat("/proc", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
[pid 17786] lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
[pid 17788] lstat("/proc/self", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
[pid 17788] readlink("/proc/self", 0x7f2a6c000b40, 0) = -1 EINVAL (Invalid argument)
I'll submit a patch shortly.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libuv1/+bug/1792647/+subscriptions
More information about the foundations-bugs
mailing list