appscope
appscope copied to clipboard
Running new lxc containers does not automatically set env or mounts
$ /bin/linux/aarch64/scope run -- lxc ls ERROR: ld.so: object 'libscope.so' from /etc/ld.so.preload cannot be preloaded (failed to map segment from shared object): ignored. (same result with LD_PRELOAD or ld.so.preload)
$ LD_DEBUG=libs lxc ls results in numerous symbol errors. a few examples: calling init: /lib/libscope.so
20015: /lib/libscope.so: error: symbol lookup error: undefined symbol: SSL_read (fatal)
20015: /lib/libscope.so: error: symbol lookup error: undefined symbol: SSL_write (fatal)
20015: /lib/libscope.so: error: symbol lookup error: undefined symbol: SSL_get_fd (fatal)
20015: /lib/libscope.so: error: symbol lookup error: undefined symbol: PR_SetError (fatal)
20015: /lib/libscope.so: error: symbol lookup error: undefined symbol: uv__read (fatal)
20015: /lib/libscope.so: error: symbol lookup error: undefined symbol: uv_fileno (fatal)
other libs exhibit symbol errors, such as librt. however, are not preloaded.
Poking around a bit with this. There are 2 independent issues:
- The lxc exec is a script which execs /snap/bin/lxc and that is a soft link; /snap/bin/lxc -> lxd.lxc, that, in turn, is a link; /snap/bin/lxd.lxc -> /usr/bin/snap. It is the start of lxd.lxc that causes the ld.so issue with loading libscope
- An lxc container is started using lxd and not containerd. Therefore, runc is not exec'd. Therefore, we don't attempt to update config.json for the new container.