Skip to content

docker: add dwarves package for pahole tool#1158

Merged
gctucker merged 1 commit intokernelci:mainfrom
nuclearcat:PAHOLE-add-dwarves-package
Aug 18, 2022
Merged

docker: add dwarves package for pahole tool#1158
gctucker merged 1 commit intokernelci:mainfrom
nuclearcat:PAHOLE-add-dwarves-package

Conversation

@nuclearcat
Copy link
Copy Markdown
Member

As reported in maillist https://groups.io/g/kernelci/message/1489 recent builds are failing,
because pahole tool is missing.
This patch add required support and tested locally.

Signed-off-by: Denys Fedoryshchenko denys.f@collabora.com

@nuclearcat nuclearcat added the staging-skip Don't test automatically on staging.kernelci.org label Apr 30, 2022
@nuclearcat
Copy link
Copy Markdown
Member Author

There is one concern remains, build of mentioned android package with clang and pahole available generate around 819Mbyte of verbose log. I am adding staging-skip label "just in case", as i am not sure our build system is ready for such surprise.
I will test several other builds and might add dwarves in other packages.

@nuclearcat nuclearcat force-pushed the PAHOLE-add-dwarves-package branch from 13f06ae to 996c03a Compare April 30, 2022 08:57
@nuclearcat
Copy link
Copy Markdown
Member Author

Also spotted one more missing package:

WARN: multiple IDs found for 'pt_regs': 3, 3314001 - using 3
/bin/sh: 1: lz4: not found
make[3]: *** [/root/kernelci-quickstart/kernelci-core/linux-x86/arch/x86/boot/compressed/Makefile:137: arch/x86/boot/compressed/vmlinux.bin.lz4] Error 127

Adding lz4 and retesting

@nuclearcat nuclearcat force-pushed the PAHOLE-add-dwarves-package branch from 996c03a to bd58f0a Compare April 30, 2022 20:14
@nuclearcat
Copy link
Copy Markdown
Member Author

lz4 required in clang packages, but not gcc

@nuclearcat nuclearcat marked this pull request as ready for review May 2, 2022 07:50
@gctucker gctucker requested a review from a team May 2, 2022 08:08
@gctucker
Copy link
Copy Markdown
Collaborator

gctucker commented May 2, 2022

@nuclearcat Maybe the staging-skip label can be dropped now, unless there's more known issues to fix?

@nuclearcat
Copy link
Copy Markdown
Member Author

Sure, just i kept it over weekend as clang with pahole generate big amount of logs (and i dont want to make issues at weekend).

@nuclearcat nuclearcat removed the staging-skip Don't test automatically on staging.kernelci.org label May 2, 2022
@nuclearcat
Copy link
Copy Markdown
Member Author

It looks like except memory consumption issue discussed on IRC (LTO option require around 16-18Gb of RAM during linking, and we have only 4Gb on builders), manual tests are ok, but i am failing (likely due OOM) to build on staging, for example https://bot.staging.kernelci.org/job/kernel-build/64062/console

@nuclearcat
Copy link
Copy Markdown
Member Author

Thats interesting, job stopped at:

../scripts/link-vmlinux.sh: 51: python: not found

I will add python to list of packages

@nuclearcat nuclearcat force-pushed the PAHOLE-add-dwarves-package branch from bd58f0a to 4bc7c68 Compare May 6, 2022 14:26
Comment thread config/docker/clang-15/Dockerfile Outdated
Comment thread config/docker/gcc-10_arm64/Dockerfile
@gctucker gctucker self-assigned this May 6, 2022
@nuclearcat nuclearcat force-pushed the PAHOLE-add-dwarves-package branch 2 times, most recently from 1931c0b to 272b894 Compare May 9, 2022 06:26
@gctucker
Copy link
Copy Markdown
Collaborator

Is this working now? I believe you said there was still an issue but I don't remember what it was.

@nuclearcat
Copy link
Copy Markdown
Member Author

nuclearcat commented May 18, 2022

Sorry for delay, not yet, as we have some objects generated and hit another issue, probably size limitation during objects upload.
I will try to run jenkins job and in parallel will do manual build to investigate more

@nuclearcat nuclearcat added the staging-skip Don't test automatically on staging.kernelci.org label Jun 21, 2022
@nuclearcat nuclearcat force-pushed the PAHOLE-add-dwarves-package branch 2 times, most recently from 8e0f19b to cd9caa5 Compare June 30, 2022 07:10
As reported in maillist https://groups.io/g/kernelci/message/1489 recent builds are failing,
because pahole tool is missing.
Also during test builds i found that lz4 and python required too.
This patch add required packages and tested locally.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat nuclearcat force-pushed the PAHOLE-add-dwarves-package branch from cd9caa5 to a600345 Compare June 30, 2022 07:12
@nuclearcat nuclearcat removed the staging-skip Don't test automatically on staging.kernelci.org label Jul 8, 2022
@nuclearcat
Copy link
Copy Markdown
Member Author

