barnacle icon indicating copy to clipboard operation
barnacle copied to clipboard

Unable to connect: assertion failed

Open henrik242 opened this issue 15 years ago • 10 comments

I'm on the latest version (0.6.6), and I'm getting an error as the client connects:

# ./run
WIFI: driver loaded
WIFI: wpa_supplicant started
WIFI: wpa_supplicant connected
WIFI: OK wlan0 58:17:0c:4a:xx:xx

DHCP: ACK 58:b0:35:7b:xx:xx 192.168.5.101 hnrk
assertion "IdIn(IPFlowId(b).reverse()) == in()" failed: file "/home/szym/workspace/barnacle/jni/../native/nat/natopen.hh", line 98, function "void MappingFullCone::applyOut(const IPFlowId&, Buffer&)"
[2]   Segmentation fault      ./nat

The link seems fine, but I'm unable to send and receive data. I'm using a Sony Ericsson X10 mini pro with Android 2.1-update1.

henrik242 avatar Dec 29 '10 09:12 henrik242

This is pretty bad. Could you enable NAT debugging under Settings > NAT > Debug. Then when you get the error, could you run "adb logcat" and send me the dump? Thanks!

szym avatar Dec 29 '10 12:12 szym

Sure, here you go:

  D/barnacle( 3184): WIFI: WPASUPP assoc
  I/NotificationService( 1194): enqueueToast pkg=net.szym.barnacle callback=android.app.ITransientNotification$Stub$Proxy@45910a50 duration=1
  I/wpa_supplicant( 3185): Trying to associate with SSID 'barnacle'
  I/wpa_supplicant( 3185): CTRL-EVENT-STATE-CHANGE id=0 state=3
  I/wpa_supplicant( 2791): CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
  I/wpa_supplicant( 2791): CTRL-EVENT-STATE-CHANGE id=0 state=0
  I/wpa_supplicant( 2801): CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
  I/wpa_supplicant( 2801): CTRL-EVENT-STATE-CHANGE id=0 state=0
  I/wpa_supplicant( 3185): CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
  I/wpa_supplicant( 3185): CTRL-EVENT-STATE-CHANGE id=0 state=0
  I/wpa_supplicant( 2801): CTRL-EVENT-STATE-CHANGE id=0 state=4
  I/wpa_supplicant( 3185): CTRL-EVENT-STATE-CHANGE id=0 state=4
  I/wpa_supplicant( 2791): CTRL-EVENT-STATE-CHANGE id=0 state=4
  I/wpa_supplicant( 2801): Associated with 02:00:00:97:3a:3f
  I/wpa_supplicant( 2801): CTRL-EVENT-STATE-CHANGE id=0 state=7
  I/wpa_supplicant( 2801): CTRL-EVENT-CONNECTED - Connection to 02:00:00:97:3a:3f completed (reauth) [id=0 id_str=]
  I/wpa_supplicant( 3185): Associated with 02:00:00:97:3a:3f
  I/wpa_supplicant( 3185): CTRL-EVENT-STATE-CHANGE id=0 state=7
  I/wpa_supplicant( 3185): CTRL-EVENT-CONNECTED - Connection to 02:00:00:97:3a:3f completed (reauth) [id=0 id_str=]
  I/wpa_supplicant( 2791): Associated with 02:00:00:97:3a:3f
  I/wpa_supplicant( 2791): CTRL-EVENT-STATE-CHANGE id=0 state=7
  I/wpa_supplicant( 2791): CTRL-EVENT-CONNECTED - Connection to 02:00:00:97:3a:3f completed (reauth) [id=0 id_str=]
  I/wpa_supplicant( 2801): CTRL-EVENT-SCAN-RESULTS  Ready
  I/wpa_supplicant( 2791): CTRL-EVENT-SCAN-RESULTS  Ready
  I/wpa_supplicant( 3185): CTRL-EVENT-SCAN-RESULTS  Ready
  D/barnacle( 3183): NAT: --- Cleanup --- 0 maps IN: 0 0 OUT: 0 0
  D/dalvikvm( 1828): GC freed 10037 objects / 523632 bytes in 167ms
  I/wpa_supplicant( 3185): CTRL-EVENT-SCAN-RESULTS  Ready
  D/barnacle( 3183): NAT: NEW (17| 169.254.5.210:5353 > 224.0.0.251:5353) ==> 32000
  D/barnacle( 3183): NAT: NEW (17| 169.254.5.210:33419 > 224.0.0.251:50149) ==> 32001
  I/BarnacleService( 3124): log: assertion "IdIn(IPFlowId(b).reverse()) == in()" failed: file "/home/szym/workspace/barnacle/jni/../native/nat/natopen.hh", line 98, function "void MappingFullCone::applyOut(const IPFlowId&, Buffer&)"
  I/DEBUG   ( 1097): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  I/DEBUG   ( 1097): Build fingerprint: 'SEMC/U20i_1239-3895/U20i/delta:2.1-update1/2.0.A.0.504/-AFA:user/release-keys'
  I/DEBUG   ( 1097): pid: 3183, tid: 3183  >>> ./nat <<<
  I/DEBUG   ( 1097): signal 11 (SIGSEGV), fault addr deadbaad
  I/DEBUG   ( 1097):  r0 00000000  r1 afe1332d  r2 00000027  r3 00000000
  I/DEBUG   ( 1097):  r4 00000000  r5 deadbaad  r6 00002ee0  r7 00008b82
  I/DEBUG   ( 1097):  r8 fb0000e0  r9 000000d4  10 bed7d770  fp 0000f808
  I/DEBUG   ( 1097):  ip ffffffff  sp bed7cca8  lr afe142ed  pc afe10c58  cpsr 40000030
  I/DEBUG   ( 1097):          \#00  pc 00010c58  /system/lib/libc.so
  I/DEBUG   ( 1097):          \#01  pc 000176de  /system/lib/libc.so
  I/DEBUG   ( 1097): 
  I/DEBUG   ( 1097): code around pc:
  I/DEBUG   ( 1097): afe10c48 4e17d003 51a02001 4d164798 24002227 
  I/DEBUG   ( 1097): afe10c58 f7fb702a 2106ee6a ef1ef7fc 05592380 
  I/DEBUG   ( 1097): 
  I/DEBUG   ( 1097): code around lr:
  I/DEBUG   ( 1097): afe142dc 220ce008 2b005eab 1c28d003 47889901 
  I/DEBUG   ( 1097): afe142ec 35544306 d5f43f01 2c006824 b003d1ee 
  I/DEBUG   ( 1097): afe142fc bdf01c30 00024b34 000000b4 1c0fb5f0 
  I/DEBUG   ( 1097): 
  I/DEBUG   ( 1097): stack:
  I/DEBUG   ( 1097):     bed7cc68  0001140c  
  I/DEBUG   ( 1097):     bed7cc6c  bed7cc98  
  I/DEBUG   ( 1097):     bed7cc70  afe3902c  
  I/DEBUG   ( 1097):     bed7cc74  afe38fd8  
  I/DEBUG   ( 1097):     bed7cc78  00000000  
  I/DEBUG   ( 1097):     bed7cc7c  afe142ed  /system/lib/libc.so
  I/DEBUG   ( 1097):     bed7cc80  000113d8  
  I/DEBUG   ( 1097):     bed7cc84  afe1332d  /system/lib/libc.so
  I/DEBUG   ( 1097):     bed7cc88  473a134d  
  I/DEBUG   ( 1097):     bed7cc8c  afe38e08  
  I/DEBUG   ( 1097):     bed7cc90  00000000  
  I/DEBUG   ( 1097):     bed7cc94  00002ee0  
  I/DEBUG   ( 1097):     bed7cc98  00008b82  /data/data/net.szym.barnacle/files/nat
  I/DEBUG   ( 1097):     bed7cc9c  afe135cb  /system/lib/libc.so
  I/DEBUG   ( 1097):     bed7cca0  df002777  
  I/DEBUG   ( 1097):     bed7cca4  e3a070ad  
  I/DEBUG   ( 1097): \#00 bed7cca8  000113c4  
  I/DEBUG   ( 1097):     bed7ccac  afe38e08  
  I/DEBUG   ( 1097):     bed7ccb0  0000ddf8  /data/data/net.szym.barnacle/files/nat
  I/DEBUG   ( 1097):     bed7ccb4  00000062  
  I/DEBUG   ( 1097):     bed7ccb8  00008b82  /data/data/net.szym.barnacle/files/nat
  I/DEBUG   ( 1097):     bed7ccbc  fffffbdf  
  I/DEBUG   ( 1097):     bed7ccc0  afe38e08  
  I/DEBUG   ( 1097):     bed7ccc4  0000ddf8  /data/data/net.szym.barnacle/files/nat
  I/DEBUG   ( 1097):     bed7ccc8  00000062  
  I/DEBUG   ( 1097):     bed7cccc  afe176e3  /system/lib/libc.so
  I/DEBUG   ( 1097): \#01 bed7ccd0  afe38e08  
  I/DEBUG   ( 1097):     bed7ccd4  afe176e3  /system/lib/libc.so
  I/DEBUG   ( 1097):     bed7ccd8  00000062  
  I/DEBUG   ( 1097):     bed7ccdc  0000d548  /data/data/net.szym.barnacle/files/nat
  I/DEBUG   ( 1097):     bed7cce0  000113b8  
  I/DEBUG   ( 1097):     bed7cce4  00000011  
  I/DEBUG   ( 1097):     bed7cce8  4000e038  
  I/DEBUG   ( 1097):     bed7ccec  0000a2e1  /data/data/net.szym.barnacle/files/nat
  I/DEBUG   ( 1097):     bed7ccf0  000113f8  
  I/DEBUG   ( 1097):     bed7ccf4  473a134d  
  I/DEBUG   ( 1097):     bed7ccf8  fb0000e0  
  I/DEBUG   ( 1097):     bed7ccfc  e5c3017d  
  I/DEBUG   ( 1097):     bed7cd00  d205fe11  
  I/DEBUG   ( 1097):     bed7cd04  ffd189d7  
  I/DEBUG   ( 1097):     bed7cd08  473a134d  
  I/DEBUG   ( 1097):     bed7cd0c  fb0000e0  
  I/DEBUG   ( 1097):     bed7cd10  e5c38b82  
  I/DEBUG   ( 1097):     bed7cd14  473a1311  
  I/BarnacleService( 3124): log: [2]   Segmentation fault      ./nat
  D/iddd-events( 1118): Registering event com.sonyericsson.idd.probe.android.devicemonitor::ApplicationCrash with 2372 bytes payload.

