From: Rick M. <obj...@gm...> - 2008-04-04 13:48:02
|
I think the valgrind data has given me a clue, which should be fairly easy to validate if you have the time to do a little experiment. Change the value of the constant MAX_THREAD_POOL_SIZE from 5 to 10 and see if your program works. My guess is it will work until you get to a value of 12. If that's the case, then I have a fairly good idea on where the problem lies. Rick On Fri, Apr 4, 2008 at 9:23 AM, Moritz Hoffmann <ant...@gm...> wrote: > I'll try to install ooRexx 3.2.0 and test it again. > > Vagrind is a tool to analyze applications in many ways, primarily it > is a memory leak finder. I have not used it a lot yet, but it helps > sometimes a lot. Have a look at http://valgrind.org/ for more > information. Unfortunately there is no Windows port, so you need to > run it on Linux. > Moritz > > On Fri, Apr 4, 2008 at 2:45 PM, Rick McGuire <obj...@gm...> > wrote: > > I notice you're running this on a trunk build. Does this problem occur > on > > 3.2.0? > > > > Rick > > > > > > > > On Fri, Apr 4, 2008 at 8:28 AM, Moritz Hoffmann <ant...@gm...> > wrote: > > > > > > > > > > > > > > To figure out what the problem might be I tried to run rexx under > > > valgrind to test for any semaphore related issues. Here is a summary > > > of what it found out. I don't know if this is helpful, as I don't > > > really know how the UNIX semaphores work, but maybe it'll give us a > > > hint. > > > > > > > > > ==10975== Conditional jump or move depends on uninitialised value(s) > > > ==10975== at 0x416A215: locksem(int, int) > (SystemSemaphores.cpp:151) > > > ==10975== by 0x4169796: RxAPIStartUp(int) (RexxAPIManager.cpp:292) > > > ==10975== by 0x4166BC6: RegRegisterDll(char const*, char const*, > > > char const*, char const*, unsigned, int) (SubcommandAPI.cpp:786) > > > ==10975== by 0x4166D52: RexxRegisterFunctionDll > (SubcommandAPI.cpp:661) > > > ==10975== by 0x4106E66: Interpreter::processStartup() > > (Interpreter.cpp:107) > > > ==10975== by 0x40F2C65: SystemInterpreter::processStartup() > > > (SystemInterpreter.cpp:93) > > > ==10975== by 0x40F2A76: _init() (SystemInitialization.cpp:50) > > > ==10975== by 0x40F2A96: _GLOBAL__I__Z5_initv > > (SystemInitialization.cpp:59) > > > > > > > > > ==10975== Conditional jump or move depends on uninitialised value(s) > > > ==10975== at 0x416A215: locksem(int, int) > (SystemSemaphores.cpp:151) > > > ==10975== by 0x416BC6A: ResetEventSem(int) (QueuesAPI.cpp:1245) > > > ==10975== by 0x416BD0F: create_queue_sem(unsigned) > (QueuesAPI.cpp:332) > > > ==10975== by 0x416C5D9: search_session() (QueuesAPI.cpp:538) > > > ==10975== by 0x4169801: RxAPIStartUp(int) (RexxAPIManager.cpp:328) > > > ==10975== by 0x4166BC6: RegRegisterDll(char const*, char const*, > > > char const*, char const*, unsigned, int) (SubcommandAPI.cpp:786) > > > ==10975== by 0x4166D52: RexxRegisterFunctionDll > (SubcommandAPI.cpp:661) > > > ==10975== by 0x4106E66: Interpreter::processStartup() > > (Interpreter.cpp:107) > > > ==10975== by 0x40F2C65: SystemInterpreter::processStartup() > > > (SystemInterpreter.cpp:93) > > > ==10975== by 0x40F2A76: _init() (SystemInitialization.cpp:50) > > > ==10975== by 0x40F2A96: _GLOBAL__I__Z5_initv > > (SystemInitialization.cpp:59) > > > > > > > > > Several different problems arise in the following block: > > > ==10975== Syscall param futex(futex) points to unaddressable byte(s) > > > ==10975== Invalid read of size 4 > > > > > > ==10975== by 0x40F1A44: RexxSemaphore::~RexxSemaphore() > > > (ThreadSupport.cpp:221) > > > ==10975== by 0x410144B: RexxActivity::cleanupActivityResources() > > > (RexxActivity.cpp:179) > > > ==10975== by 0x4105D70: > > > ActivityManager::activityEnded(RexxActivity*) > > > (ActivityManager.cpp:694) > > > ==10975== by 0x410487A: RexxActivity::runThread() > > (RexxActivity.cpp:167) > > > ==10975== by 0x410491C: activity_thread (RexxActivity.cpp:90) > > > ==10975== by 0x417B4FA: start_thread (in > > /lib/i686/cmov/libpthread-2.7.so) > > > ==10975== by 0x438393D: clone (in /lib/i686/cmov/libc-2.7.so) > > > ==10975== Address 0x43ff948 is 0 bytes inside a block of size 76 > free'd > > > ==10975== at 0x40242EC: operator delete(void*) > > (vg_replace_malloc.c:342) > > > ==10975== by 0x4101453: RexxActivity::cleanupActivityResources() > > > (RexxActivity.cpp:179) > > > ==10975== by 0x410553A: > > > ActivityManager::poolActivity(RexxActivity*) (ActivityManager.cpp:445) > > > ==10975== by 0x4107F92: > > > InterpreterInstance::poolActivity(RexxActivity*) > > > (InterpreterInstance.cpp:254) > > > ==10975== by 0x410483C: RexxActivity::runThread() > > (RexxActivity.cpp:154) > > > ==10975== by 0x410491C: activity_thread (RexxActivity.cpp:90) > > > ==10975== by 0x417B4FA: start_thread (in > > /lib/i686/cmov/libpthread-2.7.so) > > > ==10975== by 0x438393D: clone (in /lib/i686/cmov/libc-2.7.so) > > > > > > > > > ==10975== Invalid read of size 4 > > > ==10975== at 0x41075BA: InterpreterInstance::haltAllActivities() > > > (ListClass.hpp:84) > > > ==10975== by 0x4107009: Interpreter::haltAllActivities() > > > (Interpreter.cpp:308) > > > ==10975== by 0x4167CBC: RxExitClear(int) (RexxAPIManager.cpp:1892) > > > ==10975== by 0x4183E77: (within /lib/i686/cmov/libpthread-2.7.so) > > > ==10975== by 0x40F1A44: RexxSemaphore::~RexxSemaphore() > > > (ThreadSupport.cpp:221) > > > ==10975== by 0x410144B: RexxActivity::cleanupActivityResources() > > > (RexxActivity.cpp:179) > > > ==10975== by 0x4105D70: > > > ActivityManager::activityEnded(RexxActivity*) > > > (ActivityManager.cpp:694) > > > ==10975== by 0x410487A: RexxActivity::runThread() > > (RexxActivity.cpp:167) > > > ==10975== by 0x410491C: activity_thread (RexxActivity.cpp:90) > > > ==10975== by 0x417B4FA: start_thread (in > > /lib/i686/cmov/libpthread-2.7.so) > > > ==10975== by 0x438393D: clone (in /lib/i686/cmov/libc-2.7.so) > > > > > > > > > > > > On Fri, Apr 4, 2008 at 1:02 PM, Rick McGuire <obj...@gm...> > > wrote: > > > > Not sure I can say where the problem is, though I expect something > > > > unexpected is happening with the Linux semaphores. I'm not seeing > any > > > > problems with this on Windows, going as high as 100 without problem. > > The > > > > semaphoring would be the only platform-specific aspect of the GUARD > > > > instruction. > > > > > > > > Rick > > > -- > > > Moritz Hoffmann; > > > http://antiguru.de/ > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > Check out the new SourceForge.net Marketplace. > > > It's the best place to buy or sell services for > > > just about anything Open Source. > > > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > > _______________________________________________ > > > Oorexx-devel mailing list > > > Oor...@li... > > > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > > > > > > > > > ------------------------------------------------------------------------- > > Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > > _______________________________________________ > > Oorexx-devel mailing list > > Oor...@li... > > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > > > > > > > -- > Moritz Hoffmann; > http://antiguru.de/ > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > |