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

Python netifaces.interfaces() returns [Errno 22] when connected with internet on build 14965 #1414

Closed
ghost opened this issue Nov 24, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 24, 2016

I'm having problems with roscore returning Errno 22 on build 14965, while being connected with the internet. However, when I disable the connection, roscore runs just fine. Roscore should work on build 14965, but it doesn't.

Traceback (most recent call last):
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/init.py", line 307, in main
p.start()
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 279, in start
self.runner.launch()
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 654, in launch
self._setup()
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 630, in _setup
self._launch_master()
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 394, in _launch_master
validate_master_launch(m, self.is_core, self.is_rostest)
File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 83, in validate_master_launch
if not rosgraph.network.is_local_address(m.get_host()):
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 176, in is_local_address
local_addresses = ['localhost'] + get_local_addresses()
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 219, in get_local_addresses
for iface in netifaces.interfaces():
OSError: [Errno 22] Invalid argument

My Windows build is Windows 10 Pro Insider Preview Build 14965

@fpqc
Copy link

fpqc commented Nov 24, 2016

This is a known issue related to ip addr not working, itself because of some address-size thing with Windows's teredo ipv6 tunneling through ipv4 virtual adapter. One way to fix this is to use netsh in Windows to disable the teredo interface. Otherwise, you have to wait for the team to release their latest updates, in which they have fixed this. The only problem is that it's thanksgiving in the US so we probably won't see a new insider build for probably two weeks.

@sunilmut
Copy link
Member

Just FYI that the teredo issue is fixed and is making its way to the insider build. Thanks @JasonLinMS, who can also provide more information about the issue. Something to do with the fixed size buffer in the 'ip' tool to store the address and the incompatibility with what the 'teredo' interface reports on Windows.

@JasonLinMS
Copy link

Thanks @sunilmut
Yes, the root cause is that the Teredo network adapter has a 32-byte hardware address, which is not handled well inside WSL (and has just been fixed recently).
We also found that the Linux "ip addr show" tool does not handle 32-byte hardware addresses well either - it will crash when trying to display the HW address due to a string buffer overflow. You will see this crash in "ip" in the next Insider build if you have Teredo enabled.
Note that these are two different issues with the handling of 32-byte HW addresses - one in WSL, and one in "ip". The issue in WSL has been fixed, so in the next Insider build you will see the issue in "ip". (Most other tools handle this correctly)

We think that the fix should be in the "ip" code, and plan to reach out to them. If anyone here is familiar with the standards regarding hardware address (not MAC address) length, please let us know.

@gavanderhoorn
Copy link

Related: #1391?

@sunilmut
Copy link
Member

The teredo issue should be fixed in 15007

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

No branches or pull requests

5 participants