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

Mobile data not working on crackling #204

Open
rmull561 opened this issue Apr 10, 2023 · 15 comments
Open

Mobile data not working on crackling #204

rmull561 opened this issue Apr 10, 2023 · 15 comments
Labels
bug Something isn't working

Comments

@rmull561
Copy link

I migrated from LOS to DOS on Wileyfox Swift. I wiped /data before installation. It seems to be working nicely except mobile data is not working. I tried setting APN manually as suggested in the documentation. That didn't help. In the log I noticed netmgrd is crashing. I thought it might be related:

04-10 18:38:08.216 17986 17986 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-10 18:38:08.216 17986 17986 F DEBUG   : DivestOS Version: '17.1-20230401-dos-crackling'
04-10 18:38:08.216 17986 17986 F DEBUG   : Build fingerprint: 'Wileyfox/lineage_crackling/crackling:10/QQ3A.200805.001/eng.emy.20230401.173424:user/release-keys'
04-10 18:38:08.216 17986 17986 F DEBUG   : Revision: '0'
04-10 18:38:08.216 17986 17986 F DEBUG   : ABI: 'arm64'
04-10 18:38:08.218 17986 17986 F DEBUG   : Timestamp: 2023-04-10 18:38:08+0200
04-10 18:38:08.219 17986 17986 F DEBUG   : pid: 17272, tid: 17323, name: netmgrd  >>> /system/vendor/bin/netmgrd <<<
04-10 18:38:08.219 17986 17986 F DEBUG   : uid: 0
04-10 18:38:08.219 17986 17986 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
04-10 18:38:08.219 17986 17986 F DEBUG   :     x0  0000000000000000  x1  00000000000043ab  x2  0000000000000006  x3  0000005974c14fe0
04-10 18:38:08.219 17986 17986 F DEBUG   :     x4  606bff28646d6873  x5  606bff28646d6873  x6  606bff28646d6873  x7  7f7f7f7f7f7f7f7f
04-10 18:38:08.219 17986 17986 F DEBUG   :     x8  00000000000000f0  x9  000000728a0a1f00  x10 ffffffe0ffffffdf  x11 0000000000000001
04-10 18:38:08.219 17986 17986 F DEBUG   :     x12 000000721bd8e338  x13 000000721bd8e33d  x14 000000721bd8e345  x15 0000000000000010
04-10 18:38:08.219 17986 17986 F DEBUG   :     x16 000000728a132d20  x17 000000728a112e30  x18 00000000ffffffd8  x19 00000000000000ac
04-10 18:38:08.219 17986 17986 F DEBUG   :     x20 0000000000004378  x21 00000000000000b2  x22 00000000000043ab  x23 00000000ffffffff
04-10 18:38:08.219 17986 17986 F DEBUG   :     x24 000000721bd8e33c  x25 0000000000000001  x26 000000721bd8e330  x27 000000000000003e
04-10 18:38:08.219 17986 17986 F DEBUG   :     x28 000000721dc1c000  x29 0000005974c15090
04-10 18:38:08.219 17986 17986 F DEBUG   :     sp  0000005974c14fc0  lr  000000728a0c4e04  pc  000000728a0c4e34
04-10 18:38:08.223 17986 17986 F DEBUG   : 
04-10 18:38:08.223 17986 17986 F DEBUG   : backtrace:
04-10 18:38:08.223 17986 17986 F DEBUG   :       #00 pc 0000000000040e34  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: 83e548aec61e975f1f9b643b250391b3)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #01 pc 000000000003c238  /apex/com.android.runtime/lib64/bionic/libc.so (fatal_error+100) (BuildId: 83e548aec61e975f1f9b643b250391b3)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #02 pc 00000000000399bc  /apex/com.android.runtime/lib64/bionic/libc.so (deallocate_small+1532) (BuildId: 83e548aec61e975f1f9b643b250391b3)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #03 pc 000000000006aec8  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #04 pc 000000000004fb58  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #05 pc 0000000000061144  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #06 pc 0000000000010314  /system/vendor/lib64/libdsutils.so (stm2_process_input+492) (BuildId: 7e9b29c3bbf60834e58a428989fd5bf2)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #07 pc 0000000000010da0  /system/vendor/lib64/libdsutils.so (stm2_instance_process_input+96) (BuildId: 7e9b29c3bbf60834e58a428989fd5bf2)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #08 pc 0000000000029ec0  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
04-10 18:38:08.223 17986 17986 F DEBUG   :       #09 pc 0000000000005e78  /system/vendor/lib64/libdsutils.so (BuildId: 7e9b29c3bbf60834e58a428989fd5bf2)
04-10 18:38:08.224 17986 17986 F DEBUG   :       #10 pc 00000000000a3724  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 83e548aec61e975f1f9b643b250391b3)
04-10 18:38:08.224 17986 17986 F DEBUG   :       #11 pc 0000000000042948  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 83e548aec61e975f1f9b643b250391b3)

Please let me know if there is anything else I could try.

@SkewedZeppelin
Copy link
Member

Are you on the correct/latest firmware/modem for that device?

@SkewedZeppelin SkewedZeppelin added the bug Something isn't working label Apr 10, 2023
@rmull561
Copy link
Author

I think so, or at least I couldn't find anything more recent. It's from radio-20161215-crackling.zip. It worked on LOS 17.1 fine.

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Apr 10, 2023

Can you run these:

Radio issues: adb logcat -b all -d | grep -i -e radio -e modem -e network -e connect -e phone -e tele
Library issues: adb logcat -b all -d | grep -i -e dlopen

per https://divestos.org/pages/bug_reporting#logs

@rmull561
Copy link
Author

rmull561 commented Apr 10, 2023

Here is the radio log.

The dlopen log was empty.

FWIW, a SIM from the same operator works fine on a harpia running DOS (built at the same date as the crackling DOS).

@SkewedZeppelin
Copy link
Member

SkewedZeppelin commented Apr 11, 2023

Logs from this please?
adb logcat -b all -d | grep -i -C10 netmgrd

I'm going through it and see:

  • DivestOS makes very few changes to crackling specifically, and none radio/modem related
  • There were reports of these older netmgrd crashing with some carriers, but you ruled that out as it works on vanilla Lineage
  • Being a prebuilt none of the compile hardening flags would affect it
  • There may be a SELinux denial, but that is likely already handled?
  • This isn't isn't new, I found a report of someone else with non-working data on crackling but they never provided logs

@rmull561
Copy link
Author

Here is the log with context:
netmgr_context.log

I tried disabling selinux enforcing mode with setenforce 0, but that didn't help.

If you suspect something I installed there is interfering with netmgrd, I can make a clean install and try again.

@rmull561
Copy link
Author

I tried some older images I found with signatures (20211007, 20221023), installed cleanly after wiped data. Same issue observed. If it works for other people, I guess the difference is in the SIM or the configuration provided by the operator.

@fishy1337
Copy link

This is also happening for me on divested-17.1-20230718-dos-crackling.zip. I noticed that this line in the backtrace:

#02 pc 00000000000399bc  /apex/com.android.runtime/lib64/bionic/libc.so (deallocate_small+1532) (BuildId: 83e548aec61e975f1f9b643b250391b3)

points to the double free (quarantine) error case in hardened_malloc: https://github.com/GrapheneOS/hardened_malloc/blob/526ccd915180ae9d0464f4e92c1c485c2ec91dec/h_malloc.c#L690. No idea why it doesn't log the actual error.

I guess maybe the netmgrd binary used for crackling is broken in weird ways and this only fails with the hardened_malloc (and not the normal malloc in LOS 17)? Perhaps one of the funny bug workarounds that already exist for camera/audio could work around this, or one that disables the SLAB_QUARANTINE stuff? Or maybe this is completely unrelated...

I don't have a powerful enough machine to build any changes myself for testing at the moment but I thought I'd share this in case it's helpful for someone. :)

@SkewedZeppelin
Copy link
Member

@fishy1337
oh, that is interesting! I overlooked hmalloc here as I thought crackling was a 32-bit device.

I can add netmgrd to the workaround list for next build!

SkewedZeppelin added a commit that referenced this issue Aug 18, 2023
netmgrd appears incompatible with hmalloc
noted by @fishy1337
#204 (comment)

Signed-off-by: Tad <tad@spotco.us>
@SkewedZeppelin
Copy link
Member

A new build is up with a workaround included, please test!

@rmull561
Copy link
Author

It works for me. Thanks!

@fishy1337
Copy link

Thanks for trying the workaround!

It's still not working for me unfortunately. Same problem as before :/

08-25 13:14:35.040  5985  6145 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 6145 (netmgrd), pid 5985 (netmgrd)
08-25 13:14:35.040  6767  6767 I netmgrd : type=1400 audit(0.0:52): avc: denied { sys_resource } for capability=24 scontext=u:r:netmgrd:s0 tcontext=u:r:netmgrd:s0 tclass=capability permissive=1
08-25 13:14:35.079  6769  6769 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
08-25 13:14:35.081   437   437 I /system/bin/tombstoned: received crash request for pid 6145
08-25 13:14:35.086  6769  6769 I crash_dump64: performing dump of process 5985 (target tid = 6145)
08-25 13:14:35.096  6769  6769 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-25 13:14:35.097  6769  6769 F DEBUG   : DivestOS Version: '17.1-20230824-dos-crackling'
08-25 13:14:35.097  6769  6769 F DEBUG   : Build fingerprint: 'Wileyfox/lineage_crackling/crackling:10/QQ3A.200805.001/eng.emy.20230824.035542:user/release-keys'
08-25 13:14:35.097  6769  6769 F DEBUG   : Revision: '0'
08-25 13:14:35.097  6769  6769 F DEBUG   : ABI: 'arm64'
08-25 13:14:35.098  6769  6769 F DEBUG   : Timestamp: 2023-08-25 13:14:35+0200
08-25 13:14:35.098  6769  6769 F DEBUG   : pid: 5985, tid: 6145, name: netmgrd  >>> /system/vendor/bin/netmgrd <<<
08-25 13:14:35.098  6769  6769 F DEBUG   : uid: 0
08-25 13:14:35.098  6769  6769 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
08-25 13:14:35.098  6769  6769 F DEBUG   :     x0  0000000000000000  x1  0000000000001801  x2  0000000000000006  x3  0000005a9ce15fe0
08-25 13:14:35.099  6769  6769 F DEBUG   :     x4  3131301f626e6b6b  x5  3131301f626e6b6b  x6  3131301f626e6b6b  x7  7f7f7f7f7f7f7f7f
08-25 13:14:35.099  6769  6769 F DEBUG   :     x8  00000000000000f0  x9  000000737d91ff00  x10 ffffffe0ffffffdf  x11 0000000000000001
08-25 13:14:35.099  6769  6769 F DEBUG   :     x12 0000007329a19338  x13 0000007329a1933d  x14 0000007329a19345  x15 0000000000000010
08-25 13:14:35.099  6769  6769 F DEBUG   :     x16 000000737d9b0d20  x17 000000737d990eb0  x18 00000000ffffffd8  x19 00000000000000ac
08-25 13:14:35.099  6769  6769 F DEBUG   :     x20 0000000000001761  x21 00000000000000b2  x22 0000000000001801  x23 00000000ffffffff
08-25 13:14:35.099  6769  6769 F DEBUG   :     x24 0000007329a1933c  x25 0000000000000001  x26 0000007329a19330  x27 000000000000003e
08-25 13:14:35.099  6769  6769 F DEBUG   :     x28 000000732b8a7000  x29 0000005a9ce16090
08-25 13:14:35.099  6769  6769 F DEBUG   :     sp  0000005a9ce15fc0  lr  000000737d942e84  pc  000000737d942eb4
08-25 13:14:35.103  6769  6769 F DEBUG   : 
08-25 13:14:35.103  6769  6769 F DEBUG   : backtrace:
08-25 13:14:35.103  6769  6769 F DEBUG   :       #00 pc 0000000000040eb4  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: 7bddee8dec665b6a37a82eee333dfa6a)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #01 pc 000000000003c288  /apex/com.android.runtime/lib64/bionic/libc.so (fatal_error+100) (BuildId: 7bddee8dec665b6a37a82eee333dfa6a)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #02 pc 00000000000399bc  /apex/com.android.runtime/lib64/bionic/libc.so (deallocate_small+1532) (BuildId: 7bddee8dec665b6a37a82eee333dfa6a)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #03 pc 000000000006aec8  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #04 pc 000000000004fb58  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #05 pc 0000000000061144  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #06 pc 0000000000010314  /system/vendor/lib64/libdsutils.so (stm2_process_input+492) (BuildId: 7e9b29c3bbf60834e58a428989fd5bf2)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #07 pc 0000000000010da0  /system/vendor/lib64/libdsutils.so (stm2_instance_process_input+96) (BuildId: 7e9b29c3bbf60834e58a428989fd5bf2)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #08 pc 0000000000029ec0  /system/vendor/bin/netmgrd (BuildId: 7424b483afe7ad8601e866075dad618b)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #09 pc 0000000000005e78  /system/vendor/lib64/libdsutils.so (BuildId: 7e9b29c3bbf60834e58a428989fd5bf2)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #10 pc 00000000000a37a4  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: 7bddee8dec665b6a37a82eee333dfa6a)
08-25 13:14:35.103  6769  6769 F DEBUG   :       #11 pc 00000000000429c8  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 7bddee8dec665b6a37a82eee333dfa6a)

I'm confused why it works for @rmull561 suddenly.

I suspect the "brokenness" of the netmgrd binary is somehow different compared to the existing workarounds for the camera binaries, but it's hard to say what's happening exactly. We might need a different workaround here :(

@SkewedZeppelin
Copy link
Member

a better workaround may be pulling the binary from another similar device
eg. clark 17.1 with hmalloc has no issue

@rmull561
Copy link
Author

Hm, I guess I was too quick in testing. I don't see any netmgrd crashes in logcat anymore. But mobile data still don't work. I suspect I forgot to disable wifi when I was testing it earlier.

@fishy1337
Copy link

a better workaround may be pulling the binary from another similar device eg. clark 17.1 with hmalloc has no issue

Perhaps, yeah. But I fear this would be quite some effort that would potentially just introduce new other problems. AFAIK the radio related binaries were specifically downgraded for crackling to older versions at some point because the newer ones were causing some trouble. And sadly the netmgrd binary also seems quite intertwined with other binaries that would need to be replaced to match. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants