Ticket #4010 (closed Bugs: fixed)
Boost message queue bug
|Reported by:||rusty0831 <rusty_lai@…>||Owned by:||igaztanaga|
|Keywords:||bug message queue temp folder bootstamp||Cc:||anders.widen@…|
There is a serious bug within the message queue. Originally boost message queue intends to create temp files under a randomly generated temp folder, boost uses undocumented Windows APIs to get the bootstamp to generate the folder name, the folder name looks like "C:\Documents and Settings\All Users\Application Data/boost_interprocess/D0F325BE8579CA01/". Unfortunately that there is a bug of the method to generate the bootstamp, that the bootstamp will vary, even without rebooting!!
This will cause problems that, if a message queue is running for hours, further request from client cannot connect to it because of the newly generated bootstamp is different!!
This bug can be replicated by
- Write a test program (A), create a message queue and let it running for hours (e.g. 3hours...) When the message queue is created, a folder under "C:\Documents and Settings\All Users\Application Data\boost_interprocess\D0F325BE8579CA01" will be created. Notice the folder name "D0F325BE8579CA01".
- Write another test program (B) to connect to the message queue created by test program (A). You will notice that it's unable to connect to the message queue created by program (A).
You can also find that another folder "C:\Documents and Settings\All Users\Application Data\boost_interprocess\9053E2F2EBC0CA01" is created. Notice that the folder name "9053E2F2EBC0CA01" is different from "D0F325BE8579CA01".
There is another more simple method to replicate the issue instead of to wait for hours. The steps are mostly the same as [Method 1], the difference is before running test program (B), please change the system time.
Afterwards test program (B) is unable to connect to test program (A) anymore.
- Status changed from new to closed
- Resolution set to fixed
- Milestone changed from Boost 1.43.0 to Boost-1.45.0