Skip to content

Instantly share code, notes, and snippets.

Gleb Smirnov gvsmirnov

Block or report user

Report or block gvsmirnov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gvsmirnov
gvsmirnov / Dockerfile
Last active Nov 7, 2018
Naive attempts at ingress traffic control
View Dockerfile
# in the throttled_client folder. Gist does not allow the '/' char in file names
FROM azul/zulu-openjdk
RUN apt-get update && apt-get install -y iproute2 wget
ENTRYPOINT sleep 99999999
View oom.killer.txt
[7168160.156548] bash invoked oom-killer: gfp_mask=0x26000c0, order=2, oom_score_adj=0
[7168160.156551] bash cpuset=/ mems_allowed=0
[7168160.156556] CPU: 0 PID: 23277 Comm: bash Not tainted 4.4.0-59-generic #80-Ubuntu
[7168160.156558] Hardware name: Xen HVM domU, BIOS 4.2.amazon 09/19/2016
[7168160.156559] 0000000000000286 0000000021d7e43c ffff8800207dbaf0 ffffffff813f7583
[7168160.156562] ffff8800207dbcc8 ffff880033b60e00 ffff8800207dbb60 ffffffff8120ad5e
[7168160.156564] ffffffff81cd2dc7 0000000000000000 ffffffff81e67760 0000000000000206
[7168160.156567] Call Trace:
[7168160.156573] [<ffffffff813f7583>] dump_stack+0x63/0x90
[7168160.156577] [<ffffffff8120ad5e>] dump_header+0x5a/0x1c5
View keybase.md

Keybase proof

I hereby claim:

  • I am gvsmirnov on github.
  • I am gvsmirnov (https://keybase.io/gvsmirnov) on keybase.
  • I have a public key whose fingerprint is 1F68 AD1C 4DB0 C74F AFD3 6F57 B755 94A9 D00B 6279

To claim this, I am signing this object:

@gvsmirnov
gvsmirnov / Oom.java
Last active Jan 6, 2017
Garbage Collection Considered Harmful
View Oom.java
import java.util.*;
public class Oom {
public static void main(String[] args) {
List<Object> sink = new ArrayList<>();
while(true) {
sink.add(new Object());
}
}
View fix.diff
7c7
< private static volatile Double sensorValue;
---
> private static volatile double sensorValue = Double.NaN;
15,16c15,16
< private static void processSensorValue(Double value) {
< if(value != null) {
---
> private static void processSensorValue(double value) {
> if(!Double.isNaN(value)) {
View gist:047baa6eeb8724e4cf15
Process: idea [13368]
Path: /Applications/IntelliJ IDEA 15.app/Contents/MacOS/idea
Identifier: com.jetbrains.intellij
Version: 15.0.2 (IU-143.1184.17)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: idea [13368]
User ID: 501
Date/Time: 2016-01-18 10:55:49.837 +0200
View gist:5e88f49c312a15fc2ea3
Process: idea [1324]
Path: /Applications/IntelliJ IDEA 15.app/Contents/MacOS/idea
Identifier: com.jetbrains.intellij
Version: 15.0.2 (IU-143.1184.17)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: idea [1324]
User ID: 501
Date/Time: 2016-01-14 13:09:47.341 +0200
View gist:cac5b8f20e97aa5f68af
Process: idea [69393]
Path: /Applications/IntelliJ IDEA 15.app/Contents/MacOS/idea
Identifier: com.jetbrains.intellij
Version: 15.0.2 (IU-143.1184.17)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: idea [69393]
User ID: 501
Date/Time: 2016-01-13 23:05:45.587 +0200
View gist:f865373bd99602116ce9
/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xmx2g -Didea.launcher.port=7534 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 15.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Content
@gvsmirnov
gvsmirnov / EscapingThisFromConstructorTest.java
Last active Aug 29, 2015
Escaping this from constructor
View EscapingThisFromConstructorTest.java
package org.openjdk.jcstress.tests.finals;
import org.openjdk.jcstress.annotations.*;
import org.openjdk.jcstress.infra.results.IntResult2;
import org.openjdk.jcstress.infra.results.IntResult4;
@JCStressTest
@State
@Outcome(id = "[0, 0, 0, 0]", expect = Expect.ACCEPTABLE, desc = "Neither of the escaped writes is observed")
@Outcome(id = "[1, 42, 1, 42]", expect = Expect.ACCEPTABLE, desc = "Both of the escaped writes are observed, and the write to the final field is observed in both cases")
You can’t perform that action at this time.