EmailWorker not threadsafe?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

EmailWorker not threadsafe?

Ean Schuessler
Is anyone using EmailWorker? I notice that it uses a class-wide static private int to keep track of how many attachments the email currently being stored has, which certainly isn't thread-safe and would almost certainly be tickled. It creates CommunicationEvents for me successfully but doesn't seem to create attachments.

Is anyone making use of this code in a production setting?

--
Ean Schuessler, CTO Brainfood.com
[hidden email] - http://www.brainfood.com - 214-720-0700 x 315
Reply | Threaded
Open this post in threaded view
|

Re: EmailWorker not threadsafe?

David E Jones

Sounds like a pernicious evil and should be corrected....

-David


On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:

> Is anyone using EmailWorker? I notice that it uses a class-wide  
> static private int to keep track of how many attachments the email  
> currently being stored has, which certainly isn't thread-safe and  
> would almost certainly be tickled. It creates CommunicationEvents  
> for me successfully but doesn't seem to create attachments.
>
> Is anyone making use of this code in a production setting?
>
> --
> Ean Schuessler, CTO Brainfood.com
> [hidden email] - http://www.brainfood.com - 214-720-0700 x 315

Reply | Threaded
Open this post in threaded view
|

Re: EmailWorker not threadsafe?

Ean Schuessler
I'll take that as a "no". :-D

----- "David E Jones" <[hidden email]> wrote:

> Sounds like a pernicious evil and should be corrected....
>
> On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:
> >
> > Is anyone making use of this code in a production setting?

--
Ean Schuessler, CTO Brainfood.com
[hidden email] - http://www.brainfood.com - 214-720-0700 x 315
Reply | Threaded
Open this post in threaded view
|

Re: EmailWorker not threadsafe?

David E Jones

Actually, my guess is that people are using it in production, and either haven't been hit by the problem yet, or haven't noticed, or having noticed weren't sure what to do about it...

Do you have a patch for this, or do we need a volunteer to knock this out?

-David


On Thu, 17 Jul 2008 13:31:34 -0500 (CDT), Ean Schuessler <[hidden email]> wrote:

> I'll take that as a "no". :-D
>
> ----- "David E Jones" <[hidden email]> wrote:
>
>> Sounds like a pernicious evil and should be corrected....
>>
>> On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:
>> >
>> > Is anyone making use of this code in a production setting?
>
> --
> Ean Schuessler, CTO Brainfood.com
> [hidden email] - http://www.brainfood.com - 214-720-0700 x 315

Reply | Threaded
Open this post in threaded view
|

Re: EmailWorker not threadsafe?

BJ Freeman
I reported this back last year.
glad to know what was causing it.

David Jones sent the following on 7/17/2008 12:58 PM:

> Actually, my guess is that people are using it in production, and either haven't been hit by the problem yet, or haven't noticed, or having noticed weren't sure what to do about it...
>
> Do you have a patch for this, or do we need a volunteer to knock this out?
>
> -David
>
>
> On Thu, 17 Jul 2008 13:31:34 -0500 (CDT), Ean Schuessler <[hidden email]> wrote:
>> I'll take that as a "no". :-D
>>
>> ----- "David E Jones" <[hidden email]> wrote:
>>
>>> Sounds like a pernicious evil and should be corrected....
>>>
>>> On Jul 16, 2008, at 5:54 PM, Ean Schuessler wrote:
>>>> Is anyone making use of this code in a production setting?
>> --
>> Ean Schuessler, CTO Brainfood.com
>> [hidden email] - http://www.brainfood.com - 214-720-0700 x 315
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: EmailWorker not threadsafe?

Ean Schuessler
I can fix the thread problem easily enough, just need to pass the attachment count as a parameter in the method call rather than having a static field. My problem was that it didn't seem to save attachments correctly. I have a rather special case need where I handle nested trees of forwarded mails so I wrote something up from scratch. However, I could take a crack at debugging this. I can at least provide a patch to clear up the thread-safeness.

----- "BJ Freeman" <[hidden email]> wrote:

> I reported this back last year.
> glad to know what was causing it.
>
> David Jones sent the following on 7/17/2008 12:58 PM:
> > Actually, my guess is that people are using it in production, and
> either haven't been hit by the problem yet, or haven't noticed, or
> having noticed weren't sure what to do about it...
> >
> > Do you have a patch for this, or do we need a volunteer to knock
> this out?

--
Ean Schuessler, CTO Brainfood.com
[hidden email] - http://www.brainfood.com - 214-720-0700 x 315
Reply | Threaded
Open this post in threaded view
|

Re: EmailWorker not threadsafe?

Tim Ruppert
+1

On Jul 18, 2008, at 8:13 PM, Ean Schuessler wrote:

> I can fix the thread problem easily enough, just need to pass the  
> attachment count as a parameter in the method call rather than  
> having a static field. My problem was that it didn't seem to save  
> attachments correctly. I have a rather special case need where I  
> handle nested trees of forwarded mails so I wrote something up from  
> scratch. However, I could take a crack at debugging this. I can at  
> least provide a patch to clear up the thread-safeness.
>
> ----- "BJ Freeman" <[hidden email]> wrote:
>
>> I reported this back last year.
>> glad to know what was causing it.
>>
>> David Jones sent the following on 7/17/2008 12:58 PM:
>>> Actually, my guess is that people are using it in production, and
>> either haven't been hit by the problem yet, or haven't noticed, or
>> having noticed weren't sure what to do about it...
>>>
>>> Do you have a patch for this, or do we need a volunteer to knock
>> this out?
>
> --
> Ean Schuessler, CTO Brainfood.com
> [hidden email] - http://www.brainfood.com - 214-720-0700 x 315


smime.p7s (3K) Download Attachment