Tuesday, December 13, 2011, 7:00:42 PM, you wrote:
>> > No other thread can call vc->do_io_close if they don't have the pointer
>> > to it.
>> Turns out that at least other thread does have a pointer.
> Then they should not.
Great. Now explain it to the compiler. Let me know when you've done that
On Tue, Dec 13, 2011 at 3:51 PM, Alan M. Carroll <
a...@network-geographics.com> wrote:
> Tuesday, December 13, 2011, 3:30:06 PM, you wrote:
>
> > No other thread can call vc->do_io_close if they don't have the pointer
> to
> > it.
>
> Turns out that at least other thread does have a pointer.
>
Tuesday, December 13, 2011, 3:30:06 PM, you wrote:
> No other thread can call vc->do_io_close if they don't have the pointer to
> it.
Turns out that at least other thread does have a pointer.
> It is up to the protocol engine to ensure that all pointers are clear.
Still not clear on how the pro
This worked for 15 years. This is how Traffic Server was designed and how
it has run for years at AOL with uptime measured in months under very high
load on multi-processors with weaker memory guarantees than x86 (e.g.
Alpha).
Some new bug comes along and suddenly something which has been field t
Tuesday, December 13, 2011, 1:00:11 PM, you wrote:
> Clear all pointers to a NetVC then call vc->do_io_close.
> Period.
That does not work. Period. You can crash calling vc->do_io_close if another
thread de-allocates it at the same time. I also don't see how you can clear all
pointers when tho
This is done intentionally. The reason is to catch bugs, not to hide them.
By overwriting the pointer, bugs in client code will be caught faster and
caught in optimized code which is more likely to exhibit race conditions.
It makes working with NetVCs much safer as it helps you find bugs in you
Another point on this issue is why the NetVC allocation scheme swizzles the
virtual function pointer, rather than having a separate pointer for the free
list. This makes working with the NetVCs far more dangerous and I don't see
what the benefit that justifies this risk is. Is there any possibil