Hi ! I have a problem with the test shmget03 to make it "concurrency-safe". Actually, this test is broken by design in term of concurrency-safeness.
This test checks if the shmget function returns ENOSPC when the maximum
number of IPCs has been reached.
It works as follow :
setup: loop on shmget until shmget fails (so we reached the maximum
IPC number limit)
main: try to allocate a new memory segment and check if the function
returns ENOSPC.
cleanup: free all the allocated memory segments.
If we run several instances of this test, we can have the following behavior
Process A Process B
setup
cleanup
main
In this case, when process A enter the main function, the process B is
freeing IPCs, making possible to allocate new IPC and making the test
fail.
I'm wondering why this test is split in two parts :
1/ looping until reaching the maximum number of IPCs
2/ trying to allocated a new one and checking it returns ENOSPC.
So... Why doing the second operation since we already reached the limit
and received an ENOSPC in the 1st part ?
Any idea or comment ?
Regards.
R.
--
Renaud Lottiaux
Kerlabs
Bâtiment Germanium
80, avenue des buttes de Coësmes
35700 Rennes - France
Phone : (+33|0)6 80 89 19 34
Fax : (+33|0)2 99 84 71 71
Email : [EMAIL PROTECTED]
Web : http://www.kerlabs.com/
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
