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

"Operation not permitted" error while processing UDP connection #840

Closed
ameshkov opened this Issue Oct 13, 2016 · 4 comments

Comments

Projects
None yet
2 participants
@ameshkov
Member

ameshkov commented Oct 13, 2016

Getting an error:

UDP id=689 Error while processing vpn data
                                                                          java.io.IOException: Operation not permitted
                                                                            at sun.nio.ch.DatagramDispatcher.write0(Native Method) ~[na:0.0]
                                                                            at sun.nio.ch.DatagramDispatcher.write(DatagramDispatcher.java:52) ~[na:0.0]
                                                                            at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) ~[na:0.0]
                                                                            at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:0.0]
                                                                            at sun.nio.ch.DatagramChannelImpl.write(DatagramChannelImpl.java:622) ~[na:0.0]
                                                                            at com.adguard.commons.b.j.write(Unknown Source) ~[na:0.0]
                                                                            at com.adguard.android.filtering.vpn.a.a(Unknown Source) ~[na:0.0]
                                                                            at com.adguard.android.filtering.vpn.p.c(Unknown Source) ~[na:0.0]
                                                                            at com.adguard.android.filtering.vpn.a$1.run(Unknown Source) ~[na:0.0]
                                                                            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) ~[na:0.0]
                                                                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) ~[na:0.0]
                                                                            at java.lang.Thread.run(Thread.java:761) ~[na:0.0]

@ameshkov ameshkov added the Bug label Oct 13, 2016

@ameshkov ameshkov added this to the 2.8 milestone Oct 13, 2016

@ameshkov ameshkov self-assigned this Oct 13, 2016

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Nov 2, 2016

Member

Quoting netty/netty#1258 (comment)

The discussion at http://www.archivum.info/comp.protocols.tcp-ip/2009-05/00088/UDP-socket-amp-amp-sendto-amp-amp-EPERM.html seems to indicate that this is "normal" behavior of the Linux kernel if a UDP socket is sending too fast to one (or more?) hosts.

The same discussion on google groups:
https://groups.google.com/forum/#!topic/comp.protocols.tcp-ip/Qou9Sfgr77E

Relevant quote:

What may be the cause of my problem?
Failure to implement transmit pacing. With UDP, you are responsible
for spacing out your sends at a rational rate. You should start out at
a very slow rate and raise the rate as you confirm that there is
minimal or no packet loss. You can simply ignore this error if you
want, assuming you do properly implement transmit pacing.

Member

ameshkov commented Nov 2, 2016

Quoting netty/netty#1258 (comment)

The discussion at http://www.archivum.info/comp.protocols.tcp-ip/2009-05/00088/UDP-socket-amp-amp-sendto-amp-amp-EPERM.html seems to indicate that this is "normal" behavior of the Linux kernel if a UDP socket is sending too fast to one (or more?) hosts.

The same discussion on google groups:
https://groups.google.com/forum/#!topic/comp.protocols.tcp-ip/Qou9Sfgr77E

Relevant quote:

What may be the cause of my problem?
Failure to implement transmit pacing. With UDP, you are responsible
for spacing out your sends at a rational rate. You should start out at
a very slow rate and raise the rate as you confirm that there is
minimal or no packet loss. You can simply ignore this error if you
want, assuming you do properly implement transmit pacing.

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Nov 2, 2016

Member

Fixed

Member

ameshkov commented Nov 2, 2016

Fixed

@ameshkov ameshkov closed this Nov 2, 2016

@ameshkov ameshkov changed the title from UDP: Error while processing vpn data to "Operation not permitted" error while processing UDP connection Nov 2, 2016

@Revertron

This comment has been minimized.

Show comment
Hide comment
@Revertron

Revertron Nov 2, 2016

Member

May be we need to catch IOException, not just Exception?

Member

Revertron commented Nov 2, 2016

May be we need to catch IOException, not just Exception?

@ameshkov

This comment has been minimized.

Show comment
Hide comment
@ameshkov

ameshkov Nov 3, 2016

Member

Ah, i suppose catching all exceptions is good enough:)

Member

ameshkov commented Nov 3, 2016

Ah, i suppose catching all exceptions is good enough:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment