Issue about Error: ENOENT: no such file or directory, uv_resident_set_memory

925 views
Skip to first unread message

蔡仲明

unread,
Sep 6, 2018, 4:23:43 AM9/6/18
to Sandstorm Development
I frequently encounter this error message:

 Error: ENOENT: no such file or directory, uv_resident_set_memory

I guess this is some system call or file invisible in the sandbox, but can it just returns some false value so the app won't crash and I need to read and fix?
Thanks.

Ian Denhardt

unread,
Sep 6, 2018, 2:40:06 PM9/6/18
to 蔡仲明, Sandstorm Development
Looks like that function is part of libuv, node's async-io library. I
did a bit of digging, my guess is it's chocking on trying to open
/proc/self/stat:

https://github.com/libuv/libuv/blob/f43c66343316878da09949daf49b515249f71bdf/src/unix/linux-core.c#L459

It should be possible for you to work around this by inserting a dummy
file in your package; the format is documented in proc(5) and it looks
to me like the function is interested in the 'rss' value. I don't know
enough about what's calling that function and how the result is used to
be able to say what the impact of specific values would be though.

I don't think it's a good idea for sandstorm itself to try to spoof
this; we don't have enough visibility into how the information is being
used, and I worry anything we try to do centrally will introduce weird
resource usage bugs elsewhere.

Looks like the cygwin implementation just returns ENOSYS from this
function:

https://github.com/libuv/libuv/blob/e4087dedf837f415056a45a838f639a3d9dc3ced/src/unix/cygwin.c#L38-L41

So presumably libuv has some kind of fallback encoded in it somewhere.

It might be a good idea to open an issue with the libuv project about
running without access to stuff in /proc.

Quoting 蔡仲明 (2018-09-06 04:23:43)
> --
> You received this message because you are subscribed to the Google
> Groups "Sandstorm Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [1]sandstorm-de...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/sandstorm-dev/ae185808-5439-4341-a
> 782-4bb317cfad7a%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> Verweise
>
> 1. mailto:sandstorm-de...@googlegroups.com
> 2. https://groups.google.com/d/msgid/sandstorm-dev/ae185808-5439-4341-a782-4bb317cfad7a%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

Romulus Urakagi Ts'ai 仲明

unread,
Sep 7, 2018, 4:44:44 AM9/7/18
to Ian Denhardt, Sandstorm Development
Thank you, I'll try if it will work.

Ian Denhardt <i...@zenhack.net> 於 2018年9月7日 週五 上午2:40寫道:


--
Romulus Urakagi Ts'ai
Reply all
Reply to author
Forward
0 new messages