henrik242 avatar Dec 29 '10 13:12 henrik242

I'm looking into this issue. I am unable to reproduce this error, so right now I'm trying to figure out what could lead to this assertion failing.

szym avatar Dec 30 '10 20:12 szym

I am getting the same error. My technology level in this area is very low.

I am able to create a VPN connection to the client site; however, when I try to connect to the server via a Remote Desktop icon on my computer I receive the above error and shuts down my internet connection.

When I use EasyTether with a USB cable, I am able to connect to the server using the Remote Desktop icon on my computer.

I wouldl prefer to use Barnacle's wirelessly tethering instead of using a USB cable.

Thanks, Reed

rwickst avatar Mar 24 '11 14:03 rwickst

Also, I am using a Samsung Vibrant phone.

rwickst avatar Mar 24 '11 17:03 rwickst

Hi, I'm running this Barnacle Wifi Tether on Xperia X10 phone, with android 2.1-update1 rooted, and I'm getting exactly the same error: assertion "IdIn(IPFlowId(b).reverse()) == in()" failed: file "/home/szym/workspace/barnacle/jni/../native/nat/natopen.hh", line 98, funtion "voidMappingFullCone::applyOut(Const IPFlowId&, Buffer&)"

[2] Segmentation fault ./nat Do you have any idea of what if failing? How can I see the version that I have installed? Android report it as "Version 40"

Schultheis avatar Mar 28 '11 21:03 Schultheis

Hi, this assertion failure always happens for me when I use the ICSI Netalyzr (http://netalyzr.icsi.berkeley.edu/) on laptop over Barnacle. The phone runs Android 2.1.

oliver avatar Mar 30 '12 20:03 oliver

Hi. Has this issue ever been resolved or explained? I'm having the same problem with my motorola triumph running 2.2. I turn on barnacle tether then connect with my laptop. Then usually after 20-30 seconds, i get this error and stop receiving data.

Feid avatar Apr 18 '12 04:04 Feid

Hi, I'm getting the same error a motorola backflip running 2.4 rooted with cyanogenmod. It happens every 17 or 57 minutes past the hour. It segfaults as soon as the clock hits (1|5)7 minutes

qorelogic avatar Apr 28 '12 07:04 qorelogic

It segfaults immediately here, with exactly same error message as in first post.

Hardware is Xperia X8, Android 1.6, properly rooted. I have to skip the WPA phase, then the ad-hoc network is seen, but after association, the problem is with NAT. To be noticed, android-wifi-tether (another app) tells me that my kernel lacks the netfilter support and therefore cannot do NAT: maybe the problem is simple as that...

Bischoff avatar Jul 06 '12 13:07 Bischoff