Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ag does not work on tmpfs/cgroup filesystem #1532

Open
jirib opened this issue Oct 4, 2023 · 0 comments
Open

ag does not work on tmpfs/cgroup filesystem #1532

jirib opened this issue Oct 4, 2023 · 0 comments

Comments

@jirib
Copy link

jirib commented Oct 4, 2023

the_silver_searcher-2.2.0-3.5.x86_64 (OpenSUSE TW - update 20231003) seems not to work correctly with tmpfs/cgroup filesystem:

$ findmnt /sys/fs/cgroup
TARGET         SOURCE  FSTYPE  OPTIONS
/sys/fs/cgroup cgroup2 cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot

An example: searching for a file containing '5055' pattern, in fact a PID number.

$ ag -D 5055 /sys/fs/cgroup/user.slice/user-1000.slice/ 2>&1 | grep -P 'cgroup.procs: file is empty'
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/gvfs-goa-volume-monitor.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-permission-store.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-document-portal.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-desktop-portal.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/pipewire-pulse.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/wireplumber.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/gvfs-daemon.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/gvfs-udisks2-volume-monitor.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/gvfs-gphoto2-volume-monitor.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/at-spi-dbus-bus.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/gvfs-metadata.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/pipewire.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/dbus.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/gvfs-mtp-volume-monitor.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/gvfs-afc-volume-monitor.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/background.slice/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/background.slice/tracker-miner-fs-3.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/syncthing.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/dconf.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/dbus.socket/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/app.slice/obex.service/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/init.scope/cgroup.procs: file is empty.
DEBUG: Skipping /sys/fs/cgroup/user.slice/user-1000.slice/session-3.scope/cgroup.procs: file is empty.

# checking the file containing '5055' pattern
$  ls -l /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-document-portal.service/cgroup.procs
-rw-r--r-- 1 jiri users 0 Oct  3 18:10 /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-document-portal.service/cgroup.procs

$ grep -H '' /sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-document-portal.service/cgroup.procs
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-document-portal.service/cgroup.procs:5055
/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/xdg-document-portal.service/cgroup.procs:5066
@jirib jirib changed the title ag does not work tmpfs/cgroup filesystem ag does not work on tmpfs/cgroup filesystem Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant