Dear Rick, many thanks for your explanation. If I'm understanding correctly I have to figure out how I have to get the configuration for the semaphores to work correctly? Does this also include to change the bit of recursion you talked about to a non recursive version? Because I read somewhere that recursion works not too well in such cases. @striketrough text: I guess with the last information this isn't useful anymore.
Yesterday, I did not provide gdb logs of the complete Debug-Build. It was only for the rexximage executable. With a small sample helloWorld rexx program there is an interesting difference when trying to execute it. There is a segmentation fault. It occurs in RexxMemory.cpp line 691. I attached the 2 GDB-Logfiles. Thomas On 7/4/21 9:37 PM, Rick McGuire wrote: When porting to new *ix environments, it is quite common for there to be problems getting the configuration for the semaphores to work correctly. From the stack trace, it is hanging on a request for a mutex semaphore. rexximage should run completely single threaded, so this should never deadlock. However, the semaphore in question is already held by the current thread because of a bit of recursion at startup, so It looks like the semaphores are not properly handling nested requests. Rick On Sun, Jul 4, 2021 at 3:11 PM Thomas Kahr <tho...@vaime.at<mailto:tho...@vaime.at>> wrote: Dear Developers, the current semester has come to an end and I finished all my exams. So, now I can fully focus on my little Android Project. There are some new developments I would like to share with all of you. I'm not experienced with GDB and STRACE so maybe here are some pros who know what to do with the output better than me. 1. GDB As Erich suggested I built a Debug-Version for Android and setup gdbserver on the device and connected it with GDB on my host System. The output files (I followed the steps in the Sourceforge ooRexx Website) are attached. I did not push the whole debug version to the device. I just moved all necessary files to create rexx.img to the device. When executing rexximage its also hanging up so I thought it would be a good idea to debug rexximage first because maybe its more compact. These are the following files: /bin: rexximage rxapi CoreClasses.orx PlatformObjects.orx StreamClasses.orx /lib: librexx.so librexxapi.so librxregexp.so librxunixsys.so (I think not every single lib file is necessary for building the target rexx.img but I pushed every lib file which was already built when executing rexximage during the build process) I also attached 2 Screenshots showing the GDB output on the Host and the Target. As you can see, on the target I get the "Acitivity output" which Erich told me I should include. In theory I should also get the same output for the other 2 .orx Files. Seems like something is wrong here. 2. STrace Strace is also available on the emulated Android device. I logged the strace output from "rexx -v" and "rexx bintest.rex" where this .rex-File is just a HelloWorld. I also tried it with rexximage rexx.img. rexx -v is working rexx bintest.rex is hanging up even with the debug version. rexximage rexx.img hangs up The 3 files are attached. Any suggestions for my next steps. Is the output helpful? Thanks for your help and best regards Thomas _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net<mailto:Oorexx-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/oorexx-devel _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net<mailto:Oorexx-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
Id Target Id Frame * 1 Thread 4976.4976 "rexx" 0xf7a11970 in MemoryObject::restoreImage (this=0xf7afac2c <memoryObject>) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/memory/RexxMemory.cpp:691 Thread 1 (Thread 4976.4976 "rexx"): #0 0xf7a11970 in MemoryObject::restoreImage (this=0xf7afac2c <memoryObject>) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/memory/RexxMemory.cpp:691 #1 0xf7a1171f in MemoryObject::initialize (this=0xf7afac2c <memoryObject>, restoringImage=true, imageTarget=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/memory/RexxMemory.cpp:179 #2 0xf7aa9b55 in Interpreter::startInterpreter (mode=Interpreter::RUN_MODE, imageTarget=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/runtime/Interpreter.cpp:155 #3 0xf7aaa1cd in Interpreter::createInterpreterInstance (options=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/runtime/Interpreter.cpp:325 #4 0xf7aaa078 in Interpreter::createInstance (instance=@0xffffb400: 0x6f72705f, threadContext=@0xffffb3fc: 0x64666f72, options=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/runtime/Interpreter.cpp:283 #5 0xf79ab006 in RexxCreateInterpreter (instance=0xffffb400, context=0xffffb3fc, options=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/api/InterpreterAPI.cpp:395 #6 0x56556e22 in main (argc=2, argv=0xffffd4c4) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/utilities/rexx/platform/unix/rexx.cpp:136
Thread 1 (Thread 4976.4976 "rexx"): #0 0xf7a11970 in MemoryObject::restoreImage (this=0xf7afac2c <memoryObject>) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/memory/RexxMemory.cpp:691 primitiveTypeNum = 4155416004 imageSize = 2063764 relocation = 0xf714603c "\204\254\257", <incomplete sequence \367> markHandler = {<MarkHandler> = {_vptr$MarkHandler = 0xf7ae4c80 <vtable for ImageRestoreMarkHandler+8>}, relocation = 0xf714603c "\204\254\257", <incomplete sequence \367>} objectPointer = 0xf7146040 endPointer = 0xf733ddd4 saveArray = 0xf7146040 primitiveBehaviours = 0xf7aebee0 #1 0xf7a1171f in MemoryObject::initialize (this=0xf7afac2c <memoryObject>, restoringImage=true, imageTarget=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/memory/RexxMemory.cpp:179 No locals. #2 0xf7aa9b55 in Interpreter::startInterpreter (mode=Interpreter::RUN_MODE, imageTarget=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/runtime/Interpreter.cpp:155 lock = {terminated = false} #3 0xf7aaa1cd in Interpreter::createInterpreterInstance (options=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/runtime/Interpreter.cpp:325 lock = {terminated = false} rootActivity = 0x0 instance = 0x3 #4 0xf7aaa078 in Interpreter::createInstance (instance=@0xffffb400: 0x6f72705f, threadContext=@0xffffb3fc: 0x64666f72, options=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/runtime/Interpreter.cpp:283 newInstance = 0xf7ebcb90 <__kernel_vsyscall> activity = 0x0 #5 0xf79ab006 in RexxCreateInterpreter (instance=0xffffb400, context=0xffffb3fc, options=0x0) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/interpreter/api/InterpreterAPI.cpp:395 No locals. #6 0x56556e22 in main (argc=2, argv=0xffffd4c4) at /home/tjk/coding/oorexx/oorexxsvn/main/trunk/utilities/rexx/platform/unix/rexx.cpp:136 i = 2 rc = 0 program_name = 0xffffd614 "hello.rex" arg_buffer = '\000' <repeats 652 times>... cp = 0xffffd614 "hello.rex" argument = {strlength = 0, strptr = 0xffffb428 ""} argCount = 0 ptr = 0xf7783245 <system_properties+37> "/dev/__properties__" rexxrc = 0 from_string = false real_argument = true instore = {{strlength = 0, strptr = 0x0}, {strlength = 0, strptr = 0x0}} pgmInst = 0x6f72705f pgmThrdInst = 0x64666f72 rxargs = 0x400 rxcargs = 0xffffb3d8 dir = 0xf7704839 <ContextNode::Open(bool, bool*)+377> result = 0xffffb7f8
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel