[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scheduler core-dropper (2.99.23)
Ok, FOUND it -- if you (like is the default) compile ZMailer with
``MM-Malloc'' in debug mode, the current scheduler can drop core if:
1) A message as multiple recipients
2) One of the recipients expires
3) More addresses are still active
It could happen, that a referral thru free()ed memory read from it
a pointer with value 0x55555555 (32-bit machines), and then tried
to refer via it into nonexisting memory -> crash.. Fix is to do the
``vp->proc'' referral before possibly invalidating the block.
( DIFF is below for the impatient :) )
There is another memory leakage elsewere -- every error report from
ZMailer leaks a bit of scheduler memory (diff not included), but it
is not that bad..
I will look at the other letters I got over the last week yet, so
perhaps I won't do 2.99.24 today/tonight..
Lately I have been thinking of building a multi-threaded SMTP-client,
one which is feed a set of addresses (like "*.edu"), which opens all
such addresses in parallel, opens SMTP sessions to necessary targets,
and keeps connection caches. The more I think about it, the more it
sounds like a thing that must be done, but which will not be an easy
one.. .. not it will likely be of ``low tech'' implementation, that
is, I envision POSIX-Threads to be at the core of the beast.
/Matti Aarnio <mea@nic.funet.fi>
diff -c ../../zmailer-2.99.23/scheduler/update.c update.c
*** ../../zmailer-2.99.23/scheduler/update.c Sat Dec 30 00:25:51 EET 1995
--- update.c Tue Jan 2 12:59:09 EET 1996
***************
*** 677,687 ****
* the heuristic in reschedule() to ignore the request if
* the time is already in the future should help out.
*/
- thread_reschedule(vp->thread, retrytime, index);
if (vp->proc && vp->proc->vertex == vp)
/* Pick next, but don't feed it (yet)! */
pick_next_vertex(vp->proc, 0);
return 1;
}
--- 677,689 ----
* the heuristic in reschedule() to ignore the request if
* the time is already in the future should help out.
*/
+ /* ``vp'' might become expired by thread_reschedule() .. */
if (vp->proc && vp->proc->vertex == vp)
/* Pick next, but don't feed it (yet)! */
pick_next_vertex(vp->proc, 0);
+
+ thread_reschedule(vp->thread, retrytime, index);
return 1;
}