[news.admin] Netnews v2 abend while CP ACNT close issued.

CCSMBRK@TECHNION.BITNET (Moshe Barak) (12/29/89)

Hi ..
We are running NetNews V2 for few days now . Occasionally the server
would crash in routine GetTime . Tracing it I came to the conclusion
that when the command CP ACNT ALL CLOSE is issued ( we do it few times
a day for our accounting system ) GetTime will fail on proccessing
a negative number , resulting from G.VIRTCPU retaining it's original
value while VCPU being reset by the ACNT command.
As we issue CP ACNT command at least 6 times a day , this caused us
a real problem as quite some few commands use the GetTime routine
(PURGE, STAT to name a few ).

I'm appending the console log below ..
Thanks
Moshe

p.s : I bypassed the problem caused by the server crashing on this
by adding a line for each VCPU  and TOTCPU in GetTime routine,something
like : if vcpu <= g.virtcpu then vcpu = vcpu + g.virtcpu .
while this solved us the server crash , which was the urgent thing to
do for us , it will not produce  correct statistical values ..
any ideas ?

----------       Log starts here ....       ---------------------

 13:48:02 Waiting for interrupt . . .

/--->>> counters zeroed here by CP ACNT COMMAND :   m.b

 CONNECT= 00:03:58 VIRTCPU= 000:15.05 TOTCPU= 000:18.01

 13:49:28 Processing message from CCSMBRK:  STAT


   2466 *-*            /* Returns elapsed time, virtual cpu, & total cpu */
   2467 *-*            time = diag('C')
        >>>              "12/27/8913:49:29??????::???????*"
   2468 *-*            numeric digits 32
        >>>              "32"
   2469 *-*            parse var time 17 vcpu 25 tcpu +8 .
        >>>              "??????::"
        >>>              "???????*"
        >.>              ""
   2470 *-*            vcpu = c2d(vcpu) / 1000000
        >>>              "0.087291"
   2471 *-*            tcpu = c2d(tcpu) / 1000000
        >>>              "0.143452"
   2472 *-*            say' return'    time('E') vcpu-g.virtcpu tcpu-g.totcpu

/---->>> and as a result GetTime receives a negative number:  m.b .

        >>>              " return 225.120688 -14.748796 -17.431164"
  return 225.120688 -14.748796 -17.431164

/------>>>>>> ,since vcpu has been initialized while g.virtcpu not. m.b


   2473 *-*            say vcpu g.virtcpu tcpu g.totcpu
        >>>              "0.087291 14.836087 0.143452 17.574616"
 0.087291 14.836087 0.143452 17.574616
   2474 *-*            trace n
 num=225.130203
 OUTSTATS -14.748796 Virtual CPU adding articles
 num=-14.748796
   2488 +++              secs = format(num // 60, 2, 2)
   1874 +++             info = right(FormatTime(num),11) ' ' text
   1857 +++           call OutStats vcpu - g.p_virtcpu 'Virtual CPU adding
articl
 es'
    261 +++          msg = CmdSTATS(args)
    261 +++         interpret 'msg = Cmd'CmdVerb'(args)' /* Go do the command */
    231 +++      call ProcessCommand userid umsg
    116 +++   call ProcessMESSAGE
    116 +++  interpret 'call Process'interrupt
 :
 DMSREX475E Error 40 running NNSERVER EXEC, line 2488: Incorrect call to routine