Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 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@… 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by aalutov@…

Attachment: multithread_producer.cpp added

comment:1 Changed 4 years ago by Ion Gaztañaga

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?

comment:2 in reply to:  1 Changed 4 years ago by anonymous

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 Changed 4 years ago by Ion Gaztañaga

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.

comment:4 in reply to:  3 Changed 4 years ago by anonymous

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 Changed 4 years ago by Ion Gaztañaga

Resolution: fixed
Status: assignedclosed

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

comment:6 in reply to:  5 Changed 4 years ago by anonymous

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ion Gaztañaga.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.