Giter VIP home page Giter VIP logo

below's People

Contributors

ahornby avatar boyuni avatar brianc118 avatar cdown avatar chadaustin avatar chippermist avatar cooperlees avatar danielocfb-test avatar danobi avatar davide125 avatar dschatzberg avatar emersonford avatar fanzeyi avatar jsgf avatar krallin avatar kulshrax avatar lnicco avatar lnyng avatar lukaspiatkowski avatar michel-slm avatar mmynk avatar pedroerp avatar plv avatar shodoco avatar shri-khare avatar simpkins avatar stepancheg avatar wez avatar xavierd avatar zertosh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

below's Issues

Cargo build in resctl root dir fails

$ cargo build 
    Updating git repository `https://github.com/gimli-rs/addr2line.git`
    Updating git repository `https://github.com/llogiq/bytecount`
    Updating git repository `https://gitlab.redox-os.org/ahornby/chashmap`
    Updating git repository `https://github.com/fbsource/const-random`
    Updating git repository `https://github.com/krallin/gotham.git`
    Updating git repository `https://github.com/mozilla/sccache`
    Updating git repository `https://github.com/KapJI/rust-openssl`
    Updating git repository `https://github.com/gabrielrussoc/prost`
    Updating git repository `https://github.com/jsgf/r2d2-sqlite.git`
    Updating git repository `https://github.com/jsgf/rustfilt.git`
    Updating git repository `https://github.com/bolinfest/tokio-core`
    Updating git repository `https://github.com/jsgf/toml-rs`
    Updating crates.io index
    Updating git repository `https://github.com/facebookexperimental/rust-shed.git`
    Updating git repository `https://github.com/facebook/fbthrift.git`
error: failed to load source for a dependency on `fbthrift`

Caused by:
  Unable to update https://github.com/facebook/fbthrift.git#81db842b

Caused by:
  Could not find `Cargo.toml` in `/home/agartrell/.cargo/git/checkouts/fbthrift-abf000ee5c7fcc50/81db842/common/rust/shed/codegen_includer_proc_macro`

exitstat.bpf.o missing?

First up: below looks awesome! As a big atop fan I am excited to see development in this area. Great job.

On my pretty vanilla Arch box:

$ podman run --privileged --cgroupns=host --pid=host -it below/below:latest
Nov 02 12:02:39.065libbpf: failed to open /usr/facebook/below/bpf/exitstat.bpf.o: No such file or directory
 WARN Failed to initialize BPF: Failed to increase rlimit. Data collection will be degraded. You can ignore this warning or try to run with sudo.
Nov 02 12:02:39.071 ERRO%

I'm assuming that something is supposed to compile https://github.com/facebookincubator/resctl/blob/master/resctl/below/src/bpf/exitstat.bpf.c and put it in the path mentioned above but there's no such location in the image (in fact there's no /usr/facebook at all). I had a snoop about but I'm woefully unfamiliar with building Rust projects and have no idea how this is supposed to work.

Implement remote viewing

We have remote viewing implemented internally at FB. Laziness and dependency issues have kept it closed source. If there's any interest/desire from other folks to have it open sourced I can do it.

run failed with "cpu.pressure": Operation not supported (os error 95)

# .cargo/bin/below --version
below 0.5.0
# .cargo/bin/below
Apr 08 14:22:16.594 ERRO
----------------- Detected unclean exit ---------------------
Error Message: Os { code: 95, kind: Uncategorized, message: "Operation not supported" }: "cpu.pressure": Operation not supported (os error 95)
-------------------------------------------------------------
# cat /sys/fs/cgroup/cpu.pressure
cat: /sys/fs/cgroup/cpu.pressure: Operation not supported

os info:
centos 9 stream
5.14.0-71.el9.x86_64
CONFIG_PSI_DEFAULT_DISABLED=y

build failed

I tried to build it, but this error happened.

  error: unknown proxy name: 'rustfmt'; valid proxy names are 'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rls', 'cargo-clippy', 'clippy-driver', 'cargo-miri'
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Generate("Failed to generate skeleton for /tmp/.tmpHkN52W/exitstat.o: Broken pipe (os error 32)")', below/build.rs:19:47

Network interface summary does not properly break into multiple lines

If you are having a lot of network interfaces (e.g., virtual bridges for containers), the text interface of below does some very creative line breaks:

image

It should properly break the columns over to the next line, and it should also indent the next line properly after the Iface (Rx|Tx= label. I'm just guessing here when I say that the same problem probably applies to the block devices (I/O (Rd|Wr)).

Version bump

Now that the commit has landed to fix the broken libbpf-rs dependency can we get a new release? The 0.4.0 version isn't so useful as it doesn't compile.

CPU pressure is always zero

To reproduce: stress-ng --cpu $(( $(nproc) * 2))

Expected behavior: CPU pressure column in the General tab of the cgroups view reads >0%, because the CPU is oversubscribed.

Actual behavior: CPU pressure column reads 0%.

Looking over on the Pressure tab, we find that the load shows up in the "CPU Some Pressure" column. The kernel documentation says:

CPU full is undefined at the system level, but has been reported since 5.13, so it is set to zero for backward compatibility.

My opinion here is that "CPU Some" should replace "CPU full" on the General tab, and probably "CPU full" should not be collected at all. "CPU Some" is useful for detecting transient CPU saturation that doesn't show up in CPU utilization because the workload is bursty.

fb_procfs: Can't tell which `Stat::cpus` entry matches to which CPU when CPUs are hot[un]plugged

Stat::cpus is Option<Vec<CpuStat>> which is populated by each cpuN line in /proc/stat. However, /proc/stat CPU numbers may have holes. Here's an example from a 4 CPU qemu instance:

# cat /proc/stat
cpu  113613 21 2406 5547556 641 0 144 0 0 0
cpu0 26133 18 1309 2725972 370 0 134 0 0 0
cpu1 32707 2 422 2709984 266 0 2 0 0 0
cpu2 28312 0 587 67 0 0 7 0 0 0
cpu3 26460 0 86 111532 5 0 0 0 0 0

After taking cpu2 offline with echo 0 > /sys/devices/system/cpu/cpu2/online, the file looks as follows:

# cat /proc/stat
cpu  113618 21 2412 8207884 686 0 145 0 0 0
cpu0 26136 18 1312 2733593 371 0 135 0 0 0
cpu1 32708 2 424 2717609 268 0 2 0 0 0
cpu3 26460 0 87 119161 6 0 0 0 0 0

KernelStats::cpu_time will contain 3 entries but without any way to reliably find out which three CPUs are being reported. Corroborating other sources doesn't really work as there may be intervening hot[un]plug operations between reads.

It seems like KernelStats::cpu_time, instead of being a Vec, should be keyed with CPU ID read from /proc/stat.

Error in bpf_object__probe_loading():Operation not permitted(1)

How can I resolve the following error?
Error in bpf_object__probe_loading():Operation not permitted(1)

Running the service:

Feb 28 13:57:22.357 ERRO Failed to load BPF program: System error, errno: 22 (EINVAL: Invalid argument)
Feb 28 13:57:27.358 WARN bpf error channel disconnected

I checked and is seems if my kernel does have CONFIG_BPF_SYSCALL set to y:

6.1.77-99.164.amzn2023.x86_64/config
116:CONFIG_BPF_SYSCALL=y
6.1.75-99.163.amzn2023.x86_64/config
116:CONFIG_BPF_SYSCALL=y
6.1.72-96.166.amzn2023.x86_64/config
116:CONFIG_BPF_SYSCALL=y

Debug Log:

libbpf: loading object 'exitstat_bpf' from buffer
libbpf: elf: section(2) .symtab, size 408, link 1, flags 0, type=2
libbpf: elf: section(3) .text, size 608, link 0, flags 6, type=1
libbpf: sec '.text': found program 'percpu_counter_read_positive' at insn offset 0 (0 bytes), code size 2 insns (16 bytes)
libbpf: sec '.text': found program 'task_cpu' at insn offset 2 (16 bytes), code size 19 insns (152 bytes)
libbpf: sec '.text': found program 'mm_active_rss_pages' at insn offset 21 (168 bytes), code size 55 insns (440 bytes)
libbpf: elf: section(4) tracepoint/sched/sched_process_exit, size 1488, link 0, flags 6, type=1
libbpf: sec 'tracepoint/sched/sched_process_exit': found program 'tracepoint__sched__sched_process_exit' at insn offset 0 (0 bytes), code size 186 insns (1488 bytes)
libbpf: elf: section(5) .maps, size 24, link 0, flags 3, type=1
libbpf: elf: section(6) license, size 4, link 0, flags 3, type=1
libbpf: license of exitstat_bpf is GPL
libbpf: elf: section(7) .reltracepoint/sched/sched_process_exit, size 32, link 2, flags 40, type=9
libbpf: elf: section(8) .BTF, size 69476, link 0, flags 0, type=1
libbpf: elf: section(9) .BTF.ext, size 2268, link 0, flags 0, type=1
libbpf: looking for externs among 17 symbols...
libbpf: collected 0 externs total
libbpf: map 'events': at sec_idx 5, offset 0.
libbpf: map 'events': found type = 4.
libbpf: map 'events': found key_size = 4.
libbpf: map 'events': found value_size = 4.
libbpf: sec '.reltracepoint/sched/sched_process_exit': collecting relocation for section(4) 'tracepoint/sched/sched_process_exit'
libbpf: sec '.reltracepoint/sched/sched_process_exit': relo #0: insn #173 against 'mm_active_rss_pages'
libbpf: sec '.reltracepoint/sched/sched_process_exit': relo #1: insn #178 against 'events'
libbpf: prog 'tracepoint__sched__sched_process_exit': found map 0 (events, sec 5, off 0) for insn #178
libbpf: Failed to bump RLIMIT_MEMLOCK (err = -1), you might need to do it explicitly!
libbpf: Error in bpf_object__probe_loading():Operation not permitted(1). Couldn't load trivial BPF program. Make sure your kernel supports BPF (CONFIG_BPF_SYSCALL=y) and/or that RLIMIT_MEMLOCK is set to big enough value.
libbpf: failed to load object 'exitstat_bpf'
libbpf: failed to load BPF skeleton 'exitstat_bpf': -1

Large number of clock_gettime syscalls

I noticed when running below on live mode a few interesting things. First there are roughly 3-4 clock_gettime syscalls per epoll_wait.

strace -f -p `pgrep below`
...
[pid 10545] epoll_wait(7, [], 3, 0)     = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=824761942}) = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=824806781}) = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=824850152}) = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=824894012}) = 0
[pid 10545] epoll_wait(7, [], 3, 0)     = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=824976495}) = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=825019028}) = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=825062260}) = 0
[pid 10545] clock_gettime(CLOCK_MONOTONIC, {tv_sec=1030, tv_nsec=825104165}) = 0
[pid 10545] epoll_wait(7, [], 3, 0)     = 0

A quick and dirty bpftrace estimate of syscalls/sec, shows ~20k syscalls/sec:

 bpftrace -e 'tracepoint:raw_syscalls:sys_enter /comm == "below"/ { @syscalls = count(); }
    interval:s:1 { print(@syscalls); clear(@syscalls); }'
Attaching 2 probes...
@syscalls: 20399
@syscalls: 19499
@syscalls: 18809
@syscalls: 19378
@syscalls: 27254
@syscalls: 20061
@syscalls: 19144
@syscalls: 18824

Compared to clock_gettime syscalls (~15k syscalls/sec):

bpftrace -e 'tracepoint:syscalls:sys_enter_clock_gettime /comm == "below"/ { @syscalls = count(); }
    interval:s:1 { print(@syscalls); clear(@syscalls); }'
Attaching 2 probes...
@syscalls: 15518
@syscalls: 15510
@syscalls: 17648
@syscalls: 14906
@syscalls: 15070
@syscalls: 15713

Not that there is anything wrong with running clock_gettime, but when I run top/htop at the same time as below I notice it takes anywhere in the range of ~7-12% CPU. From digging around the code I'm guessing the store crate is probably where many of these calls are coming from:

rg -i 'now\(' | cut -d ':' -f 1 | sort | uniq -c
      1 below/common/src/cliutil.rs
     32 below/common/src/dateutil.rs
      2 below/model/src/collector.rs
      7 below/src/main.rs
      4 below/src/test.rs
      1 below/store/src/advance.rs
      9 below/store/src/cursor.rs
     11 below/store/src/lib.rs
      1 below/view/src/lib.rs

needsuser visible error handling when cgroup2 not present

When I boot with systemd.unified_cgroup_hierarchy=0 - below doesn't run and doesn't give an error. However...

$ strace below
execve("/usr/bin/below", ["below"], 0x7ffe6c58e130 /* 37 vars */) = 0
brk(NULL)                               = 0x5572e3f8d000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fff144d5ef0) = -1 EINVAL (Invalid argument)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6c209cb000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=57255, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 57255, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6c209bd000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libzstd.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\351\357\4\10=\0000M\243\244\346c\215M!\317"..., 172, 744) = 172
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=735528, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 729424, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c2090a000
mprotect(0x7f6c2090f000, 704512, PROT_NONE) = 0
mmap(0x7f6c2090f000, 638976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7f6c2090f000
mmap(0x7f6c209ab000, 61440, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa1000) = 0x7f6c209ab000
mmap(0x7f6c209bb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xb0000) = 0x7f6c209bb000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libbpf.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0c\5\305X\272\16vC\1\37\306\232\224eG\216"..., 172, 744) = 172
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=364200, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 356976, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c208b2000
mmap(0x7f6c208bc000, 221184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f6c208bc000
mmap(0x7f6c208f2000, 86016, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x40000) = 0x7f6c208f2000
mmap(0x7f6c20907000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x54000) = 0x7f6c20907000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=128528, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 127272, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c20892000
mmap(0x7f6c20895000, 94208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f6c20895000
mmap(0x7f6c208ac000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a000) = 0x7f6c208ac000
mmap(0x7f6c208b0000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d000) = 0x7f6c208b0000
mmap(0x7f6c208b1000, 296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6c208b1000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=919824, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 905480, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c207b4000
mmap(0x7f6c207c2000, 466944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xe000) = 0x7f6c207c2000
mmap(0x7f6c20834000, 376832, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x80000) = 0x7f6c20834000
mmap(0x7f6c20890000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xdb000) = 0x7f6c20890000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20\227\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0@\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0"..., 80, 848) = 80
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0o\\\345\24\251\347\365\36\2G\245'\303\244\36\331"..., 68, 928) = 68
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=2375216, ...}, AT_EMPTY_PATH) = 0
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
mmap(NULL, 2104720, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c205b2000
mmap(0x7f6c205da000, 1523712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7f6c205da000
mmap(0x7f6c2074e000, 360448, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19c000) = 0x7f6c2074e000
mmap(0x7f6c207a6000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f3000) = 0x7f6c207a6000
mmap(0x7f6c207ac000, 32144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6c207ac000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libelf.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\5\204\274\270\2047\268\3523Q\16\323t5q"..., 176, 800) = 176
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=108592, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 106512, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c20597000
mprotect(0x7f6c2059a000, 90112, PROT_NONE) = 0
mmap(0x7f6c2059a000, 69632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f6c2059a000
mmap(0x7f6c205ab000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14000) = 0x7f6c205ab000
mmap(0x7f6c205b0000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f6c205b0000
mmap(0x7f6c205b1000, 16, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6c205b1000
close(3)                                = 0
openat(AT_FDCWD, "/lib64/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0bJD\363\0351\335t\226H2\335_\274\0^"..., 172, 744) = 172
newfstatat(3, "", {st_mode=S_IFREG|0755, st_size=103280, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6c20595000
mmap(NULL, 102408, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f6c2057b000
mprotect(0x7f6c2057e000, 86016, PROT_NONE) = 0
mmap(0x7f6c2057e000, 57344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f6c2057e000
mmap(0x7f6c2058c000, 24576, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x7f6c2058c000
mmap(0x7f6c20593000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f6c20593000
mmap(0x7f6c20594000, 8, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6c20594000
close(3)                                = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6c20578000
arch_prctl(ARCH_SET_FS, 0x7f6c20578840) = 0
set_tid_address(0x7f6c20578b10)         = 7340
set_robust_list(0x7f6c20578b20, 24)     = 0
rseq(0x7f6c205791e0, 0x20, 0, 0x53053053) = 0
mprotect(0x7f6c207a6000, 16384, PROT_READ) = 0
mprotect(0x7f6c20593000, 4096, PROT_READ) = 0
mprotect(0x7f6c205b0000, 4096, PROT_READ) = 0
mprotect(0x7f6c20890000, 4096, PROT_READ) = 0
mprotect(0x7f6c208b0000, 4096, PROT_READ) = 0
mprotect(0x7f6c20907000, 8192, PROT_READ) = 0
mprotect(0x7f6c209bb000, 4096, PROT_READ) = 0
mprotect(0x5572e25b5000, 274432, PROT_READ) = 0
mprotect(0x7f6c20a02000, 8192, PROT_READ) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
munmap(0x7f6c209bd000, 57255)           = 0
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 0 (Timeout)
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f6c205f0a70}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x5572e23ae5c0, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f6c205f0a70}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x5572e23ae5c0, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f6c205f0a70}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c209c8000
mprotect(0x7f6c209c8000, 4096, PROT_NONE) = 0
sigaltstack({ss_sp=0x7f6c209c9000, ss_flags=0, ss_size=8192}, NULL) = 0
getrandom("\xc4\x46\x4f\xed\xc8\x36\x3d\xbb", 8, GRND_NONBLOCK) = 8
brk(NULL)                               = 0x5572e3f8d000
brk(0x5572e3fae000)                     = 0x5572e3fae000
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
newfstatat(3, "", {st_mode=S_IFREG|0444, st_size=0, ...}, AT_EMPTY_PATH) = 0
read(3, "5572e1edc000-5572e1f40000 r--p 0"..., 1024) = 1024
read(3, "00-7f6c20594000 r--p 00017000 00"..., 1024) = 1024
read(3, "                  /usr/lib64/lib"..., 1024) = 1024
read(3, ":2c 311                        /"..., 1024) = 1024
read(3, "c209bb000-7f6c209bc000 r--p 000b"..., 1024) = 1024
close(3)                                = 0
sched_getaffinity(7340, 32, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]) = 8
brk(0x5572e3fcf000)                     = 0x5572e3fcf000
getrandom("\xf8\x89\xbc\x70\x09\x9e\xdf\x66\x4f\xf4\x06\x26\xc7\xd6\x3c\xe6", 16, GRND_NONBLOCK) = 16
brk(0x5572e3fcd000)                     = 0x5572e3fcd000
statx(0, NULL, AT_STATX_SYNC_AS_STAT, STATX_ALL, NULL) = -1 EFAULT (Bad address)
statx(AT_FDCWD, "/etc/below/below.conf", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7fff144d0f90) = -1 ENOENT (No such file or directory)
getuid()                                = 1000
newfstatat(AT_FDCWD, "/etc/nsswitch.conf", {st_mode=S_IFREG|0644, st_size=693, ...}, 0) = 0
newfstatat(AT_FDCWD, "/", {st_mode=S_IFDIR|0555, st_size=152, ...}, 0) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=693, ...}, AT_EMPTY_PATH) = 0
read(3, "# Generated by authselect on Fri"..., 4096) = 693
read(3, "", 4096)                       = 0
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=693, ...}, AT_EMPTY_PATH) = 0
close(3)                                = 0
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2474, ...}, AT_EMPTY_PATH) = 0
lseek(3, 0, SEEK_SET)                   = 0
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2474
close(3)                                = 0
statx(AT_FDCWD, "/var/log/below", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|S_ISVTX|0777, stx_size=650, ...}) = 0
statx(AT_FDCWD, "/var/log/below", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|S_ISVTX|0777, stx_size=650, ...}) = 0
statx(AT_FDCWD, "/var/log/below", AT_STATX_SYNC_AS_STAT, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|S_ISVTX|0777, stx_size=650, ...}) = 0
openat(AT_FDCWD, "/var/log/below", O_RDONLY|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|S_ISVTX|0777, stx_size=650, ...}) = 0
close(3)                                = 0
openat(AT_FDCWD, "/var/log/below/error_chris.log", O_WRONLY|O_CREAT|O_APPEND|O_CLOEXEC, 0666) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0666, stx_size=312, ...}) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f6c2063c260, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f6c205f0a70}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c20377000
mprotect(0x7f6c20378000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c20577910, parent_tid=0x7f6c20577910, exit_signal=0, stack=0x7f6c20377000, stack_size=0x1ffe00, tls=0x7f6c20577640} => {parent_tid=[7341]}, 88) = 7341
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [4, 5]) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x5572e23586b0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f6c205f0a70}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x5572e23586b0, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f6c205f0a70}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c20176000
mprotect(0x7f6c20177000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c20376910, parent_tid=0x7f6c20376910, exit_signal=0, stack=0x7f6c20176000, stack_size=0x1ffe00, tls=0x7f6c20376640} => {parent_tid=[7342]}, 88) = 7342
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1bdff000
mprotect(0x7f6c1be00000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1bfff910, parent_tid=0x7f6c1bfff910, exit_signal=0, stack=0x7f6c1bdff000, stack_size=0x1ffe00, tls=0x7f6c1bfff640} => {parent_tid=[7343]}, 88) = 7343
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
openat(AT_FDCWD, "/var/log/below/store/index_01660089600", O_RDONLY|O_CLOEXEC) = 6
statx(6, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=424544, ...}) = 0
mmap(NULL, 424544, PROT_READ, MAP_SHARED, 6, 0) = 0x7f6c2010e000
close(6)                                = 0
openat(AT_FDCWD, "/var/log/below/store/data_01660089600", O_RDONLY|O_CLOEXEC) = 6
statx(6, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=575925208, ...}) = 0
mmap(NULL, 575925208, PROT_READ, MAP_SHARED, 6, 0) = 0x7f6bedac1000
close(6)                                = 0
openat(AT_FDCWD, "/var/log/below/store", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7
newfstatat(7, "", {st_mode=S_IFDIR|0755, st_size=264, ...}, AT_EMPTY_PATH) = 0
getdents64(7, 0x5572e3fac8b0 /* 10 entries */, 32768) = 368
getdents64(7, 0x5572e3fac8b0 /* 0 entries */, 32768) = 0
close(7)                                = 0
openat(AT_FDCWD, "/var/log/below/store/index_01660089600", O_RDONLY|O_CLOEXEC) = 7
statx(7, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=424544, ...}) = 0
mmap(NULL, 424544, PROT_READ, MAP_SHARED, 7, 0) = 0x7f6c200a6000
close(7)                                = 0
openat(AT_FDCWD, "/var/log/below/store/data_01660089600", O_RDONLY|O_CLOEXEC) = 7
statx(7, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=575925208, ...}) = 0
mmap(NULL, 575925208, PROT_READ, MAP_SHARED, 7, 0) = 0x7f6bcb582000
close(7)                                = 0
munmap(0x7f6bcb582000, 575925208)       = 0
munmap(0x7f6c200a6000, 424544)          = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1b75a000
mprotect(0x7f6c1b75b000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1b95a910, parent_tid=0x7f6c1b95a910, exit_signal=0, stack=0x7f6c1b75a000, stack_size=0x1ffe00, tls=0x7f6c1b95a640} => {parent_tid=[7344]}, 88) = 7344
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1b559000
mprotect(0x7f6c1b55a000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1b759910, parent_tid=0x7f6c1b759910, exit_signal=0, stack=0x7f6c1b559000, stack_size=0x1ffe00, tls=0x7f6c1b759640} => {parent_tid=[7345]}, 88) = 7345
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1b358000
mprotect(0x7f6c1b359000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1b558910, parent_tid=0x7f6c1b558910, exit_signal=0, stack=0x7f6c1b358000, stack_size=0x1ffe00, tls=0x7f6c1b558640} => {parent_tid=[7346]}, 88) = 7346
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1b157000
mprotect(0x7f6c1b158000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1b357910, parent_tid=0x7f6c1b357910, exit_signal=0, stack=0x7f6c1b157000, stack_size=0x1ffe00, tls=0x7f6c1b357640} => {parent_tid=[7347]}, 88) = 7347
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 2101248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f6c1af56000
mprotect(0x7f6c1af57000, 2097152, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
clone3({flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, child_tid=0x7f6c1b156910, parent_tid=0x7f6c1b156910, exit_signal=0, stack=0x7f6c1af56000, stack_size=0x1ffe00, tls=0x7f6c1b156640} => {parent_tid=[7348]}, 88) = 7348
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
openat(AT_FDCWD, "/sys/fs/cgroup/", O_RDONLY|O_CLOEXEC|O_PATH) = 7
fstatfs(7, {f_type=TMPFS_MAGIC, f_bsize=4096, f_blocks=1024, f_bfree=1024, f_bavail=1024, f_files=1024, f_ffree=1007, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RDONLY|ST_NOSUID|ST_NODEV|ST_NOEXEC}) = 0
close(7)                                = 0
futex(0x5572e3f8f8f8, FUTEX_WAKE_PRIVATE, 1) = 1
munmap(0x7f6c2010e000, 424544)          = 0
munmap(0x7f6bedac1000, 575925208)       = 0
futex(0x5572e3fa9888, FUTEX_WAKE_PRIVATE, 1) = 1
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, Aug 10 18:35:26.294NULL) = 0
munmap(0x7f6c209c8000, 12288)           = 0
 ERRO 
----------------- Detected unclean exit ---------------------
Error Message: Not cgroup2 filesystem: "/sys/fs/cgroup/"
-------------------------------------------------------------
sched_yield()                           = 0
sched_yield()                           = 0
exit_group(1)                           = ?
+++ exited with 1 +++

Build Fails

I tried to install via cargo install below the build failed :(
The same failure is reproduced when we try to checkout the code and build again.

Error:

mfrw@u18 ~/r/below (master)> cargo build --release
warning: /home/mfrw/rutils/below/below/store/Cargo.toml: version requirement `=0.8.0+zstd.1.4.9` for dependency `zstd` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion
   Compiling below_derive v0.2.0 (/home/mfrw/rutils/below/below/below_derive)
   Compiling fb_procfs v0.2.0 (/home/mfrw/rutils/below/below/procfs)
   Compiling cgroupfs v0.2.0 (/home/mfrw/rutils/below/below/cgroupfs)
   Compiling below-common v0.2.0 (/home/mfrw/rutils/below/below/common)
   Compiling below v0.2.0 (/home/mfrw/rutils/below/below)
error: failed to run custom build command for `below v0.2.0 (/home/mfrw/rutils/below/below)`

Caused by:
  process didn't exit successfully: `/home/mfrw/rutils/below/target/release/build/below-47df527852d71c27/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Build("No such file or directory (os error 2)")', below/build.rs:19:47
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

Am I missing anything trivial ?

Filter by other fields

Currently it is only possible to filter by name.

Would be very useful to be able to filter by other fields like state or cmdline.

build-failed : thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value

'''
Compiling below v0.5.0 (/home/bhzhu/source/below/below)
error: failed to run custom build command for below v0.5.0 (/home/bhzhu/source/below/below)

Caused by:
process didn't exit successfully: /home/bhzhu/source/below/target/release/build/below-718216cef9c31e46/build-script-build (exit status: 101)
--- stderr
thread 'main' panicked at 'called Result::unwrap() on an Err value: Build("Failed to run regex on version string")', below/build.rs:19:47
stack backtrace:
0: 0x5555557ee5ec - std::backtrace_rs::backtrace::libunwind::trace::h26ded3cee286f9ec
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x5555557ee5ec - std::backtrace_rs::backtrace::trace_unsynchronized::h830d548378790fdc
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x5555557ee5ec - std::sys_common::backtrace::_print_fmt::h7356e27371ec940d
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:66:5
3: 0x5555557ee5ec - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h3da18fd93237a444
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:45:22
4: 0x555555810c3c - core::fmt::write::h1b11e7c3b9f52b83
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/fmt/mod.rs:1190:17
5: 0x5555557ea318 - std::io::Write::write_fmt::h2530d62e754fd8dc
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/io/mod.rs:1657:15
6: 0x5555557f0657 - std::sys_common::backtrace::_print::ha001eea1f09df837
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:48:5
7: 0x5555557f0657 - std::sys_common::backtrace::print::he19aad5eb563cdb7
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:35:9
8: 0x5555557f0657 - std::panicking::default_hook::{{closure}}::h4bec003d220dffc8
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:295:22
9: 0x5555557f031f - std::panicking::default_hook::hbf9de44b5ceb445d
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:314:9
10: 0x5555557f0dba - std::panicking::rust_panic_with_hook::hba49b95df3772ed5
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:698:17
11: 0x5555557f0aa7 - std::panicking::begin_panic_handler::{{closure}}::he9fc0b4286f77c60
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:588:13
12: 0x5555557eea94 - std::sys_common::backtrace::__rust_end_short_backtrace::h07791585b84f81da
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/sys_common/backtrace.rs:138:18
13: 0x5555557f07a9 - rust_begin_unwind
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:584:5
14: 0x5555555b9c13 - core::panicking::panic_fmt::he8540b011fb85aaa
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/panicking.rs:143:14
15: 0x5555555b9ca3 - core::result::unwrap_failed::h5b5a61b4f1a3fe39
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/result.rs:1749:5
16: 0x5555555babe2 - core::result::Result<T,E>::unwrap::hbd8ff0f689370095
17: 0x5555555bcb7a - build_script_build::main::h64c087248aa8d4af
18: 0x5555555bb2c3 - core::ops::function::FnOnce::call_once::h3fe4fb01b7d47e7e
19: 0x5555555bb509 - std::sys_common::backtrace::__rust_begin_short_backtrace::h4b18e62f18ccc92a
20: 0x5555555bcac9 - std::rt::lang_start::{{closure}}::hf32d562c9a5ca0c2
21: 0x5555557edcd1 - core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::hb16268c89c211835
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/core/src/ops/function.rs:259:13
22: 0x5555557edcd1 - std::panicking::try::do_call::h42af4c24be01d864
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:492:40
23: 0x5555557edcd1 - std::panicking::try::hcddad39c2668977b
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:456:19
24: 0x5555557edcd1 - std::panic::catch_unwind::h17be4d22360f6801
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panic.rs:137:14
25: 0x5555557edcd1 - std::rt::lang_start_internal::{{closure}}::he399a7bc5b46d1ed
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/rt.rs:128:48
26: 0x5555557edcd1 - std::panicking::try::do_call::he22e88faa301e128
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:492:40
27: 0x5555557edcd1 - std::panicking::try::h179e28dc63c29e66
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panicking.rs:456:19
28: 0x5555557edcd1 - std::panic::catch_unwind::h926c540a0059105b
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/panic.rs:137:14
29: 0x5555557edcd1 - std::rt::lang_start_internal::hcf3b4e612381f709
at /rustc/09cb29c64c2a0e15debf2d6fca2bc7c71a682033/library/std/src/rt.rs:128:20
30: 0x5555555bcab1 - std::rt::lang_start::hfb5e709917bc1f4e
31: 0x5555555bcc43 - main
32: 0x7ffff6f1f50d - __libc_start_main
at /home/bhzhu/source/glibc-2.33/csu/../csu/libc-start.c:332:16
33: 0x5555555ba43a - _start
at /home/bhzhu/source/glibc-2.33/csu/../sysdeps/x86_64/start.S:120
34: 0x0 -
warning: build failed, waiting for other jobs to finish...
error: build failed
'''

Update dependency nix to 0.25

The build on Alpine Linux fails because the crate nix specifically disables many constants for the musl target in versions lower than 0.25

better config management

If one installs below with default settings, its use is really annoying because one always needs to specify --config myconf.

It would be nice, if below would try per default to load ${HOME}/.below.conf (ignore if n/a), than supplement all unset values with the system config /etc/below.conf and finally set all unset values to their fallback values.

get stuck when run with sudo

It‘s Ok when run with unpriviledged user. But when run with sudo it get stuck, nothing responsive.
image

and CPU 100%
image

Not cgroup2 filesystem

On a fresh install of Fedora 34, trying to run below give me the error:

----------------- Detected unclean exit ---------------------
Error Message: Not cgroup2 filesystem: "/sys/fs/cgroup/"
-------------------------------------------------------------

System info:

$ uname -a
Linux fedora 5.13.10-200.fc34.x86_64 #1 SMP Fri Aug 13 20:13:23 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/*-release
Fedora release 34 (Thirty Four)
NAME=Fedora
VERSION="34 (Workstation Edition)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f34/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=34
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=34
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
Fedora release 34 (Thirty Four)
Fedora release 34 (Thirty Four)

Also, I'm running Fedora on VMware 16.

Unable to build from branch 'main'

I've just tried to build from branch 'main' using Rust 1.68.2 and got the following errors:

    Building [=======================> ] 346/348: below-view
error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:25:5
    |
25  |     Event::Char('u'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:33:5
    |
33  |     Event::Char('g'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:42:5
    |
42  |     Event::Char('G'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

error[E0308]: mismatched types
   --> below/view/src/controllers/open_source/mod.rs:51:5
    |
51  |     Event::Char('x'),
    |     ^^^^^^^^^^^^^^^^ expected struct `Vec`, found enum `Event`
    |
   ::: below/view/src/controllers/controller_infra.rs:220:36
    |
220 |             fn default_events() -> Vec<Event> {
    |                                    ---------- expected `Vec<cursive::event::Event>` because of return type
    |
    = note: expected struct `Vec<cursive::event::Event>`
                 found enum `cursive::event::Event`

For more information about this error, try `rustc --explain E0308`.
error: could not compile `below-view` due to 4 previous errors

Error while trying to build

I have a Dockerfile that I use for trying to build below located here https://gist.github.com/dc510ccd122e6c13d6271833dd1cbcee I keep getting the following error while trying to build the HEAD , the tag v0.5.0 builds just fine.


#15 105.6    Compiling num_enum_derive v0.5.4
#15 105.7    Compiling cursive v0.16.3
#15 107.1    Compiling cursive_buffered_backend v0.5.0
#15 107.7    Compiling below-common v0.5.0 (/src/below/below/common)
#15 107.8    Compiling num_enum v0.5.4
#15 108.2    Compiling btrfs v0.5.0 (/src/below/below/btrfs)
#15 108.4    Compiling below-gpu-stats v0.5.0 (/src/below/below/gpu_stats)
#15 108.7 error: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133)
#15 108.7     --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4997:10
#15 108.7      |
#15 108.7 4997 | #[derive(Debug)]
#15 108.7      |          ^^^^^
#15 108.7      |
#15 108.7      = note: `#[deny(unaligned_references)]` on by default
#15 108.7      = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
#15 108.7      = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
#15 108.7      = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
#15 108.7 
#15 108.8 error: could not compile `btrfs` due to 2 previous errors
#15 108.8 warning: build failed, waiting for other jobs to finish...
------
executor failed running [/bin/sh -c /root/.cargo/bin/cargo build --release --all-targets]: exit code: 101
make: *** [build] Error 1
(ins)lrfurtado-mbp:below_build lrfurtado$ 

libbpf issue

libbpf: prog 'tracepoint__sched__sched_process_exit': failed to load: -22
libbpf: failed to load object 'exitstat_bpf'
libbpf: failed to load BPF skeleton 'exitstat_bpf': -22
May 17 06:50:02.720 ERRO System error, errno: 22
^CMay 17 06:50:04.541 ERRO Stop signal received: 2, exiting.
May 17 06:50:07.721 ERRO Stopped by signal: 2
May 17 13:43:17 arazu systemd[1]: Started below system monitor recording daemon.
May 17 13:43:17 arazu below[29640]: May 17 06:43:17.616 DEBG Starting up!
May 17 13:43:22 arazu below[29640]: May 17 06:43:22.617 ERRO System error, errno: 22
May 17 13:43:27 arazu below[29640]: May 17 06:43:27.617 WARN bpf error channel disconnected
May 17 13:46:36 arazu below[29640]: May 17 06:46:36.238 ERRO Stop signal received: 15, exiting.
May 17 13:46:36 arazu systemd[1]: Stopping below system monitor recording daemon...
May 17 13:46:37 arazu below[29640]: May 17 06:46:37.628 ERRO Stopped by signal: 15
May 17 13:46:37 arazu systemd[1]: below.service: Deactivated successfully.
May 17 13:46:37 arazu systemd[1]: Stopped below system monitor recording daemon.
May 17 13:46:37 arazu systemd[1]: below.service: Consumed 1.005s CPU time.
Linux arazu 6.3.2-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 11 May 2023 16:40:19 +0000 x86_64 GNU/Linux

log_dir = "/var/log/below"
store_dir = "/var/log/below/store"
cgroup_filter_out = "user.slice.*"
[root@arazu below]# cat /sys/kernel/security/lsm
capability,landlock,lockdown,yama,bpf
journalctl -b | egrep -i '(bpf|lsm)'
egrep: warning: egrep is obsolescent; using grep -E
May 17 12:56:05 arazu kernel: LSM: initializing lsm=capability,landlock,lockdown,yama,integrity,bpf
May 17 12:56:05 arazu kernel: LSM support for eBPF active
May 17 12:56:05 arazu systemd[1]: systemd 253.4-1-arch running in system mode (+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
May 17 12:56:05 arazu systemd[1]: bpf-lsm: LSM BPF program attached
May 17 13:41:37 arazu below[26674]: May 17 06:41:37.601 WARN bpf error channel disconnected
May 17 13:42:02 arazu below[27207]: May 17 06:42:02.607 WARN bpf error channel disconnected
May 17 13:43:27 arazu below[29640]: May 17 06:43:27.617 WARN bpf error channel disconnected

arch, installed via AUR from git

Fails to build with musl due to incorrect arguments to libc::ioctl

   Compiling below-ethtool v0.8.1 (below-0.8.1/below/ethtool)
error[E0308]: mismatched types
   --> below/ethtool/src/reader.rs:36:58
    |
36  |     let exit_code = unsafe { libc::ioctl(fd.as_raw_fd(), nix::libc::SIOCETHTOOL, &ifr) };
    |                              -----------                 ^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `u64`
    |                              |
    |                              arguments to this function are incorrect
    |
note: function defined here
   --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.153/src/unix/linux_like/linux/musl/mod.rs:850:12
    |
850 |     pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int;
    |            ^^^^^
help: you can convert a `u64` to an `i32` and panic if the converted value doesn't fit
    |
36  |     let exit_code = unsafe { libc::ioctl(fd.as_raw_fd(), nix::libc::SIOCETHTOOL.try_into().unwrap(), &ifr) };
    |                                                                                ++++++++++++++++++++
  • Alpine Linux Edge x86_64
  • musl libc 1.2.5
  • rust 1.77.0

below 0.3.0 records an unclean exit (crash)

This happens when I'm emerging packages in Gentoo:

# ~ $ below
# ~ $ echo $?
1
# ~ $ below
Nov 04 12:05:08.863 ERRO
----------------- Detected unclean exit ---------------------
Error Message: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }: "portage/net-fs:samba-4.14.9.ccy1d170/io.stat": Permission denied (os error 13)
-------------------------------------------------------------

# ~ $ journalctl -et below --no-hostname
Nov 04 10:45:33 below[2296112]: Nov 04 10:45:33.016 DEBG Starting up!
Nov 04 10:45:38 below[2296112]: Nov 04 10:45:38.015 ERRO System error, errno: 1
Nov 04 10:45:43 below[2296112]: Nov 04 10:45:43.016 WARN bpf error channel disconnected
Nov 04 11:37:13 below[2296112]: Nov 04 11:37:13.202 ERRO panic 'cmdline receiver hung up: SendError { .. }': below/procfs/src/lib.rs:630
Nov 04 11:37:13 below[2296112]: Backtrace is not available.
Nov 04 11:37:18 below[2296112]: Nov 04 11:37:18.175 ERRO panic 'cmdline receiver hung up: SendError { .. }': below/procfs/src/lib.rs:630
Nov 04 11:37:18 below[2296112]: Backtrace is not available.
Nov 04 11:49:28 below[2296112]: Nov 04 11:49:28.238 ERRO panic 'cmdline receiver hung up: SendError { .. }': below/procfs/src/lib.rs:630
Nov 04 11:49:28 below[2296112]: Backtrace is not available.
Nov 04 11:55:48 below[2296112]: Nov 04 11:55:48.197 ERRO panic 'cmdline receiver hung up: SendError { .. }': below/procfs/src/lib.rs:630
Nov 04 11:55:48 below[2296112]: Backtrace is not available.
Nov 04 12:03:23 below[2296112]: Nov 04 12:03:23.230 ERRO panic 'cmdline receiver hung up: SendError { .. }': below/procfs/src/lib.rs:630
Nov 04 12:03:23 below[2296112]: Backtrace is not available.

sys-fs-cgroup.tree.txt

process view: hide kernel threads

Usually kernel threads are just clutter in the process view: not much one can do about it, not of interest because resource usage is always 0 no matter, which one.

So it makes sense to hide them per default (and optionally add a CLI option or key binding to show them on demand).

To find out, whether a process is a kernel_thread, one may inspect field 9 (flags) of /proc/$pid/stat - if the values bit 0x00200000 is set, it is a kernel thread.

systemd-cgls e.g. does it this way: https://github.com/jelmd/cgls/blob/main/misc.c#L911

[FIX] Add build dependency

After commit 9205e4f the following patch helps me to successfully build "main" branch:

commit 6812470834ab431078ff5e4bdd4e30969d20b48f
Author: Elijah Zarezky <[email protected]>
Date:   Fri Sep 17 23:03:59 2021 +0300

    Fix build dependency

diff --git a/Cargo.lock b/Cargo.lock
index 367bc5d..2755940 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -105,6 +105,7 @@ dependencies = [
  "regex",
  "slog",
  "slog-term",
+ "walkdir",
 ]
 
 [[package]]
diff --git a/below/common/Cargo.toml b/below/common/Cargo.toml
index 0499455..6dd8117 100644
--- a/below/common/Cargo.toml
+++ b/below/common/Cargo.toml
@@ -18,3 +18,4 @@ once_cell = "1.4"
 regex = "1.4.2"
 slog = { version = "2.5", features = ["max_level_trace", "nested-values"] }
 slog-term = "2.4.2"
+walkdir = "2.2.9"

I am using Rust version 1.53.0.

Support fold in zoom process view

Fold can be used in normal process view, but not in zoomed process view (after zooming into processes of a cgroup). Maybe it makes sense to support that too?

Add process tree view

Being able to see the processes in a tree (like ps -ef f or top V) offers a lot of information about what is your system doing at a glance.

Test failures around Thrift data format

---- cursor::tests::advance_at_boundries stdout ----
thread 'cursor::tests::advance_at_boundries' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:707:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- cursor::tests::advance_from_invalid_offset stdout ----
thread 'cursor::tests::advance_from_invalid_offset' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:886:24

---- cursor::tests::advance_simple stdout ----
thread 'cursor::tests::advance_simple' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:728:24

---- cursor::tests::advance_retry stdout ----
thread 'cursor::tests::advance_retry' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:757:24

---- cursor::tests::get_corrupt stdout ----
thread 'cursor::tests::get_corrupt' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:784:38

---- cursor::tests::jump_to_key stdout ----
thread 'cursor::tests::jump_to_key' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:914:28

---- cursor::tests::manipulate_offset stdout ----
thread 'cursor::tests::manipulate_offset' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:839:24

---- cursor::tests::read_thrift stdout ----
thread 'cursor::tests::read_thrift' panicked at 'Failed to store data: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:584:14

---- cursor::tests::skip_corrupt stdout ----
thread 'cursor::tests::skip_corrupt' panicked at 'called `Result::unwrap()` on an `Err` value: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:805:37

---- cursor::tests::read_compressed_thrift stdout ----
thread 'cursor::tests::read_compressed_thrift' panicked at 'Failed to store data: Failed to serialize data frame

Caused by:
    Data format Thrift is unsupported', below/store/src/cursor.rs:584:14


failures:
    cursor::tests::advance_at_boundries
    cursor::tests::advance_from_invalid_offset
    cursor::tests::advance_retry
    cursor::tests::advance_simple
    cursor::tests::get_corrupt
    cursor::tests::jump_to_key
    cursor::tests::manipulate_offset
    cursor::tests::read_compressed_thrift
    cursor::tests::read_thrift
    cursor::tests::skip_corrupt

build fails on Ubunto foacl as well as jammy

Building below on Ubuntu 20.04 (focal) as well as 22.04 (jammy) fails with:

> cargo build --release
warning: /export/scratch/elkner/build/below/below/store/Cargo.toml: version requirement `5.0.1+zstd.1.5.2` for dependency `zstd-safe` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion
warning: /export/scratch/elkner/build/below/below/store/Cargo.toml: version requirement `0.11.1+zstd.1.5.2` for dependency `zstd` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion
   Compiling below v0.6.2 (/export/scratch/elkner/build/below/below)
   Compiling below-store v0.6.2 (/export/scratch/elkner/build/below/below/store)
   Compiling below-render v0.6.2 (/export/scratch/elkner/build/below/below/render)
   Compiling below-view v0.6.2 (/export/scratch/elkner/build/below/below/view)
   Compiling below-dump v0.6.2 (/export/scratch/elkner/build/below/below/dump)
error: failed to run custom build command for `below v0.6.2 (/export/scratch/elkner/build/below/below)`

Caused by:
  process didn't exit successfully: `/export/scratch/elkner/build/below/target/release/build/below-7b509743ed83d54a/build-script-build` (exit status: 101)
  --- stderr
  Warning: unrecognized map: .maps
  Warning: unrecognized map: license
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Generate("Failed to generate skeleton for /tmp/.tmpmPLpsb/exitstat.o: Failed to spawn rustfmt")', below/build.rs:36:10
  stack backtrace:
     0:     0x556421e5de2c - std::backtrace_rs::backtrace::libunwind::trace::h76d34c316a8bb75b
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
     1:     0x556421e5de2c - std::backtrace_rs::backtrace::trace_unsynchronized::hb782d75313085067
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
     2:     0x556421e5de2c - std::sys_common::backtrace::_print_fmt::hee022c31c5bcfcc1
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/sys_common/backtrace.rs:66:5
     3:     0x556421e5de2c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h054c846eb7f0e1fb
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/sys_common/backtrace.rs:45:22
     4:     0x556421e7f80e - core::fmt::write::hcef9c23bf27d039c
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/core/src/fmt/mod.rs:1194:17
     5:     0x556421e48041 - std::io::Write::write_fmt::h6f6e0727690d342c
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/io/mod.rs:1655:15
     6:     0x556421e4ac45 - std::sys_common::backtrace::_print::h591ece144505a7d5
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/sys_common/backtrace.rs:48:5
     7:     0x556421e4ac45 - std::sys_common::backtrace::print::hbdcd241dc6539260
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/sys_common/backtrace.rs:35:9
     8:     0x556421e4ac45 - std::panicking::default_hook::{{closure}}::hc934c90a9f702809
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:295:22
     9:     0x556421e4a8f9 - std::panicking::default_hook::h984be39605172602
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:314:9
    10:     0x556421e4b28f - std::panicking::rust_panic_with_hook::h04be8cf992436914
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:698:17
    11:     0x556421e5e167 - std::panicking::begin_panic_handler::{{closure}}::h47ebda0479239463
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:588:13
    12:     0x556421e5df44 - std::sys_common::backtrace::__rust_end_short_backtrace::h1690aafc8ab8529a
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/sys_common/backtrace.rs:138:18
    13:     0x556421e4ada2 - rust_begin_unwind
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:584:5
    14:     0x556421c609b3 - core::panicking::panic_fmt::h8531284c14f462dc
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/core/src/panicking.rs:143:14
    15:     0x556421c60a43 - core::result::unwrap_failed::h6972a430d3981bcd
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/core/src/result.rs:1785:5
    16:     0x556421c61912 - core::result::Result<T,E>::unwrap::hb6712249d2833527
    17:     0x556421c6151e - build_script_build::main::h444f38e0706d0359
    18:     0x556421c61b03 - core::ops::function::FnOnce::call_once::hcba44e2289eae45f
    19:     0x556421c616c9 - std::sys_common::backtrace::__rust_begin_short_backtrace::h0a511523a6f97bc6
    20:     0x556421c60d09 - std::rt::lang_start::{{closure}}::h045e314370c806a1
    21:     0x556421e45d81 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::he815eb44dc8530a2
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/core/src/ops/function.rs:259:13
    22:     0x556421e45d81 - std::panicking::try::do_call::h65588aa29098f6c1
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:492:40
    23:     0x556421e45d81 - std::panicking::try::haa10bca2f4952c44
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:456:19
    24:     0x556421e45d81 - std::panic::catch_unwind::h1d908ddce340475e
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panic.rs:137:14
    25:     0x556421e45d81 - std::rt::lang_start_internal::{{closure}}::hdf74d953ee81ad25
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/rt.rs:128:48
    26:     0x556421e45d81 - std::panicking::try::do_call::hac535a1b96e92d37
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:492:40
    27:     0x556421e45d81 - std::panicking::try::hcc24ddbc174e7e92
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panicking.rs:456:19
    28:     0x556421e45d81 - std::panic::catch_unwind::h4b14c208c01d9f23
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/panic.rs:137:14
    29:     0x556421e45d81 - std::rt::lang_start_internal::heef479cc3aa3b396
                                 at /build/rustc-ZOqcvC/rustc-1.61.0+dfsg1/library/std/src/rt.rs:128:20
    30:     0x556421c60cf1 - std::rt::lang_start::had5835b9e151f469
    31:     0x556421c615d3 - main
    32:     0x7f9047436d90 - <unknown>
    33:     0x7f9047436e40 - __libc_start_main
    34:     0x556421c60c05 - _start
    35:                0x0 - <unknown>
warning: build failed, waiting for other jobs to finish...
warning: unused `Result` that must be used
   --> below/view/src/lib.rs:224:13
    |
224 | /             screens
225 | |                 .get_mut()
226 | |                 .screen_mut()
227 | |                 .unwrap()
228 | |                 .take_focus(cursive::direction::Direction::none());
    | |___________________________________________________________________^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: this `Result` may be an `Err` variant, which should be handled

warning: `below-view` (lib) generated 1 warning
    Building [=======================> ] 333/335: below-store                 
142.436u 2.734s 0:54.00 268.8%	0+0k 17758+55902io 6034pf+0w

below build fail in ubuntu 20.04

Build command is as below, any ideas to fix the build issue?
cargo build --release -v

error: failed to run custom build command for below v0.3.0 (/home/user01/work/below/below)

Caused by:
process didn't exit successfully: /home/user01/work/below/target/release/build/below-3b4d41dc52728e3b/build-script-build (exit code: 101)
--- stderr
Warning: unrecognized map: .maps
Warning: unrecognized map: license
error: no override and no default toolchain set
thread 'main' panicked at 'called Result::unwrap() on an Err value: Generate("Failed to generate skeleton for /tmp/.tmpTh70yB/exitstat.o: Broken pipe (os error 32)"
)', below/build.rs:19:47
stack backtrace:
0: 0x562eda68a5bc - std::backtrace_rs::backtrace::libunwind::trace::h7f0f727c679b121e
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x562eda68a5bc - std::backtrace_rs::backtrace::trace_unsynchronized::h27b8207adc787597
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x562eda68a5bc - std::sys_common::backtrace::_print_fmt::h18c4a15687f3f453
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/sys_common/backtrace.rs:67:5
3: 0x562eda68a5bc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h7077f94cc0b2a619
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/sys_common/backtrace.rs:46:22
4: 0x562eda6bceff - core::fmt::write::hd1fcbdc89ccede50
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/core/src/fmt/mod.rs:1096:17
5: 0x562eda689d76 - std::io::Write::write_fmt::h3030f95a96ab63e0
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/io/mod.rs:1568:15
6: 0x562eda69de65 - std::sys_common::backtrace::_print::hce920b6e4ede72f2
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/sys_common/backtrace.rs:49:5
7: 0x562eda69de65 - std::sys_common::backtrace::print::h63694f3a744810f6
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/sys_common/backtrace.rs:36:9
8: 0x562eda69de65 - std::panicking::default_hook::{{closure}}::h2f22ad38e825d5e1
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/panicking.rs:208:50
9: 0x562eda69da33 - std::panicking::default_hook::hc0998dccd7f968a3
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/panicking.rs:225:9
10: 0x562eda69e495 - std::panicking::rust_panic_with_hook::h618d5ded1dbe5ea3
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/panicking.rs:591:17
11: 0x562eda68add7 - std::panicking::begin_panic_handler::{{closure}}::h64f3a351a9df3931
at /build/rustc-AUyUKS/rustc-1.51.0+dfsg1+llvm/library/std/src/panicking.rs:497:13

Invalid file format: "/proc/1/cgroup"

I installed below with dnf on Fedora 34, and I get this error when I try to start it:

❯❯❯ sudo below live
Aug 21 14:33:45.414 ERRO
----------------- Detected unclean exit ---------------------
Error Message: Invalid file format: "/proc/1/cgroup"
-------------------------------------------------------------

I also see the same error message over and over in journald.

In case it matters, before this I encountered the issue described in #8103 (I had disabled cgroup v2 to install docker) but I fixed it (at least I think I did) and now I get the error above instead.

I'm not sure if I can provide good reproducible steps, as this is a fairly old Fedora install that has been updated and tweaked over the years. But I'd appreciate any help diagnosing the issue further.

Process error

Hello! Thanks for creating and open-sourcing it.
I have managed to compiled below on my system which is

➜  below git:(main) ✗ uname -r  
5.8.0-63-generic
➜  below git:(main) ✗ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.3 LTS
Release:	20.04
Codename:	focal

After compiling from the source, when I try to run it, I am not able to with the following error

➜  below git:(main) ✗ sudo ./target/release/below --help
below 0.3.0

USAGE:
    below [FLAGS] [OPTIONS] [SUBCOMMAND]

FLAGS:
    -d, --debug      
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --config <config>     [default: /etc/below/below.conf]

SUBCOMMANDS:
    debug     Debugging facilities (for development use)
    dump      Dump historical data into parseable text format
    help      Prints this message or the help of the given subcommand(s)
    live      Display live system data (interactive) (default)
    record    Record local system data (daemon mode)
    replay    Replay historical data (interactive)
➜  below git:(main) ✗ sudo ./target/release/below --debug
libbpf: loading object 'exitstat_bpf' from buffer
libbpf: elf: section(3) tracepoint/sched/sched_process_exit, size 1664, link 0, flags 6, type=1
Sep 28 09:20:54.531 ERRO %  

I have also tried cleaning up with cargo clean -p below and did cargo build --release again but still the same issue.

Are there anything I am missing ?

Build Failure on Jammy(Ubuntu 22.04)

Hello, I have compiled below on latest ubuntu 22.04 jammy.

Looks like dependency libbpf-sys v0.6.2+v0.6.1 has an issue.

  Compiling crossbeam-deque v0.8.1
   Compiling signal-hook-mio v0.2.3
   Compiling libbpf-sys v0.6.2+v0.6.1
   Compiling zstd-sys v1.5.0+zstd.1.4.9
   Compiling vsprintf v2.0.0
   Compiling console v0.15.0
   Compiling crossterm v0.19.0
   Compiling darling_core v0.10.2
   Compiling term v0.7.0
   Compiling crossterm v0.20.0
   Compiling num v0.3.1
error: failed to run custom build command for `libbpf-sys v0.6.2+v0.6.1`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install9Iwpfi/release/build/libbpf-sys-d272316adf9e8884/build-script-build` (exit status: 101)
  --- stderr
  make: *** No targets specified and no makefile found.  Stop.
  thread 'main' panicked at 'pkg-config is required to compile libbpf-sys using the vendored copy of libbpf', /home/paran/.cargo/registry/src/github.com-1ecc6299db9ec823/libbpf-sys-0.6.2+v0.6.1/build.rs:81:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `below v0.5.0`, intermediate artifacts can be found at `/tmp/cargo-install9Iwpfi`
paran@paran-virtual-machine:~/below$ uname -a
Linux paran-virtual-machine 5.15.0-33-generic #34-Ubuntu SMP Wed May 18 13:34:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

What contribution can I make to help this issue?

Thanks.
Paran Lee.

v0.3.0: cgroup invalid file format

Here's another instance of "invalid file format":

below[707]: Nov 04 08:52:11.414 ERRO Invalid file format: "/proc/1880/cgroup"

# cat /proc/1880/cgroup
0::/user.slice/user-500.slice/[email protected]/app.slice/app-dbus\x2d:1.4\x2dorg.freedesktop.Telepathy.AccountManager.slice/dbus-:[email protected]

I'm not sure if this may be fixed by 80fb95e because my distribution did not bump to 0.4.0 yet.

thread 'test::test_dump_queue_content' panicked at below/dump/src/test.rs:1056:5:

I got the following running cargo test building with rustc 1.78.0:

assertion `left == right` failed
  left: Array [Object {"Datetime": String("1970-01-01 00:00:00"), "Interface": String("eth0"), "Queue": String("0"), "RawStats": String("stat1=1000, stat2=2000"), "RxBytes": String("10 B/s"), "RxCount": String("100/s"), "Timestamp": String("0"), "TxBytes": String("20 B/s"), "TxCount": String("200/s"), "TxMissedTx": String("50"), "TxUnmaskInterrupt": String("5")}, Object {"Datetime": String("1970-01-01 00:00:00"), "Interface": String("eth0"), "Queue": String("1"), "RawStats": String("stat1=2000, stat2=1000"), "RxBytes": String("20 B/s"), "RxCount": String("200/s"), "Timestamp": String("0"), "TxBytes": String("10 B/s"), "TxCount": String("100/s"), "TxMissedTx": String("5"), "TxUnmaskInterrupt": String("50")}, Object {"Datetime": String("1970-01-01 00:00:00"), "Interface": String("lo"), "Queue": String("1"), "RawStats": String("stat1=2000, stat2=1000"), "RxBytes": String("20 B/s"), "RxCount": String("200/s"), "Timestamp": String("0"), "TxBytes": String("10 B/s"), "TxCount": String("100/s"), "TxMissedTx": String("5"), "TxUnmaskInterrupt": String("50")}]
 right: Array [Object {"Datetime": String("1969-12-31 16:00:00"), "Interface": String("eth0"), "Queue": String("0"), "RawStats": String("stat1=1000, stat2=2000"), "RxBytes": String("10 B/s"), "RxCount": String("100/s"), "Timestamp": String("0"), "TxBytes": String("20 B/s"), "TxCount": String("200/s"), "TxMissedTx": String("50"), "TxUnmaskInterrupt": String("5")}, Object {"Datetime": String("1969-12-31 16:00:00"), "Interface": String("eth0"), "Queue": String("1"), "RawStats": String("stat1=2000, stat2=1000"), "RxBytes": String("20 B/s"), "RxCount": String("200/s"), "Timestamp": String("0"), "TxBytes": String("10 B/s"), "TxCount": String("100/s"), "TxMissedTx": String("5"), "TxUnmaskInterrupt": String("50")}, Object {"Datetime": String("1969-12-31 16:00:00"), "Interface": String("lo"), "Queue": String("1"), "RawStats": String("stat1=2000, stat2=1000"), "RxBytes": String("20 B/s"), "RxCount": String("200/s"), "Timestamp": String("0"), "TxBytes": String("10 B/s"), "TxCount": String("100/s"), "TxMissedTx": String("5"), "TxUnmaskInterrupt": String("50")}]

clang = 15.0.7. Running on Amazon's al2023.

Let me know if you need anything more.

Need Clean up cargo test warning messages

I checked cargo test in main branch, have some warning messages.

My build Enviroment information.

paran@paran-virtual-machine:~/below$ rustc --version
rustc 1.61.0 (fe5b13d68 2022-05-18)

~/below$ cargo --version
cargo 1.61.0 (a028ae4 2022-04-29)

~/below$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

~/below$ uname -a
Linux paran-virtual-machine 5.15.0-33-generic #34-Ubuntu SMP Wed May 18 13:34:26 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Some warning messages.

  1. #[derive] can't be used on a #[repr(packed)]
   Compiling darling v0.10.2
warning: `#[derive]` can't be used on a `#[repr(packed)]` struct that does not derive Copy (error E0133)
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4997:10
     |
4997 | #[derive(Debug)]
     |          ^^^^^
  1. warning: reference to packed field is unaligned
   Compiling clap_complete v3.1.1
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:1870:18
     |
1870 |         unsafe { &(*(::std::ptr::null::<btrfs_balance_args>())).profiles as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: `#[warn(unaligned_references)]` on by default
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: `btrfs` (lib) generated 1 warning
   Compiling futures-executor v0.3.21
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4030:18
     |
4030 |         unsafe { &(*(::std::ptr::null::<btrfs_disk_key>())).objectid as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4080:18
     |
4080 |         unsafe { &(*(::std::ptr::null::<btrfs_key>())).objectid as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4141:18
     |
4141 |         unsafe { &(*(::std::ptr::null::<btrfs_dev_item>())).devid as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4301:18
     |
4301 |         unsafe { &(*(::std::ptr::null::<btrfs_stripe>())).devid as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4358:18
     |
4358 |         unsafe { &(*(::std::ptr::null::<btrfs_chunk>())).length as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4478:18
     |
4478 |         unsafe { &(*(::std::ptr::null::<btrfs_free_space_entry>())).offset as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4542:13
     |
4542 |             &(*(::std::ptr::null::<btrfs_free_space_header>())).generation as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4597:18
     |
4597 |         unsafe { &(*(::std::ptr::null::<btrfs_extent_item>())).refs as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4607:18
     |
4607 |         unsafe { &(*(::std::ptr::null::<btrfs_extent_item>())).generation as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4715:18
     |
4715 |         unsafe { &(*(::std::ptr::null::<btrfs_extent_data_ref>())).root as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4773:18
     |
4773 |         unsafe { &(*(::std::ptr::null::<btrfs_shared_data_ref>())).count as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4812:18
     |
4812 |         unsafe { &(*(::std::ptr::null::<btrfs_extent_inline_ref>())).offset as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4843:18
     |
4843 |         unsafe { &(*(::std::ptr::null::<btrfs_extent_ref_v0>())).root as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4905:18
     |
4905 |         unsafe { &(*(::std::ptr::null::<btrfs_dev_extent>())).chunk_tree as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:4976:18
     |
4976 |         unsafe { &(*(::std::ptr::null::<btrfs_inode_ref>())).index as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5018:13
     |
5018 |             &(*(::std::ptr::null::<btrfs_inode_extref>())).parent_objectid as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5078:18
     |
5078 |         unsafe { &(*(::std::ptr::null::<btrfs_timespec>())).sec as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5132:18
     |
5132 |         unsafe { &(*(::std::ptr::null::<btrfs_inode_item>())).generation as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5320:18
     |
5320 |         unsafe { &(*(::std::ptr::null::<btrfs_dir_log_item>())).end as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5362:18
     |
5362 |         unsafe { &(*(::std::ptr::null::<btrfs_dir_item>())).transid as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5454:18
     |
5454 |         unsafe { &(*(::std::ptr::null::<btrfs_root_item>())).generation as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5714:18
     |
5714 |         unsafe { &(*(::std::ptr::null::<btrfs_root_ref>())).dirid as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:5953:13
     |
5953 |             &(*(::std::ptr::null::<btrfs_disk_balance_args>())).profiles as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6090:18
     |
6090 |         unsafe { &(*(::std::ptr::null::<btrfs_balance_item>())).flags as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6168:13
     |
6168 |             &(*(::std::ptr::null::<btrfs_file_extent_item>())).generation as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6329:18
     |
6329 |         unsafe { &(*(::std::ptr::null::<btrfs_dev_stats_item>())).values as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6366:13
     |
6366 |             &(*(::std::ptr::null::<btrfs_dev_replace_item>())).src_devid as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6504:18
     |
6504 |         unsafe { &(*(::std::ptr::null::<btrfs_block_group_item>())).used as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6556:13
     |
6556 |             &(*(::std::ptr::null::<btrfs_free_space_info>())).extent_count as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6599:13
     |
6599 |             &(*(::std::ptr::null::<btrfs_qgroup_status_item>())).version as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6665:13
     |
6665 |             &(*(::std::ptr::null::<btrfs_qgroup_info_item>())).generation as *const _ as usize
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
warning: reference to packed field is unaligned
    --> below/btrfs/src/btrfs_api/open_source/btrfs_sys.rs:6742:18
     |
6742 |         unsafe { &(*(::std::ptr::null::<btrfs_qgroup_limit_item>())).flags as *const _ as usize },
     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
     = note: for more information, see issue #82523 <https://github.com/rust-lang/rust/issues/82523>
     = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
  1. unused variable
warning: unused variable: `enable_gpu_stats`
   --> below/src/main.rs:656:13
    |
656 |             ref enable_gpu_stats,
    |             ^^^^^^^^^^^^^^^^^^^^ help: try ignoring the field: `enable_gpu_stats: _`
    |
    = note: `#[warn(unused_variables)]` on by default

Error building "main" branch

Trying to build from "main" branch just now and got the following error:

error: failed to run custom build command for `below v0.7.0 (/home/elijah/.local/rpmbuild/BUILD/below/below)`

Caused by:
  process didn't exit successfully: `/home/elijah/.local/rpmbuild/BUILD/below/target/release/build/below-aefe42d9920a03d1/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Build("Failed to compile /var/tmp/.tmpCurUWB/exitstat.o from ./src/bpf/exitstat.bpf.c")', below/build.rs:38:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Using Rust 1.70.0, Clang 11.1.0, libbpf 1.2.0 and Linux kernel 5.15.120.

unable to build on ubuntu 22.04

I followed the ubuntu instructions and what I'm seeing is this:

$ cargo build --release
warning: /home/martin/inspect/below/below/store/Cargo.toml: version requirement `5.0.1+zstd.1.5.2` for dependency `zstd-safe` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion
warning: /home/martin/inspect/below/below/store/Cargo.toml: version requirement `0.11.2+zstd.1.5.2` for dependency `zstd` includes semver metadata which will be ignored, removing the metadata is recommended to avoid confusion
    Updating crates.io index
  Downloaded io-lifetimes v0.7.4
  Downloaded erased-serde v0.3.23
  Downloaded equivalent v1.0.0
  Downloaded enum-map v2.4.1
  Downloaded camino v1.1.1
  Downloaded scroll_derive v0.11.0
  Downloaded darling_macro v0.14.2
  Downloaded enumset_derive v0.6.1
  Downloaded os_info v3.5.1
  Downloaded terminal_size v0.2.1
  Downloaded terminal_size v0.1.17
  Downloaded is-terminal v0.4.7
  Downloaded enumset v1.0.12
  Downloaded cargo-platform v0.1.2
  Downloaded darling v0.14.2
  Downloaded console v0.15.2
  Downloaded time-macros v0.2.5
  Downloaded portable-atomic v0.3.20
  Downloaded tempfile v3.5.0
  Downloaded once_cell v1.15.0
  Downloaded ahash v0.8.0
  Downloaded jobserver v0.1.25
  Downloaded io-lifetimes v1.0.10
  Downloaded clap_complete v4.3.2
  Downloaded toml v0.5.8
  Downloaded darling_core v0.14.2
  Downloaded tar v0.4.38
  Downloaded indicatif v0.17.3
  Downloaded time v0.3.16
  Downloaded toml_edit v0.19.12
  Downloaded libm v0.2.5
  Downloaded portable-atomic v1.3.2
  Downloaded winnow v0.4.9
  Downloaded cursive_core v0.3.5
  Downloaded nix v0.25.0
  Downloaded rustix v0.35.12
  Downloaded rustix v0.37.11
  Downloaded libc v0.2.141
  Downloaded zstd-sys v2.0.1+zstd.1.5.2
  Downloaded linux-raw-sys v0.0.46
  Downloaded linux-raw-sys v0.3.1
  Downloaded libbpf-sys v1.0.4+v1.0.1
  Downloaded enum-map-derive v0.10.0
  Downloaded 43 crates (6.4 MB) in 1.93s
   Compiling libc v0.2.141
   Compiling autocfg v1.1.0
   Compiling proc-macro2 v1.0.64
   Compiling quote v1.0.29
   Compiling unicode-ident v1.0.5
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.177
   Compiling serde_derive v1.0.177
   Compiling syn v1.0.109
   Compiling version_check v0.9.4
   Compiling bitflags v1.3.2
   Compiling memchr v2.5.0
   Compiling thiserror v1.0.43
   Compiling libm v0.2.5
   Compiling io-lifetimes v1.0.10
   Compiling log v0.4.17
   Compiling crossbeam-utils v0.8.12
   Compiling scopeguard v1.1.0
   Compiling rustix v0.37.11
   Compiling once_cell v1.15.0
   Compiling unicode-width v0.1.10
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling memoffset v0.6.5
   Compiling ident_case v1.0.1
   Compiling io-lifetimes v0.7.4
   Compiling fnv v1.0.7
   Compiling anyhow v1.0.71
   Compiling lazy_static v1.4.0
   Compiling lock_api v0.4.9
   Compiling num-iter v0.1.43
   Compiling num-rational v0.4.1
   Compiling itoa v1.0.4
   Compiling signal-hook v0.3.14
   Compiling time-core v0.1.0
   Compiling crossbeam-channel v0.5.6
   Compiling smallvec v1.10.0
   Compiling parking_lot_core v0.9.4
   Compiling rustix v0.35.12
   Compiling time-macros v0.2.5
   Compiling ahash v0.8.0
   Compiling num_threads v0.1.6
   Compiling syn v2.0.25
   Compiling unicase v2.6.0
   Compiling serde_json v1.0.100
   Compiling pin-utils v0.1.0
   Compiling stable_deref_trait v1.2.0
   Compiling erased-serde v0.3.23
   Compiling unicode-segmentation v1.10.0
   Compiling owning_ref v0.4.1
   Compiling xi-unicode v0.3.0
   Compiling slog v2.7.0
   Compiling getrandom v0.2.8
   Compiling jobserver v0.1.25
   Compiling signal-hook-registry v1.4.0
   Compiling mio v0.8.5
   Compiling num-complex v0.4.2
   Compiling cc v1.0.73
   Compiling time v0.3.16
   Compiling dirs-sys-next v0.1.2
   Compiling parking_lot v0.12.1
   Compiling signal-hook-mio v0.2.3
   Compiling dirs-next v2.0.0
   Compiling memoffset v0.7.1
   Compiling heck v0.4.0
   Compiling crossterm v0.25.0
   Compiling num v0.4.0
   Compiling term v0.7.0
   Compiling rand_core v0.6.4
   Compiling atty v0.2.14
   Compiling num_cpus v1.13.1
   Compiling aho-corasick v0.7.19
   Compiling thread_local v1.1.4
   Compiling regex-syntax v0.6.27
   Compiling pkg-config v0.3.26
   Compiling iana-time-zone v0.1.53
   Compiling ppv-lite86 v0.2.16
   Compiling same-file v1.0.6
   Compiling chrono v0.4.22
   Compiling walkdir v2.3.2
   Compiling libbpf-sys v1.0.4+v1.0.1
   Compiling toml v0.5.8
   Compiling vsprintf v2.0.0
   Compiling rand_chacha v0.3.1
   Compiling nix v0.25.0
   Compiling openat v0.1.21
   Compiling linux-raw-sys v0.3.1
   Compiling humantime v2.1.0
   Compiling rand v0.8.5
   Compiling slog-term v2.9.0
   Compiling regex v1.6.0
   Compiling futures-core v0.3.28
   Compiling rustversion v1.0.9
   Compiling zstd-sys v2.0.1+zstd.1.5.2
   Compiling rand_distr v0.4.3
   Compiling darling_core v0.14.2
   Compiling async-trait v0.1.71
   Compiling utf8parse v0.2.1
   Compiling linux-raw-sys v0.0.46
   Compiling anstyle-parse v0.2.1
   Compiling threadpool v1.8.1
   Compiling thiserror-impl v1.0.43
   Compiling clap_derive v4.3.2
   Compiling crossbeam-epoch v0.9.11
   Compiling colorchoice v1.0.0
   Compiling match_cfg v0.1.0
   Compiling hashbrown v0.14.0
   Compiling anstyle-query v1.0.0
   Compiling semver v1.0.14
   Compiling equivalent v1.0.0
   Compiling anstyle v1.0.1
   Compiling is-terminal v0.4.7
   Compiling ryu v1.0.11
   Compiling camino v1.1.1
   Compiling anstream v0.3.2
   Compiling indexmap v2.0.0
   Compiling terminal_size v0.2.1
   Compiling hostname v0.3.1
   Compiling proc-macro-crate v1.2.1
   Compiling cgroupfs v0.7.1 (/home/martin/inspect/below/below/cgroupfs)
   Compiling fb_procfs v0.7.1 (/home/martin/inspect/below/below/procfs)
   Compiling enum-map-derive v0.10.0
   Compiling strum_macros v0.24.3
   Compiling darling_macro v0.14.2
   Compiling below_derive v0.7.1 (/home/martin/inspect/below/below/below_derive)
   Compiling num_enum_derive v0.5.7
   Compiling bytes v1.2.1
   Compiling enum-map v2.4.1
   Compiling os_info v3.5.1
   Compiling toml_datetime v0.6.3
   Compiling darling v0.14.2
   Compiling enumset_derive v0.6.1
   Compiling serde_spanned v0.6.3
   Compiling slab v0.4.7
   Compiling futures-channel v0.3.28
   Compiling strsim v0.10.0
   Compiling rayon-core v1.9.3
   Compiling zstd-safe v5.0.2+zstd.1.5.2
   Compiling futures-task v0.3.28
   Compiling pin-project-lite v0.2.9
   Compiling static_assertions v1.1.0
   Compiling clap_lex v0.5.0
   Compiling winnow v0.4.9
   Compiling clap_builder v4.3.11
   Compiling nix v0.26.2
   Compiling num_enum v0.5.7
   Compiling enumset v1.0.12
   Compiling cursive_core v0.3.5
   Compiling cargo-platform v0.1.2
   Compiling futures-util v0.3.28
   Compiling half v1.8.2
   Compiling fastrand v1.8.0
   Compiling futures-sink v0.3.28
   Compiling portable-atomic v1.3.2
   Compiling either v1.8.0
   Compiling tempfile v3.5.0
   Compiling cargo_metadata v0.15.4
   Compiling serde_cbor v0.11.2
   Compiling crossbeam-deque v0.8.2
   Compiling scroll_derive v0.11.0
   Compiling toml_edit v0.19.12
   Compiling futures-macro v0.3.28
   Compiling memmap2 v0.5.10
   Compiling tokio v1.21.2
   Compiling rayon v1.5.3
   Compiling clap v4.3.11
   Compiling scroll v0.11.0
   Compiling cursive v0.20.0
   Compiling futures-io v0.3.28
   Compiling futures v0.1.31
   Compiling maplit v1.0.2
   Compiling portable-atomic v0.3.20
   Compiling below-common v0.7.1 (/home/martin/inspect/below/below/common)
   Compiling below-btrfs v0.7.1 (/home/martin/inspect/below/below/btrfs)
   Compiling below-gpu-stats v0.7.1 (/home/martin/inspect/below/below/gpu_stats)
   Compiling below-model v0.7.1 (/home/martin/inspect/below/below/model)
   Compiling toml v0.7.6
   Compiling xattr v0.2.3
   Compiling rand v0.4.6
   Compiling terminal_size v0.1.17
   Compiling filetime v0.2.18
   Compiling remove_dir_all v0.5.3
   Compiling tar v0.4.38
   Compiling tempdir v0.3.7
   Compiling console v0.15.2
   Compiling cursive_buffered_backend v0.6.1
   Compiling itertools v0.10.5
   Compiling crossterm v0.23.2
   Compiling below-render v0.7.1 (/home/martin/inspect/below/below/render)
   Compiling futures-executor v0.3.28
   Compiling number_prefix v0.4.0
   Compiling futures v0.3.28
   Compiling below-config v0.7.1 (/home/martin/inspect/below/below/config)
   Compiling clap_complete v4.3.2
   Compiling indicatif v0.17.3
   Compiling users v0.11.0
   Compiling plain v0.2.3
   Compiling libbpf-rs v0.21.2
   Compiling libbpf-cargo v0.21.2
   Compiling below v0.7.1 (/home/martin/inspect/below/below)
error: failed to run custom build command for `below v0.7.1 (/home/martin/inspect/below/below)`

Caused by:
  process didn't exit successfully: `/home/martin/inspect/below/target/release/build/below-2d28fc00088dc975/build-script-build` (exit status: 101)
  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Build(Failed to compile /tmp/.tmpbchdUC/exitstat.o from ./src/bpf/exitstat.bpf.c

  Caused by:
      0: Command `clang -I/tmp/.tmpsndTSM/bpf/src -fno-stack-protector -D__TARGET_ARCH_x86 -g -O2 -target bpf -c ./src/bpf/exitstat.bpf.c -o /tmp/.tmpbchdUC/exitstat.o` failed (exit status: 70)
      1: ./src/bpf/exitstat.bpf.c:153:55: warning: passing 'const struct mm_struct *' to parameter of type 'void *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
             data.stats.active_rss_pages = mm_active_rss_pages(mm);
                                                               ^~
         ./src/bpf/exitstat.bpf.c:98:31: note: passing argument to parameter 'arg' here
         u64 mm_active_rss_pages(void *arg) {
                                       ^
         fatal error: error in backend: Incorrect flag for llvm.bpf.preserve.type.info intrinsic
         PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
         Stack dump:
         0.     Program arguments: clang -I/tmp/.tmpsndTSM/bpf/src -fno-stack-protector -D__TARGET_ARCH_x86 -g -O2 -target bpf -c ./src/bpf/exitstat.bpf.c -o /tmp/.tmpbchdUC/exitstat.o
         1.     <eof> parser at end of file
         2.     Optimizer
         Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x31)[0x7ff10083fd01]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x7ff10083da3e]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0xfb)[0x7ff10083f0ab]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0xd6bbea)[0x7ff10076bbea]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0xd6bb8b)[0x7ff10076bb8b]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm3sys7Process4ExitEib+0x27)[0x7ff10083a007]
         clang[0x4136d2]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm18report_fatal_errorERKNS_5TwineEb+0x113)[0x7ff10077a673]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0xd7a556)[0x7ff10077a556]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x2f5f224)[0x7ff10295f224]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x2f5aad4)[0x7ff10295aad4]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x2f5a845)[0x7ff10295a845]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x2f6e79d)[0x7ff10296e79d]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm11PassManagerINS_8FunctionENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0x19e)[0x7ff1009aea0e]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x2b9924d)[0x7ff10259924d]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm27ModuleToFunctionPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE+0x1d1)[0x7ff1009b29d1]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(+0x2b9907d)[0x7ff10259907d]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm11PassManagerINS_6ModuleENS_15AnalysisManagerIS1_JEEEJEE3runERS1_RS3_+0x19e)[0x7ff1009ad60e]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(+0x1862b9b)[0x7ff107c62b9b]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang17EmitBackendOutputERNS_17DiagnosticsEngineERKNS_19HeaderSearchOptionsERKNS_14CodeGenOptionsERKNS_13TargetOptionsERKNS_11LangOptionsEN4llvm9StringRefEPNSE_6ModuleENS_13BackendActionESt10unique_ptrINSE_17raw_pwrite_streamESt14default_deleteISK_EE+0x412)[0x7ff107c56a52]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(+0x1b7c855)[0x7ff107f7c855]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang8ParseASTERNS_4SemaEbb+0x244)[0x7ff106e04824]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang13CodeGenAction13ExecuteActionEv+0xb1)[0x7ff107f78b71]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang14FrontendAction7ExecuteEv+0x67)[0x7ff108914b57]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x336)[0x7ff10886c3a6]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x29b)[0x7ff10898e45b]
         clang(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x99b)[0x41328b]
         clang[0x4114bc]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(+0x20eaed2)[0x7ff1084eaed2]
         /lib/x86_64-linux-gnu/libLLVM-14.so.1(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xdd)[0x7ff10076bb6d]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x140)[0x7ff1084ea9c0]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3_+0x3f3)[0x7ff1084b5183]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x8a)[0x7ff1084b540a]
         /lib/x86_64-linux-gnu/libclang-cpp.so.14(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x1a7)[0x7ff1084cf507]
         clang(main+0x2816)[0x410f26]
         /lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7ff0ff229d90]
         /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7ff0ff229e40]
         clang(_start+0x25)[0x40e3b5]
         clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
         Ubuntu clang version 14.0.0-1ubuntu1.1
         Target: bpf
         Thread model: posix
         InstalledDir: /usr/bin
         clang: note: diagnostic msg: 
         ********************
         
         PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
         Preprocessed source(s) and associated run script(s) are located at:
         clang: note: diagnostic msg: /tmp/exitstat-2c6bd1.c
         clang: note: diagnostic msg: /tmp/exitstat-2c6bd1.sh
         clang: note: diagnostic msg: 
         
         ********************
         )', below/build.rs:38:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

This is from main, at a1b257d. I also tried the tag v0.7.1 with the same error message.

question of bpf code

below/src/bpf/exitstat.bpf.c
Comment show that code logic will check tas->signal.live as last thread, but I never found it in all files
so comment is wrong?

// sched:sched_process_exit is triggered right before process/thread exits. At
// this point we capture last taskstats to account resource usage of short-lived
// processes. We also check tas->signal.live counter to determine if this thread
// is the last thread in a process and thus is also a process exit.
SEC("tracepoint/sched/sched_process_exit")
int tracepoint__sched__sched_process_exit(
    struct trace_event_raw_sched_process_template* args
) {
  struct task_struct* task = (struct task_struct*)bpf_get_current_task();
  u64 pid_tgid = bpf_get_current_pid_tgid();
  u64 now = bpf_ktime_get_ns();

below build fail in centos 7

Hello!
I tried to install via cargo install below but the build failed :(

CentOS 7.9
Kernel: 3.10.0-1160.25.1.el7.x86_64

error: failed to run custom build command for `libbpf-sys v0.4.0-2`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installkqT4F8/release/build/libbpf-sys-94c19ae4f774f898/build-script-build` (exit status: 101)
  --- stdout
    MKDIR    staticobjs
    CC       bpf.o
    CC       btf.o
    CC       libbpf.o
    CC       libbpf_errno.o
    CC       netlink.o

  --- stderr
  netlink.c: In function ‘__get_tc_info’:
  netlink.c:515:11: error: ‘TCA_BPF_ID’ undeclared (first use in this function)
    if (!tbb[TCA_BPF_ID])
             ^
  netlink.c:515:11: note: each undeclared identifier is reported only once for each function it appears in
  netlink.c: In function ‘tc_add_fd_and_name’:
  netlink.c:551:30: error: ‘TCA_BPF_FD’ undeclared (first use in this function)
    ret = nlattr_add(nh, maxsz, TCA_BPF_FD, &fd, sizeof(fd));
                                ^
  netlink.c:559:31: error: ‘TCA_BPF_NAME’ undeclared (first use in this function)
    return nlattr_add(nh, maxsz, TCA_BPF_NAME, name, len + 1);
                                 ^
  netlink.c: In function ‘bpf_tc_attach’:
  netlink.c:623:14: error: ‘TCA_BPF_FLAG_ACT_DIRECT’ undeclared (first use in this function)
    bpf_flags = TCA_BPF_FLAG_ACT_DIRECT;
                ^
  netlink.c:624:41: error: ‘TCA_BPF_FLAGS’ undeclared (first use in this function)
    ret = nlattr_add(&req.nh, sizeof(req), TCA_BPF_FLAGS, &bpf_flags,
                                           ^
  netlink.c: In function ‘tc_add_fd_and_name’:
  netlink.c:560:1: error: control reaches end of non-void function [-Werror=return-type]
   }
   ^
  cc1: all warnings being treated as errors

Apparently the issue and solution is discussed here: https://lore.kernel.org/buildroot/[email protected]/T/

Is it possible to build below with a kernel 3.10 ? Maybe with a patch or something ?

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.