Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9221 closed Bugs (fixed)

message_queue deadlock on linux

Reported by: aalutov@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.54.0 Severity: Problem
Keywords: message_queue deadlock Cc:

Description

I have a problem with message_queue on linux. there are two writers and one reader. some milliseconds after start application locks on receive and send methods. writers waits while(is_full()), reader waits while(is_empty()) (see attach); If I add manual synchronization in writers (scoped lock), application closes normal.

Attachments (1)

multithread_producer.cpp (1.4 KB ) - added by aalutov@… 9 years ago.

Download all attachments as: .zip

Change History (7)

by aalutov@…, 9 years ago

Attachment: multithread_producer.cpp added

comment:1 by Ion Gaztañaga, 9 years ago

Thanks for the report. I'm still not able to reproduce the problem, but I'll try harder with different linux versions. Do you know the libc version in your system?

in reply to:  1 comment:2 by anonymous, 9 years ago

Replying to igaztanaga:

Thanks for the report. I'm still not able to reproduce the problem, but I'll try harder with different linux versions. Do you know the libc version in your system?

Thanks for reply. My libc version is 2.15. linux x86_64, kernel version is 3.5.0-030500-generic.

comment:3 by Ion Gaztañaga, 9 years ago

Status: newassigned

I've reproduced the bug, the queue only works for single proucer / single consumer. I have a fix adding some blocked producer and consumer counters. You test case seems fixed with these counters. I'll commit it to trunk ASAP, it would be nice if you could tell me if the problem was completely solved.

in reply to:  3 comment:4 by anonymous, 9 years ago

Replying to igaztanaga:

I've reproduced the bug, the queue only works for single proucer / single consumer. I have a fix adding some blocked producer and consumer counters. You test case seems fixed with these counters. I'll commit it to trunk ASAP, it would be nice if you could tell me if the problem was completely solved.

Ok, I'll check my test after your commit.

comment:5 by Ion Gaztañaga, 9 years ago

Resolution: fixed
Status: assignedclosed

(In [86316]) Fixes #9221 ("message_queue deadlock on linux")

in reply to:  5 comment:6 by anonymous, 9 years ago

Replying to igaztanaga:

(In [86316]) Fixes #9221 ("message_queue deadlock on linux")

I can't reproduce this bug on trunk. Problem was solved. Thank you.

Note: See TracTickets for help on using tickets.