Up to Main Index                               Up to Journal for May, 2013

                     JOURNAL FOR WEDNESDAY 1ST MAY, 2013
______________________________________________________________________________

SUBJECT: Testing and network weirdness
   DATE: Wed May  1 21:21:59 BST 2013

Well it's WolfMUD Wednesday again - not that I've been idle since my last post.
Regular readers of this journal will know I've been working on completing test
cases, bug fixing and generally polishing the code.

Writing tests can sometimes *seem* to be a pointless exercise - especially
when there are more fun things to do like actually coding - even though we all
know it's not pointless[1]. However writing tests feels much more satisfying
and beneficial when you actually discover bugs and fix them.

Since last week I've been hunting down a few bugs with the client package
which handles most of the networking code. In doing so I've simplified the
bailing/locking code and made it more robust and also found a minor nit where
access to the bail member wasn't properly protected by locking in one
instance.

The actual bug I'm hunting right now is kind of odd, deep in the network code
and present in Go 1.0.3 and 1.1 RC1 which was released today - even though I'm
actually running tip at the moment.

The 'bug' seems to be deferred calls in the network standard library that
stack up and don't end - even after the sockets are closed. This leads to
memory being tied up and not released as there is nothing to trip the deferred
routines. There are no lingering connections and the go routines for the
connections have ended.

--
Diddymus

  [1] See: Myers, Glenford J. (1979). The Art of Software Testing.
      John Wiley and Sons. ISBN 0-471-04328-1

      I thought it expensive when I bought the small and slim hardback 2nd
      edition with the orange cover for £85 a long time ago. It was well worth
      it. There is a 3rd edition (Dec 2011) which is £95 but I don't have it.

______________________________________________________________________________

SUBJECT: Testing and network weirdness - update
   DATE: Wed May  1 22:16:35 BST 2013

Not sure but after some more testing and debugging I *think* the weirdness may
be something to do with the net library pollServer ... possibly ...

--
Diddymus


  Up to Main Index                               Up to Journal for May, 2013