Skip to content

Instantly share code, notes, and snippets.

View andreimatei's full-sized avatar

Andrei Matei andreimatei

View GitHub Profile
cockroach.go121.rc3: file format elf64-x86-64
Disassembly of section .text:
0000000002fb8f80 <github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Init>:
; github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Init():
; /home/andrei/src/github.com/cockroachdb/cockroach/pkg/sql/colflow/stats.go:98
2fb8f80: 49 3b 66 10 cmpq 0x10(%r14), %rsp
2fb8f84: 0f 86 38 01 00 00 jbe 0x2fb90c2 <github.com/cockroachdb/cockroach/pkg/sql/colflow.(*batchInfoCollector).Init+0x142>
syntax = "proto3";
import "google/pprof/proto/profile.proto";
message FunctionInfoRequest {
// e.g. github.com/cockroachdb/cockroach/pkg/kv/kvserver.(*raftScheduler).Start.Func2
string name = 1;
}
SQL/TenantCockroach/Delete/count=1-24 973µs ± 6% 723µs ± 6% -25.65% (p=0.008 n=5+5)
SQL/TenantCockroach/Delete/count=10-24 1.11ms ± 1% 0.86ms ± 2% -22.75% (p=0.008 n=5+5)
SQL/TenantCockroach/Delete/count=100-24 2.20ms ± 3% 1.98ms ± 5% -9.98% (p=0.008 n=5+5)
SQL/TenantCockroach/Delete/count=1000-24 45.6ms ±44% 50.3ms ±20% ~ (p=0.310 n=5+5)
SQL/TenantCockroach/Insert/count=1-24 926µs ± 2% 714µs ± 7% -22.91% (p=0.008 n=5+5)
SQL/TenantCockroach/Insert/count=10-24 1.05ms ± 1% 0.81ms ± 3% -23.24% (p=0.008 n=5+5)
SQL/TenantCockroach/Insert/count=100-24 3.52ms ±81% 4.21ms ±64% ~ (p=1.000 n=5+5)
SQL/TenantCockroach/Insert/count=1000-24 64.7ms ± 1% 64.9ms ± 0% ~ (p=0.222 n=5+5)
SQL/TenantCockroach/InsertDistinct/count=1-24 3.25ms ± 4% 3.28ms ± 2% ~ (p=0.548 n=5+5)
SQL/TenantCockro
name old time/op new time/op delta
SQL/Cockroach/Delete/count=1-24 626µs ±18% 1099µs ± 1% +75.68% (p=0.001 n=10+5)
SQL/Cockroach/Delete/count=10-24 780µs ± 6% 1276µs ± 1% +63.52% (p=0.001 n=10+5)
SQL/Cockroach/Delete/count=100-24 1.95ms ±15% 2.38ms ± 2% +22.13% (p=0.002 n=8+5)
SQL/Cockroach/Delete/count=1000-24 49.5ms ±33% 43.7ms ±29% ~ (p=0.841 n=5+5)
SQL/Cockroach/Insert/count=1-24 641µs ± 2% 1110µs ± 8% +73.22% (p=0.008 n=5+5)
SQL/Cockroach/Insert/count=10-24 719µs ± 1% 1180µs ± 2% +63.99% (p=0.008 n=5+5)
SQL/Cockroach/Insert/count=100-24 1.51ms ± 1% 2.08ms ± 6% +37.28% (p=0.008 n=5+5)
SQL/Cockroach/Insert/count=1000-24 8.35ms ± 2% 10.70ms ± 1% +28.09% (p=0.016 n=5+4)
SQL/Cockroach/InsertDistinct/count=1-24 1.76ms ± 9% 2.40ms ±23% +36.09
name old time/op new time/op delta
SQL/Cockroach/Delete/count=1-24 626µs ±18% 723µs ± 6% +15.58% (p=0.008 n=10+5)
SQL/Cockroach/Delete/count=10-24 780µs ± 6% 858µs ± 2% +10.04% (p=0.001 n=10+5)
SQL/Cockroach/Delete/count=100-24 1.95ms ±15% 1.98ms ± 5% ~ (p=0.171 n=8+5)
SQL/Cockroach/Delete/count=1000-24 49.5ms ±33% 50.3ms ±20% ~ (p=0.690 n=5+5)
SQL/Cockroach/Insert/count=1-24 641µs ± 2% 714µs ± 7% +11.45% (p=0.008 n=5+5)
SQL/Cockroach/Insert/count=10-24 719µs ± 1% 809µs ± 3% +12.49% (p=0.008 n=5+5)
SQL/Cockroach/Insert/count=100-24 1.51ms ± 1% 4.21ms ±64% ~ (p=0.056 n=5+5)
SQL/Cockroach/Insert/count=1000-24 8.35ms ± 2% 64.90ms ± 0% +677.26% (p=0.008 n=5+5)
SQL/Cockroach/InsertDistinct/count=1-24 1.76ms ± 9% 3.28ms ± 2%
attaching to process /home/andrei/work/src/play/bpf/libbpf-uprobe/app/app (100034) at offset 0xa68c0
libbpf: loading object 'probe_bpf' from buffer
libbpf: elf: section(1) .text, size 888, link 0, flags 6, type=1
libbpf: sec '.text': found program 'exec_prog' at insn offset 0 (0 bytes), code size 111 insns (888 bytes)
libbpf: elf: section(2) uprobe/trigger_func, size 832, link 0, flags 6, type=1
libbpf: sec 'uprobe/trigger_func': found program 'probe' at insn offset 0 (0 bytes), code size 104 insns (832 bytes)
libbpf: elf: section(3) license, size 13, link 0, flags 3, type=1
libbpf: license of probe_bpf is Dual BSD/GPL
libbpf: elf: section(4) .bss, size 272, link 0, flags 3, type=8
libbpf: elf: section(5) .rodata.str1.1, size 124, link 0, flags 32, type=1
@andreimatei
andreimatei / nil_ctx.patch
Last active July 17, 2020 16:39
crash on nil ctx
diff --git a/pkg/sql/conn_executor.go b/pkg/sql/conn_executor.go
index bca73e1072..dbd3f40a4e 100644
--- a/pkg/sql/conn_executor.go
+++ b/pkg/sql/conn_executor.go
@@ -2079,6 +2079,7 @@ func (ex *connExecutor) txnStateTransitionsApplyWrapper(
implicitTxn = os.ImplicitTxn.Get()
}
+ stateBefore := ex.machine.CurState()
err := ex.machine.ApplyWithPayload(withStatement(ex.Ctx(), ex.curStmt), ev, payload)
github.com/cockroachdb/cockroach/pkg/kv/kvserver/txnwait.(*Queue).MaybeWaitForPush(0xc0003eeff0, 0x4abaf40, 0xc006479f20, 0xc0044e0780, 0x0, 0x0)
/home/andrei/work2/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/txnwait/queue.go:513 +0xf95
github.com/cockroachdb/cockroach/pkg/kv/kvserver/concurrency.(*managerImpl).maybeInterceptReq(0xc00102a400, 0x4abaf40, 0xc006479f20, 0x0, 0x15f9c7eb252a6b7b, 0x0, 0x0, 0x0, 0xc005da0600, 0x1, ...)
/home/andrei/work2/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/concurrency/concurrency_manager.go:189 +0xa9
github.com/cockroachdb/cockroach/pkg/kv/kvserver/concurrency.(*managerImpl).sequenceReqWithGuard(0xc00102a400, 0x4abaf40, 0xc006479f20, 0xc000523730, 0x0, 0x15f9c7eb252a6b7b, 0x0, 0x0, 0x0, 0xc005da0600, ...)
/home/andrei/work2/src/github.com/cockroachdb/cockroach/pkg/kv/kvserver/concurrency/concurrency_manager.go:142 +0xb8
github.com/cockroachdb/cockroach/pkg/kv/kvserver/concurrency.(*managerImpl).SequenceReq(0xc00102a400, 0x4abaf40, 0xc006479f20, 0xc00052
[andrei:~/work/src/github.com/cockroachdb/cockroach] master+ ± ./cockroach start-single-node --insecure --host=localhost --logtostderr --port=26257
I191229 03:08:53.846198 1 cli/start.go:1127 logging to directory /home/andrei/work/src/github.com/cockroachdb/cockroach/cockroach-data/logs
W191229 03:08:53.846462 1 cli/start.go:1166 RUNNING IN INSECURE MODE!
- Your cluster is open for any client that can access localhost.
- Any user, even root, can log in without providing a password.
- Any user, connecting as root, can read or write any data in your cluster.
- There is no network encryption nor authentication, and thus no confidentiality.
Check out how to secure your cluster: https://www.cockroachlabs.com/docs/v20.1/secure-a-cluster.html
@andreimatei
andreimatei / gist:bd59d82032d6639951cb61724894b407
Created December 28, 2019 20:12
invalid truncation decision logs
I191228 19:45:57.472144 49 storage/engine/rocksdb.go:603 opening rocksdb instance at "/tmp/TestDebugKeysHex151640530/store"
I191228 19:45:57.493069 49 storage/engine/rocksdb.go:743 closing rocksdb instance at "/tmp/TestDebugKeysHex151640530/store"
[debug keys /tmp/TestDebugKeysHex151640530/store --from hex:016b12bd898090d79e52e79b0144000174786e2d733fb094e9aa4d67974c71486b9823b900 --to hex:016b12bd898090d79e52e79b0144000174786e2d733fb094e9aa4d67974c71486b9823b900]
[debug keys /tmp/TestDebugKeysHex151640530/store --to hex:01]
Usage:
cockroach debug keys <directory> [flags]
Flags:
--from engine.MVCCKey
Start key and format as [<format>:]<key>. Supported formats: raw, hex,