Roman Zeyde

Results 503 comments of Roman Zeyde

Using the following debug branches: - https://github.com/trezor/trezor-firmware/compare/romanz/debug-oom - https://github.com/trezor/micropython/compare/trezor-v1.19.1...trezor:micropython:romanz/debug-oom ![Image](https://github.com/user-attachments/assets/c34a0703-b97c-4add-b834-de5b3bf37b6c) [debug.gc2.log](https://github.com/user-attachments/files/22194707/debug.gc2.log) [gc2.log](https://github.com/user-attachments/files/22194716/gc2.log) [analyze.py](https://github.com/user-attachments/files/22194720/analyze.py)

It looks similar to the "chain of heap blocks" symptom in https://github.com/trezor/trezor-firmware/issues/5472#issuecomment-3262594686:

Looking on one of the "1088 bytes" heap block -> it's block ID is 20224: It is used to store 1076 bytes' object: ``` $ grep 20224 ~/tmp/debug.gc2.log gc_alloc(1076) ->...

BTW, in this case we also exceed `MICROPY_ALLOC_GC_STACK_SIZE=64` limit, as we did in https://github.com/trezor/trezor-firmware/issues/5472#issuecomment-3262413349 🤔 Maybe we should use it as a signal to detect such issues in debug builds?

It seems that invoking the GC and clearing the stack before calling `trezorui_api.flow_confirm_output()` helps: https://github.com/trezor/trezor-firmware/compare/main...romanz/debug-oom I suspect that during the layout creation (in Rust), some previous stack values are being...

The OOM doesn't reproduce on T3T1 & T3W1 when testing with https://github.com/trezor/trezor-firmware/commit/29fc8bfdf456afca478d80ca75cb2ec5c38a42b6.

# Test duration on T3T1 @ acd56d0113 ``` $ TREZOR_MODEL=T3T1 DISABLE_OPTIGA=1 STORAGE_INSECURE_TESTING_MODE=1 PYOPT=0 make build_firmware upload -C core $ pytest tests/device_tests/bitcoin/test_signtx.py::test_lots_of_outputs -v --durations 0 ``` | `BITCOIN_ONLY` | stack clear...

# Slowest 40 tests on T3T1 with `BITCOIN_ONLY=0` ``` $ BITCOIN_ONLY=0 TREZOR_MODEL=T3T1 DISABLE_OPTIGA=1 STORAGE_INSECURE_TESTING_MODE=1 PYOPT=0 \ make clean build_firmware upload -C core $ pytest -v tests/device_tests/ --durations 40 ``` ##...

Happened again: https://github.com/trezor/trezor-firmware/actions/runs/20113357905/job/57716533128?pr=6249