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

Big Sur "No tun devices found, trying utun. segmentation fault" #48

Closed
andrewmunsell opened this issue May 12, 2021 · 6 comments
Closed

Comments

@andrewmunsell
Copy link

andrewmunsell commented May 12, 2021

I'm trying to run iodine as follows:

sudo ./iodine -f -P password t1.mydomain.com

However, I get:

No tun devices found, trying utun
[1]    4469 segmentation fault sudo ./iodine -f -P password t1.mydomain.com

This happens regardless of specifying -d=utun0 (all the way through utun7, only utun0 through utun6 are shown on my ifconfig). There aren't any /dev/tunX or /dev/utunX devices showing in /dev, though I am not sure whether they should be or not.

This is using the latest master commit as of May 12th 2021 on Mac OS X Big Sur 11.3.

Tunnelblick seems to be able to create a new utun7 no problem when it creates an OVPN connection.

@andrewmunsell andrewmunsell changed the title Big Sur "No tun devices found, trying utun" Big Sur "No tun devices found, trying utun. segmentation fault" May 12, 2021
@andrewmunsell
Copy link
Author

I was able to get this to work with specifying -d utun7, without the equals

@yarrick
Copy link
Owner

yarrick commented May 13, 2021

Since a904570 it is supposed to try utun automatically. Can you try running it inside gdb and try to get a stack trace or core dump?

Try this:

$ sudo gdb ./iodine
(gdb) r -f -P password t1.mydomain.com

then a stack trace can be shown by typing where once it stops on the segfault. It is probably some missing error handling in open_utun() if I have to guess.

@yarrick yarrick reopened this May 13, 2021
@andrewmunsell
Copy link
Author

Result:

➜  bin sudo gdb ./iodine
Password:
GNU gdb (GDB) 10.2
...
Reading symbols from ./iodine...
(gdb) r -f -P password t1.mydomain.com
Starting program: /Users/andrew/Downloads/iodine-master/bin/iodine -f -P password t1.mydomainc.om
[New Thread 0x2003 of process 13668]
[New Thread 0x2503 of process 13668]
warning: unhandled dyld version (17)
No tun devices found, trying utun

Thread 2 received signal SIGSEGV, Segmentation fault.
0x0000000100003241 in utun_unit (dev=0x0) at tun.c:344
344		while (*unit_str != '\0' && !isdigit(*unit_str))

@yarrick
Copy link
Owner

yarrick commented May 13, 2021

Thanks, I spotted an error causing NULL to be passed to the utun setup. Can you try again with the latest code?

It will probably work better now but might log a bit while testing devices in use.

@andrewmunsell
Copy link
Author

LGTM, works great now:

➜  bin sudo ./iodine -f -P password t1.mydomain.com
No tun devices found, trying utun
iodine: open_utun: connect: Resource busy
iodine: open_utun: connect: Resource busy
iodine: open_utun: connect: Resource busy
iodine: open_utun: connect: Resource busy
iodine: open_utun: connect: Resource busy
iodine: open_utun: connect: Resource busy
iodine: open_utun: connect: Resource busy
Opened utun7
Opened IPv4 UDP socket
...

@yarrick
Copy link
Owner

yarrick commented May 13, 2021

Thanks for the quick test!

@yarrick yarrick closed this as completed May 13, 2021
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