PANIC: semaphore invalid or not allocated

Hi,

i’m running a Notes C++ API program on a Win2k machine, with a Notes client v6.5 installed. Using the C++ API it connects to a Domino server running a redhat 8.0 with kernel 2.4.18-14 (perhaps that’s relevant…)

i’m using my program to go through databases and read the contents of documents. it works fine for about 30,000 docs, but then for just one of them (always the same) i get the following message on the console:


30-08-2004 17:12:50, info, URI link of document : ‘http://saturn:80/mail/dbeckers.nsf/9BB22B3CB005B02D852564B5001283E0/D4C091472A1E24B1C1256E93002D8E02?OpenDocument’.

30.08.2004 17:12:51 Begin MIME to CD Conversion (Process: ? (00000874:00000002), Database: CN=Saturn/O=ARXNET!!mail\dbeckers.nsf, Note: 0000288E)

Thread=[0874:0002-081C]

Stack base=0x341BDD10, Stack size = 1136 bytes

PANIC: semaphore invalid or not allocated


so the first line is ok, that’s a message i display myself. the second line comes normally with mail messages, it’s generated by Notes for some reason. i normally get a line stating the end of the conversion after that. but here, the app freezes after the “PANIC” has been displayed. the message is quite a normal-looking email, with no special features – just a vcf file attached, but it’s not processed at this point.

after my program has crashed this way, i have to kill it using the task manager (ctrl-c doesn’t work), and then if my notes client was running it’s frozen as well, i just have to kill it. and it won’t start again until i’ve also killed ntaskldr.exe and nslservice.exe…

does someone know why this problem occurs? it’s obviously not a memory problem (500MB available on the machine), and there doesn’t seem to be anything special about this message. and seeing as my program can process 30,000 docs without any hitch, i expect it’s not a blatant bug in the code – not even sure it has to do with the API, as obviously the crash occurs while Notes (or the Domino server) is performing an internal task (this MIME to CD conversion thing)… if someone’s come across this problem and comprehended it, could they please give me a hint?

thx

David

Subject: Re: PANIC: semaphore invalid or not allocated

Try running your C++ program on just the one problematic doc. If it bombs then there is something particular about that document causing the problem – either something strange causing a MIME/CD bomb, general document corruption, etc.

Subject: RE: Re: PANIC: semaphore invalid or not allocated

I’ve tried to run the program over only the one database that contains the doc… No problem, the thing runs through with no complaints…

Besides, displaying the document in Notes or in a Web browser is no problem at all.

However, I’d say it’s something special with this document anyway, cos even when I let the app run over a large collection of databases it always crashes on the same doc, although the rest of the databases (what’s retrieved before) is prone to changes (like mail dbs).

What’s this MIME/CD conversion thing anyway? For some docs the begin/end conversion messages are displayed up to 10 or 20 times – all for just one mail message!! And it appears only for mail messages. Is there a way one can turn these messages off? It pretty much fills up the console, and I can’t say I’m too interested – although of course in this case it might help, but when it works I don’t really care…

Thx for helping

David

Subject: RE: Re: PANIC: semaphore invalid or not allocated

MIME/CD conversion is the conversion that takes between MIME and Domino’s native storage/rendering format (CD). This is typically Rich Text to HTML or vice-versa, but happens under various other circumstances as well.

Throw this in your INI file to keep those messages from being reported to your console:

converter_log_level=10

Without knowing exactly what your program is doing I’d say you’ve got a problem with that one document. There are various techniques posted here that can help you get around a problematic document: examine its contents, run a fixup on the DB, etc.

Subject: RE: Re: PANIC: semaphore invalid or not allocated

ok, thx a lot for your help. i’ve asked our admin to run this fixup on the db, i hope it’s gonna solve the problem. it might be that i try to read some corrupted data, which is not caught by the C++ API and crashes my program, whereas notes can catch the problem while displaying the doc in a web browser or a notes client… normally all i do is read the content of the fields that contain text in the document to be able to retrieve a full-text version of it, so it shouldn’t be too heavy, but who knows.

and thx for the tip about the converter, i’ll do that right away :slight_smile:

David