2021-04-23 13:06:35

by Michal Suchánek

[permalink] [raw]
Subject: linux-next failing build due to missing cubictcp_state symbol

Hello,

I see this build error in linux-next (config attached).

[ 4939s] LD vmlinux
[ 4959s] BTFIDS vmlinux
[ 4959s] FAILED unresolved symbol cubictcp_state
[ 4960s] make[1]: ***
[/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
vmlinux] Error 255
[ 4960s] make: *** [../Makefile:222: __sub-make] Error 2


Attachments:
(No filename) (388.00 B)
vanilla (207.71 kB)
Download all attachments

2021-04-23 14:45:43

by Yonghong Song

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol



On 4/23/21 6:05 AM, Michal Such?nek wrote:
> Hello,
>
> I see this build error in linux-next (config attached).
>
> [ 4939s] LD vmlinux
> [ 4959s] BTFIDS vmlinux
> [ 4959s] FAILED unresolved symbol cubictcp_state
> [ 4960s] make[1]: ***
> [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> vmlinux] Error 255
> [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2

Looks like you have DYNAMIC_FTRACE config option enabled already.
Could you try a later version of pahole?

2021-04-23 17:57:16

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
>
>
> On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > Hello,
> >
> > I see this build error in linux-next (config attached).
> >
> > [ 4939s] LD vmlinux
> > [ 4959s] BTFIDS vmlinux
> > [ 4959s] FAILED unresolved symbol cubictcp_state
> > [ 4960s] make[1]: ***
> > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > vmlinux] Error 255
> > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
>
> Looks like you have DYNAMIC_FTRACE config option enabled already.
> Could you try a later version of pahole?

Is this requireent new?

I have pahole 1.20, and master does build without problems.

If newer version is needed can a check be added?

Thanks

Michal

2021-04-25 11:19:10

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> >
> >
> > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > Hello,
> > >
> > > I see this build error in linux-next (config attached).
> > >
> > > [ 4939s] LD vmlinux
> > > [ 4959s] BTFIDS vmlinux
> > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > [ 4960s] make[1]: ***
> > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > vmlinux] Error 255
> > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> >
> > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > Could you try a later version of pahole?
>
> Is this requireent new?
>
> I have pahole 1.20, and master does build without problems.
>
> If newer version is needed can a check be added?

With dwarves 1.21 some architectures are fixed and some report other
missing symbol. Definitely an improvenent.

I see some new type support was added so it makes sense if that type is
used the new dwarves are needed.

Thanks

Michal

2021-04-26 11:35:27

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > >
> > >
> > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > Hello,
> > > >
> > > > I see this build error in linux-next (config attached).
> > > >
> > > > [ 4939s] LD vmlinux
> > > > [ 4959s] BTFIDS vmlinux
> > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > [ 4960s] make[1]: ***
> > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > vmlinux] Error 255
> > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > >
> > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > Could you try a later version of pahole?
> >
> > Is this requireent new?
> >
> > I have pahole 1.20, and master does build without problems.
> >
> > If newer version is needed can a check be added?
>
> With dwarves 1.21 some architectures are fixed and some report other
> missing symbol. Definitely an improvenent.
>
> I see some new type support was added so it makes sense if that type is
> used the new dwarves are needed.

Ok, here is the current failure with dwarves 1.21 on 5.12:

[ 2548s] LD vmlinux
[ 2557s] BTFIDS vmlinux
[ 2557s] FAILED unresolved symbol vfs_truncate
[ 2558s] make[1]: ***
[/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
vmlinux] Error 255

Any idea where this one is coming from?

Thanks

Michal


Attachments:
(No filename) (1.59 kB)
kvmsmall (11.97 kB)
Download all attachments

2021-04-26 12:13:51

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > >
> > > >
> > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > Hello,
> > > > >
> > > > > I see this build error in linux-next (config attached).
> > > > >
> > > > > [ 4939s] LD vmlinux
> > > > > [ 4959s] BTFIDS vmlinux
> > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > [ 4960s] make[1]: ***
> > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > vmlinux] Error 255
> > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > > >
> > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > Could you try a later version of pahole?
> > >
> > > Is this requireent new?
> > >
> > > I have pahole 1.20, and master does build without problems.
> > >
> > > If newer version is needed can a check be added?
> >
> > With dwarves 1.21 some architectures are fixed and some report other
> > missing symbol. Definitely an improvenent.
> >
> > I see some new type support was added so it makes sense if that type is
> > used the new dwarves are needed.
>
> Ok, here is the current failure with dwarves 1.21 on 5.12:
>
> [ 2548s] LD vmlinux
> [ 2557s] BTFIDS vmlinux
> [ 2557s] FAILED unresolved symbol vfs_truncate
> [ 2558s] make[1]: ***
> [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> vmlinux] Error 255
>
> Any idea where this one is coming from?
Attaching a complete config
>
> Thanks
>
> Michal


Attachments:
(No filename) (1.78 kB)
vanilla (71.00 B)
Download all attachments

2021-04-26 12:14:58

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > >
> > > > >
> > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > Hello,
> > > > > >
> > > > > > I see this build error in linux-next (config attached).
> > > > > >
> > > > > > [ 4939s] LD vmlinux
> > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > [ 4960s] make[1]: ***
> > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > vmlinux] Error 255
> > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > > > >
> > > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > > Could you try a later version of pahole?
> > > >
> > > > Is this requireent new?
> > > >
> > > > I have pahole 1.20, and master does build without problems.
> > > >
> > > > If newer version is needed can a check be added?
> > >
> > > With dwarves 1.21 some architectures are fixed and some report other
> > > missing symbol. Definitely an improvenent.
> > >
> > > I see some new type support was added so it makes sense if that type is
> > > used the new dwarves are needed.
> >
> > Ok, here is the current failure with dwarves 1.21 on 5.12:
> >
> > [ 2548s] LD vmlinux
> > [ 2557s] BTFIDS vmlinux
> > [ 2557s] FAILED unresolved symbol vfs_truncate
> > [ 2558s] make[1]: ***
> > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > vmlinux] Error 255
> >
> > Any idea where this one is coming from?
> Attaching a complete config
> >
> > Thanks
> >
> > Michal


Attachments:
(No filename) (1.94 kB)
default (206.25 kB)
Download all attachments

2021-04-26 15:43:47

by Yonghong Song

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol



On 4/26/21 5:14 AM, Michal Such?nek wrote:
> On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
>> On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
>>> On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
>>>> On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
>>>>> On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
>>>>>>
>>>>>>
>>>>>> On 4/23/21 6:05 AM, Michal Such?nek wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> I see this build error in linux-next (config attached).
>>>>>>>
>>>>>>> [ 4939s] LD vmlinux
>>>>>>> [ 4959s] BTFIDS vmlinux
>>>>>>> [ 4959s] FAILED unresolved symbol cubictcp_state
>>>>>>> [ 4960s] make[1]: ***
>>>>>>> [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
>>>>>>> vmlinux] Error 255
>>>>>>> [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
>>>>>>
>>>>>> Looks like you have DYNAMIC_FTRACE config option enabled already.
>>>>>> Could you try a later version of pahole?
>>>>>
>>>>> Is this requireent new?
>>>>>
>>>>> I have pahole 1.20, and master does build without problems.
>>>>>
>>>>> If newer version is needed can a check be added?
>>>>
>>>> With dwarves 1.21 some architectures are fixed and some report other
>>>> missing symbol. Definitely an improvenent.
>>>>
>>>> I see some new type support was added so it makes sense if that type is
>>>> used the new dwarves are needed.
>>>
>>> Ok, here is the current failure with dwarves 1.21 on 5.12:
>>>
>>> [ 2548s] LD vmlinux
>>> [ 2557s] BTFIDS vmlinux
>>> [ 2557s] FAILED unresolved symbol vfs_truncate
>>> [ 2558s] make[1]: ***
>>> [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
>>> vmlinux] Error 255

This is PPC64, from attached config:
CONFIG_PPC64=y
I don't have environment to cross-compile for PPC64.
Jiri, could you take a look? Thanks!

>>>
>>> Any idea where this one is coming from?
>> Attaching a complete config
>>>
>>> Thanks
>>>
>>> Michal

2021-04-26 16:05:01

by Jiri Olsa

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
>
>
> On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > >
> > > > > > >
> > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > >
> > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > vmlinux] Error 255
> > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2

