[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Core Dump when PagePool/WebTraf - Page Size > 1?
> I'm completely confused. I hope I don't miss anything by assuming this
> event chain:
>
> sched() -> new event -> handle() -> expire() -> next event ...
>
> How come this will miss the first sched()????
>
> - Haobo
>
I got it, in WebTrafSession::handle(), the code was like this:
TimerHandler::handle(e);
// If I've scheduled all my pages, don't schedule it any more.
if (++curPage_ >= nPage_)
return;
sched(...);
so it calls handle() -> expire() first, then increase the value
of curPage_, and since in expire(), the program will increase
the value of donePage_, then check if donePage_ >= nPage_, and
will stop there if it does. (so it could be the case that curPage is
less than donePage_ when all the page are launched).
Therefore, it leads to the warning and abort sequence when session
ended because curPage_ != donePage_.
Exchanging the order of TimerHandler::handle(e) and ++curPage_
will solve this problem.
I was wrong in that I thought sched() would launch a page, sorry for
previous misleading messages.
Guo, Liang.