Skip to content

Instantly share code, notes, and snippets.

View mranney's full-sized avatar

Matt Ranney mranney

View GitHub Profile
> var b = []; for (var i = 0; i < 1024 * 1024 ; i++) { b.push(new Buffer(1024)); }
1048576
> process.memoryUsage()
{ rss: 141910016,
heapTotal: 104296088,
heapUsed: 101654176 }
> var b = []; for (var i = 0; i < 1024 * 1024 ; i++) { b.push(new Buffer(2048)); }
1048576
> process.memoryUsage()
{ rss: 778919936,
> ::fpregs
_fp_hw 0x03 (80387 chip with SSE)
cw 0x0c7f (IM|DM|ZM|OM|UM|PM|RC|RTZ|P)
sw 0x0c77 (TOP=0t1) (IE|DE|ZE|UE|PE|SF|C2)
xcp sw 0x0000 (0)
ipoff port_poll+0x49
cssel 0x0
dtoff 0x8047bd8
dtsel 0x0
> *0x87ebddc
libm.so.2`floor: subl $0x8,%esp
libm.so.2`floor+3: fwait
libm.so.2`floor+4: fnstcw (%esp)
libm.so.2`floor+7: fldl 0xc(%esp)
libm.so.2`floor+0xb: movw (%esp),%cx
libm.so.2`floor+0xf: orw $0xc00,%cx
libm.so.2`floor+0x14: xorw $0x800,%cx
libm.so.2`floor+0x19: movw %cx,0x4(%esp)
libm.so.2`floor+0x1e: fldcw 0x4(%esp)
> libm.so.2`floor::dis
libm.so.2`floor: subl $0x8,%esp
libm.so.2`floor+3: fwait
libm.so.2`floor+4: fnstcw (%esp)
libm.so.2`floor+7: fldl 0xc(%esp)
libm.so.2`floor+0xb: movw (%esp),%cx
libm.so.2`floor+0xf: orw $0xc00,%cx
libm.so.2`floor+0x14: xorw $0x800,%cx
libm.so.2`floor+0x19: movw %cx,0x4(%esp)
libm.so.2`floor+0x1e: fldcw 0x4(%esp)
mjr@prod-2119:~ [zookeeper]$ gdb /opt/local/bin/node ./core.82428
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 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-sun-solaris2".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
> _ZN2v88internal23Runtime_DateCurrentTimeENS0_9ArgumentsEPNS0_7IsolateE-0x3219db::dis
PLT:sin: *ERROR--unknown op code**
PLT:pow: jmp *0x87ebdd8
PLT:pow: pushl $0x7d0
PLT:pow: jmp -0xfc0 <0x81de188>
PLT=libm.so.2`floor: jmp *0x87ebddc
PLT=libm.so.2`floor: pushl $0x7d8
PLT=libm.so.2`floor: jmp -0xfd0 <0x81de188>
PLT:fmod: jmp *0x87ebde0
PLT:fmod: pushl $0x7e0
@mranney
mranney / gist:5549123
Created May 9, 2013 17:38
Date.now() gets stuck after a while and then only updates slowly.
djg@prod-2122:~$ sudo rc /tmp/repl/prod-metricsserver4.sock
prod-metricsserver4> Date.now()
1368115118080
prod-metricsserver4> Date.now()
1368115118080
prod-metricsserver4> Date.now()
1368115118080
.... much time passes ...
make[1]: Entering directory `/voxer/deploy/node/out'
cc '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DL_ENDIAN' '-DOPENSSL_THREADS' '-DPURIFY' '-D_REENTRANT' '-DOPENSSL_NO_DTLS1' '-DOPENSSL_NO_SOCK' '-DOPENSSL_NO_DGRAM' '-DOPENSSL_NO_GOST' '-DOPENSSL_NO_HW_PADLOCK' '-DOPENSSL_NO_TTY' '-DAES_ASM' '-DBF_ASM' '-DBNCO_ASM' '-DBN_ASM' '-DCPUID_ASM' '-DDES_ASM' '-DLIB_BN_ASM' '-DOPENSSL_BN_ASM' '-DOPENSSL_CPUID_OBJ' '-DRIP_ASM' '-DWHIRLPOOL_ASM' '-DWP_ASM' '-DENGINESDIR="/dev/null"' '-DOPENSSLDIR="/etc/ssl"' '-DTERMIOS' '-D__EXTENSIONS__' -I../deps/openssl -I../deps/openssl/openssl -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/asn1 -I../deps/openssl/openssl/crypto/evp -I../deps/openssl/openssl/crypto/store -I../deps/openssl/openssl/include -I../deps/openssl/config/k8 -Wall -m64 -pthreads -O2 -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-tree-vrp -fno-omit-frame-pointer -MMD -MF /voxer/deploy/node/out/Release/.deps//voxer/deploy/node/out/Release/obj.target/openssl/deps/ope
@mranney
mranney / gist:3764423
Created September 21, 2012 23:05
sess.txt
141f4d0: proto=tcpv4 src=208.54.35.249:43275 fe=front_prod-nr1278 be=back_prod-nr1278 srv=prod-nr1278 ts=08 age=17h9m calls=13 q[f=2804020h,i=0,an=2000h,rx=,wx=,ax=] rp[f=000020h,i=0,an=100000h,rx=,wx=,ax=] s0=[7,8h,fd=170,ex=] s1=[9,188h,fd=492,ex=] exp=
dcb2d0: proto=tcpv4 src=166.250.33.151:8671 fe=front_prod-nr1278 be=back_prod-nr1278 srv=prod-nr1278 ts=08 age=17h9m calls=8 q[f=804020h,i=238,an=2000h,rx=,wx=,ax=] rp[f=000020h,i=0,an=100000h,rx=,wx=,ax=] s0=[7,8h,fd=459,ex=] s1=[9,188h,fd=492,ex=] exp=
root@prod-2180:/voxer/core# mdb core.node.15363
Loading modules: [ libumem.so.1 libc.so.1 ld.so.1 ]
> ::status
debugging core file of node (32-bit) from prod-2180.local
file: /opt/local/bin/node
initial argv: node /voxer/server/router_node.js --name prod-nr1337.voxer.com --rediscache 192
threading model: native threads
status: process terminated by SIGABRT (Abort), pid=15363 uid=0 code=-1
root@prod-2180:/voxer/core# ls -lh core.node.29756
-rw------- 1 root root 432M Aug 30 18:28 core.node.29756