this one was reported by Jesper and was fixed by upgrading pahole
that contains the new function generation fixes (v1.19)

> > > > > > >
> > > > > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > > > > Could you try a later version of pahole?
> > > > > >
> > > > > > Is this requireent new?
> > > > > >
> > > > > > I have pahole 1.20, and master does build without problems.
> > > > > >
> > > > > > If newer version is needed can a check be added?
> > > > >
> > > > > With dwarves 1.21 some architectures are fixed and some report other
> > > > > missing symbol. Definitely an improvenent.
> > > > >
> > > > > I see some new type support was added so it makes sense if that type is
> > > > > used the new dwarves are needed.
> > > >
> > > > Ok, here is the current failure with dwarves 1.21 on 5.12:
> > > >
> > > > [ 2548s] LD vmlinux
> > > > [ 2557s] BTFIDS vmlinux
> > > > [ 2557s] FAILED unresolved symbol vfs_truncate
> > > > [ 2558s] make[1]: ***
> > > > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > > > vmlinux] Error 255
>
> This is PPC64, from attached config:
> CONFIG_PPC64=y
> I don't have environment to cross-compile for PPC64.
> Jiri, could you take a look? Thanks!

looks like vfs_truncate did not get into BTF data,
I'll try to reproduce

jirka

2021-04-26 19:26:33

by Jiri Olsa

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> >
> >
> > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > Hello,
> > > > > > > > >
> > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > >
> > > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > vmlinux] Error 255
> > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
>
> this one was reported by Jesper and was fixed by upgrading pahole
> that contains the new function generation fixes (v1.19)
>
> > > > > > > >
> > > > > > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > > > > > Could you try a later version of pahole?
> > > > > > >
> > > > > > > Is this requireent new?
> > > > > > >
> > > > > > > I have pahole 1.20, and master does build without problems.
> > > > > > >
> > > > > > > If newer version is needed can a check be added?
> > > > > >
> > > > > > With dwarves 1.21 some architectures are fixed and some report other
> > > > > > missing symbol. Definitely an improvenent.
> > > > > >
> > > > > > I see some new type support was added so it makes sense if that type is
> > > > > > used the new dwarves are needed.
> > > > >
> > > > > Ok, here is the current failure with dwarves 1.21 on 5.12:
> > > > >
> > > > > [ 2548s] LD vmlinux
> > > > > [ 2557s] BTFIDS vmlinux
> > > > > [ 2557s] FAILED unresolved symbol vfs_truncate
> > > > > [ 2558s] make[1]: ***
> > > > > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > > > > vmlinux] Error 255
> >
> > This is PPC64, from attached config:
> > CONFIG_PPC64=y
> > I don't have environment to cross-compile for PPC64.
> > Jiri, could you take a look? Thanks!
>
> looks like vfs_truncate did not get into BTF data,
> I'll try to reproduce

I can't reproduce the problem, in both cross build and native ppc,
but the .config attached does not see complete, could you pelase
resend?

thanks,
jirka

2021-04-27 12:14:52

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
> On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> > On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> > >
> > >
> > > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > > Hello,
> > > > > > > > > >
> > > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > > >
> > > > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > > vmlinux] Error 255
> > > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> >
> > this one was reported by Jesper and was fixed by upgrading pahole
> > that contains the new function generation fixes (v1.19)
> >
> > > > > > > > >
> > > > > > > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > > > > > > Could you try a later version of pahole?
> > > > > > > >
> > > > > > > > Is this requireent new?
> > > > > > > >
> > > > > > > > I have pahole 1.20, and master does build without problems.
> > > > > > > >
> > > > > > > > If newer version is needed can a check be added?
> > > > > > >
> > > > > > > With dwarves 1.21 some architectures are fixed and some report other
> > > > > > > missing symbol. Definitely an improvenent.
> > > > > > >
> > > > > > > I see some new type support was added so it makes sense if that type is
> > > > > > > used the new dwarves are needed.
> > > > > >
> > > > > > Ok, here is the current failure with dwarves 1.21 on 5.12:
> > > > > >
> > > > > > [ 2548s] LD vmlinux
> > > > > > [ 2557s] BTFIDS vmlinux
> > > > > > [ 2557s] FAILED unresolved symbol vfs_truncate
> > > > > > [ 2558s] make[1]: ***
> > > > > > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > > > > > vmlinux] Error 255
> > >
> > > This is PPC64, from attached config:
> > > CONFIG_PPC64=y
> > > I don't have environment to cross-compile for PPC64.
> > > Jiri, could you take a look? Thanks!
> >
> > looks like vfs_truncate did not get into BTF data,
> > I'll try to reproduce
>
> I can't reproduce the problem, in both cross build and native ppc,
> but the .config attached does not see complete, could you pelase
> resend?

I can't reproduce outside of the build service either. There is probably
some other tool missing that is commonly available and there is no check
for it.

Thanks

Michal

2021-04-30 17:48:20

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

CC another Jiri

On Tue, Apr 27, 2021 at 02:12:37PM +0200, Michal Such?nek wrote:
> On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
> > On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> > > On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> > > >
> > > >
> > > > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > > > Hello,
> > > > > > > > > > >
> > > > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > > > >
> > > > > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > > > vmlinux] Error 255
> > > > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > >
> > > this one was reported by Jesper and was fixed by upgrading pahole
> > > that contains the new function generation fixes (v1.19)
> > >
> > > > > > > > > >
> > > > > > > > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > > > > > > > Could you try a later version of pahole?
> > > > > > > > >
> > > > > > > > > Is this requireent new?
> > > > > > > > >
> > > > > > > > > I have pahole 1.20, and master does build without problems.
> > > > > > > > >
> > > > > > > > > If newer version is needed can a check be added?
> > > > > > > >
> > > > > > > > With dwarves 1.21 some architectures are fixed and some report other
> > > > > > > > missing symbol. Definitely an improvenent.
> > > > > > > >
> > > > > > > > I see some new type support was added so it makes sense if that type is
> > > > > > > > used the new dwarves are needed.
> > > > > > >
> > > > > > > Ok, here is the current failure with dwarves 1.21 on 5.12:
> > > > > > >
> > > > > > > [ 2548s] LD vmlinux
> > > > > > > [ 2557s] BTFIDS vmlinux
> > > > > > > [ 2557s] FAILED unresolved symbol vfs_truncate
> > > > > > > [ 2558s] make[1]: ***
> > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > > > > > > vmlinux] Error 255
> > > >
> > > > This is PPC64, from attached config:
> > > > CONFIG_PPC64=y
> > > > I don't have environment to cross-compile for PPC64.
> > > > Jiri, could you take a look? Thanks!
> > >
> > > looks like vfs_truncate did not get into BTF data,
> > > I'll try to reproduce
> >
> > I can't reproduce the problem, in both cross build and native ppc,
> > but the .config attached does not see complete, could you pelase
> > resend?
>
> I can't reproduce outside of the build service either. There is probably
> some other tool missing that is commonly available and there is no check
> for it.

Looks like pahole or some library are miscompiled on ppc64.

Using the native ppc64 tools is broken and using cross-tools works.

Thanks

Michal

