Skip to content

Instantly share code, notes, and snippets.

@rzezeski
rzezeski / gist:ba4753873d54c3a744d4
Created May 26, 2015 22:13
usr/src/uts/common/inet diff (gate to joyent)
Only in illumos-joyent/usr/src/uts/common/inet: inet_hash.h
diff -ur illumos-gate/usr/src/uts/common/inet/ip/ip_attr.c illumos-joyent/usr/src/uts/common/inet/ip/ip_attr.c
--- illumos-gate/usr/src/uts/common/inet/ip/ip_attr.c 2015-05-26 22:07:54.760515401 +0000
+++ illumos-joyent/usr/src/uts/common/inet/ip/ip_attr.c 2015-05-26 22:08:56.031054703 +0000
@@ -909,6 +909,11 @@
*/
if (ixa->ixa_free_flags & IXA_FREE_CRED)
crhold(ixa->ixa_cred);
+
+ /*
# dtrace -qn 'sched:::on-cpu { onc=1; } fbt:ixgbe::entry /onc==1/ {start = timestamp;} fbt:ixgbe::return /onc==1/ {time = timestamp - start; @[probefunc] = lquantize( (time / 1000), 0, 100, 20); } sched:::off-cpu { onc=0; } tick-1sec { exit(0); }' -x aggpack
key min .-------. max | count
ixgbe_fc_autoneg < 0 : █ : >= 100 | 2
ixgbe_arm_watchdog_timer < 0 : █ : >= 100 | 3
ixgbe_local_timer < 0 : █ : >= 100 | 3
ixgbe_restart_watchdog_timer < 0 : █ : >= 100 | 3
ixgbe_stall_check < 0 : █ : >= 100 | 3
ixgbe_check_mac_link_generic < 0 : █ : >= 100 | 6
exec /smartdc/bin/qemu-exec /smartdc/bin/qemu-system-x86_64 "-m" "1024" "-name" "0848546c-2f54-4742-a0fd-7e006206c8b8" "-uuid" "0848546c-2f54-4742-a0fd-7e006206c8b8" "-cpu" "qemu64" "-smp" "2" "-drive" "file=/dev/zvol/rdsk/zones/0848546c-2f54-4742-a0fd-7e006206c8b8-disk0,if=ide,index=0,media=disk,boot=on" "-drive" "file=/sos.iso,if=ide,index=1,media=cdrom" "-boot" "order=d" "-net" "nic,macaddr=52:52:4a:57:08:43,vlan=0,name=net0,model=e1000" "-net" "vnic,name=net0,vlan=0,ifname=net0,ip=10.0.1.217,netmask=255.255.255.0,gateway_ip=10.0.1.1,hostname=old-sos,dns_ip0=10.0.1.1" "-smbios" "type=1,manufacturer=Joyent,product=SmartDC HVM,version=7.20150219T102159Z,serial=0848546c-2f54-4742-a0fd-7e006206c8b8,uuid=0848546c-2f54-4742-a0fd-7e006206c8b8,sku=001,family=Virtual Machine" "-pidfile" "/tmp/vm.pid" "-vga" "std" "-chardev" "socket,id=qmp,path=/tmp/vm.qmp,server,nowait" "-qmp" "chardev:qmp" "-chardev" "socket,id=serial0,path=/tmp/vm.console,server,nowait" "-serial" "chardev:serial0" "-chardev" "socket,id=serial1,pa
@rzezeski
rzezeski / gist:9629efcd0e22551bae40
Created March 28, 2015 18:28
TLB shootdown tracker
# /data/shootdowns | tee -i /data/shootdowns2.log
ADDRESS PAGES SHOOTDOWNS FACTOR LATENCY (us)
0xffffff26f1674000 1792 1 1792 492
0xffffff26f1630000 67 1 67 28
0xffffff26ffaf7000 62 1 62 30
0xffffff0bd2a90000 2 1 2 7
0xffffff0c9f659000 16 1 16 9
0xffffff0ca14db000 32 1 32 10
0xffffff23542de000 64 1 64 16
0xffffff26f122e000 384 1 384 128
@rzezeski
rzezeski / gist:a7801188ebfcd358f324
Created March 13, 2015 04:42
truss of rsyslogd stack smash
# /native/usr/bin/truss -p $(pgrep rsyslogd)
/3: pollsys(0x7FFFFEEDE9F0, 1, 0x00000000, 0x00000000) (sleeping...)
/1: pollsys(0x7FFFFF38EA00, 0, 0x7FFFFF38EB00, 0x00000000) (sleeping...)
/3: pollsys(0x7FFFFEEDE9F0, 1, 0x00000000, 0x00000000) = 1
/3: uucopy(0x7FFFFEEDEB40, 0x7FFFEC0008C0, 1) = 0
/3: brand(130, 0x7FFFFEEDECA0, 0x00000017, 0x00000001, 0x00000000, 0x00000000) Err#1 EPERM
/3: brand(130, 0x7FFFFEEDECA0, 0x0000002F, 0x00000023, 0x00000000, 0x00000000) Err#35 ENOMSG
/3: Incurred fault #6, FLTBOUNDS %pc = 0xFFFFFFFFFF600000
/3: siginfo: SIGSEGV SEGV_MAPERR addr=0xFFFFFFFFFF600000
/3: Received signal #11, SIGSEGV [default]
@rzezeski
rzezeski / gist:d683629c3cb176c05696
Created March 11, 2015 23:44
dtrace Erlang VM GC
dtrace -p $(pgrep beam.smp) -n 'pid$target::collect_heap_frags*:entry {print(*args[0]);}'
10 5214 collect_heap_frags:entry Process {
ErtsPTabElementCommon common = {
Eterm id = 0x13000000263
ethr_atomic32_t refc = {
volatile ethr_sint32_t counter = 0x1
}
Eterm tracer_proc = 0xfffffffffffffffb
Uint trace_flags = 0
@rzezeski
rzezeski / gist:dffe858cee6cd8b77910
Created December 31, 2014 20:23
1984, Two Minutes Hate

The horrible thing about the Two Minutes Hate was not that one was obliged to act a part, but that is was impossible to avoid joining in. Withing thirty seconds any pretense was already unnecessary. A hideous ecstasy of fear and vindictiveness, a desire to kill, to torture, to smash faces in with a sledge hammer, seemed to flow through the whole group of people like an electic current, turning one even against one's will into a grimacing, screaming lunatic. And yet the rage that one felt was an abstract, undirected emotion which could be switched from one object to another like the flame of a blowlamp. (p14)

@rzezeski
rzezeski / gist:e78752e82a0da0bc372b
Created December 24, 2014 19:08
wsdiff(1) output for PR#147 on illumos-core
# This file was produced by wsdiff
# 2014-12-24 at 18:41:03
Old proto area: proto.prev/
New proto area: proto/
Results file: wsdiff.out
lib/amd64/libc.so.1
NOTE: ELF .SUNW_dof difference detected.
553,554c553,554
rpz@oi3:/code/illumos-core$ ./nightly.sh illumos.sh || echo "BUILD FAILED -- CHECK LOGS"
rpz@oi3:/code/illumos-core$ sudo ./usr/src/tools/scripts/onu -t nightly -d packages/i386/nightly
Password:
BE nightly already exists
.Please choose a different BE name.
beadm create nightly failed: exit code 173
You have new mail in /var/mail/rpz
rpz@oi3:/code/illumos-core$ sudo beadm activate openindiana-1
Activated successfully
rpz@oi3:/code/illumos-core$ sudo beadm destroy -f nightly
:- op(250,xfx,:).
initial(1).
final(1).
arc(1,1,a:b).
transduce1(Node,[],[]) :-
final(Node).
transduce1(Node1,Tape1,Tape2) :-
arc(Node1,Node2,Label),