Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #73470 > unrolled thread

Bug#996852: "Error: failed to load BTF from ./fat: Invalid argument"

Started byPhilipp Marek <philipp@marek.priv.at>
First post2021-10-19 18:10 +0200
Last post2021-10-22 20:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.debian.kernel


Contents

  Bug#996852: "Error: failed to load BTF from ./fat: Invalid argument" Philipp Marek <philipp@marek.priv.at> - 2021-10-19 18:10 +0200
    Bug#996852: "Error: failed to load BTF from ./fat: Invalid argument" Salvatore Bonaccorso <carnil@debian.org> - 2021-10-22 20:50 +0200
    Processed: Re: Bug#996852: "Error: failed to load BTF from ./fat:  Invalid argument" "Debian Bug Tracking System" <owner@bugs.debian.org> - 2021-10-22 20:50 +0200

#73470 — Bug#996852: "Error: failed to load BTF from ./fat: Invalid argument"

FromPhilipp Marek <philipp@marek.priv.at>
Date2021-10-19 18:10 +0200
SubjectBug#996852: "Error: failed to load BTF from ./fat: Invalid argument"
Message-ID<D9ZQB-1Xt-1@gated-at.bofh.it>
Package: bpftool
Version: 5.14.12-1
Severity: minor
X-Debbugs-Cc: philipp@marek.priv.at

Using an absolute path, I get output:

     [/sys/kernel/btf]$ bpftool btf dump file $PWD/fat | head -2
     [85705] STRUCT 'fat_mount_options' size=48 vlen=27
             'fs_uid' type_id=506 bits_offset=0
     [/sys/kernel/btf]$ bpftool btf dump file $PWD/fat | wc
         685    2274   25834

Using a relative path, "bpftool btf dump" doesn't work:

     [/sys/kernel/btf]$ bpftool btf dump file ./fat
     Error: failed to load BTF from ./fat: Invalid argument


"strace" shows that with a full path "bpftool" reads
"/sys/kernel/btf/vmlinux", but doesn't even try to find that in the
second case.

Dumping "vmlinux" works with a relative path,
I guess because it's self-contained.


Copying "fat" and "vmlinux" to /tmp/ and using a relative or absolute
path works for "vmlinux", but not "fat".

I think it would be great if a relative path would just be translated
to absolute when needed, or that required files would be searched via
some path list (configurable via environment, like $PATH or
$LD_LIBRARY_PATH etc.?).


Thanks a lot!


-- System Information:
Debian Release: bookworm/sid
   APT prefers testing
   APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 
'testing-debug'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.14.0-2-amd64 (SMP w/8 CPU threads)
Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_AT:de
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages bpftool depends on:
ii  libc6    2.32-4
ii  libcap2  1:2.44-1
ii  libelf1  0.185-2
ii  zlib1g   1:1.2.11.dfsg-2

bpftool recommends no packages.

bpftool suggests no packages.

-- no debconf information

[toc] | [next] | [standalone]


#73501

FromSalvatore Bonaccorso <carnil@debian.org>
Date2021-10-22 20:50 +0200
Message-ID<Db7M5-2lW-1@gated-at.bofh.it>
In reply to#73470
Control: tags -1 + upstream

Hi Philipp,

On Tue, Oct 19, 2021 at 05:59:41PM +0200, Philipp Marek wrote:
> Package: bpftool
> Version: 5.14.12-1
> Severity: minor
> X-Debbugs-Cc: philipp@marek.priv.at
> 
> Using an absolute path, I get output:
> 
>     [/sys/kernel/btf]$ bpftool btf dump file $PWD/fat | head -2
>     [85705] STRUCT 'fat_mount_options' size=48 vlen=27
>             'fs_uid' type_id=506 bits_offset=0
>     [/sys/kernel/btf]$ bpftool btf dump file $PWD/fat | wc
>         685    2274   25834
> 
> Using a relative path, "bpftool btf dump" doesn't work:
> 
>     [/sys/kernel/btf]$ bpftool btf dump file ./fat
>     Error: failed to load BTF from ./fat: Invalid argument
> 
> 
> "strace" shows that with a full path "bpftool" reads
> "/sys/kernel/btf/vmlinux", but doesn't even try to find that in the
> second case.
> 
> Dumping "vmlinux" works with a relative path,
> I guess because it's self-contained.
> 
> 
> Copying "fat" and "vmlinux" to /tmp/ and using a relative or absolute
> path works for "vmlinux", but not "fat".
> 
> I think it would be great if a relative path would just be translated
> to absolute when needed, or that required files would be searched via
> some path list (configurable via environment, like $PATH or
> $LD_LIBRARY_PATH etc.?).

Can you please report this directly to upstream
(scripts/get_maintainer.pl can help to get who to contact) and once
the upstream report is done, reference it here please?

Regards,
Salvatore

[toc] | [prev] | [next] | [standalone]


#73502 — Processed: Re: Bug#996852: "Error: failed to load BTF from ./fat: Invalid argument"

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2021-10-22 20:50 +0200
SubjectProcessed: Re: Bug#996852: "Error: failed to load BTF from ./fat: Invalid argument"
Message-ID<Db7M6-2lW-7@gated-at.bofh.it>
In reply to#73470
Processing control commands:

> tags -1 + upstream
Bug #996852 [bpftool] "Error: failed to load BTF from ./fat: Invalid argument"
Added tag(s) upstream.

-- 
996852: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996852
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web