2021-04-30 18:28:31

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Fri, Apr 30, 2021 at 07:47:23PM +0200, Michal Such?nek wrote:
> CC another Jiri
>
> On Tue, Apr 27, 2021 at 02:12:37PM +0200, Michal Such?nek wrote:
> > On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
> > > On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> > > > On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> > > > >
> > > > >
> > > > > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > > > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > > > > Hello,
> > > > > > > > > > > >
> > > > > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > > > > >
> > > > > > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > > > > vmlinux] Error 255
> > > > > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > > >
> > > > this one was reported by Jesper and was fixed by upgrading pahole
> > > > that contains the new function generation fixes (v1.19)
> > > >
> > > > > > > > > > >
> > > > > > > > > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > > > > > > > > Could you try a later version of pahole?
> > > > > > > > > >
> > > > > > > > > > Is this requireent new?
> > > > > > > > > >
> > > > > > > > > > I have pahole 1.20, and master does build without problems.
> > > > > > > > > >
> > > > > > > > > > If newer version is needed can a check be added?
> > > > > > > > >
> > > > > > > > > With dwarves 1.21 some architectures are fixed and some report other
> > > > > > > > > missing symbol. Definitely an improvenent.
> > > > > > > > >
> > > > > > > > > I see some new type support was added so it makes sense if that type is
> > > > > > > > > used the new dwarves are needed.
> > > > > > > >
> > > > > > > > Ok, here is the current failure with dwarves 1.21 on 5.12:
> > > > > > > >
> > > > > > > > [ 2548s] LD vmlinux
> > > > > > > > [ 2557s] BTFIDS vmlinux
> > > > > > > > [ 2557s] FAILED unresolved symbol vfs_truncate
> > > > > > > > [ 2558s] make[1]: ***
> > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > > > > > > > vmlinux] Error 255
> > > > >
> > > > > This is PPC64, from attached config:
> > > > > CONFIG_PPC64=y
> > > > > I don't have environment to cross-compile for PPC64.
> > > > > Jiri, could you take a look? Thanks!
> > > >
> > > > looks like vfs_truncate did not get into BTF data,
> > > > I'll try to reproduce
> > >
> > > I can't reproduce the problem, in both cross build and native ppc,
> > > but the .config attached does not see complete, could you pelase
> > > resend?
> >
> > I can't reproduce outside of the build service either. There is probably
> > some other tool missing that is commonly available and there is no check
> > for it.
>
> Looks like pahole or some library are miscompiled on ppc64.
>
> Using the native ppc64 tools is broken and using cross-tools works.

Even more interesting is that also building ppc64le on ppc64 works.
So long as you do not build on ppc64 or do not build for ppc64 it is fine

Attaching the BE and LE configs. There is stil non-trivial difference
probably related to the v1 vs v2 object format version. There was once a
patchset to build BE with v2 format as well but it was rejected.

Thanks

Michal


Attachments:
(No filename) (4.05 kB)
config.be (110.76 kB)
config.le (110.75 kB)
Download all attachments

2021-05-01 06:48:53

by Jiri Slaby

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On 30. 04. 21, 19:47, Michal Such?nek wrote:
> CC another Jiri
>
> On Tue, Apr 27, 2021 at 02:12:37PM +0200, Michal Such?nek wrote:
>> On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
>>> On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
>>>> On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
>>>>>
>>>>>
>>>>> On 4/26/21 5:14 AM, Michal Such?nek wrote:
>>>>>> On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
>>>>>>> On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
>>>>>>>> On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
>>>>>>>>> On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
>>>>>>>>>> On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 4/23/21 6:05 AM, Michal Such?nek wrote:
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> I see this build error in linux-next (config attached).
>>>>>>>>>>>>
>>>>>>>>>>>> [ 4939s] LD vmlinux
>>>>>>>>>>>> [ 4959s] BTFIDS vmlinux
>>>>>>>>>>>> [ 4959s] FAILED unresolved symbol cubictcp_state
>>>>>>>>>>>> [ 4960s] make[1]: ***
>>>>>>>>>>>> [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
>>>>>>>>>>>> vmlinux] Error 255
>>>>>>>>>>>> [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
>>>>
>>>> this one was reported by Jesper and was fixed by upgrading pahole
>>>> that contains the new function generation fixes (v1.19)
>>>>
>>>>>>>>>>>
>>>>>>>>>>> Looks like you have DYNAMIC_FTRACE config option enabled already.
>>>>>>>>>>> Could you try a later version of pahole?
>>>>>>>>>>
>>>>>>>>>> Is this requireent new?
>>>>>>>>>>
>>>>>>>>>> I have pahole 1.20, and master does build without problems.
>>>>>>>>>>
>>>>>>>>>> If newer version is needed can a check be added?
>>>>>>>>>
>>>>>>>>> With dwarves 1.21 some architectures are fixed and some report other
>>>>>>>>> missing symbol. Definitely an improvenent.
>>>>>>>>>
>>>>>>>>> I see some new type support was added so it makes sense if that type is
>>>>>>>>> used the new dwarves are needed.
>>>>>>>>
>>>>>>>> Ok, here is the current failure with dwarves 1.21 on 5.12:
>>>>>>>>
>>>>>>>> [ 2548s] LD vmlinux
>>>>>>>> [ 2557s] BTFIDS vmlinux
>>>>>>>> [ 2557s] FAILED unresolved symbol vfs_truncate
>>>>>>>> [ 2558s] make[1]: ***
>>>>>>>> [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
>>>>>>>> vmlinux] Error 255
>>>>>
>>>>> This is PPC64, from attached config:
>>>>> CONFIG_PPC64=y
>>>>> I don't have environment to cross-compile for PPC64.
>>>>> Jiri, could you take a look? Thanks!
>>>>
>>>> looks like vfs_truncate did not get into BTF data,
>>>> I'll try to reproduce

_None_ of the functions are generated by pahole -J from debuginfo on
ppc64. debuginfo appears to be correct. Neither pahole -J fs/open.o
works correctly. collect_functions in dwarves seems to be defunct on
ppc64... "functions" array is bogus (so find_function -- the bsearch --
fails). I didn't have more time to continue debugging. This is where I
stopped.

regards,
--
js
suse labs

2021-05-01 10:55:00

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Sat, May 01, 2021 at 08:45:50AM +0200, Jiri Slaby wrote:
> On 30. 04. 21, 19:47, Michal Such?nek wrote:
> > CC another Jiri
> >
> > On Tue, Apr 27, 2021 at 02:12:37PM +0200, Michal Such?nek wrote:
> > > On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
> > > > On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> > > > > On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> > > > > >
> > > > > >
> > > > > > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > > > > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > > > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > > > > > Hello,
> > > > > > > > > > > > >
> > > > > > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > > > > > >
> > > > > > > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > > > > > vmlinux] Error 255
> > > > > > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > > > >
> > > > > this one was reported by Jesper and was fixed by upgrading pahole
> > > > > that contains the new function generation fixes (v1.19)
> > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > Looks like you have DYNAMIC_FTRACE config option enabled already.
> > > > > > > > > > > > Could you try a later version of pahole?
> > > > > > > > > > >
> > > > > > > > > > > Is this requireent new?
> > > > > > > > > > >
> > > > > > > > > > > I have pahole 1.20, and master does build without problems.
> > > > > > > > > > >
> > > > > > > > > > > If newer version is needed can a check be added?
> > > > > > > > > >
> > > > > > > > > > With dwarves 1.21 some architectures are fixed and some report other
> > > > > > > > > > missing symbol. Definitely an improvenent.
> > > > > > > > > >
> > > > > > > > > > I see some new type support was added so it makes sense if that type is
> > > > > > > > > > used the new dwarves are needed.
> > > > > > > > >
> > > > > > > > > Ok, here is the current failure with dwarves 1.21 on 5.12:
> > > > > > > > >
> > > > > > > > > [ 2548s] LD vmlinux
> > > > > > > > > [ 2557s] BTFIDS vmlinux
> > > > > > > > > [ 2557s] FAILED unresolved symbol vfs_truncate
> > > > > > > > > [ 2558s] make[1]: ***
> > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > > > > > > > > vmlinux] Error 255
> > > > > >
> > > > > > This is PPC64, from attached config:
> > > > > > CONFIG_PPC64=y
> > > > > > I don't have environment to cross-compile for PPC64.
> > > > > > Jiri, could you take a look? Thanks!
> > > > >
> > > > > looks like vfs_truncate did not get into BTF data,
> > > > > I'll try to reproduce
>
> _None_ of the functions are generated by pahole -J from debuginfo on ppc64.
> debuginfo appears to be correct. Neither pahole -J fs/open.o works
> correctly. collect_functions in dwarves seems to be defunct on ppc64...
> "functions" array is bogus (so find_function -- the bsearch -- fails). I
> didn't have more time to continue debugging. This is where I stopped.

A workaround is to apply
https://lore.kernel.org/linuxppc-dev/[email protected]/
and build as ABI v2

Thanks

Michal

2021-05-03 06:12:35

by Jiri Slaby

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On 01. 05. 21, 8:45, Jiri Slaby wrote:
> On 30. 04. 21, 19:47, Michal Such?nek wrote:
>> CC another Jiri
>>
>> On Tue, Apr 27, 2021 at 02:12:37PM +0200, Michal Such?nek wrote:
>>> On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
>>>> On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
>>>>> On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
>>>>>>
>>>>>>
>>>>>> On 4/26/21 5:14 AM, Michal Such?nek wrote:
>>>>>>> On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
>>>>>>>> On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
>>>>>>>>> On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
>>>>>>>>>> On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
>>>>>>>>>>> On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 4/23/21 6:05 AM, Michal Such?nek wrote:
>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I see this build error in linux-next (config attached).
>>>>>>>>>>>>>
>>>>>>>>>>>>> [ 4939s]?? LD????? vmlinux
>>>>>>>>>>>>> [ 4959s]?? BTFIDS? vmlinux
>>>>>>>>>>>>> [ 4959s] FAILED unresolved symbol cubictcp_state
>>>>>>>>>>>>> [ 4960s] make[1]: ***
>>>>>>>>>>>>> [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
>>>>>>>>>>>>>
>>>>>>>>>>>>> vmlinux] Error 255
>>>>>>>>>>>>> [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
>>>>>
>>>>> this one was reported by Jesper and was fixed by upgrading pahole
>>>>> that contains the new function generation fixes (v1.19)
>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Looks like you have DYNAMIC_FTRACE config option enabled
>>>>>>>>>>>> already.
>>>>>>>>>>>> Could you try a later version of pahole?
>>>>>>>>>>>
>>>>>>>>>>> Is this requireent new?
>>>>>>>>>>>
>>>>>>>>>>> I have pahole 1.20, and master does build without problems.
>>>>>>>>>>>
>>>>>>>>>>> If newer version is needed can a check be added?
>>>>>>>>>>
>>>>>>>>>> With dwarves 1.21 some architectures are fixed and some report
>>>>>>>>>> other
>>>>>>>>>> missing symbol. Definitely an improvenent.
>>>>>>>>>>
>>>>>>>>>> I see some new type support was added so it makes sense if
>>>>>>>>>> that type is
>>>>>>>>>> used the new dwarves are needed.
>>>>>>>>>
>>>>>>>>> Ok, here is the current failure with dwarves 1.21 on 5.12:
>>>>>>>>>
>>>>>>>>> [ 2548s]?? LD????? vmlinux
>>>>>>>>> [ 2557s]?? BTFIDS? vmlinux
>>>>>>>>> [ 2557s] FAILED unresolved symbol vfs_truncate
>>>>>>>>> [ 2558s] make[1]: ***
>>>>>>>>> [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
>>>>>>>>>
>>>>>>>>> vmlinux] Error 255
>>>>>>
>>>>>> This is PPC64, from attached config:
>>>>>> ?? CONFIG_PPC64=y
>>>>>> I don't have environment to cross-compile for PPC64.
>>>>>> Jiri, could you take a look? Thanks!
>>>>>
>>>>> looks like vfs_truncate did not get into BTF data,
>>>>> I'll try to reproduce
>
> _None_ of the functions are generated by pahole -J from debuginfo on
> ppc64. debuginfo appears to be correct. Neither pahole -J fs/open.o
> works correctly. collect_functions in dwarves seems to be defunct on
> ppc64... "functions" array is bogus (so find_function -- the bsearch --
> fails).

It's not that bogus. I forgot an asterisk:
> #0 find_function (btfe=0x100269f80, name=0x10024631c "stream_open") at /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> (gdb) p (*functions)@84
> $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr = 75232, size = 72, sh_addr = 65536, generated = false}, {
> name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592, size = 216, sh_addr = 65536, generated = false}, {
> name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr = 80816, size = 232, sh_addr = 65536, generated = false}, {
> name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr = 74304, size = 100, sh_addr = 65536, generated = false}, {
...
> name = 0x7ffff68e0808 ".stream_open", addr = 65824, size = 72, sh_addr = 65536, generated = false}, {
...
> name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size = 544, sh_addr = 65536, generated = false}}

The dot makes the difference, of course. The question is why is it
there? I keep looking into it. Only if someone has an immediate idea...

thanks,
--
js
suse labs

2021-05-03 07:15:22

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, May 03, 2021 at 08:11:50AM +0200, Jiri Slaby wrote:
> On 01. 05. 21, 8:45, Jiri Slaby wrote:
> > On 30. 04. 21, 19:47, Michal Such?nek wrote:
> > > CC another Jiri
> > >
> > > On Tue, Apr 27, 2021 at 02:12:37PM +0200, Michal Such?nek wrote:
> > > > On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
> > > > > On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> > > > > > On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> > > > > > >
> > > > > > >
> > > > > > > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > > > > > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > > > > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > > > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > > > > > > Hello,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > [ 4939s]?? LD????? vmlinux
> > > > > > > > > > > > > > [ 4959s]?? BTFIDS? vmlinux
> > > > > > > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > vmlinux] Error 255
> > > > > > > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > > > > >
> > > > > > this one was reported by Jesper and was fixed by upgrading pahole
> > > > > > that contains the new function generation fixes (v1.19)
> > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > Looks like you have
> > > > > > > > > > > > > DYNAMIC_FTRACE config option
> > > > > > > > > > > > > enabled already.
> > > > > > > > > > > > > Could you try a later version of pahole?
> > > > > > > > > > > >
> > > > > > > > > > > > Is this requireent new?
> > > > > > > > > > > >
> > > > > > > > > > > > I have pahole 1.20, and master does build without problems.
> > > > > > > > > > > >
> > > > > > > > > > > > If newer version is needed can a check be added?
> > > > > > > > > > >
> > > > > > > > > > > With dwarves 1.21 some architectures
> > > > > > > > > > > are fixed and some report other
> > > > > > > > > > > missing symbol. Definitely an improvenent.
> > > > > > > > > > >
> > > > > > > > > > > I see some new type support was
> > > > > > > > > > > added so it makes sense if that type
> > > > > > > > > > > is
> > > > > > > > > > > used the new dwarves are needed.
> > > > > > > > > >
> > > > > > > > > > Ok, here is the current failure with dwarves 1.21 on 5.12:
> > > > > > > > > >
> > > > > > > > > > [ 2548s]?? LD????? vmlinux
> > > > > > > > > > [ 2557s]?? BTFIDS? vmlinux
> > > > > > > > > > [ 2557s] FAILED unresolved symbol vfs_truncate
> > > > > > > > > > [ 2558s] make[1]: ***
> > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-kvmsmall-5.12.0/linux-5.12/Makefile:1213:
> > > > > > > > > >
> > > > > > > > > > vmlinux] Error 255
> > > > > > >
> > > > > > > This is PPC64, from attached config:
> > > > > > > ?? CONFIG_PPC64=y
> > > > > > > I don't have environment to cross-compile for PPC64.
> > > > > > > Jiri, could you take a look? Thanks!
> > > > > >
> > > > > > looks like vfs_truncate did not get into BTF data,
> > > > > > I'll try to reproduce
> >
> > _None_ of the functions are generated by pahole -J from debuginfo on
> > ppc64. debuginfo appears to be correct. Neither pahole -J fs/open.o
> > works correctly. collect_functions in dwarves seems to be defunct on
> > ppc64... "functions" array is bogus (so find_function -- the bsearch --
> > fails).
>
> It's not that bogus. I forgot an asterisk:
> > #0 find_function (btfe=0x100269f80, name=0x10024631c "stream_open") at /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> > (gdb) p (*functions)@84
> > $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr = 75232, size = 72, sh_addr = 65536, generated = false}, {
> > name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592, size = 216, sh_addr = 65536, generated = false}, {
> > name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr = 80816, size = 232, sh_addr = 65536, generated = false}, {
> > name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr = 74304, size = 100, sh_addr = 65536, generated = false}, {
> ...
> > name = 0x7ffff68e0808 ".stream_open", addr = 65824, size = 72, sh_addr = 65536, generated = false}, {
> ...
> > name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size = 544, sh_addr = 65536, generated = false}}
>
> The dot makes the difference, of course. The question is why is it there? I
> keep looking into it. Only if someone has an immediate idea...

Thanks for looking into it. That's probably expected. I vaguely recall
there is a mocro for adding a dot to assembly symbols depending on the
ABI.

Thanks

Michal

2021-05-03 08:00:38

by Jiri Slaby

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On 03. 05. 21, 8:11, Jiri Slaby wrote:
>>>>>> looks like vfs_truncate did not get into BTF data,
>>>>>> I'll try to reproduce
>>
>> _None_ of the functions are generated by pahole -J from debuginfo on
>> ppc64. debuginfo appears to be correct. Neither pahole -J fs/open.o
>> works correctly. collect_functions in dwarves seems to be defunct on
>> ppc64... "functions" array is bogus (so find_function -- the bsearch
>> -- fails).
>
> It's not that bogus. I forgot an asterisk:
>> #0? find_function (btfe=0x100269f80, name=0x10024631c "stream_open")
>> at /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
>> (gdb) p (*functions)@84
>> $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr =
>> 75232, size = 72, sh_addr = 65536, generated = false}, {
>> ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592, size
>> = 216, sh_addr = 65536, generated = false}, {
>> ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr = 80816,
>> size = 232, sh_addr = 65536, generated = false}, {
>> ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr = 74304,
>> size = 100, sh_addr = 65536, generated = false}, {
> ...
>> ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size = 72,
>> sh_addr = 65536, generated = false}, {
> ...
>> ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size = 544,
>> sh_addr = 65536, generated = false}}
>
> The dot makes the difference, of course. The question is why is it
> there? I keep looking into it. Only if someone has an immediate idea...

Well, .vfs_truncate is in .text (and contains an ._mcount call). And
vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
excludes all functions without the ._mcount call, is_ftrace_func later
returns false for such functions and they are filtered before the BTF
processing.

Technically, get_vmlinux_addrs looks at a list of functions between
__start_mcount_loc and __stop_mcount_loc and considers only the listed.

I don't know what the correct fix is (exclude .opd functions from the
filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
this too.

regards,
--
js

2021-05-03 09:03:01

by Jiri Slaby

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

CCing pahole people.

On 03. 05. 21, 9:59, Jiri Slaby wrote:
> On 03. 05. 21, 8:11, Jiri Slaby wrote:
>>>>>>> looks like vfs_truncate did not get into BTF data,
>>>>>>> I'll try to reproduce
>>>
>>> _None_ of the functions are generated by pahole -J from debuginfo on
>>> ppc64. debuginfo appears to be correct. Neither pahole -J fs/open.o
>>> works correctly. collect_functions in dwarves seems to be defunct on
>>> ppc64... "functions" array is bogus (so find_function -- the bsearch
>>> -- fails).
>>
>> It's not that bogus. I forgot an asterisk:
>>> #0? find_function (btfe=0x100269f80, name=0x10024631c "stream_open")
>>> at /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
>>> (gdb) p (*functions)@84
>>> $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr =
>>> 75232, size = 72, sh_addr = 65536, generated = false}, {
>>> ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592, size
>>> = 216, sh_addr = 65536, generated = false}, {
>>> ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr = 80816,
>>> size = 232, sh_addr = 65536, generated = false}, {
>>> ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr = 74304,
>>> size = 100, sh_addr = 65536, generated = false}, {
>> ...
>>> ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size = 72,
>>> sh_addr = 65536, generated = false}, {
>> ...
>>> ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size = 544,
>>> sh_addr = 65536, generated = false}}
>>
>> The dot makes the difference, of course. The question is why is it
>> there? I keep looking into it. Only if someone has an immediate idea...
>
> Well, .vfs_truncate is in .text (and contains an ._mcount call). And
> vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
> excludes all functions without the ._mcount call, is_ftrace_func later
> returns false for such functions and they are filtered before the BTF
> processing.
>
> Technically, get_vmlinux_addrs looks at a list of functions between
> __start_mcount_loc and __stop_mcount_loc and considers only the listed.
>
> I don't know what the correct fix is (exclude .opd functions from the
> filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
> this too.

Attaching a patch for pahole which fixes the issue, but I have no idea
whether it is the right fix at all.

> regards,--
js
suse labs


Attachments:
ppc64-opd-fix.patch (1.70 kB)

2021-05-03 10:27:32

by Jiri Olsa

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, May 03, 2021 at 10:59:44AM +0200, Jiri Slaby wrote:
> CCing pahole people.
>
> On 03. 05. 21, 9:59, Jiri Slaby wrote:
> > On 03. 05. 21, 8:11, Jiri Slaby wrote:
> > > > > > > > looks like vfs_truncate did not get into BTF data,
> > > > > > > > I'll try to reproduce
> > > >
> > > > _None_ of the functions are generated by pahole -J from
> > > > debuginfo on ppc64. debuginfo appears to be correct. Neither
> > > > pahole -J fs/open.o works correctly. collect_functions in
> > > > dwarves seems to be defunct on ppc64... "functions" array is
> > > > bogus (so find_function -- the bsearch -- fails).
> > >
> > > It's not that bogus. I forgot an asterisk:
> > > > #0? find_function (btfe=0x100269f80, name=0x10024631c
> > > > "stream_open") at
> > > > /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> > > > (gdb) p (*functions)@84
> > > > $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr
> > > > = 75232, size = 72, sh_addr = 65536, generated = false}, {
> > > > ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592,
> > > > size = 216, sh_addr = 65536, generated = false}, {
> > > > ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr =
> > > > 80816, size = 232, sh_addr = 65536, generated = false}, {
> > > > ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr =
> > > > 74304, size = 100, sh_addr = 65536, generated = false}, {
> > > ...
> > > > ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size =
> > > > 72, sh_addr = 65536, generated = false}, {
> > > ...
> > > > ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size =
> > > > 544, sh_addr = 65536, generated = false}}
> > >
> > > The dot makes the difference, of course. The question is why is it
> > > there? I keep looking into it. Only if someone has an immediate
> > > idea...
> >
> > Well, .vfs_truncate is in .text (and contains an ._mcount call). And
> > vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
> > excludes all functions without the ._mcount call, is_ftrace_func later
> > returns false for such functions and they are filtered before the BTF
> > processing.
> >
> > Technically, get_vmlinux_addrs looks at a list of functions between
> > __start_mcount_loc and __stop_mcount_loc and considers only the listed.
> >
> > I don't know what the correct fix is (exclude .opd functions from the
> > filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
> > this too.
>
> Attaching a patch for pahole which fixes the issue, but I have no idea
> whether it is the right fix at all.

hi,
we're considering to disable ftrace filter completely,
I guess that would solve this issue for ppc as well

https://lore.kernel.org/bpf/[email protected]/

jirka

>
> > regards,--
> js
> suse labs

> From: Jiri Slaby <[email protected]>
> Subject: ppc64: .opd section fix
> Patch-mainline: submitted 2021/05/03
>
> Functions in the .opd section should be considered valid too. Otherwise,
> pahole cannot produce a .BTF section from vmlinux and kernel build
> fails on ppc64.
> ---
> btf_encoder.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> --- a/btf_encoder.c
> +++ b/btf_encoder.c
> @@ -31,6 +31,8 @@ struct funcs_layout {
> unsigned long mcount_start;
> unsigned long mcount_stop;
> unsigned long mcount_sec_idx;
> + unsigned long opd_start;
> + unsigned long opd_stop;
> };
>
> struct elf_function {
> @@ -271,11 +273,24 @@ static int is_ftrace_func(struct elf_fun
> return start <= addrs[r] && addrs[r] < end;
> }
>
> +static int is_opd_func(struct elf_function *func, struct funcs_layout *fl)
> +{
> + return fl->opd_start <= func->addr && func->addr < fl->opd_stop;
> +}
> +
> static int setup_functions(struct btf_elf *btfe, struct funcs_layout *fl)
> {
> __u64 *addrs, count, i;
> int functions_valid = 0;
> bool kmod = false;
> + GElf_Shdr shdr;
> + Elf_Scn *sec;
> +
> + sec = elf_section_by_name(btfe->elf, &btfe->ehdr, &shdr, ".opd", NULL);
> + if (sec) {
> + fl->opd_start = shdr.sh_addr;
> + fl->opd_stop = shdr.sh_addr + shdr.sh_size;
> + }
>
> /*
> * Check if we are processing vmlinux image and
> @@ -322,7 +337,8 @@ static int setup_functions(struct btf_el
> func->addr += func->sh_addr;
>
> /* Make sure function is within ftrace addresses. */
> - if (is_ftrace_func(func, addrs, count)) {
> + if (is_opd_func(func, fl) ||
> + is_ftrace_func(func, addrs, count)) {
> /*
> * We iterate over sorted array, so we can easily skip
> * not valid item and move following valid field into

2021-05-03 17:13:09

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, May 03, 2021 at 06:46:56PM +0200, Michal Such?nek wrote:
> On Mon, May 03, 2021 at 12:08:02PM +0200, Jiri Olsa wrote:
> > On Mon, May 03, 2021 at 10:59:44AM +0200, Jiri Slaby wrote:
> > > CCing pahole people.
> > >
> > > On 03. 05. 21, 9:59, Jiri Slaby wrote:
> > > > On 03. 05. 21, 8:11, Jiri Slaby wrote:
> > > > > > > > > > looks like vfs_truncate did not get into BTF data,
> > > > > > > > > > I'll try to reproduce
> > > > > >
> > > > > > _None_ of the functions are generated by pahole -J from
> > > > > > debuginfo on ppc64. debuginfo appears to be correct. Neither
> > > > > > pahole -J fs/open.o works correctly. collect_functions in
> > > > > > dwarves seems to be defunct on ppc64... "functions" array is
> > > > > > bogus (so find_function -- the bsearch -- fails).
> > > > >
> > > > > It's not that bogus. I forgot an asterisk:
> > > > > > #0? find_function (btfe=0x100269f80, name=0x10024631c
> > > > > > "stream_open") at
> > > > > > /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> > > > > > (gdb) p (*functions)@84
> > > > > > $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr
> > > > > > = 75232, size = 72, sh_addr = 65536, generated = false}, {
> > > > > > ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592,
> > > > > > size = 216, sh_addr = 65536, generated = false}, {
> > > > > > ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr =
> > > > > > 80816, size = 232, sh_addr = 65536, generated = false}, {
> > > > > > ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr =
> > > > > > 74304, size = 100, sh_addr = 65536, generated = false}, {
> > > > > ...
> > > > > > ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size =
> > > > > > 72, sh_addr = 65536, generated = false}, {
> > > > > ...
> > > > > > ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size =
> > > > > > 544, sh_addr = 65536, generated = false}}
> > > > >
> > > > > The dot makes the difference, of course. The question is why is it
> > > > > there? I keep looking into it. Only if someone has an immediate
> > > > > idea...
> > > >
> > > > Well, .vfs_truncate is in .text (and contains an ._mcount call). And
> > > > vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
> > > > excludes all functions without the ._mcount call, is_ftrace_func later
> > > > returns false for such functions and they are filtered before the BTF
> > > > processing.
> > > >
> > > > Technically, get_vmlinux_addrs looks at a list of functions between
> > > > __start_mcount_loc and __stop_mcount_loc and considers only the listed.
> > > >
> > > > I don't know what the correct fix is (exclude .opd functions from the
> > > > filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
> > > > this too.
> > >
> > > Attaching a patch for pahole which fixes the issue, but I have no idea
> > > whether it is the right fix at all.
> >
> > hi,
> > we're considering to disable ftrace filter completely,
> > I guess that would solve this issue for ppc as well
> >
> > https://lore.kernel.org/bpf/[email protected]/
> >
> Just disabling the ftrace filter in pahole does not seem to fix it.
>
> Is there some other place where it should be disabled?

Nevermind, purging the system dwarves resolved the problem. Although
kbuild detects pahole as /usr/local/bin/pahole the system binaries or
libraries are still used for something.

Thanks

Michal

2021-05-03 18:14:55

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, May 03, 2021 at 12:08:02PM +0200, Jiri Olsa wrote:
> On Mon, May 03, 2021 at 10:59:44AM +0200, Jiri Slaby wrote:
> > CCing pahole people.
> >
> > On 03. 05. 21, 9:59, Jiri Slaby wrote:
> > > On 03. 05. 21, 8:11, Jiri Slaby wrote:
> > > > > > > > > looks like vfs_truncate did not get into BTF data,
> > > > > > > > > I'll try to reproduce
> > > > >
> > > > > _None_ of the functions are generated by pahole -J from
> > > > > debuginfo on ppc64. debuginfo appears to be correct. Neither
> > > > > pahole -J fs/open.o works correctly. collect_functions in
> > > > > dwarves seems to be defunct on ppc64... "functions" array is
> > > > > bogus (so find_function -- the bsearch -- fails).
> > > >
> > > > It's not that bogus. I forgot an asterisk:
> > > > > #0? find_function (btfe=0x100269f80, name=0x10024631c
> > > > > "stream_open") at
> > > > > /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> > > > > (gdb) p (*functions)@84
> > > > > $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr
> > > > > = 75232, size = 72, sh_addr = 65536, generated = false}, {
> > > > > ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592,
> > > > > size = 216, sh_addr = 65536, generated = false}, {
> > > > > ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr =
> > > > > 80816, size = 232, sh_addr = 65536, generated = false}, {
> > > > > ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr =
> > > > > 74304, size = 100, sh_addr = 65536, generated = false}, {
> > > > ...
> > > > > ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size =
> > > > > 72, sh_addr = 65536, generated = false}, {
> > > > ...
> > > > > ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size =
> > > > > 544, sh_addr = 65536, generated = false}}
> > > >
> > > > The dot makes the difference, of course. The question is why is it
> > > > there? I keep looking into it. Only if someone has an immediate
> > > > idea...
> > >
> > > Well, .vfs_truncate is in .text (and contains an ._mcount call). And
> > > vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
> > > excludes all functions without the ._mcount call, is_ftrace_func later
> > > returns false for such functions and they are filtered before the BTF
> > > processing.
> > >
> > > Technically, get_vmlinux_addrs looks at a list of functions between
> > > __start_mcount_loc and __stop_mcount_loc and considers only the listed.
> > >
> > > I don't know what the correct fix is (exclude .opd functions from the
> > > filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
> > > this too.
> >
> > Attaching a patch for pahole which fixes the issue, but I have no idea
> > whether it is the right fix at all.
>
> hi,
> we're considering to disable ftrace filter completely,
> I guess that would solve this issue for ppc as well
>
> https://lore.kernel.org/bpf/[email protected]/
>
Just disabling the ftrace filter in pahole does not seem to fix it.

Is there some other place where it should be disabled?

Thanks

Michal

2021-05-04 06:44:32

by Jiri Slaby

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On 03. 05. 21, 12:08, Jiri Olsa wrote:
> On Mon, May 03, 2021 at 10:59:44AM +0200, Jiri Slaby wrote:
>> CCing pahole people.
>>
>> On 03. 05. 21, 9:59, Jiri Slaby wrote:
>>> On 03. 05. 21, 8:11, Jiri Slaby wrote:
>>>>>>>>> looks like vfs_truncate did not get into BTF data,
>>>>>>>>> I'll try to reproduce
>>>>>
>>>>> _None_ of the functions are generated by pahole -J from
>>>>> debuginfo on ppc64. debuginfo appears to be correct. Neither
>>>>> pahole -J fs/open.o works correctly. collect_functions in
>>>>> dwarves seems to be defunct on ppc64... "functions" array is
>>>>> bogus (so find_function -- the bsearch -- fails).
>>>>
>>>> It's not that bogus. I forgot an asterisk:
>>>>> #0? find_function (btfe=0x100269f80, name=0x10024631c
>>>>> "stream_open") at
>>>>> /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
>>>>> (gdb) p (*functions)@84
>>>>> $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr
>>>>> = 75232, size = 72, sh_addr = 65536, generated = false}, {
>>>>> ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592,
>>>>> size = 216, sh_addr = 65536, generated = false}, {
>>>>> ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr =
>>>>> 80816, size = 232, sh_addr = 65536, generated = false}, {
>>>>> ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr =
>>>>> 74304, size = 100, sh_addr = 65536, generated = false}, {
>>>> ...
>>>>> ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size =
>>>>> 72, sh_addr = 65536, generated = false}, {
>>>> ...
>>>>> ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size =
>>>>> 544, sh_addr = 65536, generated = false}}
>>>>
>>>> The dot makes the difference, of course. The question is why is it
>>>> there? I keep looking into it. Only if someone has an immediate
>>>> idea...
>>>
>>> Well, .vfs_truncate is in .text (and contains an ._mcount call). And
>>> vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
>>> excludes all functions without the ._mcount call, is_ftrace_func later
>>> returns false for such functions and they are filtered before the BTF
>>> processing.
>>>
>>> Technically, get_vmlinux_addrs looks at a list of functions between
>>> __start_mcount_loc and __stop_mcount_loc and considers only the listed.
>>>
>>> I don't know what the correct fix is (exclude .opd functions from the
>>> filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
>>> this too.
>>
>> Attaching a patch for pahole which fixes the issue, but I have no idea
>> whether it is the right fix at all.
>
> hi,
> we're considering to disable ftrace filter completely,
> I guess that would solve this issue for ppc as well
>
> https://lore.kernel.org/bpf/[email protected]/

Right, the attached patch fixes it for me too.

--
js


Attachments:
0001-remove-ftrace-filter.patch (9.20 kB)

2021-05-05 15:10:27

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
> On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> > On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> > >
> > >
> > > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > > Hello,
> > > > > > > > > >
> > > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > > >
> > > > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > > vmlinux] Error 255
> > > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> >
> > this one was reported by Jesper and was fixed by upgrading pahole
> > that contains the new function generation fixes (v1.19)

It needs pahole 1.21 here, 1.19 was not sufficient. Even then it
regressed again after 5.12 on arm64:

LD vmlinux
ld: warning: -z relro ignored
BTFIDS vmlinux
FAILED unresolved symbol cubictcp_state
make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12.0.13670.g5e321ded302d/linux-5.12-13670-g5e321ded302d/Makefile:1196: vmlinux] Error 255
make: *** [../Makefile:215: __sub-make] Error 2

Any idea what might be wrong with arm64?

Thanks

Michal


Attachments:
(No filename) (1.92 kB)
vanilla (290.98 kB)
Download all attachments

2021-05-06 04:53:06

by Jiri Slaby

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On 05. 05. 21, 15:56, Michal Such?nek wrote:
> On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
>> On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
>>> On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
>>>>
>>>>
>>>> On 4/26/21 5:14 AM, Michal Such?nek wrote:
>>>>> On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
>>>>>> On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
>>>>>>> On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
>>>>>>>> On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
>>>>>>>>> On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 4/23/21 6:05 AM, Michal Such?nek wrote:
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I see this build error in linux-next (config attached).
>>>>>>>>>>>
>>>>>>>>>>> [ 4939s] LD vmlinux
>>>>>>>>>>> [ 4959s] BTFIDS vmlinux
>>>>>>>>>>> [ 4959s] FAILED unresolved symbol cubictcp_state
>>>>>>>>>>> [ 4960s] make[1]: ***
>>>>>>>>>>> [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
>>>>>>>>>>> vmlinux] Error 255
>>>>>>>>>>> [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
>>>
>>> this one was reported by Jesper and was fixed by upgrading pahole
>>> that contains the new function generation fixes (v1.19)
>
> It needs pahole 1.21 here, 1.19 was not sufficient. Even then it
> regressed again after 5.12 on arm64:

Could you try against devel:tools? I've removed the ftrace filter from
dwarves there (sr#890247 to factory).

> LD vmlinux
> ld: warning: -z relro ignored
> BTFIDS vmlinux
> FAILED unresolved symbol cubictcp_state
> make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12.0.13670.g5e321ded302d/linux-5.12-13670-g5e321ded302d/Makefile:1196: vmlinux] Error 255
> make: *** [../Makefile:215: __sub-make] Error 2
>
> Any idea what might be wrong with arm64?


--
js
suse labs

2021-05-06 05:33:17

by Martin KaFai Lau

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Thu, May 06, 2021 at 06:31:57AM +0200, Jiri Slaby wrote:
> On 05. 05. 21, 15:56, Michal Such?nek wrote:
> > On Mon, Apr 26, 2021 at 09:16:36PM +0200, Jiri Olsa wrote:
> > > On Mon, Apr 26, 2021 at 06:03:19PM +0200, Jiri Olsa wrote:
> > > > On Mon, Apr 26, 2021 at 08:41:49AM -0700, Yonghong Song wrote:
> > > > >
> > > > >
> > > > > On 4/26/21 5:14 AM, Michal Such?nek wrote:
> > > > > > On Mon, Apr 26, 2021 at 02:12:20PM +0200, Michal Such?nek wrote:
> > > > > > > On Mon, Apr 26, 2021 at 01:32:15PM +0200, Michal Such?nek wrote:
> > > > > > > > On Sun, Apr 25, 2021 at 01:15:45PM +0200, Michal Such?nek wrote:
> > > > > > > > > On Fri, Apr 23, 2021 at 07:55:28PM +0200, Michal Such?nek wrote:
> > > > > > > > > > On Fri, Apr 23, 2021 at 07:41:29AM -0700, Yonghong Song wrote:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On 4/23/21 6:05 AM, Michal Such?nek wrote:
> > > > > > > > > > > > Hello,
> > > > > > > > > > > >
> > > > > > > > > > > > I see this build error in linux-next (config attached).
> > > > > > > > > > > >
> > > > > > > > > > > > [ 4939s] LD vmlinux
> > > > > > > > > > > > [ 4959s] BTFIDS vmlinux
> > > > > > > > > > > > [ 4959s] FAILED unresolved symbol cubictcp_state
> > > > > > > > > > > > [ 4960s] make[1]: ***
> > > > > > > > > > > > [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12~rc8.next.20210422/linux-5.12-rc8-next-20210422/Makefile:1277:
> > > > > > > > > > > > vmlinux] Error 255
> > > > > > > > > > > > [ 4960s] make: *** [../Makefile:222: __sub-make] Error 2
> > > >
> > > > this one was reported by Jesper and was fixed by upgrading pahole
> > > > that contains the new function generation fixes (v1.19)
> >
> > It needs pahole 1.21 here, 1.19 was not sufficient. Even then it
> > regressed again after 5.12 on arm64:
>
> Could you try against devel:tools? I've removed the ftrace filter from
> dwarves there (sr#890247 to factory).
>
> > LD vmlinux
> > ld: warning: -z relro ignored
> > BTFIDS vmlinux
> > FAILED unresolved symbol cubictcp_state
> > make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12.0.13670.g5e321ded302d/linux-5.12-13670-g5e321ded302d/Makefile:1196: vmlinux] Error 255
> > make: *** [../Makefile:215: __sub-make] Error 2
> >
> > Any idea what might be wrong with arm64?
Can you also try this pahole patch which removes the ftrace filter:
https://lore.kernel.org/dwarves/[email protected]/

I have just cross compiled with aarch64-linux-gcc together with the
above pahole patch.

2021-05-06 05:56:10

by Jiri Slaby

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On 06. 05. 21, 6:31, Jiri Slaby wrote:
>>>> this one was reported by Jesper and was fixed by upgrading pahole
>>>> that contains the new function generation fixes (v1.19)
>>
>> It needs pahole 1.21 here, 1.19 was not sufficient. Even then it
>> regressed again after 5.12 on arm64:
>
> Could you try against devel:tools? I've removed the ftrace filter from
> dwarves there (sr#890247 to factory).

Yes, works for me.

>> ?? LD????? vmlinux
>> ld: warning: -z relro ignored
>> ?? BTFIDS? vmlinux
>> FAILED unresolved symbol cubictcp_state
>> make[1]: ***
>> [/home/abuild/rpmbuild/BUILD/kernel-vanilla-5.12.0.13670.g5e321ded302d/linux-5.12-13670-g5e321ded302d/Makefile:1196:
>> vmlinux] Error 255
>> make: *** [../Makefile:215: __sub-make] Error 2


--
js

2021-05-06 08:09:52

by Martin KaFai Lau

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Tue, May 04, 2021 at 08:41:47AM +0200, Jiri Slaby wrote:
> On 03. 05. 21, 12:08, Jiri Olsa wrote:
> > On Mon, May 03, 2021 at 10:59:44AM +0200, Jiri Slaby wrote:
> > > CCing pahole people.
> > >
> > > On 03. 05. 21, 9:59, Jiri Slaby wrote:
> > > > On 03. 05. 21, 8:11, Jiri Slaby wrote:
> > > > > > > > > > looks like vfs_truncate did not get into BTF data,
> > > > > > > > > > I'll try to reproduce
> > > > > >
> > > > > > _None_ of the functions are generated by pahole -J from
> > > > > > debuginfo on ppc64. debuginfo appears to be correct. Neither
> > > > > > pahole -J fs/open.o works correctly. collect_functions in
> > > > > > dwarves seems to be defunct on ppc64... "functions" array is
> > > > > > bogus (so find_function -- the bsearch -- fails).
> > > > >
> > > > > It's not that bogus. I forgot an asterisk:
> > > > > > #0? find_function (btfe=0x100269f80, name=0x10024631c
> > > > > > "stream_open") at
> > > > > > /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> > > > > > (gdb) p (*functions)@84
> > > > > > $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr
> > > > > > = 75232, size = 72, sh_addr = 65536, generated = false}, {
> > > > > > ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592,
> > > > > > size = 216, sh_addr = 65536, generated = false}, {
> > > > > > ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr =
> > > > > > 80816, size = 232, sh_addr = 65536, generated = false}, {
> > > > > > ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr =
> > > > > > 74304, size = 100, sh_addr = 65536, generated = false}, {
> > > > > ...
> > > > > > ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size =
> > > > > > 72, sh_addr = 65536, generated = false}, {
> > > > > ...
> > > > > > ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size =
> > > > > > 544, sh_addr = 65536, generated = false}}
> > > > >
> > > > > The dot makes the difference, of course. The question is why is it
> > > > > there? I keep looking into it. Only if someone has an immediate
> > > > > idea...
> > > >
> > > > Well, .vfs_truncate is in .text (and contains an ._mcount call). And
> > > > vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
> > > > excludes all functions without the ._mcount call, is_ftrace_func later
> > > > returns false for such functions and they are filtered before the BTF
> > > > processing.
> > > >
> > > > Technically, get_vmlinux_addrs looks at a list of functions between
> > > > __start_mcount_loc and __stop_mcount_loc and considers only the listed.
> > > >
> > > > I don't know what the correct fix is (exclude .opd functions from the
> > > > filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
> > > > this too.
> > >
> > > Attaching a patch for pahole which fixes the issue, but I have no idea
> > > whether it is the right fix at all.
> >
> > hi,
> > we're considering to disable ftrace filter completely,
> > I guess that would solve this issue for ppc as well
> >
> > https://lore.kernel.org/bpf/[email protected]/
>
> Right, the attached patch fixes it for me too.
Ah, I just noticed the attachment while replying an earlier message in
this thread.

Please feel free to add SOB to mine or
repost yours and toss mine. Either way works for me.

2021-05-06 09:21:26

by Michal Suchánek

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Thu, May 06, 2021 at 07:54:27AM +0200, Jiri Slaby wrote:
> On 06. 05. 21, 6:31, Jiri Slaby wrote:
> > > > > this one was reported by Jesper and was fixed by upgrading pahole
> > > > > that contains the new function generation fixes (v1.19)
> > >
> > > It needs pahole 1.21 here, 1.19 was not sufficient. Even then it
> > > regressed again after 5.12 on arm64:
> >
> > Could you try against devel:tools? I've removed the ftrace filter from
> > dwarves there (sr#890247 to factory).
>
> Yes, works for me.
Yes, that fixes the problem with 5.13 rc

Thanks

Michal

2021-05-06 13:21:56

by Jiri Olsa

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

On Wed, May 05, 2021 at 10:31:52PM -0700, Martin KaFai Lau wrote:
> On Tue, May 04, 2021 at 08:41:47AM +0200, Jiri Slaby wrote:
> > On 03. 05. 21, 12:08, Jiri Olsa wrote:
> > > On Mon, May 03, 2021 at 10:59:44AM +0200, Jiri Slaby wrote:
> > > > CCing pahole people.
> > > >
> > > > On 03. 05. 21, 9:59, Jiri Slaby wrote:
> > > > > On 03. 05. 21, 8:11, Jiri Slaby wrote:
> > > > > > > > > > > looks like vfs_truncate did not get into BTF data,
> > > > > > > > > > > I'll try to reproduce
> > > > > > >
> > > > > > > _None_ of the functions are generated by pahole -J from
> > > > > > > debuginfo on ppc64. debuginfo appears to be correct. Neither
> > > > > > > pahole -J fs/open.o works correctly. collect_functions in
> > > > > > > dwarves seems to be defunct on ppc64... "functions" array is
> > > > > > > bogus (so find_function -- the bsearch -- fails).
> > > > > >
> > > > > > It's not that bogus. I forgot an asterisk:
> > > > > > > #0? find_function (btfe=0x100269f80, name=0x10024631c
> > > > > > > "stream_open") at
> > > > > > > /usr/src/debug/dwarves-1.21-1.1.ppc64/btf_encoder.c:350
> > > > > > > (gdb) p (*functions)@84
> > > > > > > $5 = {{name = 0x7ffff68e0922 ".__se_compat_sys_ftruncate", addr
> > > > > > > = 75232, size = 72, sh_addr = 65536, generated = false}, {
> > > > > > > ??? name = 0x7ffff68e019e ".__se_compat_sys_open", addr = 80592,
> > > > > > > size = 216, sh_addr = 65536, generated = false}, {
> > > > > > > ??? name = 0x7ffff68e0076 ".__se_compat_sys_openat", addr =
> > > > > > > 80816, size = 232, sh_addr = 65536, generated = false}, {
> > > > > > > ??? name = 0x7ffff68e0908 ".__se_compat_sys_truncate", addr =
> > > > > > > 74304, size = 100, sh_addr = 65536, generated = false}, {
> > > > > > ...
> > > > > > > ??? name = 0x7ffff68e0808 ".stream_open", addr = 65824, size =
> > > > > > > 72, sh_addr = 65536, generated = false}, {
> > > > > > ...
> > > > > > > ??? name = 0x7ffff68e0751 ".vfs_truncate", addr = 73392, size =
> > > > > > > 544, sh_addr = 65536, generated = false}}
> > > > > >
> > > > > > The dot makes the difference, of course. The question is why is it
> > > > > > there? I keep looking into it. Only if someone has an immediate
> > > > > > idea...
> > > > >
> > > > > Well, .vfs_truncate is in .text (and contains an ._mcount call). And
> > > > > vfs_truncate is in .opd (w/o an ._mcount call). Since setup_functions
> > > > > excludes all functions without the ._mcount call, is_ftrace_func later
> > > > > returns false for such functions and they are filtered before the BTF
> > > > > processing.
> > > > >
> > > > > Technically, get_vmlinux_addrs looks at a list of functions between
> > > > > __start_mcount_loc and __stop_mcount_loc and considers only the listed.
> > > > >
> > > > > I don't know what the correct fix is (exclude .opd functions from the
> > > > > filter?). Neither why cross compiler doesn't fail, nor why ebi v2 avoids
> > > > > this too.
> > > >
> > > > Attaching a patch for pahole which fixes the issue, but I have no idea
> > > > whether it is the right fix at all.
> > >
> > > hi,
> > > we're considering to disable ftrace filter completely,
> > > I guess that would solve this issue for ppc as well
> > >
> > > https://lore.kernel.org/bpf/[email protected]/
> >
> > Right, the attached patch fixes it for me too.
> Ah, I just noticed the attachment while replying an earlier message in
> this thread.
>
> Please feel free to add SOB to mine or
> repost yours and toss mine. Either way works for me.
>

I think this patch is missing the same removal I just commented
on your patch.. either way is ok for me

jirka

2021-05-07 07:55:52

by Florian Weimer

[permalink] [raw]
Subject: Re: linux-next failing build due to missing cubictcp_state symbol

* Jiri Slaby:

> The dot makes the difference, of course. The question is why is it
> there? I keep looking into it. Only if someone has an immediate
> idea...

We see the failure on aarch64 as well, with 8404c9fbc84b741
(from Linus' tree).

As far as I can tell, the core issue is that BTF_ID is applied to a
symbol which is defined as static on the C side (and even in a different
translation unit, but this aspect doesn't really matter). The compiler
can and will change symbol names, calling conventions and data layout
for static functions/variables, so this is never going to work reliably.
It is possible to inhibit these optimizations by using __attribute__
((used)). But I'm pretty sure that BTF generation fails to work
properly if there are symbol name collisions, so I think it's better to
drop the static and rely on duplicate symbol checks from the linker
(which of course does not happen for C entities declared static).

Thanks,
Florian