View Issue Details

IDProjectCategoryView StatusLast Update
0005540unrealircdpublic2020-01-26 10:28
Reporterivanp Assigned Tosyzop  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version5.0.2 
Fixed in Version5.0.3 
Summary0005540: EventAdd() from module ??? with suspiciously low every_msec value (2)
DescriptionWhen starting UnrealIRCd 5.0.2 seeing the following message in the log:

[BUG] EventAdd() from module ??? with suspiciously low every_msec value (2). Note that it is in milliseconds now (1000 = 1 second)!

grep doesn't show any EventAdd call having such low value.

Also it doesn't display the exact name of the module, but "???" instead.
Additional Information$ grep -ri EventAdd *

src/src/dns.c: unrealdns_timeout_hdl = EventAdd(NULL, "unrealdns_timeout", unrealdns_timeout, NULL, 500, 0);
src/src/modules/jointhrottle.c: EventAdd(ModInfo->handle, "jointhrottle_cleanup_structs", jointhrottle_cleanup_structs, NULL, 60000, 0);
src/src/modules/channeldb.c: EventAdd(modinfo->handle, "channeldb_write_channeldb", write_channeldb_evt, NULL, CHANNELDB_SAVE_EVERY*1000, 0);
src/src/modules/reputation.c: EventAdd(ModInf.handle, "delete_old_records", delete_old_records, NULL, DELETE_OLD_EVERY*1000, 0);
src/src/modules/reputation.c: EventAdd(ModInf.handle, "add_scores", add_scores, NULL, BUMP_SCORE_EVERY*1000, 0);
src/src/modules/reputation.c: EventAdd(ModInf.handle, "save_db", save_db_evt, NULL, SAVE_DB_EVERY*1000, 0);
src/src/modules/chanmodes/history.c: EventAdd(modinfo->handle, "history_clean", history_clean, NULL, HISTORY_TIMER_EVERY*1000, 0);
src/src/modules/chanmodes/floodprot.c: EventAdd(modinfo->handle, "modef_event", modef_event, NULL, 10000, 0);
src/src/modules/sasl.c: EventAdd(modinfo->handle, "sasl_timeout", sasl_timeout, NULL, 2000, 0);
src/src/modules/extbans/timedban.c: EventAdd(modinfo->handle, "timedban_timeout", timedban_timeout, NULL, TIMEDBAN_TIMER*1000, 0);
src/src/modules/connthrottle.c: EventAdd(modinfo->handle, "connthrottle_evt", connthrottle_evt, NULL, 1000, 0);
src/src/modules/tkl.c: EventAdd(modinfo->handle, "tklexpire", tkl_check_expire, NULL, 5000, 0);
src/src/modules/list.c: EventAdd(modinfo->handle, "send_queued_list_data", send_queued_list_data, NULL, 1500, 0);
src/src/modules/link-security.c: EventAdd(modinfo->handle, "checklinksec", checklinksec, NULL, 2000, 0);
src/src/modules/ident_lookup.c: EventAdd(NULL, "check_ident_timeout", check_ident_timeout, NULL, 1000, 0);
src/src/modules/tkldb.c: EventAdd(modinfo->handle, "tkldb_write_tkldb", write_tkldb_evt, NULL, TKL_DB_SAVE_EVERY*1000, 0);
src/src/hash.c: EventAdd(NULL, "bucketcleaning", e_clean_out_throttling_buckets, NULL, v, 0);
src/src/modules.c: EventAdd(NULL, "e_unload_module_delayed", e_unload_module_delayed, name, 0, 1);
src/src/api-event.c:Event *EventAdd(Module *module, char *name, vFP event, void *data, long every_msec, int count)
src/src/api-event.c: ircd_log(LOG_ERROR, "[BUG] EventAdd() from module %s with suspiciously low every_msec value (%ld). "
src/src/api-event.c: EventAdd(NULL, "tunefile", save_tunefile, NULL, 300*1000, 0);
src/src/api-event.c: EventAdd(NULL, "garbage", garbage_collect, NULL, GARBAGE_COLLECT_EVERY*1000, 0);
src/src/api-event.c: EventAdd(NULL, "loop", loop_event, NULL, 1000, 0);
src/src/api-event.c: EventAdd(NULL, "unrealdns_removeoldrecords", unrealdns_removeoldrecords, NULL, 15000, 0);
src/src/api-event.c: EventAdd(NULL, "check_pings", check_pings, NULL, 1000, 0);
src/src/api-event.c: EventAdd(NULL, "check_deadsockets", check_deadsockets, NULL, 1000, 0);
src/src/api-event.c: EventAdd(NULL, "handshake_timeout", handshake_timeout, NULL, 1000, 0);
src/src/api-event.c: EventAdd(NULL, "try_connections", try_connections, NULL, 2000, 0);
src/src/mempool.c: EventAdd(NULL, "mp_pool_garbage_collect", &mp_pool_garbage_collect, NULL, 119*1000, 0);
src/src/url.c: curl_socket_timeout_hdl = EventAdd(NULL, "curl_socket_timeout", curl_socket_timeout, NULL, 500, 0);
src/include/modules.h:extern Event *EventAdd(Module *module, char *name, vFP event, void *data, long every_msec, int count);
src/ImageAuthOnline-5.0.0/imgauth.c: EventAdd(ModInf.handle, "imgauth_connchk", imgauth_connchk, NULL, 15000, 0);
src/ImageAuthOnline-5.0.0/imgauth.c: EventAdd(ModInf.handle, "imgauth_timeout", imgauth_timeout, NULL, 5000, 0);
TagsNo tags attached.
3rd party modules

Activities

syzop

2020-01-26 10:28

administrator   ~0021264

Fixed now, thanks for the report. In your case, the warning itself was pretty harmless, just so you know :)

commit d482760c6f21c8a95150bbf4a4857eade16b46da
Author: Bram Matthys <[email protected]>
Date: Sun Jan 26 10:22:28 2020 +0100

    Fix warning about EventAdd with 2msec value.
    Reported by ivanp in https://bugs.unrealircd.org/view.php?id=5540
    
    This cleans things up a bit as well (remove duplicate code).

And a related fix of something that could have the same effect:

commit eede8d3ff614a3fda3583afe7b1e0115711a0ebd (HEAD -> unreal50, origin/unreal50)
Author: Bram Matthys <[email protected]>
Date: Sun Jan 26 10:26:07 2020 +0100

    Fix warning regarding low ms_every in case of delayed module unloading.

Issue History

Date Modified Username Field Change
2020-01-22 21:10 ivanp New Issue
2020-01-26 10:28 syzop Assigned To => syzop
2020-01-26 10:28 syzop Status new => resolved
2020-01-26 10:28 syzop Resolution open => fixed
2020-01-26 10:28 syzop Fixed in Version => 5.0.3
2020-01-26 10:28 syzop Note Added: 0021264