Skip to content

pause in read of /proc/self/maps #708

Closed
@therealkenc

Description

@therealkenc

MS recently did a nice edge dev blog post on their progress on node-chakracore and I thought I'd see what WSL syscalls might be problematic, given that v8 works.

Out of the gate it fails on #597 because it tries to mmap 32GB (sic) of anonymous memory for reasons. Upping the NT paging file size does get you past that.

WSL then does admirably well with what's thrown at it, but makes very slow progress, because a read() syscall pauses when /proc/self/maps is queried. This an strace of npm install <anything>:

:58.099968 open("/proc/self/maps", O_RDONLY|O_CLOEXEC) = 14
:58.099968 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=8192*1024}) = 0
:58.100468 fstat(14, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
:58.100468 read(14, "00400000-01315000 r-x- 00000000 "..., 1024) = 1024   <--- BIG PAUSE
:59.121650 read(14, ".so.55.1\n7fff83516000-7fff835170"..., 1024) = 1024
:59.122150 read(14, ".23.so\n7fff83b15000-7fff83b19000"..., 1024) = 1024
:59.122150 read(14, "fff84050000-7fff841c7000 r-x- 00"..., 1024) = 1024
[...more reads in quick succession]
...

That first read after open at :58.100468 pauses for just over a second (1021ms) before proceeding. There are many hundreds (if not thousands) of such calls.

This is not worth looking into as a priority for obvious reasons, but maybe it tweaks a "I bet I know what's happening there" inspiration from someone. Installing the pre-release linked above is trivial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions