Skip to content

Instantly share code, notes, and snippets.

View gireeshpunathil's full-sized avatar

Gireesh Punathil gireeshpunathil

  • IBM
  • India
View GitHub Profile
@gireeshpunathil
gireeshpunathil / foo.js
Last active August 24, 2023 07:23
simulated program for pollset_query failure (4083)
const h = require('https')
const options = {
hostname: 'registry.npmjs.org',
port: 443,
protocol: 'https:',
auth: '',
method: 'GET',
headers: {
accept: ['application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'],
@gireeshpunathil
gireeshpunathil / node.tar.gz
Last active August 2, 2023 15:37
node binary for help issue 4083
This file has been truncated, but you can view the full file.
@gireeshpunathil
gireeshpunathil / valgrind_39096.txt
Created July 18, 2021 11:26
valgrind output as part of investigation of node issue 39036
Memcheck, a memory error detector
Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
Using Valgrind-3.16.0 and LibVEX; rerun with -h for copyright info
Command: ./node test/parallel/test-worker-cleanexit-with-moduleload.js
Thread 11:
Invalid write of size 8
at 0x15B37B5: uv__async_io.part.1 (async.c:155)
by 0x15C6575: uv__io_poll (linux-core.c:462)
by 0x15B4127: uv_run (core.c:385)
@gireeshpunathil
gireeshpunathil / dumpdata.zip
Last active April 2, 2019 12:20
diagnostic data for node.js 26401
This file has been truncated, but you can view the full file.
================================================================================
==== Node Report ===============================================================
Event: Allocation failed - JavaScript heap out of memory, location: "Ineffective mark-compacts near heap limit"
Filename: node-report.20180921.093347.106933.001.txt
Dump event time: 2018/09/21 09:33:47
Process ID: 106933
Command line: ./node --max-old-space-size=10 oom.js
Node.js v11.0.0-pre, glibc 2.17, 64 bit)
{
"header": {
"event": "Allocation failed - JavaScript heap out of memory",
"location": "Ineffective mark-compacts near heap limit",
"filename": "node-report.20180921.104557.33353.001.json",
"dump_event_time": "2018/09/21 10:45:57",
"process_id": "33353",
"command_line": "./node --max-old-space-size=10 oom.js ",
"node.js_version": "v11.0.0-pre",
"glibc_version": "2.17",
var http = require('http')
var string = 'http://localhost:25000'
for(var count=0; count < process.argv[2]; count++) {
http.get(string, (res) => {
res.on('data', (d) => {
});
res.on('end', () => {
})
@gireeshpunathil
gireeshpunathil / 1109.js
Created March 1, 2018 08:50
Full duplex data exchange between client and server without waiting for request-response cycle and with a custom event
var net = require('net')
const DELIM = '*'
const server = net.createServer((s) => {
s.setNoDelay(true)
s.on('data', (d) => {
if (d.includes(DELIM)) {
var index = d.indexOf(DELIM, 0)
while (d.length) {
const piece = d.slice(0, index)
@gireeshpunathil
gireeshpunathil / yieldable-json.png
Last active November 13, 2017 10:29
yieldable-json logo
sample gist