Skip to content

Instantly share code, notes, and snippets.

View meteorcloudy's full-sized avatar

Yun Peng meteorcloudy

  • Google
  • Munich
View GitHub Profile
2024-02-07 13:24:54
Full thread dump OpenJDK 64-Bit Server VM (21+35 mixed mode):
Threads class SMR info:
_java_thread_list=0x00007f0684001c60, length=24, elements={
0x00007f06ec029b00, 0x00007f06ec2d83e0, 0x00007f06ec2d9bd0, 0x00007f06ec2db7b0,
0x00007f06ec2ed1b0, 0x00007f06ec2ee4a0, 0x00007f06ec2f01c0, 0x00007f06ec2f19e0,
0x00007f06ec36c080, 0x00007f06ec36eb40, 0x00007f066000b450, 0x00007f06ecdbcf70,
0x00007f06ed3741f0, 0x00007f06ed37a660, 0x00007f0538032320, 0x00007f052c0ed230,
0x00007f0530277640, 0x00007f05302badd0, 0x00007f0530166a60, 0x00007f0530535dd0,
@meteorcloudy
meteorcloudy / bazel_bin_files.txt
Created January 12, 2023 09:28
Binaries files checked into the Bazel GitHub repository
src/main/cpp/resources.o
src/tools/singlejar/data/multi_release.jar
third_party/allocation_instrumenter/java-allocation-instrumenter-3.3.0.jar
third_party/android_common/com.android.tools.build_builder-model_2.0.0.jar
third_party/android_common/com.android.tools.build_builder-test-api_2.0.0.jar
third_party/android_common/com.android.tools.build_builder_2.0.0.jar
third_party/android_common/com.android.tools.build_manifest-merger_25.0.0-patched.jar
third_party/android_common/com.android.tools.external.lombok_lombok-ast_0.2.3.jar
third_party/android_common/com.android.tools.layoutlib_layoutlib_26.1.2-stripped.jar
third_party/android_common/com.android.tools.layoutlib_layoutlib_26.1.2.jar
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGBUS (0x7) at pc=0x00007fc01f4b3ad1, pid=2, tid=3
#
# JRE version: (11.0.15+10) (build )
# Java VM: OpenJDK 64-Bit Server VM (11.0.15+10-LTS, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C [libc.so.6+0x18ead1]
#
@meteorcloudy
meteorcloudy / cc_shared_library.diff
Created October 13, 2022 12:56
$ diff -u ./experimental_cc_shared_library.bzl.5.3.1 ./experimental_cc_shared_library.bzl.head
--- ./experimental_cc_shared_library.bzl.5.3.1 2022-10-13 14:54:02.527927885 +0200
+++ ./experimental_cc_shared_library.bzl.head 2022-10-13 14:51:43.980623854 +0200
@@ -241,7 +241,7 @@
preloaded_deps_direct_labels,
link_once_static_libs_map):
linker_inputs = []
- link_once_static_libs = []
+ curr_link_once_static_libs_map = {}
1. bzlmod outputs a lock file and a bzl file that includes all the repo rules (instead of the whole WORKSPACE file).
2. Users who want their projects work across platforms integrate bzlmod in WORKSPACE with a native workspace rule (no repository_ctx needed)
3. Users who want to check in dependencies, use bzlmod as an external tool. Check in the generated lock file and bzl file, and load the bzl file in WORKSPACE.
4. Users who want to build on different platforms AND check in dependencies use bzlmod as an external tool and maintain multiple lock files and bzl files.
# Scenario 1
# I just want my project to build on all machines and platforms.
pcloudy@pcloudy:~/workspace/bazel-bootstrap
$ docker build -f debian/mips64el.Dockerfile .
Sending build context to Docker daemon 95.25MB
Step 1/10 : FROM mips64le/debian:sid-slim
---> 1f4f2cc9a119
Step 2/10 : RUN apt-get update && apt-get install -y --no-install-recommends devscripts equivs quilt
---> Using cache
---> c885ec6ad68e
Step 3/10 : COPY . /src
---> 11ac48f0de30
root@a0252f72cd46:/src# ./debian/rules binary
dh binary --with python3
dh_update_autotools_config
dh_autoreconf
debian/rules override_dh_auto_build
make[1]: Entering directory '/src'
mkdir -p /src/debian/ccachetmp
./compile.sh
🍃 Building Bazel from scratch/usr/bin/find: '/usr/share/java/com.android.tools.common.jar': No such file or directory
/usr/bin/find: '/usr/share/java/com.android.tools.repository.jar': No such file or directory
@meteorcloudy
meteorcloudy / MODULE.bazel.py
Last active September 24, 2020 13:36
Example usages of bazel_dep and patch_dep in MODULE.bazel
module(
name = "my_awesome_project",
version = "0.0.1",
author = "Yun Peng",
description = "Demo project",
compatibility_level = "1",
# module_rule_exports = [],
)
workspace_settings(
#!/bin/bash
set -x
mkdir netty-bug
cd netty-bug
wget https://repo1.maven.org/maven2/io/netty/netty-all/4.1.51.Final/netty-all-4.1.51.Final.jar -O netty-all.jar
cat > Example.java <<EOF
@meteorcloudy
meteorcloudy / gist:4a6245995d14c58f9ded7e3806b8060e
Last active May 26, 2020 16:11
Remaining jar dependencies
third_party/api_client/google-api-client-1.22.0.jar
third_party/api_client/google-api-client-jackson2-1.22.0.jar
third_party/api_client/google-http-client-1.22.0-SNAPSHOT.jar
third_party/api_client/google-http-client-jackson2-1.22.0.jar
third_party/auth/google-auth-library-credentials-0.17.1.jar
third_party/auth/google-auth-library-oauth2-http-0.17.1.jar
third_party/auto/auto-common-0.10.jar
third_party/auto/auto-service-1.0-rc4.jar
third_party/auto/auto-value-1.6.3rc1.jar
third_party/auto/auto-value-annotations-1.6.3rc1.jar