google / sandboxed-api

Generate sandboxes for C/C++ libraries automatically

Home Page:https://developers.google.com/sandboxed-api/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Receiving TLV value failed when use the example

xsmart opened this issue · comments

I test the curl examle1 on debian 10. and has UNAVAILABLE: Receiving TLV value failed`?

root@debian10:/home/user/sandbox/sandboxed-api/oss-internship-2020/curl/build/examples# ./example1 E20210105 04:15:27.784305 1281 monitor.cc:755] SANDBOX VIOLATION : PID: 1285, PROG: 'memfd:curl_sapi.bin (deleted)' : [X86-64] sysinfo [99](0x7ffc1e6c3270) IP: 0x7f0ffdccb137, STACK: 0x7ffc1e6c3268 [mounts.cc : 230] RAW: Inserting /lib with the same value twice E20210105 04:15:27.936887 1278 example1.cc:81] Example1 failed: UNAVAILABLE: Receiving TLV value failed

That shouldn't happen. For some reason, we're inserting the /lib directory into the list of bind-mounted sub-directories twice.

I'll take a look at this later today. We will need to fix up the integration with the intern projects anyways.

Thanks, if it depends multiple library so files in different folder, all of them will be inserted to /lib?

libuv example also has same error
$ ./helloworld
E20210106 20:52:40.471252 24856 monitor.cc:755] SANDBOX VIOLATION : PID: 24860, PROG: 'memfd:uv_sapi.bin (deleted)' : [X86-64] clock_getres [229](0x6 [6], 0x7ffeb234ac60) IP: 0x7f1110d1afa7, STACK: 0x7ffeb234ac48
E20210106 20:52:40.588239 24853 helloworld.cc:85] HelloWorld failed: UNAVAILABLE: Receiving TLV value failed

Any update ? The curl is a good example to start

I use the #81 and there has another error
user@debian10:~/sandbox/curl/sandboxed-api/oss-internship-2020/curl/build/examples$ ./example1
E20210125 23:26:14.456713 43599 monitor.cc:755] SANDBOX VIOLATION : PID: 43603, PROG: 'memfd:curl_sapi.bin (deleted)' : [X86-64] futex [202](0x7fad831909d0, 0 [0], 0x3 [3], 0, 0xca, 0x7fad831909d0 [140383205525968]) IP: 0x7fad83a31495, STACK: 0x7ffc44a77120
[comms.cc : 538] RAW: write: Bad file descriptor [9]
E20210125 23:26:14.581481 43596 example1.cc:89] Example1 failed: UNAVAILABLE: Receiving TLV value failed

Hey there, I just commited the fix for the futex failure (fb1822b). The duplicate /lib issue turned out not to be the root cause.

libuv is next up on my mental todo list.