Skip to content

Instantly share code, notes, and snippets.

View taqtiqa-mark's full-sized avatar

Mark Van de Vyver taqtiqa-mark

View GitHub Profile
0.000000 execve("/usr/local/bin/packer", ["packer"], 0x7fff34d639d8 /* 189 vars */) = 0
0.060214 arch_prctl(ARCH_SET_FS, 0x7d24bb0) = 0
0.117569 sched_getaffinity(0, 8192, [0, 1]) = 8
0.000099 openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = 3
0.000081 read(3, "2097152\n", 20) = 8
0.000065 close(3) = 0
0.000041 uname({sysname="Linux", nodename="desktop.local.lan", ...}) = 0
0.000052 openat(AT_FDCWD, "/proc/version", O_RDONLY) = 3
0.000056 read(3, "Linux version 5.4.0-54-generic ("..., 512) = 157
0.000044 close(3) = 0
0.000000 execve("/usr/local/bin/packer", ["packer"], 0x7ffe34f913c8 /* 189 vars */) = 0
0.000627 arch_prctl(ARCH_SET_FS, 0x7f17990) = 0
0.000122 sched_getaffinity(0, 8192, [0, 1]) = 8
0.000079 openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = 3
0.000102 read(3, "2097152\n", 20) = 8
0.000052 close(3) = 0
0.000226 uname({sysname="Linux", nodename="desktop.local.lan", ...}) = 0
0.000063 openat(AT_FDCWD, "/proc/version", O_RDONLY) = 3
0.000055 read(3, "Linux version 5.4.0-54-generic ("..., 512) = 157
0.000288 close(3) = 0
@taqtiqa-mark
taqtiqa-mark / rust-backtrace-issue-88148.log
Created August 19, 2021 00:29
Rust backtrace: issue #88148
This file has been truncated, but you can view the full file.
error: BUG: failed to parse .ll file; please submit a bug report with Rust source code. Details (include the _first_ LLVM item, e.g. `define .. { .. }`, in the report):
Failure(("define internal fastcc void @_ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h8e015ee00e90a135E(void ()* nocapture nonnull %f) unnamed_addr #1 personality i32 (i32, i32, i64, %\"unwind::libunwind::_Unwind_Exception\"*, %\"unwind::libunwind::_Unwind_Context\"*)* @rust_eh_personality {\nstart:\n %dummy.i = alloca {}, align 1\n tail call void %f()\n %0 = bitcast {}* %dummy.i to i8*\n call void @llvm.lifetime.start.p0i8(i64 0, i8* nonnull %0)\n call void asm sideeffect \"\", \"r,~{memory},~{dirflag},~{fpsr},~{flags}\"({}* nonnull %dummy.i) #32, !srcloc !29\n call void @llvm.lifetime.end.p0i8(i64 0, i8* nonnull %0)\n ret void\n}\n\n; std::sync::once::Once::call_once::{{closure}}\n; Function Attrs: inlinehint nonlazybind uwtable\ndefine internal void @\"_ZN3std4sync4once4Once9call_once28_$u7b$$u7b$closure$u7d$$u7d$17h4e
@taqtiqa-mark
taqtiqa-mark / mre-tracing.rs
Created October 25, 2021 22:46
Tracing setup for Tokio+Hyper trace output
```rust
async fn main() {
let addr = std::net::SocketAddr::from(([127, 0, 0, 1], 6831));
// Build a Jaeger batch span processor
let jaeger_processor = opentelemetry::sdk::trace::BatchSpanProcessor::builder(
opentelemetry_jaeger::new_pipeline()
.with_service_name("mre-jaeger")
.with_agent_endpoint(addr)
// Issue #
.with_trace_config(opentelemetry::sdk::trace::config().with_resource(
@taqtiqa-mark
taqtiqa-mark / newtype_pattern.rs
Created March 31, 2022 06:23 — forked from nyinyithann/newtype_pattern.rs
The newtype pattern with Deref/DerefMut trait implementation
/*
To implement a trait on a type, the trait or the type has to be local to the code you work on. It is called the orphan rule.
To get around this restriction, we can use the newtype pattern which involves creating a new type in a tuple struct.
Both Vec<T> and Display trait are from the standard library and neither is local to our code.
We are not able to implement Display trait to Vec<T>. But we can construct a wrapper type holding an instance of Vec<T> and implement Display trait on it.
In the following example, VecWrapper<T> struct wraps Vec<T> and implements Display trait.
To get all the methods of Vec<T> available to VecWrapper, Deref trait is implemented on it.
ref: https://doc.rust-lang.org/book/ch19-03-advanced-traits.html?search=borrow%20and%20asref
*/