New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Timeout when trying to to execute on the 32-bit server from 64bit client #24
Comments
Your suggestion to modify line 201 sounds reasonable. I just have a few comments/questions:
I am curious to see how this issue occurred in your code. Could you share the code that gets executed by the 32-bit server? I'd like to write a test case for this issue. |
Thanks for your comments. No the issue does not occurs frequently but specifically first couple of times when I unlock my system after locking with application running and re-run the app. The code is the sample code available at : Here with a little bit modification . I am using Python 3.6 and probably upgrade to 3.9 shortly. I have changed my code to self._proc.wait(timeout=1)
|
Running the following module on the 32-bit server is a reliable way to simulate the issue you are experiencing import time
from msl.loadlib import Server32
class HangsForever(Server32):
def __init__(self, host, port):
time.sleep(999) A Your initial suggestion of using |
Thanks for raising this issue. It has been fixed in 1f4971c |
Thanks a lot for the update - can you please let me know how we can pull your fix locally - do we need to reinstall the package. Will all the new installation of the package will have the fix in concern? Thanks in advance. |
You can re-install the package from the main branch using pip pip install -U https://github.com/MSLNZ/msl-loadlib/archive/main.tar.gz Let me know if the issue remains. That means my test didn't cover the issue properly. |
I tried to install the package as per command mentioned but I get an error now:
Now when I run the program I get below error:
It seems some component got missed in the package. |
I see that you don't have the wheel package installed
I have pushed a fix when installing the package in a Python environment that does not have the wheel package installed. Could you try running the following command again pip install -U https://github.com/MSLNZ/msl-loadlib/archive/main.tar.gz and let me know what the outcome is. |
I am not sure whether the installation process was success - the same I state is based on previous uninstalling / installing step during installation and recent output as mentioned below:
|
What is the output of running these two commands? pip --version
pip list |
Please find the details as requested:
|
According to pip, you have Here are some commands that you can run to clean up and verify your Python environment. Your version of setuptools is quite old pip install -U setuptools To uninstall pip uninstall --yes msl-loadlib To install pip install -U https://github.com/MSLNZ/msl-loadlib/archive/main.tar.gz If you also have git installed then you can use the following command to install pip install -U git+https://github.com/MSLNZ/msl-loadlib@main Verify the installation. You should see the number python -c "from msl.examples.loadlib import Cpp64; c=Cpp64(); print(c.add(1, 1))" To illustrate how to use some of these commands I created a new Python 3.6 environment and then installed the package and verified the installation
If after following these suggestion you are still having issues then I'm not sure there is anything else that I can recommend except to reinstall the package from PyPI using |
Thanks - yes the code works as expected - no issues found so far. Actually I was in concern that the package version that I am working with would be the same when we install in our production or test bench system. It seems that it would not hence requesting changes so that any further installation of package via pip would have the fix. I would then make use of the below mentioned pip command in our other boxes:
|
Thanks for you feedback and for verifying that your code works as expected. |
I faced an issue that despite the fact that I set timeout for invocation of 32-bit server from 64bit client the timeout was not happening. The issue was found in below file and code:
msl\loadlib\client64.py :
As per the above code even though there is a connection timeout exception occurs the code waits for INFINITY time for the subprocess to be killed as per below code:
lib\subprocess.py:
Hence the code waits for infinity time period - I have made a fix for same it works but not sure if it is the correct one:
Just change line 201 in msl\loadlib\client64.py from
self._proc.wait()
to**self._proc.wait(timeout=timeout)**
The text was updated successfully, but these errors were encountered: