[IRCServices] Wrong number of users

Andrew Church achurch at achurch.org
Sat Dec 1 16:16:00 PST 2001


>problem is the following: *finduser() returns a pointer to a User struct
>that is not online anymore in some cases. And it seems this only happens
>when the user quit with Ping Timeout (as /ns info <nick> reports). So
>services know that the user quit, but they don't free the structure.
>
>Also /lusers shows something different than /os stats:
>/lusers:
>--- Current Local Users: 51  Max: 463
>--- Current Global Users: 61  Max: 472
>
>/os stats:
>-OperServ- Current users: 66 (2 ops)
>-OperServ- Maximum users: 470 (Nov 25 20:50:36 2001 CET)

     If you can find a way to consistently reproduce this problem (of
users not getting removed from Services' list), please let me know the
details.  Until then, there's not much I can do.

>Is there any good way to debug this ?

     The best way is to start Services with the -debug option, then do a
/lusers and /os stats periodically until you start noticing extra users
appearing in /os stats, then do a /who 0 and /os listusers (make sure
you've compiled with DEBUG_COMMANDS defined in config.h) and find out what
users are in Services' list that aren't actually online, and finally
terminate Services and review the log file to find out how those users
quit (you may want to rename the log file to something else and restart
Services normally so that your users have access to it).  Note that this
can take up a lot of disk space--anywhere from a few megabytes to 100MB or
more, depending on how busy your network is and how long it takes the
problem to reoccur.

     If you've gotten a debug log file which includes the problem occurring
but you can't figure out exactly why, put it on an FTP (or HTTP) site
somewhere and give me the URL; I'll take a look and see if I can find the
problem.

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/