Skip to content

Instantly share code, notes, and snippets.

View hawkw's full-sized avatar
🛠️
recently edited these files

Eliza Weisman hawkw

🛠️
recently edited these files
View GitHub Profile
@hawkw
hawkw / README.md
Last active May 29, 2019 18:45
linkerd h2 long path bug (linkerd/linkerd2#2859)

Reproduced using https://gist.github.com/tanuck/43282a75d2915bd4e1ebff63cf1c8611. stern-short.log is a smaller section of the logs, beginning with when the outbound client connection is initiated, while stern-all.log is the complete output of

stern 'linkerd-grafana-c59b86cf4-tkm77|nginx-5bbc' -c linkerd-proxy --all-namespaces --exclude admin > stern-all.log

I excluded log messages with the string 'admin' to reduce noise caused by metrics scrapes etc.

@hawkw
hawkw / mfw stacks.txt
Last active January 23, 2019 22:58
some good type errors (looks better with line wrapping)
error[E0277]: `(dyn transport::io::internal::Io + 'static)` cannot be shared between threads safely
--> src/app/main.rs:534:22
|
534 | .push(buffer::layer(MAX_IN_FLIGHT))
| ^^^^ `(dyn transport::io::internal::Io + 'static)` cannot be shared between threads safely
|
= help: the trait `std::marker::Sync` is not implemented for `(dyn transport::io::internal::Io + 'static)`
= note: required because of the requirements on the impl of `std::marker::Sync` for `std::ptr::Unique<(dyn transport::io::internal::Io + 'static)>`
= note: required because it appears within the type `std::boxed::Box<(dyn transport::io::internal::Io + 'static)>`
= note: required because it appears within the type `transport::io::BoxedIo`
@hawkw
hawkw / retry_future.rs
Last active July 29, 2018 15:44
for thramp
extern crate futures;
// XXX I haven't actually tested this, but I think it should work.
use futures::{Async, Future, Poll};
pub struct RetryFuture<F, N> {
current: F,
new_future: N,
retries: usize,
max_retries: Option<usize>,
@hawkw
hawkw / eliza-build.sh
Created June 13, 2018 22:50
extremely useful slack annoying machine
#!/bin/bash
#
# Usage:
# $ ./eliza-build.sh docker whatever...
#
webhook_url="..." # i took this out so the entire internet can't send us slack messages...
eval "$@"
status=$?
@hawkw
hawkw / Vagrantfile
Created June 12, 2018 22:57
Conduit Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
#
### Using this ###
#
# In the Conduit repo's root directory:
# $ vagrant up
# Followed by:
# $ vagrant ssh
# You will be logged in to `/home/vagrant`, and the conduit sources will
Compiling flossy v0.0.1 (file:///Users/eliza/Development/flossy)
error: internal compiler error: src/librustc_typeck/check/mod.rs:613: escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { trait_ref: <_ as futures::Future>, item_def_id: DefId { krate: CrateNum(11), node: DefIndex(318) => futures/620ce4c::future[0]::Future[0]::Item[0] } }, upstream::Status<'_>)),depth=0)
--> src/upstream/mod.rs:29:13
|
29 | -> impl Future<Item=Status, Error=Error>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
# runs linkerd in a daemonset, in linker-to-linker mode
---
apiVersion: v1
kind: ConfigMap
metadata:
name: l5d-config
data:
config.yaml: |-
admin:
port: 9998
@hawkw
hawkw / boot_asm.asm
Last active January 25, 2017 22:01
boot.rs
In archive target/x86_64-sos-kernel-gnu/debug/build/sos_kernel-9a7755fc73ed37f1/out/libboot.a:
boot.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <start>:
; == start the kernel ========================================================
@hawkw
hawkw / trace
Last active January 19, 2017 19:22
cargo issue
Discovery-One :: ~/Development/sos-kernel ‹±paging-dev› » RUST_LOG=trace xargo build --target x86_64-sos-kernel-gnu [19:05:10]
DEBUG:cargo::build: executing; cmd=cargo-build; args=["/Users/eliza/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo", "build", "--target", "x86_64-sos-kernel-gnu"]
TRACE:cargo::ops::cargo_read_manifest: read_package; path=/Users/eliza/Development/sos-kernel/Cargo.toml; source-id=file:///Users/eliza/Development/sos-kernel
DEBUG:cargo::core::workspace: find_root - trying /Users/eliza/Development/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /Users/eliza/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /Users/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /Cargo.toml
DEBUG:cargo::core::workspace: find_members - only me as a member
TRACE:cargo::ops::cargo_read_
impl<A> iter::Extend<A> for Rope
where Rope: iter::FromIterator<A> {
fn extend<B>(&mut self, iter: B)
where B: IntoIterator<Item=A> {
self.append(iter.into_iter().collect());
}
}