Vanilla List Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [VANILLA-LIST:2603] base etempbug...



On Fri, Aug 20, 1999 at 12:27:36AM -0700, Carlos Y. Villalpando wrote:
> Quoting Carlos Y. Villalpando <unbelver@brain.jpl.nasa.gov>: 
> 
> > I'm leaning towards something more going on as well as these two.
> > I'll keep looking.
> 
> One final brainstorm before I go to bed, but I notice that there's no
> semaphore on p_docked. (the "how many ships are docked on me" counter)
> 
> I notice a lot of code (esp 1 func in orbit.c) that goes:
> 
> check value of p_docked for value less that max
> 
> <tons of code that assumes value is valid>
> 
> base->p_docked++;
> base->p_port[port_id] = me->p_no;
> 
> And that code is in ntserv (and there are 16 of those running
> around).  Could there be corruption going on there?

That feels right, that it's some sort of race condition.  Maybe when two
ships try to dock at the same time, or break dock at the same time,
and they both decrement the same value of base->p_docked and give it
back to daemon.
 -Tom