Skip to content

Commit 32ed319

Browse files
committed
Merge branch 'master' of github.com:ClickHouse/ClickHouse into variant-bool-parsing
2 parents 3e208e4 + 5a030f8 commit 32ed319

File tree

524 files changed

+13088
-12460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

524 files changed

+13088
-12460
lines changed

.github/workflows/master.yml

Lines changed: 260 additions & 184 deletions
Large diffs are not rendered by default.

.github/workflows/nightly.yml

Lines changed: 0 additions & 91 deletions
This file was deleted.
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
# generated by praktika
2+
3+
name: NightlyFuzzers
4+
on:
5+
schedule:
6+
- cron: 13 3 * * *
7+
workflow_dispatch:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}
11+
12+
env:
13+
PYTHONUNBUFFERED: 1
14+
CHECKOUT_REF: ""
15+
16+
jobs:
17+
18+
config_workflow:
19+
runs-on: [self-hosted, style-checker-aarch64]
20+
needs: []
21+
name: "Config Workflow"
22+
outputs:
23+
data: ${{ steps.run.outputs.DATA }}
24+
steps:
25+
- name: Checkout code
26+
uses: actions/checkout@v4
27+
with:
28+
ref: ${{ env.CHECKOUT_REF }}
29+
30+
- name: Prepare env script
31+
run: |
32+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
33+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
34+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
35+
export PYTHONPATH=./ci:.:
36+
cat > ./ci/tmp/workflow_config_nightlyfuzzers.json << 'EOF'
37+
${{ needs.config_workflow.outputs.data }}
38+
EOF
39+
cat > ./ci/tmp/workflow_status.json << 'EOF'
40+
${{ toJson(needs) }}
41+
EOF
42+
ENV_SETUP_SCRIPT_EOF
43+
44+
- name: Run
45+
id: run
46+
run: |
47+
. ./ci/tmp/praktika_setup_env.sh
48+
set -o pipefail
49+
if command -v ts &> /dev/null; then
50+
python3 -m praktika run 'Config Workflow' --workflow "NightlyFuzzers" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
51+
else
52+
python3 -m praktika run 'Config Workflow' --workflow "NightlyFuzzers" --ci |& tee ./ci/tmp/job.log
53+
fi
54+
55+
dockers_build_arm:
56+
runs-on: [self-hosted, style-checker-aarch64]
57+
needs: [config_workflow]
58+
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).cache_success_base64, 'RG9ja2VycyBCdWlsZCAoYXJtKQ==') }}
59+
name: "Dockers Build (arm)"
60+
outputs:
61+
data: ${{ steps.run.outputs.DATA }}
62+
steps:
63+
- name: Checkout code
64+
uses: actions/checkout@v4
65+
with:
66+
ref: ${{ env.CHECKOUT_REF }}
67+
68+
- name: Prepare env script
69+
run: |
70+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
71+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
72+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
73+
export PYTHONPATH=./ci:.:
74+
cat > ./ci/tmp/workflow_config_nightlyfuzzers.json << 'EOF'
75+
${{ needs.config_workflow.outputs.data }}
76+
EOF
77+
cat > ./ci/tmp/workflow_status.json << 'EOF'
78+
${{ toJson(needs) }}
79+
EOF
80+
ENV_SETUP_SCRIPT_EOF
81+
82+
- name: Run
83+
id: run
84+
run: |
85+
. ./ci/tmp/praktika_setup_env.sh
86+
set -o pipefail
87+
if command -v ts &> /dev/null; then
88+
python3 -m praktika run 'Dockers Build (arm)' --workflow "NightlyFuzzers" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
89+
else
90+
python3 -m praktika run 'Dockers Build (arm)' --workflow "NightlyFuzzers" --ci |& tee ./ci/tmp/job.log
91+
fi
92+
93+
dockers_build_amd_and_merge:
94+
runs-on: [self-hosted, style-checker]
95+
needs: [config_workflow, dockers_build_arm]
96+
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).cache_success_base64, 'RG9ja2VycyBCdWlsZCAoYW1kKSBhbmQgTWVyZ2U=') }}
97+
name: "Dockers Build (amd) and Merge"
98+
outputs:
99+
data: ${{ steps.run.outputs.DATA }}
100+
steps:
101+
- name: Checkout code
102+
uses: actions/checkout@v4
103+
with:
104+
ref: ${{ env.CHECKOUT_REF }}
105+
106+
- name: Prepare env script
107+
run: |
108+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
109+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
110+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
111+
export PYTHONPATH=./ci:.:
112+
cat > ./ci/tmp/workflow_config_nightlyfuzzers.json << 'EOF'
113+
${{ needs.config_workflow.outputs.data }}
114+
EOF
115+
cat > ./ci/tmp/workflow_status.json << 'EOF'
116+
${{ toJson(needs) }}
117+
EOF
118+
ENV_SETUP_SCRIPT_EOF
119+
120+
- name: Run
121+
id: run
122+
run: |
123+
. ./ci/tmp/praktika_setup_env.sh
124+
set -o pipefail
125+
if command -v ts &> /dev/null; then
126+
python3 -m praktika run 'Dockers Build (amd) and Merge' --workflow "NightlyFuzzers" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
127+
else
128+
python3 -m praktika run 'Dockers Build (amd) and Merge' --workflow "NightlyFuzzers" --ci |& tee ./ci/tmp/job.log
129+
fi
130+
131+
build_fuzzers:
132+
runs-on: [self-hosted, builder-aarch64]
133+
needs: [config_workflow, dockers_build_amd_and_merge]
134+
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).cache_success_base64, 'QnVpbGQgKGZ1enplcnMp') }}
135+
name: "Build (fuzzers)"
136+
outputs:
137+
data: ${{ steps.run.outputs.DATA }}
138+
steps:
139+
- name: Checkout code
140+
uses: actions/checkout@v4
141+
with:
142+
ref: ${{ env.CHECKOUT_REF }}
143+
144+
- name: Prepare env script
145+
run: |
146+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
147+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
148+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
149+
export PYTHONPATH=./ci:.:
150+
cat > ./ci/tmp/workflow_config_nightlyfuzzers.json << 'EOF'
151+
${{ needs.config_workflow.outputs.data }}
152+
EOF
153+
cat > ./ci/tmp/workflow_status.json << 'EOF'
154+
${{ toJson(needs) }}
155+
EOF
156+
ENV_SETUP_SCRIPT_EOF
157+
158+
- name: Run
159+
id: run
160+
run: |
161+
. ./ci/tmp/praktika_setup_env.sh
162+
set -o pipefail
163+
if command -v ts &> /dev/null; then
164+
python3 -m praktika run 'Build (fuzzers)' --workflow "NightlyFuzzers" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
165+
else
166+
python3 -m praktika run 'Build (fuzzers)' --workflow "NightlyFuzzers" --ci |& tee ./ci/tmp/job.log
167+
fi
168+
169+
libfuzzer_tests:
170+
runs-on: [self-hosted, func-tester]
171+
needs: [config_workflow, dockers_build_amd_and_merge, build_fuzzers]
172+
if: ${{ !failure() && !cancelled() && !contains(fromJson(needs.config_workflow.outputs.data).cache_success_base64, 'bGliRnV6emVyIHRlc3Rz') }}
173+
name: "libFuzzer tests"
174+
outputs:
175+
data: ${{ steps.run.outputs.DATA }}
176+
steps:
177+
- name: Checkout code
178+
uses: actions/checkout@v4
179+
with:
180+
ref: ${{ env.CHECKOUT_REF }}
181+
182+
- name: Prepare env script
183+
run: |
184+
rm -rf ./ci/tmp ./ci/tmp ./ci/tmp
185+
mkdir -p ./ci/tmp ./ci/tmp ./ci/tmp
186+
cat > ./ci/tmp/praktika_setup_env.sh << 'ENV_SETUP_SCRIPT_EOF'
187+
export PYTHONPATH=./ci:.:
188+
cat > ./ci/tmp/workflow_config_nightlyfuzzers.json << 'EOF'
189+
${{ needs.config_workflow.outputs.data }}
190+
EOF
191+
cat > ./ci/tmp/workflow_status.json << 'EOF'
192+
${{ toJson(needs) }}
193+
EOF
194+
ENV_SETUP_SCRIPT_EOF
195+
196+
- name: Run
197+
id: run
198+
run: |
199+
. ./ci/tmp/praktika_setup_env.sh
200+
set -o pipefail
201+
if command -v ts &> /dev/null; then
202+
python3 -m praktika run 'libFuzzer tests' --workflow "NightlyFuzzers" --ci |& ts '[%Y-%m-%d %H:%M:%S]' | tee ./ci/tmp/job.log
203+
else
204+
python3 -m praktika run 'libFuzzer tests' --workflow "NightlyFuzzers" --ci |& tee ./ci/tmp/job.log
205+
fi

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
url = https://github.com/ClickHouse/llvm-project
248248
[submodule "contrib/corrosion"]
249249
path = contrib/corrosion
250-
url = https://github.com/ClickHouse/corrosion
250+
url = https://github.com/corrosion-rs/corrosion
251251
[submodule "contrib/libssh"]
252252
path = contrib/libssh
253253
url = https://github.com/ClickHouse/libssh.git

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Upcoming meetups
5454
* [Kuala Lumper Meetup with CNCF](https://www.meetup.com/clickhouse-malaysia-meetup-group/events/306697678/) - April 16, 2025
5555
* [Jakarta Meetup with AWS](https://www.meetup.com/clickhouse-indonesia-user-group/events/306973747/) - April 22, 2025
5656
* [London Meetup](https://www.meetup.com/clickhouse-london-user-group/events/306047172/) - May 14, 2025
57+
* [Istanbul Meetup](https://www.meetup.com/clickhouse-turkiye-meetup-group/events/306978337/) - May 15, 2025
5758

5859
Recent meetups
5960
* [Washington DC Meetup](https://www.meetup.com/clickhouse-dc-user-group/events/306439995) - March 27, 2025

base/base/cgroupsv2.cpp

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,24 @@ fs::path cgroupV2PathOfProcess()
3636
std::ifstream cgroup_name_file("/proc/self/cgroup");
3737
if (!cgroup_name_file.is_open())
3838
return {};
39-
/// With cgroups v2, there will be a *single* line with prefix "0::/"
40-
/// (see https://docs.kernel.org/admin-guide/cgroup-v2.html)
41-
std::string cgroup;
42-
std::getline(cgroup_name_file, cgroup);
39+
/// https://docs.kernel.org/admin-guide/cgroup-v2.html says:
40+
/// /proc/$PID/cgroup” lists a process’s cgroup membership. If legacy cgroup is in use in the
41+
/// system, this file may contain multiple lines, one for each hierarchy. The entry for cgroup
42+
/// v2 is always in the format “0::$PATH”.
43+
///
44+
/// So we're basically looking for a (v2) line with prefix "0::/", possibly among lines with
45+
/// other prefixes belonging v1. Note: It is valid to have an empty name as 'root' cgroup v2.
4346
static const std::string v2_prefix = "0::/";
44-
if (!cgroup.starts_with(v2_prefix))
45-
return {};
46-
cgroup = cgroup.substr(v2_prefix.length());
47-
/// Note: The 'root' cgroup can have an empty cgroup name, this is valid
48-
return default_cgroups_mount / cgroup;
47+
std::string cgroup;
48+
while (std::getline(cgroup_name_file, cgroup))
49+
{
50+
if (cgroup.starts_with(v2_prefix))
51+
{
52+
cgroup = cgroup.substr(v2_prefix.length());
53+
return default_cgroups_mount / cgroup;
54+
}
55+
}
56+
return {};
4957
#else
5058
return {};
5159
#endif

base/base/cgroupsv2.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ static inline const std::filesystem::path default_cgroups_mount = "/sys/fs/cgrou
1414
/// Is cgroups v2 enabled on the system?
1515
bool cgroupsV2Enabled();
1616

17-
/// Detects which cgroup v2 the process belongs to and returns the filesystem path to the cgroup.
18-
/// Returns an empty path the cgroup cannot be determined.
19-
/// Assumes that cgroupsV2Enabled() is enabled.
17+
/// Detects which cgroup v2 the process belongs to and returns its filesystem path.
18+
/// Assumes that cgroupsV2Enabled() was called prior and returned true.
19+
/// If the cgroup cannot be determined, an empty path is returned.
2020
std::filesystem::path cgroupV2PathOfProcess();
2121

2222
/// Returns the most nested cgroup dir containing the specified file.
2323
/// If cgroups v2 is not enabled - returns an empty optional.
24-
std::optional<std::string> getCgroupsV2PathContainingFile([[maybe_unused]] std::string_view file_name);
24+
std::optional<std::string> getCgroupsV2PathContainingFile(std::string_view file_name);

base/base/defines.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@
2828
#define NO_INLINE __attribute__((__noinline__))
2929
#define MAY_ALIAS __attribute__((__may_alias__))
3030

31-
#if defined(__x86_64__) || defined(__aarch64__)
32-
# define PRESERVE_MOST __attribute__((preserve_most))
33-
#else
34-
# define PRESERVE_MOST
35-
#endif
36-
3731
#if !defined(__x86_64__) && !defined(__aarch64__) && !defined(__PPC__) && !defined(__s390x__) && !(defined(__loongarch64)) && !(defined(__riscv) && (__riscv_xlen == 64))
3832
# error "The only supported platforms are x86_64 and AArch64, PowerPC (work in progress), s390x (work in progress), loongarch64 (experimental) and RISC-V 64 (experimental)"
3933
#endif

base/poco/Crypto/include/Poco/Crypto/OpenSSLInitializer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020

2121
#include <openssl/crypto.h>
22+
#include <openssl/provider.h>
2223
#include "Poco/AtomicCounter.h"
2324
#include "Poco/Crypto/Crypto.h"
2425
#include "Poco/Mutex.h"
@@ -83,6 +84,8 @@ namespace Crypto
8384
private:
8485
static Poco::FastMutex * _mutexes;
8586
static Poco::AtomicCounter _rc;
87+
88+
static OSSL_PROVIDER * legacy_provider;
8689
};
8790

8891

0 commit comments

Comments
 (0)