Threads, async/await, Promises, Futures

Oxide and Friends · 13 Sept 2022 · 1h 15m · Episode 27

What this episode covers

Adam Leventhal, Brian Cantrill, and guests from Oxide Computer Company discuss the difficulty of explaining async/await, prompted by Adam's attempt to teach his son C++. They contrast synchronous threading with asynchronous models, tracing the history from Solaris lightweight processes to modern Rust, Go, and Zig implementations. The group highlights significant debugging challenges in async systems, including hidden queues, non-linear response times, and the loss of stack trace context, citing painful experiences with Node.js, Erlang/RabbitMQ, and Python's Trollius library. They explore various language-specific approaches, such as Zig's explicit stack frames and Go's signal-based blocking handling, to determine when async is appropriate and how to make it debuggable.

Mentioned

Companies
Oxide Computer Company
Products
RabbitMQ, Shoutcast, LAME, HHVM
Also
Rust, Node.js, Erlang, Zig, Go, Solaris, Twisted, Trollius, io_uring, epoll

Other shows on the same ground, closest first.

  • Embedded.fm · 58m

    141: Malevolent and Trying to Trick You

    Julia Evans, a software engineer at Stripe, discusses using Linux system-level tools like `strace`, `perf`, and `top` to debug applications as black boxes. She explains how `strace` reveals system calls to understand program behavior without reading source code, and how `perf top` identifies CPU-intensive functions like garbage collection. Evans also shares her philosophy on debugging, emphasizing the importance of maintaining confidence and understanding that computers are logical machines, even when bugs seem impossible.

  • Embedded.fm · 1h 01m

    38: Blame the Monkey

    Elecia White and producer Chris White discuss strategies for debugging 'insurmountable' problems in embedded systems, ranging from race conditions and stack overflows to non-reproducible hardware issues. They advocate for methodical approaches such as drawing system diagrams, writing detailed emails to clarify thoughts, and using the scientific method to isolate variables. The conversation also covers the importance of logging, reverting to known good code, and knowing when to walk away or accept a bug as a feature.

  • Embedded.fm · 1h 12m

    215: Heisenbugs

    Guest Alvaro Prieto joins hosts Alicia White and Christopher White to discuss the fundamentals of debugging embedded systems, distinguishing between software debuggers, hardware programmers, and microprocessor debug support. They cover the evolution from print-based debugging to using tools like GDB, LLDB, and Visual Studio Code, while explaining the roles of hardware interfaces like J-Tag, SWD, and Trace. The conversation highlights the trade-offs between open-source toolchains (GCC, OpenOCD) and paid professional IDEs (Keil, IAR, Code Composer Studio), emphasizing how paid tools simplify setup for complex chip architectures. Prieto also shares anecdotes about his personal projects, including a cheese-aging cave and a new reverse engineering podcast.

  • The Amp Hour · 1h 04m

    Debugger vs Printeffer

    Dave Jones of EEVblog discusses the significant challenges he faced during the Kickstarter launch of his new digital multimeter, including manufacturing defects, logistical bottlenecks, and component sourcing issues. He details specific failures such as intermittent contacts in the range switch due to injection molding tolerances and units stuck in US customs due to reshipper ownership discrepancies. The conversation also covers the broader industry context of passive component shortages, the historical shift from mask ROM to reprogrammable microcontrollers, and debugging methodologies like using square waves for control loop stability.

  • Embedded.fm · 1h 05m

    170: Electron Gnomes

    Hosts Elecia White and Christopher White discuss the hidden complexities of embedded software engineering in preparation for Elecia's upcoming IEEE presentation on 'The Tricky Parts' of embedded systems. They cover specific technical challenges including the difficulty of debugging with limited visibility, the counterintuitive nature of power optimization (such as balancing sleep states against wake-up costs), and the pain of managing unstable SDKs and sample code from vendors like Nordic and NXP. The conversation also touches on the necessity of understanding map files for memory management and the importance of using test equipment like oscilloscopes for accurate timing analysis.

The summary, chapters and topics are generated from the episode’s audio by this directory, not written by Oxide and Friends. The episode itself belongs to its publisher.