Skip to content

Update gdb to 15.1 (by compiling from sources)#66494

Merged
alexey-milovidov merged 5 commits intoClickHouse:masterfrom
azat:gdb-image
Aug 12, 2024
Merged

Update gdb to 15.1 (by compiling from sources)#66494
alexey-milovidov merged 5 commits intoClickHouse:masterfrom
azat:gdb-image

Conversation

@azat
Copy link
Copy Markdown
Member

@azat azat commented Jul 14, 2024

Right now there are couple of gdb bugs that makes CI unstable:

But ubuntu 22.04 does not have 14+ anywhere, the
~ubuntu-toolchain-r/test contains only gdb 13, so there is no other
options except for compiling it from sources.

But there also other reasons to update it - optimizations, looks like
older gdb versions does not use index fully - 5.6sec vs 56sec:

# 15.1
$ time command gdb -batch -ex 'disas main' clickhouse
...
real    0m5.692s
user    0m29.948s
sys     0m1.190s

# 12.1 (from ubuntu 22.04)
real    0m56.709s
user    0m59.307s
sys     0m0.585s

Also note, that we cannot compile gdb in the fasttest (that contains
compiler) since some images does not includes full toolchain, for
instance gdb is added in the following images:

  • test-util -> test-base -> lots of other images (no toolchain)
  • performance-comparison (no toolchain)
  • integration-test (no toolchain)
  • integration-tests-runner (no toolchain)

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Update gdb to 15.1 (by compiling from sources)

Fixes: #66487
Fixes: #62633

@azat azat marked this pull request as draft July 14, 2024 13:49
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hence a draft for now

@robot-ch-test-poll4
Copy link
Copy Markdown
Contributor

robot-ch-test-poll4 commented Jul 14, 2024

This is an automated comment for commit 5390d1b with description of existing statuses. It's updated for the latest CI running

✅ Click here to open a full report in a separate page

Successful checks
Check nameDescriptionStatus
AST fuzzerRuns randomly generated queries to catch program errors. The build type is optionally given in parenthesis. If it fails, ask a maintainer for help✅ success
BuildsThere's no description for the check yet, please add it to tests/ci/ci_config.py:CHECK_DESCRIPTIONS✅ success
ClickBenchRuns [ClickBench](https://github.com/ClickHouse/ClickBench/) with instant-attach table✅ success
Compatibility checkChecks that clickhouse binary runs on distributions with old libc versions. If it fails, ask a maintainer for help✅ success
Docker keeper imageThe check to build and optionally push the mentioned image to docker hub✅ success
Docker server imageThe check to build and optionally push the mentioned image to docker hub✅ success
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here✅ success
Flaky testsChecks if new added or modified tests are flaky by running them repeatedly, in parallel, with more randomization. Functional tests are run 100 times with address sanitizer, and additional randomization of thread scheduling. Integration tests are run up to 10 times. If at least once a new test has failed, or was too long, this check will be red. We don't allow flaky tests, read the doc✅ success
Install packagesChecks that the built packages are installable in a clear environment✅ success
Integration testsThe integration tests report. In parenthesis the package type is given, and in square brackets are the optional part/total tests✅ success
Performance ComparisonMeasure changes in query performance. The performance test report is described in detail here. In square brackets are the optional part/total tests✅ success
Push to DockerhubThe check for building and pushing the CI related docker images to docker hub✅ success
Stateful testsRuns stateful functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stateless testsRuns stateless functional tests for ClickHouse binaries built in various configurations -- release, debug, with sanitizers, etc✅ success
Stress testRuns stateless functional tests concurrently from several clients to detect concurrency-related errors✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Unit testsRuns the unit tests for different release types✅ success
Upgrade checkRuns stress tests on server version from last release and then tries to upgrade it to the version from the PR. It checks if the new server can successfully startup without any errors, crashes or sanitizer asserts✅ success

@nikitamikhaylov
Copy link
Copy Markdown
Member

What do we think about using LLDB instead of GDB?

@azat
Copy link
Copy Markdown
Member Author

azat commented Jul 16, 2024

What do we think about using LLDB instead of GDB?

It is an option, but apart from couple of small code issues there is one bug in lldb, that cannot unwind from signal handlers properly, that has been fixed only llvm/llvm-project#92291

azat added 4 commits August 6, 2024 16:25
Right now there are couple of gdb bugs that makes CI unstable:
- https://sourceware.org/bugzilla/show_bug.cgi?id=29185
- https://bugzilla.redhat.com/show_bug.cgi?id=1492496

But ubuntu 22.04 does not have 14+ anywhere, the
~ubuntu-toolchain-r/test contains only gdb 13, so there is no other
options except for compiling it from sources.

But there also other reasons to update it - optimizations, looks like
older gdb versions does not use index fully - 5.6sec vs 56sec:

    # 15.1
    $ time command gdb -batch -ex 'disas main' clickhouse
    ...
    real    0m5.692s
    user    0m29.948s
    sys     0m1.190s

    # 12.1 (from ubuntu 22.04)
    real    0m56.709s
    user    0m59.307s
    sys     0m0.585s

Also note, that we cannot compile gdb in the fasttest (that contains
compiler) since some images does not includes full toolchain, for
instance gdb is added in the following images:
- test-util -> test-base -> lots of other images (no toolchain)
- performance-comparison (no toolchain)
- integration-test (no toolchain)
- integration-tests-runner (no toolchain)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
@azat azat marked this pull request as ready for review August 7, 2024 07:40
@azat
Copy link
Copy Markdown
Member Author

azat commented Aug 7, 2024

Now it works as expected - and it should fix gdb related issues on CI. Can someone please take a look?

@azat
Copy link
Copy Markdown
Member Author

azat commented Aug 7, 2024

There are some timeouts on CI, I think gdb could be related (though it is not 100% since no artifacts captured) - #67960 (comment)

So it will be nice if someone can take a look

@maxknv
Copy link
Copy Markdown
Member

maxknv commented Aug 11, 2024

LGTM. new images are just 100-200MB heavier

@maxknv maxknv self-requested a review August 11, 2024 09:08
@alexey-milovidov alexey-milovidov added this pull request to the merge queue Aug 12, 2024
Merged via the queue into ClickHouse:master with commit 2a12604 Aug 12, 2024
@azat azat deleted the gdb-image branch August 12, 2024 06:37
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍃 green ci 🌿 Fixing flaky tests in CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gdb: Exception ignored in: <gdb._GdbOutputFile>: KeyboardInterrupt gdb: Assertion `closure->pieces.size () == 1' failed

7 participants