Skip to content

Instantly share code, notes, and snippets.

View AudriusButkevicius's full-sized avatar

Audrius Butkevicius AudriusButkevicius

View GitHub Profile
goroutine 4099 [running]:
runtime/pprof.writeGoroutineStacks(0xe31868, 0xc0821a6340, 0x0, 0x0)
C:/Go/src/runtime/pprof/pprof.go:516 +0x8b
runtime/pprof.writeGoroutine(0xe31868, 0xc0821a6340, 0x2, 0x0, 0x0)
C:/Go/src/runtime/pprof/pprof.go:505 +0x4d
runtime/pprof.(*Profile).WriteTo(0xbc2f80, 0xe31868, 0xc0821a6340, 0x2, 0x0, 0x0)
C:/Go/src/runtime/pprof/pprof.go:236 +0xdb
net/http/pprof.handler.ServeHTTP(0xc08216a581, 0x9, 0xe317d0, 0xc0821a6340, 0xc082100380)
C:/Go/src/net/http/pprof/pprof.go:210 +0x385
net/http/pprof.Index(0xe317d0, 0xc0821a6340, 0xc082100380)
goroutine 646 [running]:
runtime/pprof.writeGoroutineStacks(0xe19090, 0xc0820340d0, 0x0, 0x0)
C:/Go/src/runtime/pprof/pprof.go:516 +0x8b
runtime/pprof.writeGoroutine(0xe19090, 0xc0820340d0, 0x2, 0x0, 0x0)
C:/Go/src/runtime/pprof/pprof.go:505 +0x4d
runtime/pprof.(*Profile).WriteTo(0xbc4f80, 0xe19090, 0xc0820340d0, 0x2, 0x0, 0x0)
C:/Go/src/runtime/pprof/pprof.go:236 +0xdb
net/http/pprof.handler.ServeHTTP(0xc08204b3f1, 0x9, 0xe19008, 0xc0820340d0, 0xc0820fc1c0)
C:/Go/src/net/http/pprof/pprof.go:210 +0x385
net/http/pprof.Index(0xe19008, 0xc0820340d0, 0xc0820fc1c0)
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
// Read system DNS config from /etc/resolv.conf
package net
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
// Read system DNS config from /etc/resolv.conf
package net
@AudriusButkevicius
AudriusButkevicius / patch.diff
Created March 26, 2016 22:34
Golang Android DNS patch
diff --git a/src/net/conf.go b/src/net/conf.go
index 36566a4..42ff1c5 100644
--- a/src/net/conf.go
+++ b/src/net/conf.go
@@ -96,7 +96,7 @@ func initConfVal() {
confVal.nss = parseNSSConfFile("/etc/nsswitch.conf")
}
- confVal.resolv = dnsReadConfig("/etc/resolv.conf")
+ confVal.resolv = dnsReadConfig(resolvConfPath)
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
// Read system DNS config from /etc/resolv.conf
package net
@AudriusButkevicius
AudriusButkevicius / syncthing.diff
Created March 6, 2016 21:23
syncthing crypto patch
diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go
index 319131d..783d968 100644
--- a/cmd/syncthing/main.go
+++ b/cmd/syncthing/main.go
@@ -602,12 +602,7 @@ func syncthingMain(runtimeOptions RuntimeOptions) {
InsecureSkipVerify: true,
MinVersion: tls.VersionTLS12,
CipherSuites: []uint16{
- tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
- tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
diff --git a/src/crypto/tls/cipher_suites.go b/src/crypto/tls/cipher_suites.go
index 224ed1b..badf640 100644
--- a/src/crypto/tls/cipher_suites.go
+++ b/src/crypto/tls/cipher_suites.go
@@ -9,6 +9,7 @@ import (
"crypto/cipher"
"crypto/des"
"crypto/hmac"
+ "crypto/md5"
"crypto/rc4"
2016/02/04 16:10:07 Generating files...
2016/02/04 16:10:20 Total 2048.0 MiB in 1 files
2016/02/04 16:10:20 Starting instance 1...
2016/02/04 16:10:39 Starting instance 2...
2016/02/04 16:10:39 {8 2016-02-04 16:10:39.700263063 -0500 EST StateChanged map[folder:default from:idle to:scanning]}
2016/02/04 16:10:39 {11 2016-02-04 16:10:39.704780175 -0500 EST StateChanged map[duration:0.004516652 folder:default from:scanning to:idle]}
2016/02/04 16:10:40 {16 2016-02-04 16:10:39.944190713 -0500 EST StateChanged map[duration:0.23940970900000003 folder:default from:idle to:syncing]}
2016/02/04 16:12:15 {67 2016-02-04 16:12:14.974551475 -0500 EST StateChanged map[folder:default from:syncing to:idle duration:95.030358331]}
2016/02/04 16:12:15 Verifying...
2016/02/04 16:12:22 Result: Wall time: 1m35.030360762s
root@audrius:~/gohome/src/github.com/syncthing/syncthing/test# go test -v -tags "integration b
=== RUN TestBenchmarkTransferLargeFile2G
2016/02/04 14:30:25 Cleaning...
2016/02/04 14:30:25 Generating files...
2016/02/04 14:33:53 Total 2048.0 MiB in 1 files
2016/02/04 14:33:53 Starting instance 1...
2016/02/04 14:33:54 Starting instance 2...
2016/02/04 14:33:54 {6 2016-02-04 14:29:26.929296081 -0500 EST StateChanged map[folder:default
2016/02/04 14:33:54 {9 2016-02-04 14:29:26.932481087 -0500 EST StateChanged map[duration:0.003
2016/02/04 14:33:54 {17 2016-02-04 14:29:27.624453379 -0500 EST StateChanged map[duration:0.69