[Bug 1792647] [NEW] fix nodejs test-case failure on s390x and LXD

Launchpad Bug Tracker 1792647 at bugs.launchpad.net
Sat Sep 15 04:17:18 UTC 2018


You have been subscribed to a public bug by Ubuntu Foundations Team Bug Bot (crichton):

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


** Tags: patch
-- 
fix nodejs test-case failure on s390x and LXD
https://bugs.launchpad.net/bugs/1792647
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list