Re: [PATCH] soup-message-io: protect unpause_source by mutex



On Thu, Jan 21, 2010 at 15:52, Dan Winship <danw gnome org> wrote:
> On 01/21/2010 03:37 AM, Andrew W. Nosenko wrote:
>> On Wed, Jan 13, 2010 at 13:45, Andrew W. Nosenko
>> <andrew w nosenko gmail com> wrote:
>>> soup-message-io: protect unpause_source by mutex
>>>
>>> Otherwise the the multithreaded program, which pauses message in the
>>> one (server) thread and unpauses it in the another (worker) thread may
>>> experience a crash under high workload (and in my case experienced it
>>> indeed).
>>
>> Ping?
>
> (So first off, you should file patches in bugzilla, not on the mailing
> list.)

Hmm...  Sorry.  I jush have not so good expirience with bugzilla in general...

> Anyway, yes I saw the message.

Thanks.  Essencially the "ping" was intended for verify that -- I has
suspiction that message could be "lost"/"hidden" by some spam filter.

> I haven't look at it in detail yet. Note
> that the docs state that only SoupSessionSync is thread-safe, and since
> soup_session_pause_message() only works with SoupSessionAsync,

There are two problems:

1. It is about SoupServer indeed.  Pause/unpause meant by me are
soup_server_pause_message() / soup_server_unpause_message().

2. [unrelated to this patch, just for yout info] SoupSessionSync is
not as thread safe as intended to be, unfortuanlely -- there lives
some race condition also (and I expirienced crashes there too).  But
in contrast to the SoupServer it was easy worked around by creating
one SoupSessionSync per one thread, while SoupServer has no such
ability.

> this
> probably means you're doing something which is known to not work, and
> even after fixing this there will probably be other problems too,
> because none of the async code paths have been tested much for threadsafety.

-- 
Andrew W. Nosenko <andrew w nosenko gmail com>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]