Skip to content

Instantly share code, notes, and snippets.

View cneira's full-sized avatar
💭
I may be slow to respond.

Neirac cneira

💭
I may be slow to respond.
View GitHub Profile
@cneira
cneira / complete.cc
Created January 23, 2017 22:33 — forked from xavierd/complete.cc
Hacking with libclang completion.
#include <clang-c/Index.h>
#include <cstdlib>
#include <iostream>
/*
* Compile with:
* g++ complete.cc -o complete -lclang -L/usr/lib/llvm
* Run with:
* LIBCLANG_TIMING=1 ./complete file.cc line column [clang args...]
*/
@cneira
cneira / bhyve-test.json
Created April 9, 2018 15:55
bhyve test
{
"alias": "centos7",
"brand": "bhyve",
"hostname": "test00",
"resolvers": [
"8.8.8.8",
"8.8.4.4"
],
"ram": 6024,
"vcpus": 2,
@cneira
cneira / README.md
Created April 9, 2018 19:38 — forked from mgerdts/README.md
bhyve on SmartOS

Introduction

The following options that aren't in the kvm brand should work:

  • com1, com2
    • Can be set to tty-like devices or socket,/some/path.
    • If both are unset, com1 defaults to /dev/zconsole and com2 defaults to /tmp/vm.ttyb.
  • bootrom
    • Should be set to /usr/share/bhyve/BHYVE_UEFI.fd or /usr/share/bhyve/BHYVE_UEFI_CSM.fd
  • Defaults to /usr/share/bhyve/BHYVE_UEFI_CSM.fd
@cneira
cneira / nwserver8166-core
Created April 9, 2018 21:09
nwserver 8166 32-bit coredumps
> $c
ld-linux.so.2`init_tls+0xfc(f9200034, 9, 804766c, 8047750, 0, 0)
ld-linux.so.2`_dl_sysdep_start+0x224()
> ::status
debugging core file of nwserver-linux (32-bit) from 26c4e9b2-3885-432d-a8de-c5be7215e348
file: /home/nwn/server/bin/linux-x86/nwserver-linux
initial argv: ./nwserver-linux
threading model: native threads
status: process terminated by SIGSEGV (Segmentation Fault), addr=321c8
> $c
@cneira
cneira / nightly_mailmsg
Created April 10, 2018 15:27
building smartos-live fails joyent_20180315T080815Z
==== Build errors (non-DEBUG) ====
/home/cnb/smartos-live/projects/illumos/usr/src/common/ficl/ficl.h:167:23: error: ficllocal.h: No such file or directory
The following command caused the error:
The following command caused the error:
The following command caused the error:
varpd.c:40:22: error: libvarpd.h: No such file or directory
varpd.c:73: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
varpd.c:135: error: expected ')' before '*' token
@cneira
cneira / b01.json
Created April 12, 2018 19:22
SmartOS build zone
{
"brand": "joyent",
"fs_allowed": "ufs,pcfs,tmpfs",
"image_uuid": "e69a0918-055d-11e5-8912-e3ceb6df4cf8",
"alias": "build01",
"hostname": "b01",
"max_physical_memory": 8024,
"quota": 70,
"resolvers": ["8.8.8.8", "8.8.8.4"],
"nics": [
@cneira
cneira / cornellcs.txt
Created April 18, 2018 04:09 — forked from bcantrill/cornellcs.txt
An old e-mail to the Cornell CS faculty; have things changed in the last 12 years?
From bmc Mon Oct 2 15:12:34 2000
Subject: Undergrad systems curriculum
To: faculty@cs.cornell.edu
Date: Mon, 2 Oct 2000 15:12:34 -0700 (PDT)
X-Mailer: ELM [version 2.4ME+ PL31H (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 4065
Status: RO
@cneira
cneira / nwserver8166-core
Created April 23, 2018 19:43
registers when works
> $r
%cs = 0x0043 %eax = 0x000001cb
%ds = 0x004b %ebx = 0xfef79fbc
%ss = 0x004b %ecx = 0x080464e0
%es = 0x004b %edx = 0xf8bb0700
%fs = 0x0000 %esi = 0x00000041
%gs = 0x01c3 %edi = 0xfef7a51c ld-2.17.so`_rtld_global+0x51c
%eip = 0xfef57d7e ld-2.17.so`init_tls+0xfc
%ebp = 0x080475c8
@cneira
cneira / mooray.log
Created April 27, 2018 11:49
disk activity
{"name":"moray","hostname":"1c1a23d7-9068-49ee-bdc9-39b6a6e05f60","pid":17317,"component":"fast","connId":7275,"client":"UDS","level":40,"err":{"message":"read ECONNRESET","name":"Error","stack":"Error: read ECONNRESET\n at errnoException (net.js:905:11)\n at TCP.onread (net.js:559:19)","code":"ECONNRESET"},"msg":"socket error","time":"2018-04-27T11:48:18.941Z","v":0}
{"name":"moray","hostname":"1c1a23d7-9068-49ee-bdc9-39b6a6e05f60","pid":17317,"component":"fast","connId":7275,"client":"UDS","level":30,"msg":"removing drained connection","time":"2018-04-27T11:48:18.941Z","v":0}
{"name":"moray","hostname":"1c1a23d7-9068-49ee-bdc9-39b6a6e05f60","pid":17313,"component":"fast","connId":7253,"client":"UDS","level":30,"msg":"connection received","time":"2018-04-27T11:48:21.221Z","v":0}
{"name":"moray","hostname":"1c1a23d7-9068-49ee-bdc9-39b6a6e05f60","pid":17313,"component":"fast","connId":7253,"client":"UDS","level":40,"err":{"message":"read ECONNRESET","name":"Error","stack":"Error: read ECONNRESET\n at
@cneira
cneira / lx-kernel-panic.md
Created May 4, 2018 14:01
32-bit linux binary makes kernel panic on joyent_20180426T014228Z

Using latest SmartOS joyent_20180426T014228Z trying to execute a linux 32-bit binary on a lx branded zone causes a kernel panic. dmesg

2018-05-04T13:46:40.000634+00:00 cl-west-0 savecore: [ID 570001 auth.error] reboot after panic: BAD TRAP: type=8 (#df Double fault) rp=fffffe2ce26b8f10 addr=0
2018-05-04T13:46:39+00:00 cl-west-0 savecore: [ID 676877 auth.error] Saving compressed system crash dump in /var/crash/volatile/vmdump.3
``
mdb info
```bash
debugging crash dump vmcore.3 (64-bit) from cl-west-0
operating system: 5.11 joyent_20180426T014228Z (i86pc)