ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.84k stars 885 forks source link

PyCryptodomex illegal instruction #1339

Open whorfin opened 3 years ago

whorfin commented 3 years ago

Install pycryptodomex:

# apk add gcc gmp python3-dev  # along with the regular goodies to get pip3 and python3
# pip3 install pycryptodomex

... have lunch or tea ...

# python3 -m Cryptodome.SelfTest
Skipping AESNI tests
/usr/lib/python3.8/site-packages/Cryptodome/SelfTest/Cipher/test_DES3.py:60: UserWarning: Warning: skipping extended tests for TDES ECB (TECBMMT2.rsp)
  test_vectors = load_test_vectors(
/usr/lib/python3.8/site-packages/Cryptodome/SelfTest/Cipher/test_DES3.py:60: UserWarning: Warning: skipping extended tests for TDES ECB (TECBMMT3.rsp)
  test_vectors = load_test_vectors(
Illegal instruction
... dmesg shows:
669 illegal instruction at 0xf701f5c0: 0f 16 84 24 48 02 00 00
62f commented 3 years ago

image https://stackoverflow.com/questions/43857083/does-compiled-crypto-library-code-that-uses-aes-gcm-encryption-utilize-intels#43857127

whorfin commented 3 years ago

I'm afraid I do not understand the suggestion. Yes, I've gotten pycryptodomex to build and install [using python3, not python2] But code which tries to use it crashes, and simply running its own self-test as I demonstrate above causes a crash.

62f commented 3 years ago

I'm afraid I do not understand the suggestion.

Yes, I've gotten pycryptodomex to build and install [using python3, not python2]

But code which tries to use it crashes, and simply running its own self-test as I demonstrate above causes a crash.

If responding looked like a help suggestion, my apologies. The original bug-report seemed sufficient, and though the accompanying data was not indicative that you might've been un/aware of how nor whether it is or is not desirable to formulate any workaround, others might have taken similar routes and thought failure was the accepted option.

{"app_name":"iSH","app_cohort":"2|date=1617699600000&sf=143441&tid=b2b729db699ff2081ca567667534a3390c9c780c2104d35ff3fff1ec0518c1b3&ttype=e","app_version":"1.1.2","timestamp":"2021-04-17 02:35:18.44 -0400","slice_uuid":"1949C22E-46C6-3D8C-A95B-E954098528ED","adam_id":1436902243,"build_version":"133","bundleID":"app.ish.iSH","share_with_app_devs":true,"is_first_party":false,"bug_type":"202","os_version":"iPhone OS 12.5.2 (16H30)","incident_id":"69B4C932-2B10-45B6-9651-53A9230E9843","is_beta":true,"name":"iSH"} Date/Time: 2021-04-17 02:35:00 -0400 End time: 2021-04-17 02:35:17 -0400 OS Version: iPhone OS 12.5.2 (Build 16H30) Architecture: arm64 Report Version: 28 Incident Identifier: 69B4C932-2B10-45B6-9651-53A9230E9843 Data Source: Microstackshots Shared Cache: 0x18370000 2ACDF5DC-579E-3653-AE88-6923296E53B2 Command: iSH Path: /private/var/containers/Bundle/Application/DC586719-CFF7-41AC-90AE-855D0E2C2DFD/iSH.app/iSH Identifier: app.ish.iSH Version: 1.1.2 (133) Beta Identifier: 34D01941-AC09-4A1D-AA69-2A0051E3DC84 PID: 40682 Event: cpu usage Action taken: none CPU: 144 seconds cpu time over 157 seconds (92% cpu average), exceeding limit of 80% cpu over 180 seconds CPU limit: 144s Limit duration: 180s CPU used: 144s Duration: 17.28s Steps: 20 Hardware model: iPhone6,1 Active cpus: 2 Boot args: Heaviest stack for the target process: 20 ??? (libsystem_pthread.dylib + 45600) [0x198e55220] 20 ??? (libsystem_pthread.dylib + 45760) [0x198e552c0] 20 ??? (iSH + 143944) [0x100a3f248] 20 ??? (iSH + 143736) [0x100a3f178] 20 ??? (iSH + 289548) [0x100a62b0c] 3 ??? (iSH + 403800) [0x100a7e958] Powerstats for: iSH [40682] Bundle ID: app.ish.iSH Adam ID: 1436902243 Is first party: No App version: 1.1.2 Build version: 133 Is Beta: Yes Share with Devs: Yes UUID: 1949C22E-46C6-3D8C-A95B-E954098528ED Path: /private/var/containers/Bundle/Application/DC586719-CFF7-41AC-90AE-855D0E2C2DFD/iSH.app/iSH Architecture: arm64 Parent: UNKNOWN [1] UID: 501 Footprint: 377.92 MB Pageins: 2 pages Start time: 2021-04-17 02:35:00 -0400 End time: 2021-04-17 02:35:17 -0400 Num samples: 20 (100%) CPU Time: 17.085s Primary state: 18 samples Frontmost App, Non-Suppressed, User mode, Effective Thread QoS Default, Requested Thread QoS Default, Override Thread QoS Unspecified User Activity: 0 samples Idle, 0 samples Active, 20 samples Unknown Power Source: 0 samples on Battery, 0 samples on AC, 20 samples Unknown 20 ??? (libsystem_pthread.dylib + 45600) [0x198e55220] 20 ??? (libsystem_pthread.dylib + 45760) [0x198e552c0] 20 ??? (iSH + 143944) [0x100a3f248] 20 ??? (iSH + 143736) [0x100a3f178] 20 ??? (iSH + 289548) [0x100a62b0c] 3 ??? (iSH + 403800) [0x100a7e958] 1 ??? (libsystem_platform.dylib + 34076) [0x198e4751c] 1 1 ??? (iSH + 419128) [0x100a82538] 1 ??? (iSH + 408532) [0x100a7fbd4] 1 ??? (iSH + 408500) [0x100a7fbb4] 1 ??? (iSH + 408184) [0x100a7fa78] 1 ??? (iSH + 404676) [0x100a7ecc4] 1 ??? (iSH + 403952) [0x100a7e9f0] 1 ??? (iSH + 403920) [0x100a7e9d0] 1 ??? (iSH + 403780) [0x100a7e944] 1 ??? (iSH + 401888) [0x100a7e1e0] 1 ??? (iSH + 399228) [0x100a7d77c] 1 ??? (iSH + 271676) [0x100a5e53c] 1 ??? (iSH + 269432) [0x100a5dc78] 1 ??? (iSH + 398432) [0x100a7d460] 1 ??? (iSH + 398008) [0x100a7d2b8] 1 ??? (iSH + 290888) [0x100a63048] 1 ??? (libsystem_malloc.dylib + 50460) [0x198e1551c] 1 ??? (libsystem_kernel.dylib + 98344) [0x198dc8028] 1 1 ??? (iSH + 290568) [0x100a62f08] 1 ??? (iSH + 290208) [0x100a62da0] 1 ??? (iSH + 310200) [0x100a67bb8] 1 ??? (iSH + 290112) [0x100a62d40] Binary Images: 0x100a1c000 - ??? iSH <1949C22E-46C6-3D8C-A95B-E954098528ED> /private/var/containers/Bundle/Application/DC586719-CFF7-41AC-90AE-855D0E2C2DFD/iSH.app/iSH 0x198db0000 - 0x198ddafff libsystem_kernel.dylib /usr/lib/system/libsystem_kernel.dylib 0x198e09000 - 0x198e2bfff libsystem_malloc.dylib <9A11B06B-2B0B-3003-860A-0071EE67C3D0> /usr/lib/system/libsystem_malloc.dylib 0x198e3f000 - 0x198e49fff libsystem_platform.dylib <463A90F8-19F8-32E2-8DA7-DBBDB9CB3EF3> /usr/lib/system/libsystem_platform.dylib 0x198e4a000 - 0x198e5afff libsystem_pthread.dylib <9E64505E-B223-3F99-8D25-A7EF27684FCF> /usr/lib/system/libsystem_pthread.dylib