Matt, thanks for this. Having looked at it, I'm not sure what I was
thinking. It looks as though it might be a copy/paste error.
Could you try to current svn and let me know if it helps? This is very
useful testing, as my testbase for this kind of thing has gone away.
M
Matt Richards wrote:
> 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
--
Mark Burgess
-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway
Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine