Skip to content

Instantly share code, notes, and snippets.

View gist:1fdfea6bcef4ec50c3d254ef06f22870
During concurrent starting of nodes and cache put/get operations exception occures. Moreover some threads blocked on waiting for futures completion.
[^CacheAffEarlySelfTest.java] for problem reproducing. Note, that exception reproduces not always.
It's important that each node invokes getOrCreateCache() during concurrent start up. It seems when there are concurrent attempts to start the same cache minor topology version differs for different nodes.
{noformat}
[12:37:58,055][ERROR][ignite-#1395%sys-distributed.GridCacheAffEarlySelfTest1%][GridCacheIoManager] Failed processing message [senderId=603d5257-2001-4365-88cb-d33dc72db006, msg=GridNearAtomicUpdateRequest [nodeId=10cbb4bb-5ad4-4df9-a4c3-e269b0aa3001, futVer=GridCacheVersion [topVer=49642684, nodeOrderDrId=4, globalTime=1438162677968, order=1438162677072], fastMap=false, updateVer=null, topVer=AffinityTopologyVersion [topVer=8, minorTopVer=3], topLocked=false, syncMode=FULL_SYNC, op=UPDATE, keys=[KeyCacheObjectImpl [val=603d5257-2001-4365-88cb-d33dc72
View Dockerfile
FROM ubuntu:21.04
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y wget make clang unzip
#RUN git clone --branch exceptionGroup-stage5 https://github.com/iritkatriel/cpython
RUN wget https://github.com/iritkatriel/cpython/archive/exceptionGroup-stage5.zip
RUN unzip -x *.zip
RUN mv cpython-* cpython
@stestagg
stestagg / example.py
Last active August 7, 2020 16:23
POC exploring possible syntaxes for the python-ideas thread: Package kwkey and PEP 472 -- Support for indexing with keyword arguments
View example.py
# coding=kw_getitem
class Helper:
def _getitem_wrapper(self, *a, **kw):
a_x = {0: (), 1: a}.get(len(a), (a, ))
return self.__getitem__(*a_x, **kw)
class ObjWithGetitem(Helper):
View get_tb.fish
for i in findings/*/crashes/*
set -l dest desc/(basename $i)
if [ ! -e $dest ]
echo $i
lldb -b --one-line "run $i" --one-line-on-crash 'quit' ./run > $dest
sleep 0.1
end
end
View Makefile
fuzz: image findings
docker run --cpuset-cpus=0 --rm -it -v ${HERE}/findings:/findings pyfuzz /afl-fuzz -m 200 -x /dict.txt -i /tests -o /findings -M master /run
fuzz-extra:
seq 10 | parallel docker run --cpuset-cpus={} --rm -i -v ${HERE}/findings:/findings pyfuzz /afl-fuzz -m 200 -x /dict.txt -i /tests -o /findings -S slave{} /run
View make_dict.py
import string;
import keyword
import json
import ast
ASSIGN_OPS = """
'+=' | '-=' | '*=' | '@=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>>=' | '**=' | '//='
"""
View Makefile
py:
(cd cpython && make clean)
(cd cpython && env CC=../afl/afl-clang-fast CXX=../afl/afl-clang-fast++ ./configure --cache-file=../config.cache --prefix=${PYROOT} --exec-prefix=${PYROOT})
(cd cpython && env CC=../afl/afl-clang-fast CXX=../afl/afl-clang-fast++ make install -j8)
View afl-run.c
#include <stdio.h>
#include <Python.h>
#define IN_BUF_SIZE 16384
int main(int argc, char **argv) {
char script[IN_BUF_SIZE + 1];
View server.js
var express = require('express')
var http = require('http')
var path = require('path')
var reload = require('reload');
var app = express()
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname, 'public', 'test.html'));
})
View gist:e59648380dd821f36bc766d341ce7642
var express = require('express')
var http = require('http')
var path = require('path')
var reload = require('reload');
var app = express()
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname, 'public', 'test.html'));
})