Deep Dive w/Scott: Epic Memory Bug episode artwork

EPISODE · Aug 27, 2021 · 2H 16M

Deep Dive w/Scott: Epic Memory Bug

from Adafruit Industries · host Adafruit Industries

Join Scott as he covers more fixes for CircuitPython 7.0.0 including an epic memory bug that he and Jeff debugged. Scott will answer questions as well. Visit the Adafruit shop online - http://www.adafruit.com Deep Dive happens every week. Normally Fridays at 2pm Pacific but occasionally shifted to Thursday at 2pm. Typically goes for two hours or more. Questions are welcome. Next week will be on Friday. Thanks to David (@dcd) for taking timecodes and notes. 0:00 Getting started 0:06:31 Hello/Welcome/Housekeeping 0:10:00 Hot Reload issue from UM 0:10:30 What’s after CP 7.0 0:12:30 Espressif (feature on Ask and Engineer) - not supported yet 0:13:36 WipperSnapper 0:14:55 RealPython podcast plug - https://realpython.com/podcasts/rpp/75/ 0:18:24 Reviewing Closed issues - https://github.com/adafruit/circuitpython/issues 0:23:10 issue 5021 - Watch Dog Timer (WDT) 0:28:00 Magtag hacked to access debug UART - handy for debugging 0:31:50 trying controlling the neopix on my feather840 with the guide with no success. couldn't find adafruit_ble.services.nordic in docs to help troubleshoot bleuart 0:33:10 When you use this m_new_obj_with_finaliser does the class have to have a finaliser or does it handle it automatically? 0:34:00 https://github.com/2m/fish-history-merge mentioned in discord 0:35:00 more spoilers - don’t look :-) 0:36:26 Can CP do quad and/or octo SPI ? 0:37:30 TG1WDT_SYS_RST ( watch dog timer reset ) 0:38:30 gc: collect() outputs (main.c) 0:40:46 mention of adding file name and line number to debug _FILE__, __LINE__ ( thanks Jeff ) 0:43:45 gc_collect_ptr() marking heap memory chunks that have pointers 0:45:10 the costs of using dynamic memory (16 byte blocs in ATB ) 0:40:00 __del and bitmaps for finalizers (FTB - finalizer table ) 0:49:00 gc_mark_subtree() 0:52:45 0x3ff80000 printed 0:53:16 esp32-s2 technical reference - Address Mapping in Table 20: 0:56:20 similar MP bug with Cortex M7 memory that shut the the memory bus 0:57:30 memory protection unit discussion 0:58:00 “it shouldn’t do that” reading memory causes bus to hang 1:00:56 last time throught the loop - the block was “1”, now it’s “2” 1:01:33 How did we come up with the block size of 2? 1:04:30 gc_alloc() FTB_SET and finalizer changing numbers.. 1:07:21 Micropython issue 7716 1:11:10 fix in pull #5245 1:12:20 turn off long living - and the bug went away 1:13:14 - youtube visualizations of left and right “heap before after” low addresses on the left, high on the right - https://www.youtube.com/watch?v=CD3lyGS_W9o 1:15:27 Short lived / Long Lived in CircuitPython 3.x ( no layers of indirection ) 1:16:40 Long Lived rules (import, Q-strings, etc.) placed on right side 1:20:45 search for long_lived, also allocators with _ll in their name 1:22:25 So it does compaction if needed? 1:23:00 Long Lived only impacts the allocation process 1:23:40 I2c bug also fixed this week - not long lived 1:24:40 earlier memory issue deep dive https://www.youtube.com/watch?v=baa5ILZTRkQ 1:26:08 my debug output is garbled although I have 115200 set. 1:28:00 build status for merge 1:28:50 - need to build CP ESP32 with debug flag to get debug strings 1:29:39 GDB learn guide 1:30:15 What did you use to make the heap graphic? / ( see tools analyze_heap_dump.py ) 1:32:25 let’s talk nRF = issue #5240 ( see also #5241 for rp2040 ) 1:35:13 (the faked sleep modes) Explains why i see the same power usage regardless of sleep mode, even time.sleep 1:36:25 sublime merge review changes 1:37:47 issue #5211 1:42:06 RESETREAS ( why nRF52840 was reset ) 1:49:46 NRF / deep-sleep-with-circuitpython/power-on-other-boards learn guide ( oh - that is still a draft ) 1:50:12 So you said about time sleep -- does that need an RTC, or just based on internal clock? 1:52:11 Nordic nRF-PPk2 Power Profiler Kit II product 5048 1:54:05 “need to figure out exception class” to throw 1:56:55 having deep sleep in CP is a game changer - CP knows what you are using 2:13:20 wrapping up #5253 2:16:30 sign off ----------------------------------------- LIVE CHAT IS HERE! http://adafru.it/discord Adafruit on Instagram: https://www.instagram.com/adafruit Subscribe to Adafruit on YouTube: http://adafru.it/subscribe New tutorials on the Adafruit Learning System: http://learn.adafruit.com/ -----------------------------------------

Join Scott as he covers more fixes for CircuitPython 7.0.0 including an epic memory bug that he and Jeff debugged. Scott will answer questions as well. Visit the Adafruit shop online - http://www.adafruit.com Deep Dive happens every week. Normally Fridays at 2pm Pacific but occasionally shifted to Thursday at 2pm. Typically goes for two hours or more. Questions are welcome. Next week will be on Friday. Thanks to David (@dcd) for taking timecodes and notes. 0:00 Getting started 0:06:31 Hello/Welcome/Housekeeping 0:10:00 Hot Reload issue from UM 0:10:30 What’s after CP 7.0 0:12:30 Espressif (feature on Ask and Engineer) - not supported yet 0:13:36 WipperSnapper 0:14:55 RealPython podcast plug - https://realpython.com/podcasts/rpp/75/ 0:18:24 Reviewing Closed issues - https://github.com/adafruit/circuitpython/issues 0:23:10 issue 5021 - Watch Dog Timer (WDT) 0:28:00 Magtag hacked to access debug UART - handy for debugging 0:31:50 trying controlling the neopix on my feather840 with the guide with no success. couldn't find adafruit_ble.services.nordic in docs to help troubleshoot bleuart 0:33:10 When you use this m_new_obj_with_finaliser does the class have to have a finaliser or does it handle it automatically? 0:34:00 https://github.com/2m/fish-history-merge mentioned in discord 0:35:00 more spoilers - don’t look :-) 0:36:26 Can CP do quad and/or octo SPI ? 0:37:30 TG1WDT_SYS_RST ( watch dog timer reset ) 0:38:30 gc: collect() outputs (main.c) 0:40:46 mention of adding file name and line number to debug _FILE__, __LINE__ ( thanks Jeff ) 0:43:45 gc_collect_ptr() marking heap memory chunks that have pointers 0:45:10 the costs of using dynamic memory (16 byte blocs in ATB ) 0:40:00 __del and bitmaps for finalizers (FTB - finalizer table ) 0:49:00 gc_mark_subtree() 0:52:45 0x3ff80000 printed 0:53:16 esp32-s2 technical reference - Address Mapping in Table 20: 0:56:20 similar MP bug with Cortex M7 memory that shut the the memory bus 0:57:30 memory protection unit discussion 0:58:00 “it shouldn’t do that” reading memory causes bus to hang 1:00:56 last time throught the loop - the block was “1”, now it’s “2” 1:01:33 How did we come up with the block size of 2? 1:04:30 gc_alloc() FTB_SET and finalizer changing numbers.. 1:07:21 Micropython issue 7716 1:11:10 fix in pull #5245 1:12:20 turn off long living - and the bug went away 1:13:14 - youtube visualizations of left and right “heap before after” low addresses on the left, high on the right - https://www.youtube.com/watch?v=CD3lyGS_W9o 1:15:27 Short lived / Long Lived in CircuitPython 3.x ( no layers of indirection ) 1:16:40 Long Lived rules (import, Q-strings, etc.) placed on right side 1:20:45 search for long_lived, also allocators with _ll in their name 1:22:25 So it does compaction if needed? 1:23:00 Long Lived only impacts the allocation process 1:23:40 I2c bug also fixed this week - not long lived 1:24:40 earlier memory issue deep dive https://www.youtube.com/watch?v=baa5ILZTRkQ 1:26:08 my debug output is garbled although I have 115200 set. 1:28:00 build status for merge 1:28:50 - need to build CP ESP32 with debug flag to get debug strings 1:29:39 GDB learn guide 1:30:15 What did you use to make the heap graphic? / ( see tools analyze_heap_dump.py ) 1:32:25 let’s talk nRF = issue #5240 ( see also #5241 for rp2040 ) 1:35:13 (the faked sleep modes) Explains why i see the same power usage regardless of sleep mode, even time.sleep 1:36:25 sublime merge review changes 1:37:47 issue #5211 1:42:06 RESETREAS ( why nRF52840 was reset ) 1:49:46 NRF / deep-sleep-with-circuitpython/power-on-other-boards learn guide ( oh - that is still a draft ) 1:50:12 So you said about time sleep -- does that need an RTC, or just based on internal clock? 1:52:11 Nordic nRF-PPk2 Power Profiler Kit II product 5048 1:54:05 “need to figure out exception class” to throw 1:56:55 having deep sleep in CP is a game changer - CP knows what you are using 2:13:20 wrapping up #5253 2:16:30 sign off ----------------------------------------- LIVE CHAT IS HERE! http://adafru.it/discord Adafruit on Instagram: https://www.instagram.com/adafruit Subscribe to Adafruit on YouTube: http://adafru.it/subscribe New tutorials on the Adafruit Learning System: http://learn.adafruit.com/ -----------------------------------------

NOW PLAYING

Deep Dive w/Scott: Epic Memory Bug

0:00 2:16:27

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

API Intersection Stoplight Building a successful API requires more than just coding. It starts with collaborative design, focuses on creating a great developer experience, and ends with getting your company on board, maintaining consistency, and maximizing your API’s profitability.In the API Intersection, you’ll learn from experienced API practitioners who transformed their organizations, and get tangible advice to build quality APIs with collaborative API-first design.Jason Harmon brings over a decade of industry-recognized REST API experience to discuss topics around API design, governance, identity/auth versioning, and more.They’ll answer listener questions, and discuss best practices on API design (definition, modeling, grammar), Governance (multi-team design, reviewing new API’s), Platform Transformation (culture, internal education, versioning) and more.They’ll also chat with experienced API practitioners from a wide array of industries to draw out practical takeaways and insights you can use.H TV Podcast Industries Chris Jones, Derek O'Neill and John Harrison. TV Podcast Industries TV Podcast Industries is a podcast that provides discussions and reviews of various TV shows, including recent popular series like Alien Earth, The Sandman, The Last of Us, The Boys, and Daredevil Born Again. They also cover shows such as Ironheart, Star Trek: Picard, The Rings of Power, and many more, spanning both Marvel and DC universes, as well as other genres. Heart to Heart Podcast One on One / Next Level Studios In the Heart to Heart Podcast, we talk to some of our favorite & most interesting people in the entertainment industry so you can feel empowered and learn that even in the most challenging of industries, where there’s a will there’s a way.Whether you’re an actor, a writer, a casting director, a talent rep, or just someone interested in the behind the scene happenings of the entertainment industry, this podcast will have something for you. NOW, this isn’t just another How To podcast for actors. Plenty of those shows already exist. In Heart to Heart, every guest will share stories inspired by their sometimes winding path to success on their own terms. The Learning Future Podcast with Louka Parry The Learning Future The world has never been changing more rapidly, dislocating the ways we work, learn and live. On The Learning Future Podcast we discuss the knowledge, skills and dispositions we all need for our learning future, exploring insights through interviews with world-class educators, researchers, policy makers, and leaders from across industries and across the world.

Frequently Asked Questions

How long is this episode of Adafruit Industries?

This episode is 2 hours and 16 minutes long.

When was this Adafruit Industries episode published?

This episode was published on August 27, 2021.

What is this episode about?

Join Scott as he covers more fixes for CircuitPython 7.0.0 including an epic memory bug that he and Jeff debugged. Scott will answer questions as well. Visit the Adafruit shop online - http://www.adafruit.com Deep Dive happens every week. Normally...

Can I download this Adafruit Industries episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!