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 quit unexpectedly #482

Open
gottk opened this issue Jun 29, 2024 · 1 comment
Open

Python quit unexpectedly #482

gottk opened this issue Jun 29, 2024 · 1 comment

Comments

@gottk
Copy link

gottk commented Jun 29, 2024

I am experiencing frequent crashes when using trezor-agent to sign my key for SSH connections to servers or when used in combination with Git. The issue appears to be increasing in frequency.

Upon crash, Python generates an error report indicating an unexpected termination.
The following stack trace is provided:
Thread 4 Crashed:
0 CoreFoundation 0x1855ac874 __CFCheckCFInfoPACSignature + 44
1 CoreFoundation 0x1854b1350 CFRunLoopAddSource + 136
2 IOKit 0x188bf87a0 IOHIDDeviceScheduleWithRunLoop + 92
3 IOKit 0x188bfd6cc __IOHIDManagerDeviceApplier + 636
4 IOKit 0x188bb83c0 __IOHIDManagerDeviceAdded + 752
5 IOKit 0x188bb7fa8 __IOHIDManagerSetDeviceMatching + 372
6 IOKit 0x188bb7ddc IOHIDManagerSetDeviceMatchingMultiple + 272
7 hid.cpython-312-darwin.so 0x1020efd28 hid_enumerate + 260
8 hid.cpython-312-darwin.so 0x1020ef0f0 __pyx_pw_3hid_1enumerate + 428
9 Python 0x100f8ad88 cfunction_call + 72
10 Python 0x100f39348 _PyObject_MakeTpCall + 128
11 Python 0x10102d580 _PyEval_EvalFrameDefault + 44000
12 Python 0x100f3c410 method_vectorcall + 372
13 Python 0x101030dfc _PyObject_CallNoArgs + 80
14 Python 0x10102cdb4 _PyEval_EvalFrameDefault + 42004
15 Python 0x100f39cc8 _PyVectorcall_Call + 152
16 Python 0x101105240 partial_call + 120
17 Python 0x100f3a060 _PyObject_Call + 124
18 Python 0x10102ef20 _PyEval_EvalFrameDefault + 50560
19 Python 0x100f3c410 method_vectorcall + 372
20 Python 0x1010fe558 thread_run + 144
21 Python 0x1010947a8 pythread_wrapper + 48
22 libsystem_pthread.dylib 0x1853faf94 _pthread_start + 136
23 libsystem_pthread.dylib 0x1853f5d34 thread_start + 8

Thread 4 crashed with ARM Thread State (64-bit):
x0: 0x0000600003aa0540 x1: 0x0000600003ab0780 x2: 0x00000001f2081b88 x3: 0x0000000000000002
x4: 0x0000000000000000 x5: 0x0000000000000810 x6: 0x0000000000000030 x7: 0x0000000000000000
x8: 0x0000f1d012e9002a x9: 0x000000000000002a x10: 0x000000000000082c x11: 0x0000000000000030
x12: 0x0000600000dae104 x13: 0x00000000001ff800 x14: 0x00000000000007fb x15: 0x00000000c54a802c
x16: 0x00000001854b12c8 x17: 0x00000001f75f1300 x18: 0x0000000000000000 x19: 0x0000600003aa0540
x20: 0x0000600003ab0780 x21: 0x00000001f2081b88 x22: 0x00000001ed24f000 x23: 0x000000015970bd70
x24: 0x000000015970bcd0 x25: 0x0000000000000002 x26: 0x0000000000000000 x27: 0x0000000000002f0f
x28: 0x0000000119908f50 fp: 0x000000017194a390 lr: 0x00000001854b1350
sp: 0x000000017194a300 pc: 0x00000001855ac874 cpsr: 0x00001000
far: 0x0000000000000000 esr: 0xf200c470 (Breakpoint) pointer authentication trap IA

Steps to reproduce:

Use trezor-agent to sign a key for SSH connection or Git operation
Attempt to connect to a server via SSH or perform a Git operation (randomly crashes on git pull / git fetch or git push)
Observe unexpected crash and Python error report, it closes my terminal as a side-effect too, which is not great while being in the middle of a deployment.

Additional information:

Frequency: Increasing over time
Trezor-agent version: trezor-agent=0.12.0 libagent=0.14.7
Python version: 3.12.4
Operating System: Apple M1 Pro / MacOS Sonoma 14.5

Please help.

@romanz
Copy link
Owner

romanz commented Aug 23, 2024

It seems like an issue with hid Python module:

0 CoreFoundation 0x1855ac874 __CFCheckCFInfoPACSignature + 44
1 CoreFoundation 0x1854b1350 CFRunLoopAddSource + 136
2 IOKit 0x188bf87a0 IOHIDDeviceScheduleWithRunLoop + 92
3 IOKit 0x188bfd6cc __IOHIDManagerDeviceApplier + 636
4 IOKit 0x188bb83c0 __IOHIDManagerDeviceAdded + 752
5 IOKit 0x188bb7fa8 __IOHIDManagerSetDeviceMatching + 372
6 IOKit 0x188bb7ddc IOHIDManagerSetDeviceMatchingMultiple + 272
7 hid.cpython-312-darwin.so 0x1020efd28 hid_enumerate + 260
8 hid.cpython-312-darwin.so 0x1020ef0f0 __pyx_pw_3hid_1enumerate + 428

Do regular trezorctl commands work on your machine?

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