Greetings.
I have been noticing this bug for awhile. When making copies from
multiple servers. After all the copies from the multiple servers have
been completed, cf-agent will seg fault:
cf3 Existing connection just became free...
Segmentation fault in ServerDisconnection at line 195 in file
"/mnt/cfengine-svn/trunk/src/client_code.c" ($t1)
195 close(conn->sd);
Then conn structure seems to get corrupted in CacheServerConnection
(client_code.c):
for (rp = SERVERLIST; rp != NULL; rp=rp->next)
{
svp = (struct ServerItem *)rp->item;
conn = svp->conn;
if (strcmp(ipname,conn->localip) == 0)
{
conn->sd = CF_COULD_NOT_CONNECT;
return;
}
}
I am not sure of the purpose of this code segment, but is appears to
be damaging. If someone else could please take a look at it. I need a
second pair of eyes on this one.
Also, in the same function:
rp = PrependRlist(&SERVERLIST,"nothing",CF_SCALAR);
free(rp->item);
svp = (struct ServerItem *)malloc((sizeof(struct ServerItem)));
rp->item = svp;
svp->server = strdup(ipname);
svp->conn = conn;
shouldn't you add a:
svp->busy=false
as well? I happened to stumble across this as a host want
inadvertently marked busy, when it wasn't. Seems the busy was never
set.
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine