Git Product home page Git Product logo

Comments (11)

therealbobo avatar therealbobo commented on August 14, 2024

Hey @nazdridoy! Thank you for the issue! We already patched this problem and release a patch release )0.35.2) 😁 On the other hand supporting XDG directories is a good point and maybe we should do that.

from sysdig.

nazdridoy avatar nazdridoy commented on August 14, 2024

We already patched this problem and release a patch release )0.35.2)

great! i guess it'll be available in arch repo soon.

supporting XDG directories is a good point and maybe we should do that.

please do... many of us would really appriciate that.

from sysdig.

eugenesan avatar eugenesan commented on August 14, 2024

I just tested with 0.35.3 and the issue is not fixed.
The problem appeared somewhere between 0.32.0 and 0.35.0.

I am building Debian package that installs chisels to /usr/share/sysdig/chisels.
sysdig still looks for chisels in current directory.
ln -s /usr/share/sysdig/chisels fixes the issue.

If there are any new config options to specify location of the chisels/plugins please let us know.

readlink("/root", 0x7ffc013228a0, 1023) = -1 EINVAL (Invalid argument)
readlink("/root/.chisels", 0x7ffc013228a0, 1023) = -1 ENOENT (No such file or directory)
faccessat2(AT_FDCWD, "/root/.chisels/", F_OK, AT_EACCESS) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/proc/1/root", {st_mode=S_IFDIR|0755, st_size=424, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib/ssl/openssl.cnf", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=12324, ...}, AT_EMPTY_PATH) = 0
newfstatat(AT_FDCWD, "/proc/1/root", {st_mode=S_IFDIR|0755, st_size=424, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/sysdig/plugins/", 0x7ffc01322330, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/root/.terminfo", 0x6342d493d6e0, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/etc/terminfo", {st_mode=S_IFDIR|0755, st_size=12, ...}, 0) = 0
newfstatat(AT_FDCWD, "/lib/terminfo", 0x6342d493d770, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/share/terminfo", {st_mode=S_IFDIR|0755, st_size=84, ...}, 0) = 0
access("/etc/terminfo/x/xterm-1003", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/terminfo/x/xterm-1003", R_OK) = 0
openat(AT_FDCWD, "/usr/share/terminfo/x/xterm-1003", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3946, ...}, AT_EMPTY_PATH) = 0
access("/etc/terminfo/x/xterm-1003", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/share/terminfo/x/xterm-1003", R_OK) = 0
openat(AT_FDCWD, "/usr/share/terminfo/x/xterm-1003", O_RDONLY) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=3946, ...}, AT_EMPTY_PATH) = 0
filesystem error: directory iterator cannot open directory: No such file or directory [./chisels/]
+++ exited with 1 +++

from sysdig.

therealbobo avatar therealbobo commented on August 14, 2024

Hey @eugenesan! The current version of sysdig (at least the one compiled by the ci) seems to work correctly even if no chisel directory is present. How are you building the package? By the way, it's possible to specify a specific chisel directory using the environment variable SYSDIG_CHISEL_DIR.

from sysdig.

therealbobo avatar therealbobo commented on August 14, 2024

@eugenesan by any chance, are you referring to the variable that sets the chisel directory during the build? In that case you should modify the file here:

userspace/sysdig/config_sysdig.h.in
24:#define SYSDIG_CHISELS_DIR "${CMAKE_INSTALL_PREFIX}/share/sysdig/chisels"

from sysdig.

eugenesan avatar eugenesan commented on August 14, 2024

@therealbobo
Sorry for the delayed response.

The issue is not related to the configuration.
I've tracked the problem to falcosecurity call:

chisel_add_dir(SYSDIG_CHISELS_DIR, false);

The SYSDIG_CHISELS_DIR definitely contains the correct path and the function being called seems OK and didn't change for a while:
https://github.com/falcosecurity/libs/blob/a6be3efda7cf6c38c22d43b1a71976b3c646c38c/userspace/chisel/chisel_utils.cpp#L148

But still the path never ends up in the list or being tested/accessed and I am getting: filesystem error: directory iterator cannot open directory: No such file or directory [./chisels/]

Maybe it's a toolchain or 3rd part library bug? I am testing on Ubuntu 23.10.

from sysdig.

therealbobo avatar therealbobo commented on August 14, 2024

This sounds really strange! I'm on ubuntu 22.04 and I cannot get a repro. Do you mind sharing the cmake commands you are using? 🤔 @eugenesan

from sysdig.

eugenesan avatar eugenesan commented on August 14, 2024

This sounds really strange! I'm on ubuntu 22.04 and I cannot get a repro. Do you mind sharing the cmake commands you are using? 🤔 @eugenesan

Here are the build logs for Ubuntu 23.10 (same issue on 24.04) and corresponding package:

On 22.04 it worked with slighly older versions. Here are the logs and corresponding package:

from sysdig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.