After adding missing tools by this PR we able to compile gki_defconfig now (it is using kernelci/staging-clang-15 ):
https://bot.staging.kernelci.org/job/denysf/job/df-main-kernel-build/12/console

Comment on lines +15 to +16
python3 \
python
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me why this is needed in the Clang images and not the GCC ones.

@gctucker
Copy link
Copy Markdown
Collaborator

Thats interesting, job stopped at:

../scripts/link-vmlinux.sh: 51: python: not found

I will add python to list of packages

Which kernel revision were you building? I don't see python mentioned anywhere in link-vmlinux.sh on linux-next.

@nuclearcat
Copy link
Copy Markdown
Member Author

@nuclearcat
Copy link
Copy Markdown
Member Author

AS i noticed inside there is:

# Generate a linker script to ensure correct ordering of initcalls.
gen_initcalls()
{
        info GEN .tmp_initcalls.lds
        
        ${PYTHON} ${srctree}/scripts/jobserver-exec             \
        ${PERL} ${srctree}/scripts/generate_initcall_order.pl   \
                ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}   \
                > .tmp_initcalls.lds
}

@gctucker
Copy link
Copy Markdown
Collaborator

Kernels from https://storage.kernelci.org/android/android13-5.15/ASB-2022-08-05_13-5.15-8-g5d05a30e879f1/linux-src_android13-5.15.tar.gz and probably tried another versions.

If this is only in the Android tree then we're not going to fix it. KernelCI is about testing upstream kernels.

Maybe we should talk to the Android team and set up android.kenelci.org (like it has been suggested for a few years already) to cover specific needs for Android kernels. But it doesn't seem like a good idea to bloat the Docker images used to build upstream kernels with tools for Android downstream branches.

@nuclearcat
Copy link
Copy Markdown
Member Author

As far as i see such fragment present also in vanilla kernels, just checked scripts/link-vmlinux.sh in 5.15 now.

@gctucker
Copy link
Copy Markdown
Collaborator

AS i noticed inside there is:

# Generate a linker script to ensure correct ordering of initcalls.
gen_initcalls()
{
        info GEN .tmp_initcalls.lds
        
        ${PYTHON} ${srctree}/scripts/jobserver-exec             \
        ${PERL} ${srctree}/scripts/generate_initcall_order.pl   \
                ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}   \
                > .tmp_initcalls.lds
}

That's not upstream, is it? Please be more precise about where you're quoting things from.

@nuclearcat
Copy link
Copy Markdown
Member Author

@gctucker
Copy link
Copy Markdown
Collaborator

Upstream, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/link-vmlinux.sh?h=v5.15#n45 5.15.x kernel tree

Right, and that got removed recently (well moved to another file) by 5d45950dfbb1540bba3e3762a3497de8b4a715d3.

@gctucker
Copy link
Copy Markdown
Collaborator

OK so gki_defconfig enables the DEBUG_INFO_BTF config which requires the pahole tool which is part of the dwarves package in Debian. So that explains why we would add dwarves everywhere.

I'm not sure about the lz4 and python / python3 part specific to Clang though.

@nuclearcat
Copy link
Copy Markdown
Member Author

Mostly because i tested it with clang only, probably i should test with gcc, likely it is required there too. I will do that tomorrow.

@gctucker
Copy link
Copy Markdown
Collaborator

OK thanks. As discussed earlier today, I think we can merge this now and get the extra packages added to the base/host-tools.jinja2 template with the new Docker config to test it there directly.

@gctucker gctucker merged commit 1354d1c into kernelci:main Aug 18, 2022
@gctucker
Copy link
Copy Markdown
Collaborator

@nuclearcat BTW you can't build gki_defconfig with GCC as far as I remember, so just building a kernel with DEBUG_INFO_BTF turned on by hand should be enough to check things aren't completely broken.

nuclearcat added a commit to nuclearcat/kernelci-core that referenced this pull request Aug 24, 2022
As in kernelci#1158 we need
to add several packages to be able run pahole and other tools,
which is required to complete gki_defconfig build.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
mgalka pushed a commit that referenced this pull request Aug 31, 2022
As in #1158 we need
to add several packages to be able run pahole and other tools,
which is required to complete gki_defconfig build.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants