Closed noproto closed 2 months ago
@noproto super sorry for delay, I've missed email with notification.
Also would you like to be maintainer in this repository or would you like to have mfkey in your repo(like betsy did with picopass)?
PS: also don't hesitate to ping us if there are any delays.
I see crash, looks like missing furi_thread_join. I think I've pressed either ok or back on complete screen.
#0 0x080123a0 in __furi_crash_implementation () at furi/core/check.c:170
#1 0x08015c82 in furi_thread_free (thread=0x2000cc40) at furi/core/thread.c:205
#2 0x20019240 in mfkey_main () at /Users/aku/Work/Flipper/flipperzero-good-faps/mfkey/mfkey.c:896
#3 0x0805d086 in flipper_application_thread (context=0x2000bd58) at lib/flipper_application/flipper_application.c:239
#4 0x08015b8e in furi_thread_body (context=0x2000c8d8) at furi/core/thread.c:103
#5 0x08015b3e in furi_thread_catch () at furi/core/thread.c:75
(gdb) p *thread
$2 = {
container = {
pxDummy1 = 0x2000e27c,
xDummy3 = {{
xDummy2 = 0,
pvDummy3 = {0x20000ff8 <xTasksWaitingTermination+8>, 0x20000ff8 <xTasksWaitingTermination+8>, 0x2000cc40, 0x20000ff0 <xTasksWaitingTermination>}
}, {
xDummy2 = 16,
pvDummy3 = {0x2000cb6c, 0x2000cb6c, 0x2000cc40, 0x0}
}},
uxDummy5 = 16,
pxDummy6 = 0x2000dae8,
ucDummy7 = "MFKey Worker", '\000' <repeats 19 times>,
pxDummy8 = 0x2000e2e0,
uxDummy10 = {47, 0},
uxDummy12 = {16, 0},
pvDummy15 = {0x2000cc40},
ulDummy16 = 3538578007,
ulDummy18 = {0, 0, 0},
ucDummy19 = "\000\000"
},
stack_buffer = 0x2000dae8,
state = FuriThreadStateStopped,
ret = 0,
callback = 0x200190f1 <mfkey_worker_thread>,
context = 0x2000caa0,
state_callback = 0x0,
state_context = 0x0,
signal_callback = 0x0,
signal_context = 0x0,
name = 0x2000bcd8 "MFKey Worker",
appid = 0x2000bcc8 "mfkey",
priority = FuriThreadPriorityNone,
stack_size = 2048,
heap_size = 0,
output = {
write_callback = 0x0,
buffer = 0x2000bcb0
},
is_service = false,
heap_trace_enabled = false,
is_active = true
}
So unfortunately I'm not able to reproduce a crash - I attempted for 4 hours with various tests - or locate the condition in MFKey which would result in that behavior. It'll be very helpful if I can get steps to reproduce it so I can get the bug closed out. Reviewing the diff of the changes on this PR, a crash in 2.7 should be applicable to MFKey 2.6 and earlier versions if it is related to the thread joining.
Also I'd be happy to be a maintainer for this repo to keep MFKey up to date. The recent MFKey changes are to support the firmware Nested implementation that is halfway complete.
@noproto once again sorry for delay with this PR.
I also was not able to reproduce crash anymore. I was able to reproduce Timer thread lockup caused by event accumulation, but that is kinda expected: worker doesn't give CPU time to lower priority threads.
As an apologies for delay I've cleaned up code a little bit.
What's new
Verification
Here are several test Mfkey32 nonces you can store in .mfkey32.log:
Checklist (For Reviewer)