Boost logo

Boost :

Subject: Re: [boost] [interprocess] SHARING_VIOLATION due to antivirus
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-08-19 00:56:03


On Tue, Aug 18, 2009 at 1:09 PM, Lars Hagstrom<lars_at_[hidden]> wrote:
> Hi,
>
> I've discovered that there is some unfortunate interaction of
> boost::interprocess and at least one antivirus product (ESET Nod32). The
> problem manifests on some installations, and the symptom is that an
> interprocess_exception with a native error code of 32
> (ERROR_SHARING_VIOLATION) occurs when a named_semaphore (or other named
> objects) are opened (well, I've only seen it when opening, but depending on
> the AV product I guess it may happen when creating as well).
>
> Googling a bit on this I found http://support.microsoft.com/kb/316609, which
> suggests that AV products take exclusive locks on files just as a file is
> being opened, which sometimes upsets calls to CreateFile. What they suggest
> is doing retries when a sharing violation occurs.
>
> I'm not really saying that this is a boost.interprocess bug, but at least
> for me it would be handy if it was a little bit more tolerant towards AV
> products.
>
> I've managed (after quite a lot of hard work) to get a test environment
> where I can reproduce this quite easily, so I'm more than willing to help
> out with testing.

To me, that sounds like a bug in the AV product, since with the code
you are only doing what you are supposed to be doing. If the AV
itself is acting like a virus and causes bugs like that, it is their
fault.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk