Skip to content

Instantly share code, notes, and snippets.

View taegyunkim's full-sized avatar

Taegyun Kim taegyunkim

View GitHub Profile
@taegyunkim
taegyunkim / greenlet-341-getcurrent-finalization.patch
Created August 2, 2026 17:46
greenlet 3.4.1 backport for PyGreenlet_GetCurrent finalization error
From 651a156835a75e6b0b29d94f6fef677b16903198 Mon Sep 17 00:00:00 2001
From: Taegyun Kim <taegyun.kim@datadoghq.com>
Date: Sun, 2 Aug 2026 17:44:21 +0000
Subject: [PATCH] Set exception when PyGreenlet_GetCurrent returns NULL
---
CHANGES.rst | 3 ++-
src/greenlet/CObjects.cpp | 1 +
src/greenlet/tests/_test_extension.c | 10 ++++++++++
src/greenlet/tests/test_interpreter_shutdown.py | 17 +++++++++++++++++
@taegyunkim
taegyunkim / Dockerfile
Created July 31, 2026 01:00
Reproducer for ddtrace-py 4.10.10 gevent stack-profiler RSS growth on Python 3.13.13
FROM python:3.13.13-slim
ENV PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
DD_PROFILING_ENABLED=true \
DD_PROFILING_MEMORY_ENABLED=false \
DD_PROFILING_LOCK_ENABLED=false \
DD_PROFILING_EXCEPTION_ENABLED=false \
DD_PROFILING_UPLOAD_INTERVAL=5
@taegyunkim
taegyunkim / Dockerfile
Created July 21, 2026 15:01
ddtrace 4.10.6 MCP circular-import reproducer
# Python 3.13.11 is the version used by the original issue report.
FROM python:3.13.11-slim-bookworm@sha256:20080e807bfc404f8450b185cf0fc95d553462673598549613735f70a5b4d5d0
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --disable-pip-version-check -r requirements.txt
COPY reproduce.py run-reproducer.sh ./
RUN chmod +x run-reproducer.sh
@taegyunkim
taegyunkim / repro_rlimit_stack.sh
Last active March 26, 2026 03:03
Reproduce: ddtrace stack profiler empty profiles with ulimit -s unlimited (SCP-1091)
#!/usr/bin/env bash
# Reproduces: CPU/wall-time profiles are empty when RLIMIT_STACK=unlimited on glibc
# Requires: Docker
#
# Usage:
# ./repro_rlimit_stack.sh # install ddtrace==4.2.1 from PyPI
# ./repro_rlimit_stack.sh 4.2.1 # install specific PyPI version
# ./repro_rlimit_stack.sh <40-char commit SHA> # install dev build from S3
#
# Root cause: create_thread_with_stack() passes RLIM_INFINITY to
@taegyunkim
taegyunkim / test1.cpp
Last active May 12, 2025 19:33
c++ variant
#include <variant>
#include <cstdio>
struct Thing {
Thing() {
std::printf("default constructor\n");
}
Thing(Thing &&other) {
std::printf("move constructor\n");
}
@taegyunkim
taegyunkim / monad.hs
Last active April 3, 2021 02:12
monad in 5 min
-- Import this for fromJust
import Data.Maybe
data Expr = Val Int | Div Expr Expr
-- Example expressions
one = Val 1
two = Div (Val 6) (Div (Val 3) (Val 1))
three = Div (Val 6) (Val 2)
@taegyunkim
taegyunkim / gist:f8e8b8142a7ff4fb36fa0332d5729ffd
Created August 2, 2020 01:01
emscripten bazel build boost error
...
Fixing bazel-out/wasm-fastbuild-ST-629647e12a78/bin/external/boost/_objs/container/global_resource.d
ERROR: /private/var/tmp/_bazel_taegyunkim/f4d9c414e12983e771160994f3d3fd11/external/boost/BUILD.bazel:518:14: undeclared inclusion(s) in rule '@boost//:container':
this rule is missing dependency declarations for the following files included by 'external/boost/libs/container/src/dlmalloc_ext_2_8_6.c':
'/private/var/tmp/_bazel_taegyunkim/f4d9c414e12983e771160994f3d3fd11/external/boost/libs/container/src/dlmalloc_ext_2_8_6.c'
'/private/var/tmp/_bazel_taegyunkim/f4d9c414e12983e771160994f3d3fd11/external/boost/libs/container/src/dlmalloc_2_8_6.c'
Adding directories to PATH:
PATH += /private/var/tmp/_bazel_taegyunkim/f4d9c414e12983e771160994f3d3fd11/external/emscripten_toolchain
PATH += /private/var/tmp/_bazel_taegyunkim/f4d9c414e12983e771160994f3d3fd11/external/emscripten_toolchain/upstream/emscripten
PATH += /private/var/tmp/_bazel_taegyunkim/f4d9c414e12983e771160994f3d3fd11/external/emscripten_toolchain/
Control Plane - citadel pod - istio-citadel-bc69f964d-5gq5d - version: 1.4.6
Control Plane - galley pod - istio-galley-57d74676f6-xkqhb - version: 1.4.6
Control Plane - ingressgateway pod - istio-ingressgateway-6855988795-9dlnk - version: 1.4.6
Control Plane - pilot pod - istio-pilot-b6866b4d9-qqzjc - version: 1.4.6
Control Plane - policy pod - istio-policy-698f74bc98-clj7d - version: 1.4.6
Control Plane - sidecar-injector pod - istio-sidecar-injector-d5485f495-xvt2c - version: 1.4.6
Control Plane - telemetry pod - istio-telemetry-58769bf595-htrtf - version: 1.4.6
Upgrade version check passed: 1.4.6 -> 1.5.2.
@taegyunkim
taegyunkim / gist:8d45175554cf81729c63032cd3258dca
Created February 24, 2020 21:41
An example run for use-local.wat
$> cargo run --release -- ./examples/use-local.wat
   Compiling rocinante v0.1.0 (/mnt/c/Users/ktaeg/Workspace/rocinante)
    Finished release [optimized] target(s) in 5.27s
     Running `target/release/rocinante ./examples/use-local.wat`
(module
  (type (;0;) (func (param i32) (result i32)))
  (func $use-local (type 0) (param i32) (result i32)
    (local i32)
    local.get 0
(module
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func (param i32 i32 i32) (result i32)))
(type (;2;) (func (param i32 i32) (result i32)))
(type (;3;) (func (param i32)))
(type (;4;) (func (param i32 i32 i32)))
(type (;5;) (func (result i32)))
(type (;6;) (func (param i32 i32)))
(type (;7;) (func))
(type (;8;) (func (param i32 f64 i32 i32 i32 i32) (result i32)))