Skip to content

Instantly share code, notes, and snippets.

View jlevon's full-sized avatar

John Levon jlevon

View GitHub Profile
$ pfexec dtrace -n 'pid$target::_nsc_trydoorcall_ext:entry { ustack(); }' -c "ping google2.com"
dtrace: description 'pid$target::_nsc_trydoorcall_ext:entry ' matched 1 probe
CPU ID FUNCTION:NAME
0 102448 _nsc_trydoorcall_ext:entry
libc.so.1`_nsc_trydoorcall_ext
libc.so.1`_nsc_search+0xe1
libc.so.1`nss_search+0x34
libnsl.so.1`_switch_getipnodebyname_r+0x83
libnsl.so.1`_get_hostserv_inetnetdir_byname+0x806
libnsl.so.1`getipnodebyname+0x10f
# ksh ~gk/src/illumos-gate/usr/src/test/os-tests/tests/pf_key/acquire-compare.sh
pid 610811
Warning, this trashes IPsec policy.
#INDEX 9181
{ ulp 6 raddr 10.19.84.3/32 rport 23 dir out } ipsec { encr_algs aes-cbc(128..256) encr_auth_algs hmac-sha512(512) sa shared }
#INDEX 9185
{ raddr 10.90.1.25/32 dir out } ipsec { auth_algs hmac-sha512(512) encr_algs aes-cbc(256) sa shared }
#INDEX 9183
{ ulp 6 raddr 10.19.84.4/32 rport 23 dir out } ipsec { encr_algs aes-cbc(128..256) encr_auth_algs hmac-sha256(256) sa unique }
#INDEX 9187
+ curl --local-port 10001 http://10.19.84.3
+ curl --local-port 10002 http://10.19.84.4
+ curl --local-port 10003 http://10.90.1.25
+ cat /tmp/ipseckey-monitor.581336
Actively monitoring the PF_KEY socket.
Read 16 bytes.
Timestamp: 17 October 2019 at 09:11:39 PDT
Base message (version 2) type X_PROMISC, SA type <unknown 1>.
Message length 16 bytes, seq=1, pid=581362.
failed 00050653-01
failed 00050653-02
failed 00050653-04
failed 00050653-10
failed 00050653-80
failed 00050655-01
failed 00050655-02
failed 00050655-04
failed 00050655-10

Keybase proof

I hereby claim:

  • I am jlevon on github.
  • I am johnlevon (https://keybase.io/johnlevon) on keybase.
  • I have a public key ASDApiKO8M5wUr7adihf3YpLSW8v9qnWZDeh8-aHMKEFuwo

To claim this, I am signing this object:

[root@e4-11-5b-97-83-48 (emy-15) ~]# dtrace -n '__vmx_load_host_state:entry /args[0]->host_state.gs_ldt_reload_needed/ { print(cpu); stack(); }'
dtrace: description '__vmx_load_host_state:entry ' matched 1 probe
CPU ID FUNCTION:NAME
24 77227 __vmx_load_host_state:entry processorid_t 0x18
kvm`vmx_vcpu_put+0x1a
kvm`kvm_arch_vcpu_put+0x1e
kvm`vcpu_put+0x36
@jlevon
jlevon / linux-kirby.md
Last active July 26, 2019 13:18
testing joyent/documentation changes on Linux with Kirby

Installing kirby for testing changes to documentation.git On sent local Linux

Need kirby 2 (maybe?)

in ~/public_html

Get the kirby bits, but reset .htaccess etc.

@jlevon
jlevon / smartos-boot-hang.md
Last active July 17, 2019 15:22
debugging SmartOS boot hang

In the loader menu, drop into:

    2. [Esc]ape to loader prompt

then

boot -kv -m verbose -B nmi=kmdb
@jlevon
jlevon / git-submodule-hell.md
Created June 27, 2019 15:34
resetting haproxy-1.5

Add the module back:

echo '[submodule "deps/haproxy-1.5"]
>        path = deps/haproxy-1.5
>        url = https://github.com/joyent/haproxy-1.5.git
>        branch = joyent/v1.5.19
> ' >>.gitmodules
git add .gitmodules
git commit -m 1
@jlevon
jlevon / git-squashing.md
Created June 27, 2019 11:51
Forcing git to squash without rebasing

Let's say I have a particular commit (for example, a gerrit patchset), with a whole bunch of merging history. I want a single commit of all its changes against master, without having to walk through a huge rebase of the intermediate commits.

First let's get it as a branch:

~/src/grot/gerrit-pull 6225/9
git checkout -b gerrit