Skip to content

TOOL-28331 kernel module builds fail in install_kernel_headers_and_dbgsyms #362

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

sebroy
Copy link
Contributor

@sebroy sebroy commented Jul 25, 2025

If we look at the most recent failed jobs to update the linux-kernel-generic package: https://ops-jenkins.eng-tools-prd.aws.delphixcloud.com/job/linux-pkg/job/develop/job/update-package/job/linux-kernel-generic/234/
The merge itself is clean, but what's failing is the zfs and connstat package builds that are done as part of validating the kernel build. If we look at that connstat build as an example (https://ops-jenkins.eng-tools-prd.aws.delphixcloud.com/job/linux-pkg/job/develop/job/build-package/job/connstat/job/pre-push/362/console), we see it fails with:

05:35:16  Running: sudo ln -s /usr/lib/debug/boot/vmlinux-6.8.0-64-dx2025072406-c2367a020-generic /usr/src/linux-headers-6.8.0-64-dx2025072406-c2367a020-generic/vmlinux
05:35:16  Running: sudo ln -s /usr/lib/debug/boot/vmlinux-6.8.0-1031-dx2025070117-7d1cf60e8-aws /usr/src/linux-headers-6.8.0-1031-dx2025070117-7d1cf60e8-aws/vmlinux
05:35:16  ln: failed to create symbolic link '/usr/src/linux-headers-6.8.0-1031-dx2025070117-7d1cf60e8-aws/vmlinux': File exists
05:35:16  Error: failed command 'sudo ln -s /usr/lib/debug/boot/vmlinux-6.8.0-1031-dx2025070117-7d1cf60e8-aws /usr/src/linux-headers-6.8.0-1031-dx2025070117-7d1cf60e8-aws/vmlinux'

The zfs build fails the same way.

The code that issues that ln -s call is the install_kernel_headers_and_dbgsyms() function in linux-pkg's lib/common.sh file:

function install_kernel_headers_and_dbgsyms() {
        logmust install_kernel_headers
        logmust install_kernel_dbgsyms

        #
        # Additionally, we add these symlinks so that kernel module builds will
        # be able to generate BTF information, as they look for the "vmlinux" file
        # in the kernel header directory.
        #
        local kernel
        for kernel in $KERNEL_VERSIONS; do
                logmust sudo ln -s "/usr/lib/debug/boot/vmlinux-$kernel" "/usr/src/linux-headers-$kernel/vmlinux"
        done
}

The problem is that we’re building on AWS, and the VM that the build runs on has a pre-existing link created by appliance-build when that base image was created. The linux-pkg code should use ln -sf to overwrite that link.

Testing

ab-pre-push: https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/11758/
The above was run from the linux-pkg repo as git ab-pre-push -b connstat to show a successfull connstat module build.

@sebroy sebroy force-pushed the dlpx/pr/sebroy/2529d0a7-240b-415f-9879-02ca8273b7e8 branch from f4525bd to 68b7aca Compare July 25, 2025 01:33
@sebroy sebroy marked this pull request as ready for review July 25, 2025 01:43
@sebroy sebroy requested a review from mszak-perforce July 25, 2025 13:42
Copy link

@mszak-perforce mszak-perforce left a comment

Choose a reason for hiding this comment

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

Looks good.

@sebroy sebroy merged commit a5e6015 into develop Jul 25, 2025
12 checks passed
@sebroy sebroy deleted the dlpx/pr/sebroy/2529d0a7-240b-415f-9879-02ca8273b7e8 branch July 25, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants