GithubHelp home page GithubHelp logo

defmt-brtt's People

Contributors

datdenkikniet avatar korken89 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

defmt-brtt's Issues

Possible reentrancy / preemption problem

Hello,
I've just setup a new stm32 project from a template that used defmt-brtt for logging and I believe I observe a reentrancy bug. What I observe is probe-run failing when two RTIC tasks try to log data in parallel (one interrupts the other one every 100ms). With a single task this seems not to happen.

This also seems not to happen on defmt-rtt (reached 4minutes, 2mln messages without a problem). With brtt I fail at 9s, 28k messages (randomly) - so the common denominator is parallel tasks + brtt.

https://defmt.ferrous-systems.com/design-global-logger.html doc suggests it's the global logger area of interest - that's how I reached this.

probe-run stacktrace:

8901 INFO  Idling 8889                                  
└─ minimal::app::idle @ src/bin/minimal.rs:77                                                             
8902 INFO  Idling 8890                                                                                                                                                                                     
└─ minimal::app::idle @ src/bin/minimal.rs:77 
8903 INFO  Idling 8891                                                                                                                                                                                     
└─ minimal::app::idle @ src/bin/minimal.rs:77                                                             
thread 'main' panicked at 'no entry found for key', /home/bla/.cargo/registry/src/github.com-1ecc6299db9ec823/probe-run-0.3.8/src/main.rs:430:27
stack backtrace:                                                                                          
   0:     0x55d9933bebea - std::backtrace_rs::backtrace::libunwind::trace::ha9053a9a07ca49cb                                                                                                                         
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x55d9933bebea - std::backtrace_rs::backtrace::trace_unsynchronized::h9c2852a457ad564e                                                                                                                     
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55d9933bebea - std::sys_common::backtrace::_print_fmt::h457936fbfaa0070f                                                                                                                                 
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x55d9933bebea - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h5779d7bf7f70cb0c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x55d9933e0a7e - core::fmt::write::h5a4baaff1bcd3eb5
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17
   5:     0x55d9933bc6c5 - std::io::Write::write_fmt::h4bc1f301cb9e9cce                  
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/io/mod.rs:1684:15                                                                                                 
   6:     0x55d9933be9b5 - std::sys_common::backtrace::_print::h5fcdc36060f177e8                                                                                                                                     
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x55d9933be9b5 - std::sys_common::backtrace::print::h54ca9458b876c8bf
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x55d9933c000f - std::panicking::default_hook::{{closure}}::hbe471161c7664ed6
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:271:22
   9:     0x55d9933bfd4b - std::panicking::default_hook::ha3500da57aa4ac4f
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:290:9
  10:     0x55d9933c05b8 - std::panicking::rust_panic_with_hook::h50c09d000dc561d2
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:692:13
  11:     0x55d9933c04b9 - std::panicking::begin_panic_handler::{{closure}}::h9e2b2176e00e0d9c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:583:13
  12:     0x55d9933bf056 - std::sys_common::backtrace::__rust_end_short_backtrace::h5739b8e512c09d02
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/sys_common/backtrace.rs:150:18
  13:     0x55d9933c01c2 - rust_begin_unwind
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5
  14:     0x55d9930952f3 - core::panicking::panic_fmt::hf33a1475b4dc5c3e
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14                                                                                               
  15:     0x55d9933de461 - core::panicking::panic_display::ha103dd28e5023b08                                                                                                                                         
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:147:5
  16:     0x55d9933de40b - core::panicking::panic_str::h940bf021f492dc8c
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:131:5
  17:     0x55d9930952b6 - core::option::expect_failed::h09b982639336e7ea
                               at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:2045:5
  18:     0x55d9930a23ec - probe_run::print_logs::haa21a4711913f92f 
  19:     0x55d9930a00c2 - probe_run::run_target_program::h1bfb54a3d74e95cc
  20:     0x55d9930bbf99 - probe_run::cli::handle_arguments::h71a009f7757292ca
  21:     0x55d99309e04e - probe_run::main::h18fb4d75cebfb61c
  22:     0x55d9930c8db3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h2e23ee4259d1ba8b
  23:     0x55d9930b674d - std::rt::lang_start::{{closure}}::h878846510ed16b58
  24:     0x55d9933b76dc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hd6efcd3bec896f2c

Hope this helps. ;-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.