Skip Menu |

This queue is for tickets about the IPC-Mmap CPAN distribution.

Report information
The Basics
Id: 34061
Status: resolved
Priority: 0/
Queue: IPC-Mmap

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.14
Fixed in: (no value)



Subject: make test leaks semaphores
My smoke box ran out of semaphores these days. I cleaned out all cumulated semaphores and ran make test on IPC::Mmap. After that again 5 occupied semaphores were around. Repeat. Same thing. So I'd say the tests are leaking semaphors, are they not? Greetings && Thanks,
On Thu Mar 13 17:38:03 2008, ANDK wrote: Show quoted text
> My smoke box ran out of semaphores these days. I cleaned out all > cumulated semaphores and ran make test on IPC::Mmap. After that again 5 > occupied semaphores were around. Repeat. Same thing. So I'd say the > tests are leaking semaphors, are they not? > > Greetings && Thanks,
Better 3 years late than never I guess. I will be doing some maintenance on the package, let's see what we can get fixed. I have noticed that the code requesting the new semaphore was using IPC_PRIVATE, which basically means leak every time the library is used. So I replaced the offending portion with a piece of code that uses ftok to get a unique semaphore id that remains the same. The ftok refers to the file specified in the mmap call. The side effect is that when using anonymous, you can no longer specify a dummy file, but I don't see any problem with that. Long story short, in my tests the leak stopped. Only one semaphore will be consumed no matter how many times a program gets run. I'll close the ticket at this point, but please feel free to reopen or contact me directly if there's anything. Best Regards, Athanasios Douitsis