This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

IPC and pthread condition variable bug


I have tried to build an application with queues in UNIX flavor (using msgget API). I have successfully ran cygwin server and enabled IPC. The program works if I use 2-3 queues to send messages between threads (single thread reads from one queue, multiple threads can write to any queue). Although if I try to create more than 3 queues, the application behaves very strange - some read queue operations (msgrcv without IPC_NOWAIT flag set) fail randomly (returns success even if there is no message in the queue or returns undefined errors).

I also tried to implement my own IPC, without cygwin server IPC. The code, which has been successfully tested on Solaris 5.10 platform and runs there normally, under cygwin fails randomly. I have investigated that the problem is with pthread condition variables and timedout wait: pthread_cond_wait and pthread_cond_timedwait returns undefined values (none of valid error codes). This situation occurs if I operate on many condition variables (more than 3). If I use only 3 condition variables, there is no errors and my IPC works absolutely fine.

Best regards,
Grzegorz Sikorski
Astro Infrastructure
Motorola Polska Electronics? Sp.z.o.o
Bobrzynskiego 46, 
30-381 Krakow, Poland
KRS 0000146875 - Poland
VAT No: PL6772135826
Share capital: 4,600,000 PLN? 
Details of Motorola's subsidiaries in the EU/EEA can be found at: v 

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]