Semaphore issue

Richard Kettlewell rjk at greenend.org.uk
Sat Jun 20 09:27:00 UTC 2015


https://lists.isc.org/pipermail/inn-workers/2011-September/017933.html
> I believe there is a latent problem with our use of semaphores.
> I experienced again an exhaustion of available semaphores.

(Also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544457#30 )

The problem is quite simple: buffindexed deletes its shared memory
segment when there are no more users (i.e. when shm_nattch==0), but it
fails to delete the semaphore at the same time.

Patch attached.  'make check' no longer leaks semaphores.  I modified my
test rig to use buffindexed in one test so the code has been run in its
proper environment at least once!

ttfn/rjk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: semaphore.patch
Type: text/x-patch
Size: 1388 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20150620/ac2b6929/attachment.bin>


More information about the inn-workers mailing list