Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/link: don't swallow external linker warnings #17935

Closed
cyli opened this issue Nov 16, 2016 · 21 comments

Comments

Projects
None yet
7 participants
@cyli
Copy link

commented Nov 16, 2016

I think there may be something wrong with cgo networking DNS name resolution. I get a segfault when attempting to reach a server with an invalid TLD type name (for instance, the an alias I might put in /etc/hosts).

What version of Go are you using (go version)?

go version go1.7.3 linux/amd64

What operating system and processor architecture are you using (go env)?

Running on Ubuntu 16.04.

$ dpkg-query -s linux-headers-generic
Package: linux-headers-generic
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 12
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Architecture: amd64
Source: linux-meta
Version: 4.4.0.47.50
Depends: linux-headers-4.4.0-47-generic
Description: Generic Linux kernel headers
 This package will always depend on the latest generic kernel headers
 available.

$ ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu4) 2.23
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/Go"
GORACE=""
GOROOT="/root/go"
GOTOOLDIR="/root/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build792732901=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

What did you do?

Built a static binary using the following file:

package main

/*
char* foo(void) { return "hello, world!"; }
*/
import "C"

// trivial example that just includes some CGO so that the binary is built with cgo

import (
	"fmt"
	"net/http"
	"os"
)

func main() {
	resp, err := http.Get(os.Args[1])
	fmt.Println(C.GoString(C.foo()), resp, err)
}
$ go build -o temp -ldflags "-extldflags -static" ./cmd/temp
$ ./temp http://not-really-a-domain-name

What did you expect to see?

$ go build -o temp -ldflags "-extldflags -static" ./cmd/temp
$ ./temp http://not-really-a-domain-name
hello, world! <nil> dial tcp: lookup not-really-a-domain-name on 8.8.8.8:53: no such host

What did you see instead?

$ go build -o temp -ldflags "-extldflags -static" ./cmd/temp
$ ./temp http://not-really-a-domain-name
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]

runtime stack:
runtime.throw(0x6f2071, 0x2a)
	/root/go/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
	/root/go/src/runtime/sigpanic_unix.go:12 +0x2cc

goroutine 8 [syscall, locked to thread]:
runtime.cgocall(0x5b9d60, 0xc4200245f8, 0xc400000000)
	/root/go/src/runtime/cgocall.go:131 +0x110 fp=0xc4200245b0 sp=0xc420024570
net._C2func_getaddrinfo(0x2490eb0, 0x0, 0xc420017320, 0xc420026050, 0x0, 0x0, 0x0)
	??:0 +0x68 fp=0xc4200245f8 sp=0xc4200245b0
net.cgoLookupIPCNAME(0xc4200b0760, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/root/go/src/net/cgo_unix.go:146 +0x37c fp=0xc420024718 sp=0xc4200245f8
net.cgoIPLookup(0xc4200565a0, 0xc4200b0760, 0x18)
	/root/go/src/net/cgo_unix.go:198 +0x4d fp=0xc4200247a8 sp=0xc420024718
runtime.goexit()
	/root/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc4200247b0 sp=0xc4200247a8
created by net.cgoLookupIP
	/root/go/src/net/cgo_unix.go:208 +0xb4

goroutine 1 [select]:
net/http.(*Transport).getConn(0xc4200b4000, 0xc4200b0740, 0x0, 0x6ef4c9, 0x4, 0xc4200b0760, 0x1b, 0x0, 0x0, 0x0)
	/root/go/src/net/http/transport.go:890 +0x9d2
net/http.(*Transport).RoundTrip(0xc4200b4000, 0xc4200b40f0, 0x6ef4c9, 0x1f, 0x0)
	/root/go/src/net/http/transport.go:367 +0x307
main.main()
	/root/go/src/github.com/docker/notary/cmd/temp/temp.go:15 +0x91

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/root/go/src/runtime/asm_amd64.s:2086 +0x1

goroutine 5 [select]:
net.lookupIPContext(0xa041c0, 0xc4200564e0, 0xc4200b0760, 0x18, 0x0, 0x0, 0x0, 0x0, 0x444f5e)
	/root/go/src/net/lookup.go:122 +0x7bc
net.internetAddrList(0xa041c0, 0xc4200564e0, 0x6e7dc1, 0x3, 0xc4200b0760, 0x1b, 0x0, 0x0, 0x0, 0xecfbd9ed9, ...)
	/root/go/src/net/ipsock.go:241 +0x5e0
net.resolveAddrList(0xa041c0, 0xc4200564e0, 0x6e7f90, 0x4, 0x6e7dc1, 0x3, 0xc4200b0760, 0x1b, 0x0, 0x0, ...)
	/root/go/src/net/dial.go:179 +0x106
net.(*Dialer).DialContext(0xc42004c5a0, 0xa04180, 0xc42000c458, 0x6e7dc1, 0x3, 0xc4200b0760, 0x1b, 0x0, 0x0, 0x0, ...)
	/root/go/src/net/dial.go:329 +0x238
net.(*Dialer).DialContext-fm(0xa04180, 0xc42000c458, 0x6e7dc1, 0x3, 0xc4200b0760, 0x1b, 0xc42000d001, 0xc420056420, 0xc420037a38, 0x40f728)
	/root/go/src/net/http/transport.go:43 +0x73
net/http.(*Transport).dial(0xc4200b4000, 0xa04180, 0xc42000c458, 0x6e7dc1, 0x3, 0xc4200b0760, 0x1b, 0x0, 0x0, 0x0, ...)
	/root/go/src/net/http/transport.go:826 +0x227
net/http.(*Transport).dialConn(0xc4200b4000, 0xa04180, 0xc42000c458, 0x0, 0x6ef4c9, 0x4, 0xc4200b0760, 0x1b, 0x0, 0x0, ...)
	/root/go/src/net/http/transport.go:967 +0x1a85
net/http.(*Transport).getConn.func4(0xc4200b4000, 0xa04180, 0xc42000c458, 0xc420016ea0, 0xc420056180)
	/root/go/src/net/http/transport.go:885 +0x78
created by net/http.(*Transport).getConn
	/root/go/src/net/http/transport.go:887 +0x398

goroutine 7 [select]:
net.cgoLookupIP(0xa041c0, 0xc4200564e0, 0xc4200b0760, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/root/go/src/net/cgo_unix.go:209 +0x2f5
net.lookupIP(0xa041c0, 0xc4200564e0, 0xc4200b0760, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0)
	/root/go/src/net/lookup_unix.go:70 +0xf9
net.glob..func11(0xa041c0, 0xc4200564e0, 0x705450, 0xc4200b0760, 0x18, 0x0, 0x0, 0x0, 0x0, 0x0)
	/root/go/src/net/hook.go:19 +0x52
net.lookupIPContext.func1(0x0, 0x0, 0x0, 0x0)
	/root/go/src/net/lookup.go:119 +0x5c
internal/singleflight.(*Group).doCall(0xa15ad0, 0xc42004c6e0, 0xc4200b0760, 0x18, 0xc420016fc0)
	/root/go/src/internal/singleflight/singleflight.go:93 +0x3c
created by internal/singleflight.(*Group).DoChan
	/root/go/src/internal/singleflight/singleflight.go:86 +0x339

This does not happen if attempt to reach a valid domain name, if I do ./temp http://not-a-thing.com"

It also happens if I reach a .local domain: ./temp http://not-really-a-domain-name.local

This does not happen if I compile a non-static binary:

$ ~/go/bin/go build -o temp ./cmd/temp
$ ./temp http://not-really-a-domain-name
hello, world! <nil> dial tcp: lookup not-really-a-domain-name: no such host

I think this is a duplicate of #7857, which got closed for inactivity.

I've also seen this here: prometheus/alertmanager#304

Workaround

Passing -tags netgo fixes it.

$ go build -o temp -ldflags "-extldflags -static" -tags netgo ./cmd/temp
$ ./temp
hello, world! <nil> dial tcp: lookup not-really-a-domain-name on 8.8.8.8:53: no such host

@cyli cyli changed the title net: cgo segfault when looking up domain name net/http: cgo segfault when looking up domain name Nov 16, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

Can you try Go tip? (git master)

/cc @mdempsky

@bradfitz bradfitz added this to the Go1.8Maybe milestone Nov 16, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

@bradfitz bradfitz changed the title net/http: cgo segfault when looking up domain name net: cgo segfault when looking up domain name Nov 16, 2016

@mdempsky

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

I'm not able to reproduce this on Ubuntu 14.04 with either tip or Go 1.7.3.

Can you share your /etc/resolv.conf and /etc/hosts files?

@cyli

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

@mdempsky

/etc/hosts:

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.1.1 cyli-test cyli-test
127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

/etc/resolve.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
@cyli

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

@mdempsky If it helps, this is running on a digital ocean droplet. I also have a vmware fusion instance of ubuntu 16.04 where I don't run into this error, and I haven't figured out what the difference is yet.
I've tried copying the /etc/hosts and /etc/resolve.conf over to that fusion VM, and I still can't replicate the error.

Fusion vm:

$ dpkg-query -s linux-headers-generic
Package: linux-headers-generic
Status: install ok installed
Priority: optional
Section: kernel
Installed-Size: 12
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Architecture: amd64
Source: linux-meta
Version: 4.4.0.47.50
Depends: linux-headers-4.4.0-47-generic
Description: Generic Linux kernel headers
 This package will always depend on the latest generic kernel headers
 available.

$ ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu4) 2.23
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/home/cyli/go"
GOTOOLDIR="/home/cyli/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
@cyli

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

@bradfitz Not sure I did this right, but still get the issue on master:

$ export GOROOT=~/go-head

$ ~/go-head/bin/go version
go version devel +272032d Tue Nov 15 21:49:01 2016 +0000 linux/amd64

$ ~/go-head/bin/go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/root/go-head"
GOTOOLDIR="/root/go-head/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build319065530=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

$ ~/go-head/bin/go build -o temp -ldflags "-extldflags -static" ./cmd/temp
$ ./temp http://not-really-a-domain-name.local
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]

runtime stack:
...

I built go tip using the downloaded go 1.7.3 install as the GOROOT_BOOTSTRAP

@bradfitz

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

Maybe gdb would say something useful?

/cc @ianlancetaylor too.

@cyli

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

@bradfitz Apologies, I haven't used gdb much. Not sure where to go from here?

# gdb ./temp
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./temp...done.
warning: File "/root/go-head/src/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
    add-auto-load-safe-path /root/go-head/src/runtime/runtime-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
    set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
    info "(gdb)Auto-loading safe path"
(gdb) run http://not-a-host
Starting program: /root/Go/src/github.com/docker/notary/temp http://not-a-host
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7f9a700 (LWP 15410)]
[New Thread 0x7ffff7799700 (LWP 15411)]
[New Thread 0x7ffff6f51700 (LWP 15412)]

Thread 1 "temp" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) backtrace
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff55f8ff9 in __pthread_initialize_minimal_internal () at nptl-init.c:471
#2  0x00007ffff55f85d1 in _init () at ../sysdeps/x86_64/crti.S:72
#3  0x00007ffff5a19670 in ?? () from /lib/x86_64-linux-gnu/libnss_myhostname.so.2
#4  0x0000000000684cea in call_init.part ()
#5  0x0000000000684ea5 in _dl_init ()
#6  0x000000000067c3e5 in dl_open_worker ()
#7  0x000000000067a3e4 in _dl_catch_error ()
#8  0x000000000067bd49 in _dl_open ()
#9  0x000000000063cd02 in do_dlopen ()
#10 0x000000000067a3e4 in _dl_catch_error ()
#11 0x000000000063ceee in __libc_dlopen_mode ()
#12 0x000000000063705b in __nss_lookup_function ()
#13 0x00000000006287f6 in gaih_inet ()
#14 0x000000000062b84e in getaddrinfo ()
#15 0x00000000005ddfb7 in _cgo_cb4050e05860_C2func_getaddrinfo (v=0xc4200285d8) at cgo-gcc-prolog:46
#16 0x0000000000451fc0 in runtime.asmcgocall () at /root/go-head/src/runtime/asm_amd64.s:616
#17 0x0000000000000030 in ?? ()
#18 0x00000000006f5060 in type.* ()
#19 0x0000000000000001 in ?? ()
#20 0x000000c420015230 in ?? ()
#21 0x000000c4200285a0 in ?? ()
#22 0x00000000000002b0 in ?? ()
#23 0x000000c4200cc000 in ?? ()
#24 0x000000000042cdc0 in ?? () at /root/go-head/src/runtime/proc.go:1037
#25 0x0000000000a57800 in runtime.work ()
#26 0x00007fffffffe420 in ?? ()
#27 0x0000000000a57880 in runtime.work ()
#28 0x00007fffffffe410 in ?? ()
#29 0x000000000042ce24 in runtime.mstart () at /root/go-head/src/runtime/proc.go:1119
#30 0x0000000000450535 in runtime.rt0_go () at /root/go-head/src/runtime/asm_amd64.s:156
#31 0x0000000000000002 in ?? ()
#32 0x00007fffffffe588 in ?? ()
#33 0x0000000000000002 in ?? ()
#34 0x00007fffffffe588 in ?? ()
#35 0x00000000004003b8 in __rela_iplt_start ()
#36 0x00000000005e8f66 in generic_start_main ()
#37 0x00000000005e915a in __libc_start_main ()
#38 0x00000000004009d9 in _start ()
@cyli

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

On the machine that segfaults:

$ strace ./temp http://not-a-host
execve("./temp", ["./temp", "http://not-a-host"], [/* 22 vars */]) = 0
uname({sysname="Linux", nodename="cyli-test", ...}) = 0
brk(NULL)                               = 0xfb4000
brk(0xfb51c0)                           = 0xfb51c0
arch_prctl(ARCH_SET_FS, 0xfb4880)       = 0
set_tid_address(0xfb4b50)               = 15491
set_robust_list(0xfb4b60, 24)           = 0
rt_sigaction(SIGRTMIN, {0x5c56d0, [], SA_RESTORER|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x5c5760, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlink("/proc/self/exe", "/root/Go/src/github.com/docker/n"..., 4096) = 42
brk(0xfd61c0)                           = 0xfd61c0
brk(0xfd7000)                           = 0xfd7000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
sched_getaffinity(0, 8192, [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) = 32
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
munmap(0xc000000000, 65536)             = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f088077b000
mmap(0xc420000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc420000000
mmap(0xc41fff8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc41fff8000
mmap(0xc000000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f088076b000
clock_gettime(CLOCK_MONOTONIC, {26364, 336835845}) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f088075b000
clock_gettime(CLOCK_MONOTONIC, {26364, 337006025}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337085221}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337136871}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337186286}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337277291}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337357206}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337428338}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337479159}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337527841}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337576586}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337625306}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337674136}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337723992}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 337772878}) = 0
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 338109906}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 338161634}) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc420002000, ss_flags=0, ss_size=32672}, NULL) = 0
gettid()                                = 15491
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGILL, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTRAP, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGABRT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGBUS, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGFPE, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSEGV, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGALRM, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSTKFLT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGURG, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXCPU, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXFSZ, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGVTALRM, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPROF, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGWINCH, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGIO, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPWR, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSYS, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {0x5c56d0, [], SA_RESTORER|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {0x5c56d0, [], SA_RESTORER|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRTMIN, {0x5c56d0, [], SA_RESTORER|SA_STACK|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, NULL, {0x5c5760, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRT_1, NULL, {0x5c5760, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRT_1, {0x5c5760, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_2, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_3, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_3, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_4, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_5, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_6, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_7, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_8, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_9, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_10, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_11, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_12, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_13, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_14, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_15, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_16, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_17, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_18, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_19, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_20, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_21, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_22, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_23, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_24, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_25, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_26, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_27, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_28, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_29, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_30, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_31, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_32, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 345380658}) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f087ff5a000
mprotect(0x7f087ff5a000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f0880759e70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f088075a9d0, tls=0x7f088075a700, child_tidptr=0x7f088075a9d0) = 15492
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f087f759000
mprotect(0x7f087f759000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f087ff58e70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f087ff599d0, tls=0x7f087ff59700, child_tidptr=0x7f087ff599d0) = 15493
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xa21470, FUTEX_WAIT, 0, NULL)    = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f087f719000
openat(AT_FDCWD, "/proc/sys/net/core/somaxconn", O_RDONLY|O_CLOEXEC) = 3
read(3, "128\n", 4096)                  = 4
read(3, "", 4092)                       = 0
close(3)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
close(3)                                = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 3
setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
bind(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 4
setsockopt(4, SOL_IPV6, IPV6_V6ONLY, [0], 4) = 0
bind(4, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
close(4)                                = 0
close(3)                                = 0
clock_gettime(CLOCK_REALTIME, {1479262207, 982774807}) = 0
clock_gettime(CLOCK_REALTIME, {1479262207, 982840432}) = 0
clock_gettime(CLOCK_MONOTONIC, {26364, 348902665}) = 0
openat(AT_FDCWD, "/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 1024) = 508
read(3, "", 1024)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=189, ...}) = 0
read(3, "# Dynamic resolv.conf(5) file fo"..., 4096) = 189
read(3, "", 3907)                       = 0
read(3, "", 4096)                       = 0
openat(AT_FDCWD, "/proc/sys/kernel/hostname", O_RDONLY|O_CLOEXEC) = 4
read(4, "cyli-test\n", 512)             = 10
close(4)                                = 0
close(3)                                = 0
stat("/etc/mdns.allow", 0xc420059bd8)   = -1 ENOENT (No such file or directory)
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=508, ...}) = 0
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 508
read(3, "", 4096)                       = 0
close(3)                                = 0
open("/etc/host.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=92, ...}) = 0
read(3, "# The \"order\" line is only used "..., 4096) = 92
read(3, "", 4096)                       = 0
close(3)                                = 0
futex(0xa42374, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=189, ...}) = 0
read(3, "# Dynamic resolv.conf(5) file fo"..., 4096) = 189
read(3, "", 4096)                       = 0
close(3)                                = 0
uname({sysname="Linux", nodename="cyli-test", ...}) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=24792, ...}) = 0
mmap(NULL, 24792, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f087f712000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=47600, ...}) = 0
mmap(NULL, 2168600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087f500000
mprotect(0x7f087f50b000, 2093056, PROT_NONE) = 0
mmap(0x7f087f70a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f087f70a000
mmap(0x7f087f70c000, 22296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f087f70c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087f137000
mprotect(0x7f087f2f6000, 2097152, PROT_NONE) = 0
mmap(0x7f087f4f6000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f087f4f6000
mmap(0x7f087f4fc000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f087f4fc000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\f\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=162632, ...}) = 0
mmap(NULL, 2257256, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087ef0f000
mprotect(0x7f087ef35000, 2093056, PROT_NONE) = 0
mmap(0x7f087f134000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f087f134000
mmap(0x7f087f136000, 360, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f087f136000
close(3)                                = 0
mprotect(0x7f087f134000, 4096, PROT_READ) = 0
mprotect(0x7f087f4f6000, 16384, PROT_READ) = 0
mprotect(0x7f087f70a000, 4096, PROT_READ) = 0
munmap(0x7f087f712000, 24792)           = 0
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f087ee0f000
open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=594, ...}) = 0
read(3, "# Your system has configured 'ma"..., 4096) = 594
read(3, "", 4096)                       = 0
close(3)                                = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=24792, ...}) = 0
mmap(NULL, 24792, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f087f712000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnss_dns.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\17\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=27000, ...}) = 0
mmap(NULL, 2121944, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087e407000
mprotect(0x7f087e40c000, 2097152, PROT_NONE) = 0
mmap(0x7f087e60c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7f087e60c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P9\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=101200, ...}) = 0
mmap(NULL, 2206280, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087e1ec000
mprotect(0x7f087e203000, 2097152, PROT_NONE) = 0
mmap(0x7f087e403000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f087e403000
mmap(0x7f087e405000, 6728, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f087e405000
close(3)                                = 0
mprotect(0x7f087e403000, 4096, PROT_READ) = 0
mprotect(0x7f087e60c000, 4096, PROT_READ) = 0
munmap(0x7f087f712000, 24792)           = 0
open("/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=189, ...}) = 0
read(3, "# Dynamic resolv.conf(5) file fo"..., 4096) = 189
read(3, "", 4096)                       = 0
close(3)                                = 0
uname({sysname="Linux", nodename="cyli-test", ...}) = 0
socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("8.8.8.8")}, 16) = 0
gettimeofday({1479262207, 992718}, NULL) = 0
poll([{fd=3, events=POLLOUT}], 1, 0)    = 1 ([{fd=3, revents=POLLOUT}])
sendmmsg(3, {{{msg_name(0)=NULL, msg_iov(1)=[{"\257\253\1\0\0\1\0\0\0\0\0\0\nnot-a-host\0\0\1\0\1", 28}], msg_controllen=0, msg_flags=MSG_TRUNC|MSG_EOR|MSG_WAITALL|MSG_SYN|MSG_RST|MSG_ERRQUEUE|MSG_NOSIGNAL|MSG_WAITFORONE|0xfa0010}, 28}, {{msg_name(0)=NULL, msg_iov(1)=[{"\207,\1\0\0\1\0\0\0\0\0\0\nnot-a-host\0\0\34\0\1", 28}], msg_controllen=0, msg_flags=MSG_DONTROUTE|MSG_EOR|MSG_CONFIRM|MSG_RST|MSG_NOSIGNAL|MSG_MORE|MSG_FASTOPEN|MSG_CMSG_CLOEXEC|0x1bf40010}, 28}}, 2, MSG_NOSIGNAL) = 2
poll([{fd=3, events=POLLIN}], 1, 5000)  = 1 ([{fd=3, revents=POLLIN}])
ioctl(3, FIONREAD, [103])               = 0
recvfrom(3, "\257\253\201\203\0\1\0\0\0\1\0\0\nnot-a-host\0\0\1\0\1\0\0\6\0"..., 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("8.8.8.8")}, [16]) = 103
gettimeofday({1479262208, 10662}, NULL) = 0
poll([{fd=3, events=POLLIN}], 1, 4982)  = 1 ([{fd=3, revents=POLLIN}])
ioctl(3, FIONREAD, [103])               = 0
recvfrom(3, "\207,\201\203\0\1\0\0\0\1\0\0\nnot-a-host\0\0\34\0\1\0\0\6\0"..., 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("8.8.8.8")}, [16]) = 103
close(3)                                = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=24792, ...}) = 0
mmap(NULL, 24792, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f087f712000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnss_myhostname.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=76216, ...}) = 0
mmap(NULL, 80096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087e1d8000
mmap(0x7f087e1e9000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7f087e1e9000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31712, ...}) = 0
mmap(NULL, 2128832, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087dfd0000
mprotect(0x7f087dfd7000, 2093056, PROT_NONE) = 0
mmap(0x7f087e1d6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f087e1d6000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0a\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=138760, ...}) = 0
mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f087ddb3000
mprotect(0x7f087ddcb000, 2093056, PROT_NONE) = 0
mmap(0x7f087dfca000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f087dfca000
mmap(0x7f087dfcc000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f087dfcc000
close(3)                                = 0
mprotect(0x7f087dfca000, 4096, PROT_READ) = 0
mprotect(0x7f087e1d6000, 4096, PROT_READ) = 0
mprotect(0x7f087e1e9000, 8192, PROT_READ) = 0
set_tid_address(0xfb4b50)               = 15491
set_robust_list(0xfb4b60, 24)           = 0
rt_sigaction(SIGRTMIN, {0x7f087ddb8ba0, [], SA_RESTORER|SA_SIGINFO, 0x7f087ddc43e0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f087ddb8c30, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f087ddc43e0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0} ---
rt_sigreturn({mask=[]})                 = 16467984
write(2, "fatal error: ", 13fatal error: )           = 13
write(2, "unexpected signal during runtime"..., 42unexpected signal during runtime execution) = 42
...
exit_group(2)                           = ?
+++ exited with 2 +++

On the machine that does not:

$ strace ./temp https://not-a-host
execve("./temp", ["./temp", "https://not-a-host"], [/* 22 vars */]) = 0
uname({sysname="Linux", nodename="ubuntu", ...}) = 0
brk(NULL)                               = 0x1d5d000
brk(0x1d5e1c0)                          = 0x1d5e1c0
arch_prctl(ARCH_SET_FS, 0x1d5d880)      = 0
set_tid_address(0x1d5db50)              = 3422
set_robust_list(0x1d5db60, 24)          = 0
rt_sigaction(SIGRTMIN, {0x5c56d0, [], SA_RESTORER|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x5c5760, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
readlink("/proc/self/exe", "/mnt/hgfs/cyli/Go/src/github.com"..., 4096) = 51
brk(0x1d7f1c0)                          = 0x1d7f1c0
brk(0x1d80000)                          = 0x1d80000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
sched_getaffinity(0, 8192, [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) = 32
mmap(0xc000000000, 65536, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
munmap(0xc000000000, 65536)             = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f24fa829000
mmap(0xc420000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc420000000
mmap(0xc41fff8000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc41fff8000
mmap(0xc000000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f24fa819000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f24fa809000
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc420002000, ss_flags=0, ss_size=32672}, NULL) = 0
gettid()                                = 3422
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGHUP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGHUP, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGILL, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTRAP, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGABRT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGBUS, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGFPE, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR1, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSEGV, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGUSR2, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPIPE, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGALRM, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSTKFLT, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGCHLD, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGURG, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXCPU, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGXFSZ, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGVTALRM, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPROF, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGWINCH, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGIO, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGPWR, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGSYS, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {0x5c56d0, [], SA_RESTORER|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {0x5c56d0, [], SA_RESTORER|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRTMIN, {0x5c56d0, [], SA_RESTORER|SA_STACK|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, NULL, {0x5c5760, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRT_1, NULL, {0x5c5760, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x5c66a0}, 8) = 0
rt_sigaction(SIGRT_1, {0x5c5760, [], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x5c66a0}, NULL, 8) = 0
rt_sigaction(SIGRT_2, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_2, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_3, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_3, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_4, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_5, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_6, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_7, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_8, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_9, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_10, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_11, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_12, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_13, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_14, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_15, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_16, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_17, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_18, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_19, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_20, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_21, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_22, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_23, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_24, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_25, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_26, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_27, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_28, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_29, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_30, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_31, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGRT_32, {0x459310, ~[], SA_RESTORER|SA_STACK|SA_RESTART|SA_SIGINFO, 0x4593d0}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f24fa008000
mprotect(0x7f24fa008000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f24fa807e70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f24fa8089d0, tls=0x7f24fa808700, child_tidptr=0x7f24fa8089d0) = 3423
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f24f9807000
mprotect(0x7f24f9807000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f24fa006e70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f24fa0079d0, tls=0x7f24fa007700, child_tidptr=0x7f24fa0079d0) = 3424
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xa22470, FUTEX_WAIT, 0, NULL)    = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f24f97c7000
openat(AT_FDCWD, "/proc/sys/net/core/somaxconn", O_RDONLY|O_CLOEXEC) = 3
read(3, "128\n", 4096)                  = 4
read(3, "", 4092)                       = 0
close(3)                                = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
close(3)                                = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 3
setsockopt(3, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
bind(3, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 4
setsockopt(4, SOL_IPV6, IPV6_V6ONLY, [0], 4) = 0
bind(4, {sa_family=AF_INET6, sin6_port=htons(0), inet_pton(AF_INET6, "::ffff:127.0.0.1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
close(4)                                = 0
close(3)                                = 0
futex(0xc420028910, FUTEX_WAKE, 1)      = 1
futex(0xa219f8, FUTEX_WAKE, 1)          = 1
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], [], 8) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f24f8fc6000
mprotect(0x7f24f8fc6000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f24f97c5e70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f24f97c69d0, tls=0x7f24f97c6700, child_tidptr=0x7f24f97c69d0) = 3425
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xa215d8, FUTEX_WAIT, 0, {4, 999533927}) = 0
futex(0xa219f8, FUTEX_WAKE, 1)          = 1
futex(0xc420029510, FUTEX_WAKE, 1)      = 1
futex(0xa215d8, FUTEX_WAIT, 0, {4, 999340676}hello, world! <nil> Get https://not-a-host: dial tcp: lookup not-a-host on 192.168.126.2:53: no such host
 <unfinished ...>
+++ exited with 0 +++
@mwhudson

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2016

Ah, so I can reproduce this if I install libnss-myhostname. And you can
work around it by removing "myhostname" from the hosts: line in
/etc/nssswitch.conf. And the example C program from the getaddrinfo man
page crashes if you link it statically too, so I don't think this is a Go
problem.

On 16 November 2016 at 14:57, Ying Li notifications@github.com wrote:

@bradfitz https://github.com/bradfitz Apologies, I haven't used gdb
much. Not sure where to go from here?

gdb ./temp

GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./temp...done.
warning: File "/root/go-head/src/runtime/runtime-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /root/go-head/src/runtime/runtime-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) run http://not-a-host
Starting program: /root/Go/src/github.com/docker/notary/temp http://not-a-host
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7f9a700 (LWP 15410)]
[New Thread 0x7ffff7799700 (LWP 15411)]
[New Thread 0x7ffff6f51700 (LWP 15412)]

Thread 1 "temp" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) backtrace
#0 0x0000000000000000 in ?? ()
#1 0x00007ffff55f8ff9 in __pthread_initialize_minimal_internal () at nptl-init.c:471
#2 0x00007ffff55f85d1 in _init () at ../sysdeps/x86_64/crti.S:72
#3 0x00007ffff5a19670 in ?? () from /lib/x86_64-linux-gnu/libnss_myhostname.so.2
#4 0x0000000000684cea in call_init.part ()
#5 0x0000000000684ea5 in _dl_init ()
#6 0x000000000067c3e5 in dl_open_worker ()
#7 0x000000000067a3e4 in _dl_catch_error ()
#8 0x000000000067bd49 in _dl_open ()
#9 0x000000000063cd02 in do_dlopen ()
#10 0x000000000067a3e4 in _dl_catch_error ()
#11 0x000000000063ceee in __libc_dlopen_mode ()
#12 0x000000000063705b in __nss_lookup_function ()
#13 0x00000000006287f6 in gaih_inet ()
#14 0x000000000062b84e in getaddrinfo ()
#15 0x00000000005ddfb7 in _cgo_cb4050e05860_C2func_getaddrinfo (v=0xc4200285d8) at cgo-gcc-prolog:46
#16 0x0000000000451fc0 in runtime.asmcgocall () at /root/go-head/src/runtime/asm_amd64.s:616
#17 0x0000000000000030 in ?? ()
#18 0x00000000006f5060 in type.* ()
#19 0x0000000000000001 in ?? ()
#20 0x000000c420015230 in ?? ()
#21 0x000000c4200285a0 in ?? ()
#22 0x00000000000002b0 in ?? ()
#23 0x000000c4200cc000 in ?? ()
#24 0x000000000042cdc0 in ?? () at /root/go-head/src/runtime/proc.go:1037
#25 0x0000000000a57800 in runtime.work ()
#26 0x00007fffffffe420 in ?? ()
#27 0x0000000000a57880 in runtime.work ()
#28 0x00007fffffffe410 in ?? ()
#29 0x000000000042ce24 in runtime.mstart () at /root/go-head/src/runtime/proc.go:1119
#30 0x0000000000450535 in runtime.rt0_go () at /root/go-head/src/runtime/asm_amd64.s:156
#31 0x0000000000000002 in ?? ()
#32 0x00007fffffffe588 in ?? ()
#33 0x0000000000000002 in ?? ()
#34 0x00007fffffffe588 in ?? ()
#35 0x00000000004003b8 in __rela_iplt_start ()
#36 0x00000000005e8f66 in generic_start_main ()
#37 0x00000000005e915a in __libc_start_main ()
#38 0x00000000004009d9 in _start ()


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#17935 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AApBFh8TN1VJLAuJxPWoZ9McvKyUGJq2ks5q-mMZgaJpZM4KzNfA
.

@cyli

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

@mwhudson Yes! You are absolutely correct - removing myhostname from /etc/nssswitch.conf, that does fix the segfault. Is there someplace else I should file a bug instead? Update: https://sourceware.org/bugzilla/show_bug.cgi?id=10652 is probably the reason

@bradfitz

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

libc: 0
Go: 6

@bradfitz bradfitz closed this Nov 16, 2016

@cyli

This comment has been minimized.

Copy link
Author

commented Nov 16, 2016

Thanks so much for all your help, everyone!

@minux

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

@mwhudson

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2016

On 16 November 2016 at 15:25, Minux Ma notifications@github.com wrote:

It's a well-known glibc problem that statically linked multithreaded
program doesn't play well with dlopen, but I wonder why this also affects
dynamically linked cgo program.

Did you miss the -extldflags -static?

@minux

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

@minux

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2016

Yes, in effect we are silencing warnings from the external linker. If it succeeds, we only display the output if -v were used.

@minux

This comment has been minimized.

Copy link
Member

commented Nov 16, 2016

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Nov 16, 2016

I think it's worth a try.

@minux minux reopened this Nov 16, 2016

@minux minux changed the title net: cgo segfault when looking up domain name cmd/go: don't swallow external linker warnings Nov 16, 2016

@gopherbot

This comment has been minimized.

Copy link

commented Nov 16, 2016

CL https://golang.org/cl/33301 mentions this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.