Skip to content
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

Timeout on lost packet #2

Open
bpasquet opened this issue May 13, 2019 · 5 comments
Open

Timeout on lost packet #2

bpasquet opened this issue May 13, 2019 · 5 comments

Comments

@bpasquet
Copy link

Hello, I get many times a timeout but never any lost packet. I think there is problem. Have you got any idea where?

root@debiantest:/home/openip# pysipctl client rtp --host 94.143.87.170 --port 20000 --loops 30
[13/05/2019 16:43:02] - INFO - Application started in CLIENT mode.
[13/05/2019 16:43:02] - INFO - Performing RTP test.
Traceback (most recent call last):
File "/usr/local/bin/pysipctl", line 11, in
load_entry_point('PySIP==0.1.3', 'console_scripts', 'pysipctl')()
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/PySIP-0.1.3-py3.7.egg/pysip/cli.py", line 71, in rtp
status, durations = send_loop(client, size, loops)
File "/usr/local/lib/python3.7/site-packages/PySIP-0.1.3-py3.7.egg/pysip/utils.py", line 40, in send_loop
response = socket.recv(4096).decode('ASCII')
socket.timeout: timed out

@Otoru
Copy link
Contributor

Otoru commented May 13, 2019

I added the OSError exception on the block that causes that response to be considered a failure.
I believe that if you upgrade and test again, this should be resolved.

except (ConnectionRefusedError, OSError):
    status.append(False)
    durations.append(5)

@bpasquet
Copy link
Author

I try and I send you a feedback

@bpasquet
Copy link
Author

I do not have a crash anymore, but I do not think it's still good. For me, it is simply a packet not received, so a packet lost, it should be the timeout on the sending of each packet and not on the global sending of all packets. This will allow you to send a larger number of global packets without having a timeout and properly count lost packets. It does review a lot of things, but I think it will be more exploitable. For information, here is the return I have now on a lost packet:

root@debiantest:/home/openip# pysipctl client rtp --host 94.143.87.170 --port 20000 --loops 30
[14/05/2019 09:54:06] - INFO - Application started in CLIENT mode.
[14/05/2019 09:54:06] - INFO - Performing RTP test.
[14/05/2019 09:54:11] - WARNING - Test finished with failure.

@bpasquet
Copy link
Author

Any UP?

@bpasquet
Copy link
Author

bpasquet commented Jun 3, 2019

@Otoru : Do you think tht's possible to do something about that issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants