timer issues in 20010221 cvs
Christophe Wolfhugel
wolf at oleane.net
Wed Feb 21 22:26:36 UTC 2001
Following up today proposals and remarks, I'm not sure that the
patch from Alex Kiernan fits -- well it avoids the crashes, but
I do believe the problem is not there.
There is a list of timers defined in innd.h :
enum timer {
TMR_IDLE = TMR_APPLICATION, /* Server is completely idle. */
TMR_ARTCLEAN, /* Analyzing an incoming article. */
TMR_ARTWRITE, /* Writing an article. */
TMR_ARTCTRL, /* Processing a control message. */
TMR_ARTCNCL, /* Processing a cancel message. */
TMR_SITESEND, /* Sending an article to feeds. */
TMR_OVERV, /* Generating overview information. */
TMR_PERL, /* Perl filter. */
TMR_PYTHON, /* Python filter. */
TMR_NNTPREAD, /* Reading NNTP data from the network. */
TMR_ARTPARSE, /* Parsing an article. */
TMR_ARTLOG, /* Logging article disposition. */
TMR_DATAMOVE, /* Moving data. */
TMR_MAX
};
and it is taken back in innd/chan.c :
static const char * const timer_name[] = {
"idle", "artclean", "artwrite", "artctrl", "artcncl", "sitesend",
"overv", "perl", "python", "nntpread", "artparse", "artlog", "datamove"
};
what I'm understanding is that other modules, like innd/his.c use different
timers, like TMR_HISSYNC, these are defined in include/inn/timer.h :
enum {
TMR_HISHAVE, /* Looking up ID in history (yes/no). */
TMR_HISGREP, /* Looking up ID in history (data). */
TMR_HISWRITE, /* Writing to history. */
TMR_HISSYNC, /* Syncing history to disk. */
TMR_APPLICATION /* Application numbering starts here. */
};
By looking at the pre-processed code from his.c where get this :
enum {
TMR_HISHAVE,
TMR_HISGREP,
TMR_HISWRITE,
TMR_HISSYNC,
TMR_APPLICATION
};
[...]
enum timer {
TMR_IDLE = TMR_APPLICATION,
TMR_ARTCLEAN,
TMR_ARTWRITE,
TMR_ARTCTRL,
TMR_ARTCNCL,
TMR_SITESEND,
TMR_OVERV,
TMR_PERL,
TMR_PYTHON,
TMR_NNTPREAD,
TMR_ARTPARSE,
TMR_ARTLOG,
TMR_DATAMOVE,
TMR_MAX
};
In the above example, TMR_HISSAVE = 0, TMR_IDLE = TMR_APPLICATION = 4, etc...
I would then conclude that we miss either 4 empty elements in timer_name
or the "id" value should get 4 substracted for referencing right in the
array ?
Does that analysis seem reasonnable to the readers ?
--
Christophe Wolfhugel -+- wolf at oleane.net -+- France Telecom Transpac
More information about the inn-workers
mailing list