Skip to content

Instantly share code, notes, and snippets.

View andreaceccanti's full-sized avatar

Andrea Ceccanti andreaceccanti

View GitHub Profile
def a():
time.sleep(1)
def b():
time.sleep(2)
class TestRunner:
def _run(self):
a()
[ceccanti@emitestbed43 ~]$ ldapsearch -x -h localhost -p 2170 -b 'GLUE2GroupID=resource,o=glue' objectCLass=GLUE2Endpoint
# extended LDIF
#
# LDAPv3
# base <GLUE2GroupID=resource,o=glue> with scope subtree
# filter: objectCLass=GLUE2Endpoint
# requesting: ALL
#
# emitestbed43.cnaf.infn.it_VOMS_2715298739_voms_2715298739_testers3.eu-emi.e
@andreaceccanti
andreaceccanti / gist:4227554
Created December 6, 2012 19:30
Test that shows how VOMS Java APIs (if not properly used) will leak memory
public class TestOOM2 {
public static final Logger log = Logger.getLogger(TestOOM.class);
public TestOOM2() throws CertificateException {
X509Certificate[] proxyChain = PKIUtils.loadCertificates("/tmp/x509up_u504");
while(true){
package org.italiangrid.test_oom;
import java.io.IOException;
import java.security.cert.CRLException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;