Posts Tagged ‘condor_ssh_to_job’

MALLOC_PERTURB_: Finding real bugs in condor_chirp

July 17, 2010

If you are not familiar with MALLOC_PERTURB_, you should read the fedora-devel post by Jim Meyering.

After condor_ssh_to_job, which gives you a shell in the environment of your running job,

$ /usr/libexec/condor/condor_chirp get_job_attr Owner                 
$ MALLOC_PERTURB_=97 /usr/libexec/condor/condor_chirp get_job_attr Owner
$ MALLOC_PERTURB_=98 /usr/libexec/condor/condor_chirp get_job_attr Owner
$ MALLOC_PERTURB_=0 /usr/libexec/condor/condor_chirp get_job_attr Owner

From io_proxy_handler.cpp:

		result = REMOTE_CONDOR_get_job_attr(name,recv_expr);
		if(result==0) {
			sprintf(line,"%u",(unsigned int)strlen(recv_expr));
		} else {

From chirp_client_get_job_attr in chirp_client.c:

		*expr = (char*)malloc(result);
		if(*expr) {
			actual = fread(*expr,1,result,c->rstream);
			if(actual!=result) chirp_fatal_request("get_job_attr");
		} else {

From condor_chirp.cpp:

	char *p = 0;
	chirp_client_get_job_attr(client, argv[2], &p);
	printf("%s\n", p);

%d bloggers like this: