Skip to content

[feature](k8s) enable ddc debug - #59292

Merged
hello-stephen merged 1 commit into
apache:masterfrom
catpineapple:ddc-debug
Dec 24, 2025
Merged

hello-stephen merged 1 commit into
apache:masterfrom
catpineapple:ddc-debug

Conversation

@catpineapple

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions Bot added approved Indicates a PR has been approved by one committer. reviewed labels Dec 24, 2025
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@hello-stephen

Copy link
Copy Markdown
Contributor

skip buildall

@hello-stephen
hello-stephen merged commit 8bc93bf into apache:master Dec 24, 2025
29 of 30 checks passed
@catpineapple
catpineapple deleted the ddc-debug branch January 4, 2026 07:53
jayakasadev added a commit to jayakasadev/doris that referenced this pull request Sep 22, 2026
…ase image

### What problem does this PR solve?

Issue Number: none

Related PR: none

Problem Summary:

`trivy image apache/doris:fe-4.1.4` reports 59 CRITICAL findings, and 54 of them
are Linux kernel CVEs attributed to two packages that the runtime image has no
reason to carry:

```
linux-libc-dev     5.15.0-164.174  27 CRITICAL (6 with no fixed version)
linux-tools-common 5.15.0-164.174  27 CRITICAL (6 with no fixed version)
```

The same 54 appear in be-4.1.4 (62 total) and ms-4.1.4 (57 total).

Root cause in code: three entries of the base image's apt list pull them in
transitively. Verified by `apt-get install -s` on ubuntu:22.04:

- `linux-tools-realtime` -> `linux-tools-common`
- `libperl-dev`          -> `linux-libc-dev` + `libc6-dev`
- `python2-dev`          -> `linux-libc-dev` + `libc6-dev`

These packages are built from the `linux` and `glibc` source packages, so Ubuntu
maps every kernel CVE onto them, but they ship only UAPI headers and perf wrapper
scripts. The vulnerable code runs in the host kernel, which a container image
cannot patch or worsen, so the findings are not actionable inside the image. Six
of them have no fixed version at all, so an `apt upgrade` can never clear the
count - only removing the packages does.

What the removed packages provided:

- `linux-tools-realtime` existed solely for the `/usr/bin/perf` symlink, and
  `bpfcc-tools` + `linux-headers-realtime` for BCC. Both are host-kernel-coupled:
  they need `--privileged` and a kernel matching the headers baked into the image
  to work at all, so a debug sidecar sharing the target pod's namespaces is the
  correct way to run them.
- `libperl-dev` and `python2-dev` had no runtime consumer. `google-pprof` is a
  perl script and runs on the base perl interpreter; verified `pprof --version`
  still works in the rebuilt image. python2 is EOL and unused.

End-to-end result, building the base image before and after (linux/arm64):

- before: 54 CRITICAL from the two kernel packages
- after:  0 CRITICAL from them; the rebuilt base image reports 2 CRITICAL, both
  CVE-2025-68121 in the Go stdlib of the `doris-debug`/`dorisctl` binaries copied
  from `apache/doris:debug-latest`, which is a separate image outside this repo

Verified the surviving tooling in the rebuilt image: `pprof`, `gdb`, `mysql`
client, JDK 17, and the `dorisctl`/`doris-debug` binaries, plus that no
`linux-libc-dev`/`linux-tools-common`/`libc6-dev` remain installed.

The base image tag moves to `base-6.1` and the fe/be/ms Dockerfiles are updated
in lockstep, matching how apache#59292 moved base-5.0 -> base-6.0.

### Release note

Removed kernel-header and -dev packages (`linux-tools-realtime`, `bpfcc-tools`,
`linux-headers-realtime`, `libperl-dev`, `python2-dev`) from the Doris runtime
base image, eliminating 54 non-actionable CRITICAL CVE findings per image. `perf`
and the BCC tools are no longer present; run them from a debug sidecar sharing
the target container's namespaces instead. `pprof`, `gdb`, and `strace` are
unaffected.

### Check List (For Author)

- Test: Manual test - built `Dockerfile_base` for linux/arm64 before and after,
  scanned both with trivy to confirm the 54 kernel-package criticals are gone,
  and smoke-tested `pprof`, `gdb`, `mysql`, JDK 17, and the debug binaries in the
  rebuilt image. Also confirmed the transitive pull-in attribution with
  `apt-get install -s` per package. No regression test applies: this repo has no
  CI that builds the runtime images.
- Behavior changed: Yes - `perf` and the BCC tools are no longer shipped in the
  runtime image, for the reasons above.
- Does this need documentation: No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants