Skip to content

Instantly share code, notes, and snippets.

@azolotko
Last active June 13, 2018 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save azolotko/49bdeaa2854f25a0f3cb2c079732713c to your computer and use it in GitHub Desktop.
Save azolotko/49bdeaa2854f25a0f3cb2c079732713c to your computer and use it in GitHub Desktop.
macOS 10.13.5 unbound issue

The /usr/libexec/unbound resolver shipped with macOS 10.13.5 doesn't seem to work with UDPv6 properly. I tried to reproduce a setup from this guide and encountered an issue: unbound won't respond to DNS queries arriving to IPv6 UDP *:53 (while IPv6 TCP *:53 works fine). I downloaded and compiled the latest published version of unbound and it works well.

The stock unbound:

/usr/libexec/unbound -h
usage:  unbound [options]
	start unbound daemon DNS resolver.
-h	this help
-c file	config file to read instead of /usr/local/etc/unbound/unbound.conf
	file format is described in unbound.conf(5).
-d	do not fork into the background.
-v	verbose (more times to increase verbosity)
Version 1.5.1
linked libs: mini-event internal (it uses select), LibreSSL 2.2.7
linked modules: dns64 validator iterator
BSD licensed, see LICENSE in source package for details.
Report bugs to unbound-bugs@nlnetlabs.nl

shasum /usr/libexec/unbound 
7993140c01188663a23b64cbca95e0f6d1f2f800  /usr/libexec/unbound

cat /etc/com.apple.mis.unbound.conf
server:
	chroot: ""
	pidfile: "/etc/unbound.pid"
	chroot: ""
	directory: "/etc"
	username: ""
	do-daemonize: no
	access-control: ::0/0 allow
	module-config: "dns64 iterator"
	dns64-synthall: yes
	dns64-prefix: 2001:2:0:1baa::/96
	interface: ::0
forward-zone:
	name: "."
	forward-addr: 8.8.8.8
  
sudo dtruss -f sudo /usr/libexec/unbound -c /etc/com.apple.mis.unbound.conf -d -vvvvv
10787/0x195e5:  open("/dev/dtracehelper\0", 0x2, 0x181D592F)		 = 3 0
10787/0x195e5:  ioctl(0x3, 0x80086804, 0x7FFEE218AD78)		 = 0 0
10787/0x195e5:  close(0x3)		 = 0 0
10787/0x195e5:  access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)		 = -1 Err#2
10787/0x195e5:  thread_selfid(0x0, 0x0, 0x0)		 = 103909 0
10787/0x195e5:  bsdthread_register(0x7FFF53CF8BEC, 0x7FFF53CF8BDC, 0x2000)		 = 1073742047 0
10787/0x195e5:  mprotect(0x10DB03000, 0x1000, 0x0)		 = 0 0
10787/0x195e5:  mprotect(0x10DB0A000, 0x1000, 0x0)		 = 0 0
10787/0x195e5:  mprotect(0x10DB0B000, 0x1000, 0x0)		 = 0 0
10787/0x195e5:  mprotect(0x10DB12000, 0x1000, 0x0)		 = 0 0
10787/0x195e5:  mprotect(0x10DB01000, 0x88, 0x1)		 = 0 0
10787/0x195e5:  mprotect(0x10DB13000, 0x1000, 0x1)		 = 0 0
10787/0x195e5:  mprotect(0x10DB01000, 0x88, 0x3)		 = 0 0
10787/0x195e5:  mprotect(0x10DB01000, 0x88, 0x1)		 = 0 0
10787/0x195e5:  issetugid(0x0, 0x0, 0x0)		 = 0 0
10787/0x195e5:  getpid(0x0, 0x0, 0x0)		 = 10787 0
10787/0x195e5:  stat64("/AppleInternal/XBS/.isChrooted\0", 0x7FFEE218B048, 0x0)		 = -1 Err#2
10787/0x195e5:  stat64("/AppleInternal\0", 0x7FFEE218B0E0, 0x0)		 = -1 Err#2
10787/0x195e5:  csops(0x2A23, 0x7, 0x7FFEE218AB80)		 = 0 0
10787/0x195e5:  sysctl([CTL_KERN, 14, 1, 10787, 0, 0] (4), 0x7FFEE218ACC8, 0x7FFEE218ACC0, 0x0, 0x0)		 = 0 0
10787/0x195e5:  csops(0x2A23, 0x7, 0x7FFEE218A470)		 = 0 0
10787/0x195e5:  sigaction(0xF, 0x7FFEE218C828, 0x7FFEE218C850)		 = 0 0
10787/0x195e5:  sigaction(0x3, 0x7FFEE218C828, 0x7FFEE218C850)		 = 0 0
10787/0x195e5:  sigaction(0x1, 0x7FFEE218C828, 0x7FFEE218C850)		 = 0 0
10787/0x195e5:  sigaction(0xD, 0x7FFEE218C828, 0x7FFEE218C850)		 = 0 0
10787/0x195e5:  sigaction(0x2, 0x7FFEE218C828, 0x7FFEE218C850)		 = 0 0
10787/0x195e5:  getrlimit(0x1008, 0x7FFEE218C5F0, 0x0)		 = 0 0
10787/0x195e5:  open_nocancel("/private/etc/ssl/openssl.cnf\0", 0x0, 0x1B6)		 = 3 0
10787/0x195e5:  fstat64(0x3, 0x7FFEE218C4B8, 0x0)		 = 0 0
10787/0x195e5:  read_nocancel(0x3, "[ req ]\n#default_bits\t\t= 2048\n#default_md\t\t= sha256\n#default_keyfile \t= privkey.pem\ndistinguished_name\t= req_distinguished_name\nattributes\t\t= req_attributes\n\n[ req_distinguished_name ]\ncountryName\t\t\t= Country Name (2 letter code)\ncountryName_min\t\t\t= 2\ncoun", 0x10000)		 = 745 0
10787/0x195e5:  read_nocancel(0x3, "\0", 0x10000)		 = 0 0
10787/0x195e5:  close_nocancel(0x3)		 = 0 0
10787/0x195e5:  access("/etc/localtime\0", 0x4, 0x0)		 = 0 0
10787/0x195e5:  open_nocancel("/etc/localtime\0", 0x0, 0x0)		 = 3 0
10787/0x195e5:  fstat64(0x3, 0x7FFEE218C358, 0x0)		 = 0 0
10787/0x195e5:  read_nocancel(0x3, "TZif2\0", 0xA1E8)		 = 1931 0
10787/0x195e5:  close_nocancel(0x3)		 = 0 0
10787/0x195e5:  issetugid(0x0, 0x0, 0x0)		 = 0 0
10787/0x195e5:  open_nocancel("/var/db/timezone/zoneinfo/posixrules\0", 0x0, 0x0)		 = 3 0
10787/0x195e5:  fstat64(0x3, 0x7FFEE218C1A8, 0x0)		 = 0 0
10787/0x195e5:  read_nocancel(0x3, "TZif2\0", 0xA1E8)		 = 3519 0
10787/0x195e5:  close_nocancel(0x3)		 = 0 0
10787/0x195e5:  shm_open(0x7FFF53CEDDEF, 0x0, 0x0)		 = 3 0
10787/0x195e5:  mmap(0x0, 0x1000, 0x1, 0x1, 0x3, 0x0)		 = 0x10DF14000 0
10787/0x195e5:  close_nocancel(0x3)		 = 0 0
10787/0x195e5:  write_nocancel(0x2, "[1528890899] unbound[10787:0] notice: Start of unbound 1.5.1.\n\340\0", 0x3E)		 = 62 0
10787/0x195e5:  open_nocancel("/etc/com.apple.mis.unbound.conf\0", 0x0, 0x1B6)		 = 3 0
10787/0x195e5:  ioctl(0x3, 0x4004667A, 0x7FFEE218BEA4)		 = -1 Err#25
10787/0x195e5:  ioctl(0x3, 0x40487413, 0x7FFEE218BEA8)		 = -1 Err#25
10787/0x195e5:  fstat64(0x3, 0x7FFEE218BDA8, 0x0)		 = 0 0
10787/0x195e5:  read_nocancel(0x3, "server:\n\tchroot: \"\"\n\tpidfile: \"/etc/unbound.pid\"\n\tchroot: \"\"\n\tdirectory: \"/etc\"\n\tusername: \"\"\n\tdo-daemonize: no\n\taccess-control: ::0/0 allow\n\tmodule-config: \"dns64 iterator\"\n\tdns64-synthall: yes\n\tdns64-prefix: 2001:2:0:1baa::/96\n\tinterface: ::0\nforward-zon", 0x10000)	 = 293 0
10787/0x195e5:  read_nocancel(0x3, "\0", 0x10000)		 = 0 0
10787/0x195e5:  ioctl(0x3, 0x4004667A, 0x7FFEE218BEB4)		 = -1 Err#25
10787/0x195e5:  ioctl(0x3, 0x40487413, 0x7FFEE218BEB8)		 = -1 Err#25
10787/0x195e5:  close_nocancel(0x3)		 = 0 0
10787/0x195e5:  getrlimit(0x1008, 0x7FFEE218C910, 0x0)		 = 0 0
10787/0x195e5:  open_nocancel("/etc/.mdns_debug\0", 0x0, 0x0)		 = 3 0
10787/0x195e5:  read_nocancel(0x3, "OEA\n\0", 0x4)		 = 4 0
10787/0x195e5:  write_nocancel(0x2, "[1528890899] unbound[10787:0] debug: creating udp6 socket :: 53\n\0", 0x40)		 = 64 0
10787/0x195e5:  socket(0x1E, 0x2, 0x0)		 = 4 0
10787/0x195e5:  setsockopt(0x4, 0xFFFF, 0x4)		 = 0 0
10787/0x195e5:  setsockopt(0x4, 0x29, 0x1B)		 = 0 0
10787/0x195e5:  setsockopt(0x4, 0x29, 0x2A)		 = 0 0
10787/0x195e5:  bind(0x4, 0x7FC825D05BF0, 0x1C)		 = 0 0
10787/0x195e5:  fcntl(0x4, 0x3, 0x0)		 = 2 0
10787/0x195e5:  fcntl(0x4, 0x4, 0x6)		 = 0 0
10787/0x195e5:  write_nocancel(0x2, "[1528890899] unbound[10787:0] debug: creating tcp6 socket :: 53\n\0", 0x40)		 = 64 0
10787/0x195e5:  socket(0x1E, 0x1, 0x0)		 = 5 0
10787/0x195e5:  setsockopt(0x5, 0xFFFF, 0x4)		 = 0 0
10787/0x195e5:  setsockopt(0x5, 0x29, 0x1B)		 = 0 0
10787/0x195e5:  bind(0x5, 0x7FC825D05C10, 0x1C)		 = 0 0
10787/0x195e5:  fcntl(0x5, 0x3, 0x0)		 = 2 0
10787/0x195e5:  fcntl(0x5, 0x4, 0x6)		 = 0 0
10787/0x195e5:  listen(0x5, 0x100, 0x0)		 = 0 0
10787/0x195e5:  write_nocancel(0x2, "[1528890899] unbound[10787:0] debug: switching log to syslog\n\0", 0x3D)		 = 61 0
10787/0x195e5:  getuid(0x0, 0x0, 0x0)		 = 0 0
10787/0x195e5:  getgid(0x0, 0x0, 0x0)		 = 0 0
10787/0x195e5:  geteuid(0x0, 0x0, 0x0)		 = 0 0
10787/0x195e5:  getentropy(0x7FFEE218C770, 0x28, 0x0)		 = 0 0
10787/0x195e5:  mmap(0x0, 0x10, 0x3, 0x1002, 0xFFFFFFFFFFFFFFFF, 0x0)		 = 0x10DF56000 0
10787/0x195e5:  mmap(0x0, 0x440, 0x3, 0x1002, 0xFFFFFFFFFFFFFFFF, 0x0)		 = 0x10DF57000 0
10787/0x195e5:  open("/etc/unbound.pid\0", 0x0, 0x0)		 = 6 0
10787/0x195e5:  read(0x6, "10760\n\0", 0x20)		 = 6 0
10787/0x195e5:  close(0x6)		 = 0 0
10787/0x195e5:  kill(10760, 0)		 = -1 Err#3
10787/0x195e5:  proc_info(0x2, 0x2A23, 0x11)		 = 56 0
10787/0x195e5:  proc_info(0x2, 0x2A23, 0x11)		 = 56 0
10787/0x195e5:  sysctl([CTL_KERN, 14, 1, 10787, 0, 0] (4), 0x7FFEE2189A98, 0x7FFEE2189A88, 0x0, 0x0)		 = 0 0
10787/0x195e5:  issetugid(0x0, 0x0, 0x0)		 = 0 0
10787/0x195e5:  open("/usr/libexec/unbound\0", 0x8004, 0x53D3AB2E)		 = 6 0
10787/0x195e5:  fcntl(0x6, 0x32, 0x7FFEE2188E20)		 = 0 0
10787/0x195e5:  close(0x6)		 = 0 0
10787/0x195e5:  ulock_wake(0x102, 0x10DF58280, 0x0)		 = -1 Err#2
10787/0x195e5:  open_nocancel("/etc/unbound.pid\0", 0x601, 0x1B6)		 = 6 0
10787/0x195e5:  fstat64(0x6, 0x7FFEE218C588, 0x0)		 = 0 0
10787/0x195e5:  write_nocancel(0x6, "10787\n\0", 0x6)		 = 6 0
10787/0x195e5:  close_nocancel(0x6)		 = 0 0
10787/0x195e5:  chdir("/etc\0", 0x0, 0x0)		 = 0 0
10787/0x195e5:  getentropy(0x7FFEE218C7E0, 0x20, 0x0)		 = 0 0
10787/0x195e5:  socketpair(0x1, 0x1, 0x0)		 = 0 0
10787/0x195e5:  fcntl(0x6, 0x3, 0x0)		 = 2 0
10787/0x195e5:  fcntl(0x6, 0x4, 0x6)		 = 0 0
10787/0x195e5:  fcntl(0x7, 0x3, 0x0)		 = 2 0
10787/0x195e5:  fcntl(0x7, 0x4, 0x6)		 = 0 0
10787/0x195e5:  madvise(0x10DF98000, 0x40000, 0x9)		 = 0 0
10787/0x195e5:  __pthread_sigmask(0x2, 0x7FFEE218C80C, 0x0)		 = 0 0
10787/0x195e5:  __pthread_sigmask(0x2, 0x7FFEE218C80C, 0x0)		 = 0 0
10787/0x195e5:  __pthread_sigmask(0x2, 0x7FFEE218C80C, 0x0)		 = 0 0
10787/0x195e5:  __pthread_sigmask(0x2, 0x7FFEE218C80C, 0x0)		 = 0 0
10787/0x195e5:  sigaction(0x1, 0x7FFEE218C788, 0x7FFEE218C7B0)		 = 0 0
10787/0x195e5:  sigaction(0x3, 0x7FFEE218C788, 0x7FFEE218C7B0)		 = 0 0
10787/0x195e5:  sigaction(0xF, 0x7FFEE218C788, 0x7FFEE218C7B0)		 = 0 0
10787/0x195e5:  sigaction(0x2, 0x7FFEE218C788, 0x7FFEE218C7B0)		 = 0 0
10787/0x195e5:  ulock_wake(0x102, 0x10DF58380, 0x0)		 = -1 Err#2
...

via another tty

echo "hello" | socat -v - UDP-DATAGRAM:\[2001:2:0:aab1::1\]:53
> 2018/06/13 13:57:17.623743  length=6 from=0 to=5
hello

dtruss output (resumed)

...

via another tty

echo "hello" | socat -v - TCP-CONNECT:\[2001:2:0:aab1::1\]:53
> 2018/06/13 13:57:33.929804  length=6 from=0 to=5
hello

dtruss output (resumed)

...
10787/0x195e5:  select(0x7, 0x7FFEE218C6F8, 0x7FFEE218C778, 0x0, 0x0)		 = 1 0
10787/0x195e5:  accept(0x5, 0x7FC825E0B7B0, 0x7FC825E0B830)		 = 8 0
10787/0x195e5:  fcntl(0x8, 0x3, 0x0)		 = 6 0
10787/0x195e5:  fcntl(0x8, 0x4, 0x6)		 = 0 0
10787/0x195e5:  select(0x9, 0x7FFEE218C6F8, 0x7FFEE218C778, 0x0, 0x7FFEE218C818)		 = 1 0
10787/0x195e5:  recvfrom(0x8, 0x7FC82717E200, 0x2)		 = 2 0
10787/0x195e5:  recvfrom(0x8, 0x7FC82717E200, 0x6865)		 = 4 0
10787/0x195e5:  select(0x9, 0x7FFEE218C6F8, 0x7FFEE218C778, 0x0, 0x7FFEE218C818)		 = 1 0
10787/0x195e5:  recvfrom(0x8, 0x7FC82717E204, 0x6861)		 = 0 0
10787/0x195e5:  close(0x8)		 = 0 0

The re-compiled unbound:

./unbound -h                                                       
usage:  unbound [options]
	start unbound daemon DNS resolver.
-h	this help
-c file	config file to read instead of /usr/local/etc/unbound/unbound.conf
	file format is described in unbound.conf(5).
-d	do not fork into the background.
-v	verbose (more times to increase verbosity)
Version 1.5.1
linked libs: mini-event internal (it uses select), OpenSSL 1.0.2o  27 Mar 2018
linked modules: dns64 validator iterator
BSD licensed, see LICENSE in source package for details.
Report bugs to unbound-bugs@nlnetlabs.nl

shasum ./unbound
53823b2a8dfb4ceb6a631a331d30171f40f4ea91  ./unbound

sudo dtruss -f ./unbound -c /etc/com.apple.mis.unbound.conf -d -vvvvv
	PID/THRD  SYSCALL(args) 		 = return
[1528887005] unbound[10011:0] notice: Start of unbound 1.5.1.
[1528887005] unbound[10011:0] debug: creating udp6 socket :: 53
[1528887005] unbound[10011:0] debug: creating tcp6 socket :: 53
[1528887005] unbound[10011:0] debug: switching log to syslog
10011/0x1192f:  madvise(0x103215000, 0x2000, 0x5)		 = 0 0
10011/0x1192f:  open("/dev/dtracehelper\0", 0x2, 0xFFFFFFFFECCAEA20)		 = 3 0
10011/0x1192f:  ioctl(0x3, 0x80086804, 0x7FFEECCAE980)		 = 0 0
10011/0x1192f:  close(0x3)		 = 0 0
10011/0x1192f:  access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)		 = -1 Err#2
10011/0x1192f:  thread_selfid(0x0, 0x0, 0x0)		 = 71983 0
10011/0x1192f:  bsdthread_register(0x7FFF53CF8BEC, 0x7FFF53CF8BDC, 0x2000)		 = 1073742047 0
10011/0x1192f:  issetugid(0x0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  mprotect(0x103265000, 0x1000, 0x0)		 = 0 0
10011/0x1192f:  mprotect(0x10326C000, 0x1000, 0x0)		 = 0 0
10011/0x1192f:  mprotect(0x10326D000, 0x1000, 0x0)		 = 0 0
10011/0x1192f:  mprotect(0x103274000, 0x1000, 0x0)		 = 0 0
10011/0x1192f:  mprotect(0x103017000, 0x88, 0x1)		 = 0 0
10011/0x1192f:  mprotect(0x103019000, 0x1000, 0x1)		 = 0 0
10011/0x1192f:  mprotect(0x103017000, 0x88, 0x3)		 = 0 0
10011/0x1192f:  mprotect(0x103017000, 0x88, 0x1)		 = 0 0
10011/0x1192f:  getpid(0x0, 0x0, 0x0)		 = 10011 0
10011/0x1192f:  stat64("/AppleInternal/XBS/.isChrooted\0", 0x7FFEECCADF48, 0x0)		 = -1 Err#2
10011/0x1192f:  stat64("/AppleInternal\0", 0x7FFEECCADFE0, 0x0)		 = -1 Err#2
10011/0x1192f:  csops(0x271B, 0x7, 0x7FFEECCADA80)		 = 0 0
10011/0x1192f:  sysctl([CTL_KERN, 14, 1, 10011, 0, 0] (4), 0x7FFEECCADBC8, 0x7FFEECCADBC0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  csops(0x271B, 0x7, 0x7FFEECCAD370)		 = 0 0
10011/0x1192f:  sigaction(0xF, 0x7FFEECCAF7E8, 0x7FFEECCAF810)		 = 0 0
10011/0x1192f:  sigaction(0x3, 0x7FFEECCAF7E8, 0x7FFEECCAF810)		 = 0 0
10011/0x1192f:  sigaction(0x1, 0x7FFEECCAF7E8, 0x7FFEECCAF810)		 = 0 0
10011/0x1192f:  sigaction(0xD, 0x7FFEECCAF7E8, 0x7FFEECCAF810)		 = 0 0
10011/0x1192f:  sigaction(0x2, 0x7FFEECCAF7E8, 0x7FFEECCAF810)		 = 0 0
10011/0x1192f:  getrlimit(0x1008, 0x7FFEECCAF630, 0x0)		 = 0 0
10011/0x1192f:  open_nocancel("/usr/local/etc/openssl/openssl.cnf\0", 0x0, 0x1B6)		 = 3 0
10011/0x1192f:  fstat64(0x3, 0x7FFEECCAF528, 0x0)		 = 0 0
10011/0x1192f:  read_nocancel(0x3, "#\n# OpenSSL example configuration file.\n# This is mostly being used for generation of certificate requests.\n#\n\n# This definition stops the following lines choking if HOME isn't\n# defined.\nHOME\t\t\t= .\nRANDFILE\t\t= $ENV::HOME/.rnd\n\n# Extra OBJECT IDENTIFIER in", 0x10000)		 = 10835 0
10011/0x1192f:  read_nocancel(0x3, " TSA examples.\ntsa_policy1 = 1.2.3.4.1\ntsa_policy2 = 1.2.3.4.5.6\ntsa_policy3 = 1.2.3.4.5.7\n\n####################################################################\n[ ca ]\ndefault_ca\t= CA_default\t\t# The default ca section\n\n#####################################", 0x10000)		 = 0 0
10011/0x1192f:  close_nocancel(0x3)		 = 0 0
10011/0x1192f:  getattrlist("/usr\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl/1.0.2o_1\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl/1.0.2o_1/lib\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl/1.0.2o_1/lib/engines\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl/1.0.2o_1/lib/engines/libgost.dylib\0", 0x10F7C4F98, 0x7FFEECCAE1B0)		 = 0 0
10011/0x1192f:  stat64("/usr/local/Cellar/openssl/1.0.2o_1/lib/engines/libgost.dylib\0", 0x7FFEECCAEA70, 0x0)		 = 0 0
10011/0x1192f:  open("/usr/local/Cellar/openssl/1.0.2o_1/lib/engines/libgost.dylib\0", 0x0, 0x0)		 = 3 0
10011/0x1192f:  pread(0x3, "\317\372\355\376\a\0", 0x1000, 0x0)		 = 4096 0
10011/0x1192f:  mmap(0x103675000, 0x12000, 0x5, 0x12, 0x3, 0x0)		 = 0x103675000 0
10011/0x1192f:  mmap(0x103687000, 0x2000, 0x3, 0x12, 0x3, 0x12000)		 = 0x103687000 0
10011/0x1192f:  mmap(0x10368A000, 0x6D68, 0x1, 0x12, 0x3, 0x14000)		 = 0x10368A000 0
10011/0x1192f:  close(0x3)		 = 0 0
10011/0x1192f:  getattrlist("/usr\0", 0x10F7C4F98, 0x7FFEECCADFD0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local\0", 0x10F7C4F98, 0x7FFEECCADFD0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar\0", 0x10F7C4F98, 0x7FFEECCADFD0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl\0", 0x10F7C4F98, 0x7FFEECCADFD0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl/1.0.2o_1\0", 0x10F7C4F98, 0x7FFEECCADFD0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl/1.0.2o_1/lib\0", 0x10F7C4F98, 0x7FFEECCADFD0)		 = 0 0
10011/0x1192f:  getattrlist("/usr/local/Cellar/openssl/1.0.2o_1/lib/libcrypto.1.0.0.dylib\0", 0x10F7C4F98, 0x7FFEECCADFD0)		 = 0 0
10011/0x1192f:  stat64("/usr/local/Cellar/openssl/1.0.2o_1/lib/libcrypto.1.0.0.dylib\0", 0x7FFEECCAE890, 0x0)		 = 0 0
10011/0x1192f:  access("/etc/localtime\0", 0x4, 0x0)		 = 0 0
10011/0x1192f:  open_nocancel("/etc/localtime\0", 0x0, 0x0)		 = 3 0
10011/0x1192f:  fstat64(0x3, 0x7FFEECCAF318, 0x0)		 = 0 0
10011/0x1192f:  read_nocancel(0x3, "TZif2\0", 0xA1E8)		 = 1931 0
10011/0x1192f:  close_nocancel(0x3)		 = 0 0
10011/0x1192f:  issetugid(0x0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  open_nocancel("/var/db/timezone/zoneinfo/posixrules\0", 0x0, 0x0)		 = 3 0
10011/0x1192f:  fstat64(0x3, 0x7FFEECCAF168, 0x0)		 = 0 0
10011/0x1192f:  read_nocancel(0x3, "TZif2\0", 0xA1E8)		 = 3519 0
10011/0x1192f:  close_nocancel(0x3)		 = 0 0
10011/0x1192f:  shm_open(0x7FFF53CEDDEF, 0x0, 0x0)		 = 3 0
10011/0x1192f:  mmap(0x0, 0x1000, 0x1, 0x1, 0x3, 0x0)		 = 0x103077000 0
10011/0x1192f:  close_nocancel(0x3)		 = 0 0
10011/0x1192f:  write_nocancel(0x2, "[1528887005] unbound[10011:0] notice: Start of unbound 1.5.1.\n`\0", 0x3E)		 = 62 0
10011/0x1192f:  open_nocancel("/etc/com.apple.mis.unbound.conf\0", 0x0, 0x1B6)		 = 3 0
10011/0x1192f:  ioctl(0x3, 0x4004667A, 0x7FFEECCAEEC4)		 = -1 Err#25
10011/0x1192f:  ioctl(0x3, 0x40487413, 0x7FFEECCAEEC8)		 = -1 Err#25
10011/0x1192f:  fstat64(0x3, 0x7FFEECCAED98, 0x0)		 = 0 0
10011/0x1192f:  read_nocancel(0x3, "server:\n\tchroot: \"\"\n\tpidfile: \"/etc/unbound.pid\"\n\tchroot: \"\"\n\tdirectory: \"/etc\"\n\tusername: \"\"\n\tdo-daemonize: no\n\taccess-control: ::0/0 allow\n\tmodule-config: \"dns64 iterator\"\n\tdns64-synthall: yes\n\tdns64-prefix: 2001:2:0:1baa::/96\n\tinterface: ::0\nforward-zon", 0x10000)	 = 293 0
10011/0x1192f:  read_nocancel(0x3, "\0", 0x10000)		 = 0 0
10011/0x1192f:  ioctl(0x3, 0x4004667A, 0x7FFEECCAEEF4)		 = -1 Err#25
10011/0x1192f:  ioctl(0x3, 0x40487413, 0x7FFEECCAEEF8)		 = -1 Err#25
10011/0x1192f:  close_nocancel(0x3)		 = 0 0
10011/0x1192f:  getrlimit(0x1008, 0x7FFEECCAF8A0, 0x0)		 = 0 0
10011/0x1192f:  open_nocancel("/etc/.mdns_debug\0", 0x0, 0x0)		 = 3 0
10011/0x1192f:  read_nocancel(0x3, "OEA\n\0", 0x4)		 = 4 0
10011/0x1192f:  write_nocancel(0x2, "[1528887005] unbound[10011:0] debug: creating udp6 socket :: 53\n\0", 0x40)		 = 64 0
10011/0x1192f:  socket(0x1E, 0x2, 0x0)		 = 4 0
10011/0x1192f:  setsockopt(0x4, 0xFFFF, 0x4)		 = 0 0
10011/0x1192f:  setsockopt(0x4, 0x29, 0x1B)		 = 0 0
10011/0x1192f:  bind(0x4, 0x7FCAEA602150, 0x1C)		 = 0 0
10011/0x1192f:  fcntl(0x4, 0x3, 0x0)		 = 2 0
10011/0x1192f:  fcntl(0x4, 0x4, 0x6)		 = 0 0
10011/0x1192f:  write_nocancel(0x2, "[1528887005] unbound[10011:0] debug: creating tcp6 socket :: 53\n\0", 0x40)		 = 64 0
10011/0x1192f:  socket(0x1E, 0x1, 0x0)		 = 5 0
10011/0x1192f:  setsockopt(0x5, 0xFFFF, 0x4)		 = 0 0
10011/0x1192f:  setsockopt(0x5, 0x29, 0x1B)		 = 0 0
10011/0x1192f:  bind(0x5, 0x7FCAEA602170, 0x1C)		 = 0 0
10011/0x1192f:  fcntl(0x5, 0x3, 0x0)		 = 2 0
10011/0x1192f:  fcntl(0x5, 0x4, 0x6)		 = 0 0
10011/0x1192f:  listen(0x5, 0x100, 0x0)		 = 0 0
10011/0x1192f:  write_nocancel(0x2, "[1528887005] unbound[10011:0] debug: switching log to syslog\n\0", 0x3D)		 = 61 0
10011/0x1192f:  getuid(0x0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  getgid(0x0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  geteuid(0x0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  open("/dev/urandom\0", 0x20004, 0xFFFFFFFFFFFFFFE0)		 = 6 0
10011/0x1192f:  fstat64(0x6, 0x7FFEECCAF540, 0x0)		 = 0 0
10011/0x1192f:  select(0x7, 0x7FFEECCAF490, 0x0, 0x0, 0x7FFEECCAF510)		 = 1 0
10011/0x1192f:  read(0x6, "\252i\232V3\246\212\031\006\236T~6t\211@\200\242H\271\302\233'\237\270pMJ\223\312\033l\0", 0x20)		 = 32 0
10011/0x1192f:  close(0x6)		 = 0 0
10011/0x1192f:  getuid(0x0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  open("/etc/unbound.pid\0", 0x0, 0x0)		 = 6 0
10011/0x1192f:  read(0x6, "10001\n\0", 0x20)		 = 6 0
10011/0x1192f:  close(0x6)		 = 0 0
10011/0x1192f:  kill(10001, 0)		 = -1 Err#3
10011/0x1192f:  proc_info(0x2, 0x271B, 0x11)		 = 56 0
10011/0x1192f:  proc_info(0x2, 0x271B, 0x11)		 = 56 0
10011/0x1192f:  ulock_wake(0x102, 0x1036D1400, 0x0)		 = -1 Err#2
10011/0x1192f:  sysctl([CTL_KERN, 14, 1, 10011, 0, 0] (4), 0x7FFEECCACA28, 0x7FFEECCACA18, 0x0, 0x0)		 = 0 0
10011/0x1192f:  issetugid(0x0, 0x0, 0x0)		 = 0 0
10011/0x1192f:  open("/Users/azolotko/Projects/apptopia/network_cmds-543/unbound/./unbound\0", 0x8004, 0x53D3AB2E)		 = 6 0
10011/0x1192f:  fcntl(0x6, 0x32, 0x7FFEECCABDB0)		 = 0 0
10011/0x1192f:  close(0x6)		 = 0 0
10011/0x1192f:  ulock_wake(0x102, 0x1036D1280, 0x0)		 = -1 Err#2
10011/0x1192f:  open_nocancel("/etc/unbound.pid\0", 0x601, 0x1B6)		 = 6 0
10011/0x1192f:  fstat64(0x6, 0x7FFEECCAF518, 0x0)		 = 0 0
10011/0x1192f:  write_nocancel(0x6, "10011\n\0", 0x6)		 = 6 0
10011/0x1192f:  close_nocancel(0x6)		 = 0 0
10011/0x1192f:  chdir("/etc\0", 0x0, 0x0)		 = 0 0
10011/0x1192f:  ulock_wake(0x102, 0x1036D1380, 0x0)		 = -1 Err#2
10011/0x1192f:  getentropy(0x7FFEECCAF640, 0x20, 0x0)		 = 0 0
10011/0x1192f:  socketpair(0x1, 0x1, 0x0)		 = 0 0
10011/0x1192f:  fcntl(0x6, 0x3, 0x0)		 = 2 0
10011/0x1192f:  fcntl(0x6, 0x4, 0x6)		 = 0 0
10011/0x1192f:  fcntl(0x7, 0x3, 0x0)		 = 2 0
10011/0x1192f:  fcntl(0x7, 0x4, 0x6)		 = 0 0
10011/0x1192f:  madvise(0x103711000, 0x40000, 0x9)		 = 0 0
10011/0x1192f:  __pthread_sigmask(0x2, 0x7FFEECC9F440, 0x0)		 = 0 0
10011/0x1192f:  __pthread_sigmask(0x2, 0x7FFEECC9F440, 0x0)		 = 0 0
10011/0x1192f:  __pthread_sigmask(0x2, 0x7FFEECC9F440, 0x0)		 = 0 0
10011/0x1192f:  __pthread_sigmask(0x2, 0x7FFEECC9F440, 0x0)		 = 0 0
10011/0x1192f:  sigaction(0x1, 0x7FFEECC9F2F8, 0x7FFEECC9F320)		 = 0 0
10011/0x1192f:  sigaction(0x3, 0x7FFEECC9F2F8, 0x7FFEECC9F320)		 = 0 0
10011/0x1192f:  sigaction(0xF, 0x7FFEECC9F2F8, 0x7FFEECC9F320)		 = 0 0
10011/0x1192f:  sigaction(0x2, 0x7FFEECC9F2F8, 0x7FFEECC9F320)		 = 0 0
...

via another tty

echo "hello" | socat -v - UDP-DATAGRAM:\[2001:2:0:aab1::1\]:53
> 2018/06/13 12:50:53.535801  length=6 from=0 to=5
hello

dtruss output (resumed)

...
10011/0x1192f:  select(0x7, 0x7FFEECCAF538, 0x7FFEECCAF5B8, 0x0, 0x0)		 = 1 0
10011/0x1192f:  recvfrom(0x4, 0x7FCAEB018400, 0x10010)		 = 6 0
10011/0x1192f:  recvfrom(0x4, 0x7FCAEB018400, 0x10010)		 = -1 Err#35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment