This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2 b/tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2 | |
index 1784cc96c97..06a691dc7f4 100644 | |
--- a/tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2 | |
+++ b/tests/queries/0_stateless/02845_threads_count_in_distributed_queries.sql.j2 | |
@@ -18,7 +18,7 @@ select count() from remote('127.0.0.1:9000', view( | |
{% for n in range(379) -%} | |
SELECT * FROM system.one {{ "UNION ALL" if not loop.last }} | |
{% endfor -%} | |
- )) SETTINGS log_comment='check_concurrency_in_remote_queries1'; | |
+ )) SETTINGS log_comment='check_concurrency_in_remote_queries1', prefer_localhost_replica=1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
initial_query_id, | |
query_id, | |
peak_threads_usage, | |
Settings | |
FROM system.query_log | |
WHERE (log_comment = 'check_concurrency_in_remote_queries4') AND (type = 'QueryFinish') | |
Query id: 2381cef7-f23f-4577-a5cd-2b93c07158dc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by tonyyxliu on 7/11/23. | |
// | |
// This is a test for the problem related to the unexpected delay of libevent | |
// timeout event callback trigger | |
// | |
// Compile this program in release mode and link it with two libraries: 'event' and 'glog' | |
// | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo arch-chroot ./ /qemu-x86_64-static /main | |
==> WARNING: ./ is not a mountpoint. This may have undesirable side effects. | |
readlink(/proc/self/exe) => /main (len: 5) | |
readlink(/proc/self) => 27679 (len: 5) | |
readlink(/proc/1/exe) => /main (len: 5) | |
realpath(/proc/self/exe) => /qemu-x86_64-static | |
AT_EXECFN = /main | |
$ sudo arch-chroot ./ /qemu-x86_64-static -strace /main | |
==> WARNING: ./ is not a mountpoint. This may have undesirable side effects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# https://gist.github.com/azat/fe1c087d2bc25f1b831281e1ff80ff9b | |
import argparse | |
# Overhead for sparsehash [1]. | |
# | |
# [1]: https://tristanpenman.com/blog/posts/2017/10/11/sparsehash-internals/ | |
SPARSEHASH_ELEMENT_OVERHEAD_64BIT = 2.66666667 | |
SPARSEHASH_ELEMENT_OVERHEAD_32BIT = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git di | |
diff --git a/client.cpp b/client.cpp | |
index 294c8b7..cf347fe 100644 | |
--- a/client.cpp | |
+++ b/client.cpp | |
@@ -32,7 +32,7 @@ | |
#include <event2/util.h> | |
#include <event2/event.h> | |
-#include <sanitizer/lsan_interface.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Compare prices for cloud storage providers: | |
# - S3 - AWS S3 from Amazon | |
# https://aws.amazon.com/s3/pricing/ | |
# - GS/GCS - Google Cloud Storage | |
# https://cloud.google.com/storage/pricing#north-america | |
# - R2 - R2 from CloudFrame | |
# https://developers.cloudflare.com/r2/platform/pricing/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
#include <dlfcn.h> | |
#include <stdlib.h> | |
// force jemalloc | |
void __attribute__((used)) force_jemalloc() | |
{ | |
/// calloc() is used in older glibc in dlsym() | |
/// force this symbol from the jemalloc to trigger endless loop | |
(void)calloc(0, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _GNU_SOURCE | |
#include <dlfcn.h> | |
#include <stdio.h> | |
int main() | |
{ | |
void *p = dlsym(RTLD_NEXT, "__pthread_mutex_lock"); | |
printf("__pthread_mutex_lock: %p (via RTLD_NEXT)\n", p); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
int main() | |
{ | |
// something broken in ASan in interceptor for __pthread_mutex_lock | |
// and only since glibc 2.36, and for pthread_mutex_lock everything is OK | |
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; | |
return __pthread_mutex_lock(&mutex); | |
} |