cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: splay trees

From: Xavier Bouchoux <xavierb_at_gmail.com>
Date: Wed, 17 May 2006 19:19:16 +0200

> Any chance you can add a call to the
> Curl_splayprint() function at some suitable place and log the output during
> the running of the process and when when it gets stuck, check a few final
> outputs to see how they looked?

ok, I got some more time to debug it.
so, the culprit (that turns a nice tree into a recursive one) is the
last call to
    multi->timetree = Curl_splayinsert((int)nowp->tv_sec,
                                       multi->timetree,
                                       &data->state.timenode);
in Curl_expire()

I don't really know what splay trees are, but in Curl_splayinsert()
I think the case /* it already exists one of this size */
will produce the situation if t = Curl_splay(i,t) is the same as area.

in anycase, the end of the log looks like this:
("before the 2nd call to splay in function xxx" --> SPLAY xxx<<< ,
 after --> SPLAY xxx>>>)

SPLAY curl_expire3<<<
1147883470[0]
SPLAY curl_expire3>>>
1147883470[0] [+]
SPLAY curl_expire2<<<
1147883470[0] [+]
SPLAY curl_expire2>>>
1147883470[0]
SPLAY curl_expire3<<<
1147883470[0]
SPLAY curl_expire3>>>
1147883470[0] [+]
SPLAY curl_expire1<<<
1147883470[0] [+]
SPLAY curl_expire1>>>
1147883470[0]
SPLAY curl_expire1<<<
1147883470[0] [+]
SPLAY curl_expire1>>>
1147883470[0]
SPLAY curl_expire3<<<
1147883470[0]
SPLAY curl_expire3>>>
1147883471[0]
  1147883471[1]
    1147883471[2]
      1147883471[3]
        1147883471[4]
         .....

xavier
Received on 2006-05-17