Hi!
I am continuing my search of why does my remote headless image run out of semaphores eventually.
Every time I disconnect from the image with my VNC client (I click the disconnect icon) the count of leaked semaphores increases by 3. Since there is 3 semaphores per socket, I guess this is related to sockets.
Now what do I do? What do I check?
I am running the a Pharo image and Cog I got from CI server yesterday.
This is the script I use to count leaked semaphores:
| semaphores arr res |
arr := ExternalSemaphoreTable unprotectedExternalObjects.
semaphores := arr reject: #isNil.
res := semaphores collect: [:sema | sema pointersTo reject: [:ptr | ptr == arr or: [ptr == semaphores ] ] ].
res := res select: [ :each | each isEmpty ].
res size.