Number of Threads in our application (C++) server process increases when evaluating CLIPS rules

156 views
Skip to first unread message

Andy

unread,
Apr 2, 2009, 1:44:13 PM4/2/09
to CLIPSESG
We have integrated v6.24 of CLIPS into our C++ based application.
Using process explorer (Process Explorer, process 'Properties' dialog,
'Threads' tab, 'Stack' button...) on windows, we see that there is
normally 7 threads tied to our application server process. Once we
initialize the CLIPS environment and evaluate a rule through CLIPS
api's, we see that there are an additional 11 threads tied to our
application server process. Are these additional threads from the
CLIPS rules engine? This was identified in windows, but will they
also show up in our unix environments?

I have included the output from the process explorer showing the stack
contents of the threads:

<our application server>.exe: (1)

ntkrnlpa.exe+0x6e9ab
ntkrnlpa.exe+0x2bf82
ntkrnlpa.exe+0x2c864
ntkrnlpa.exe+0xe975c
ntkrnlpa.exe+0x6a62c
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
ACE.dll!ACE_OS::thr_join+0x24


MSVCR80.dll: (6) (5 ACE threads, and the windows-specific error
handler thread)

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
ACE.dll!ACE_OS::sema_wait+0xf

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
MSWSOCK.dll+0x5fa7
WS2_32.dll!select+0xa7
ACE.dll!ACE_OS::select+0x2c

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
ACE.dll!ACE_OS::sema_wait+0xf

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
MSWSOCK.dll+0x5fa7
WS2_32.dll!select+0xa7
ACE.dll!ACE_OS::select+0x2c

ntkrnlpa.exe+0x6e9ab
ntkrnlpa.exe+0x2bf82
ntkrnlpa.exe+0x2c864
ntkrnlpa.exe+0xa89fa
ntkrnlpa.exe+0xa97f7
ntkrnlpa.exe+0xa22a8
ntkrnlpa.exe+0x6a62c
ntdll.dll!KiFastSystemCallRet
libsyss.dll!ERROR_register_out_of_memory_code+0xda
MSVCR80.dll!endthreadex+0x3b
MSVCR80.dll!endthreadex+0xc7

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
ACE.dll!ACE_OS::sema_wait+0xf


msvcrt.dll: (11) All of these showed up after initializing CLIPS and
evaluating a rule:

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
msvcrt.dll!endthreadex+0xa9
kernel32.dll!GetModuleFileNameA+0x1b4

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
msvcrt.dll!endthreadex+0xa9
kernel32.dll!GetModuleFileNameA+0x1b4

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!WaitForSingleObject+0x12
msvcrt.dll!endthreadex+0xa9
kernel32.dll!GetModuleFileNameA+0x1b4

<first 5 entries on stack same set as our application server>
ntdll.dll!KiFastSystemCallRet
kernel32.dll!Sleep+0xf

CLIPS Support

unread,
Apr 3, 2009, 8:58:22 AM4/3/09
to CLIPSESG
CLIPS does not explicitly allocate any threads itself. Any threads
created would be a result of the code generated by the compiler or the
calls to the system libraries used by the compiler.

jo

unread,
Apr 17, 2009, 11:04:47 AM4/17/09
to CLIP...@googlegroups.com

hi

I am looking for a function like explode but that can explode with a specific delimiter not just whitespace.

Thanks
J.


Johan Lindberg

unread,
Apr 18, 2009, 5:46:01 AM4/18/09
to CLIP...@googlegroups.com
Hi,

> I am looking for a function like explode but that can explode with a specific delimiter not just whitespace.

I wrote one a couple of years ago that you might be able to use.
You'll find some more details and the code on my, now defunct, blog[1]

BR
Johan Lindberg
jo...@pulp.se

[1] http://commentsarelies.blogspot.com/2007/11/added-some-functionality-in-clips.html

jo

unread,
Apr 20, 2009, 5:11:51 AM4/20/09
to CLIP...@googlegroups.com

Could you relax the license GNU General Public License as my employer does not allow GPL code !

Thanks
J
Reply all
Reply to author
Forward
0 new messages