Skip to content

Instantly share code, notes, and snippets.

@glyn
glyn / gist:1e8f4ba771d8b8b42e9b
Last active August 29, 2015 14:24
ipv6 experiments
Ensure garden-linux is booted with -allowHostAccess=true (and a reasonable grace time like 500m).
=============================================================================================================
IPv4 experiment
Start a netcat server:
nc -l <host IP> 5000
Create a privileged container:
curl -H "Content-Type: application/json" -XPOST http://127.0.0.1:7777/containers -d '{"rootfs":"docker:///ubuntu","privileged":true}'
@glyn
glyn / gist:f448634a4244795be3d2c30632ead954
Created August 15, 2016 14:28
LD_DEBUG=all diagnostics for jvmkill load problem
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19:
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: file=libtinfo.so.5 [0]; needed by bash [0]
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: find library=libtinfo.so.5 [0]; searching
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19:
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: file=libtinfo.so.5 [0]; generating link map
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: search cache=/etc/ld.so.cache
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: trying file=/lib/x86_64-linux-gnu/libtinfo.so.5
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: dynamic: 0x00007f500a021d28 base: 0x00007f5009dfa000 size: 0x0000000000228ce0
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: file=libdl.so.2 [0]; needed by bash [0]
2016-08-15T15:25:17.66+0100 [APP/0] ERR 19: find library=libdl.so.2 [0]; searching

Keybase proof

I hereby claim:

  • I am glyn on github.
  • I am glynnormington (https://keybase.io/glynnormington) on keybase.
  • I have a public key whose fingerprint is 765F 7DEC 0952 8C26 BB61 54AC 3380 B980 247E 4D06

To claim this, I am signing this object:

@glyn
glyn / cf push logs
Created March 20, 2017 09:20
oom investigation
2017-03-20T09:09:58.02+0000 [CELL/0] OUT Creating container
2017-03-20T09:09:58.11+0000 [CELL/0] OUT Successfully destroyed container
2017-03-20T09:09:58.89+0000 [CELL/0] OUT Successfully created container
2017-03-20T09:10:02.89+0000 [CELL/0] OUT Starting health monitoring of container
2017-03-20T09:10:03.06+0000 [APP/PROC/WEB/0]ERR JVM Memory Configuration: -XX:ReservedCodeCacheSize=240M -XX:CompressedClassSpaceSize=18688K -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=103787K -Xmx362900K
2017-03-20T09:10:08.58+0000 [APP/PROC/WEB/0]OUT . ____ _ __ _ _
2017-03-20T09:10:08.58+0000 [APP/PROC/WEB/0]OUT /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2017-03-20T09:10:08.58+0000 [APP/PROC/WEB/0]OUT ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2017-03-20T09:10:08.58+0000 [APP/PROC/WEB/0]OUT \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2017-03-20T09:10:08.58+0000 [APP/PROC/WEB/0]OUT ' |____| .__|_| |_|_| |_\__, | / / / /
@glyn
glyn / java main app oom logs
Created March 20, 2017 12:53
OOM logs with improved memory stats log flushing
2017-03-20T12:51:33.23+0000 [APP/PROC/WEB/0]OUT 2017-03-20 12:51:33.233 INFO 14 --- [pool-1-thread-1] o.c.j.t.c.MemoryUtils$MemorySizeLogger : 328.9 MiB of 342.5 MiB used
2017-03-20T12:51:33.45+0000 [APP/PROC/WEB/0]ERR ResourceExhausted! (1/0)
2017-03-20T12:51:33.83+0000 [APP/PROC/WEB/0]OUT 2017-03-20 12:51:33.455 INFO 14 --- [pool-1-thread-1] o.c.j.t.c.MemoryUtils$MemorySizeLogger : 329.0 MiB of 342.5 MiB used
2017-03-20T12:51:34.41+0000 [APP/PROC/WEB/0]OUT | Instance Count | Total Bytes | Class Name |
2017-03-20T12:51:34.41+0000 [APP/PROC/WEB/0]OUT | 18864 | 329908672 | [B |
2017-03-20T12:51:34.41+0000 [APP/PROC/WEB/0]OUT | 39051 | 6899336 | [C |
2017-03-20T12:5
INFO:bindgen: Clang Version: Apple LLVM version 8.0.0 (clang-800.0.42.1)
WARN:bindgen: Couldn't parse libclang version
DEBUG:bindgen::ir::context: BindgenContext::add_item(Item { id: ItemId(0), local_id: Cell { value: None }, next_child_local_id: Cell { value: 1 }, canonical_name_cache: RefCell { value: None }, comment: None, annotations: Annotations { opaque: false, hide: false, use_instead_of: None, disallow_copy: false, private_fields: None, accessor_kind: None, constify_enum_variant: false }, parent_id: ItemId(0), kind: Module(Module { name: Some("root"), kind: Normal, children: {} }), detect_derive_debug_cycle: Cell { value: false }, detect_derive_copy_cycle: Cell { value: false } }, declaration: None, loc: None
DEBUG:bindgen::ir::item: Item::from_ty_with_id: ItemId(1)
ty = Type(jvmtiCapabilities, kind: Record, cconv: 100, decl: Cursor( kind: StructDecl, loc: ./jvmkill/include/jvmti_wrapper.h:2:9, usr: Some("c:@SA@jvmtiCapabilities")), canon: Cursor( kind: StructDecl, loc: ./jvmkill/include/jvmti_wrappe
@glyn
glyn / console.txt
Created September 7, 2017 09:42
Unexpected reformatting when running bindgen tests
➜ rust-bindgen git:(no-syntex) git st
On branch no-syntex
Your branch is up-to-date with 'fitzgen/no-syntex'.
nothing to commit, working tree clean
➜ rust-bindgen git:(no-syntex) rustup run nightly cargo install rustfmt --force
Updating registry `https://github.com/rust-lang/crates.io-index`
Installing rustfmt v0.9.0
Compiling unicode-segmentation v1.2.0
Compiling getopts v0.2.15
Compiling bitflags v0.9.1
/* automatically generated by rust-bindgen */
#[repr(C, packed)]
#[derive(Copy)]
pub struct header_t {
pub __bindgen_anon_1: header_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy)]
pub union header_t__bindgen_ty_1 {
@glyn
glyn / gc.txt
Created December 13, 2017 09:30
Output of java -Xmx350M -Xms350M -XX:+UseG1GC -XX:NativeMemoryTracking=summary -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMTStatistics -XX:+PrintFlagsFinal -version >gc.txt
[Global flags]
uintx AdaptiveSizeDecrementScaleFactor = 4 {product}
uintx AdaptiveSizeMajorGCDecayTimeScale = 10 {product}
uintx AdaptiveSizePausePolicy = 0 {product}
uintx AdaptiveSizePolicyCollectionCostMargin = 50 {product}
uintx AdaptiveSizePolicyInitializingSteps = 20 {product}
uintx AdaptiveSizePolicyOutputInterval = 0 {product}
uintx AdaptiveSizePolicyWeight = 10 {product}
uintx AdaptiveSizeThroughPutPolicy = 0 {product}
uintx AdaptiveTimeWeight = 25 {product}
@glyn
glyn / Sleeper.java
Created December 13, 2017 14:23
NMT details of Sleeper.java
public class Sleeper {
public static void main(String args[]) {
try {
Thread.sleep(24*60*60*1000);
} catch (InterruptedException _) {
}
}
}