Hi guys, We found an interesting thing in your code. Functions build_alloc_msg and slurm_free_resource_allocation_response_msg are inconsistent. Variable msg->environment created in build_alloc_msg is deleted incorrectly in slurm_free_resource_allocation_response_msg. This led to the inoperability of the job_ptr->details->env_sup structure filling mechanism in the selection plugin. Everything works fine if we apply this patch: --- slurm-20.02.3.clean/src/slurmctld/proc_req.c 2020-05-21 23:34:01.000000000 +0300 +++ slurm-20.02.3/src/slurmctld/proc_req.c 2020-10-08 23:02:32.189548100 +0300 @@ -1295,11 +1295,12 @@ if (job_ptr->details->env_cnt) { alloc_msg->env_size = job_ptr->details->env_cnt; alloc_msg->environment = - xmalloc(sizeof(char *) * alloc_msg->env_size); + xmalloc(sizeof(char *) * (alloc_msg->env_size + 1)); for (i = 0; i < alloc_msg->env_size; i++) { alloc_msg->environment[i] = xstrdup(job_ptr->details->env_sup[i]); } + alloc_msg->environment[alloc_msg->env_size] = NULL; } } else { /* alloc_msg->pn_min_memory = 0; */