Example:
WARN 2016-09-28 16:49:26,990 [shard 0] seastar - Exceptional future ignored: seastar::gate_closed_exception (gate closed)
0x498629
0x4f927a
0x6e2bc4
0x48c1c8
0x4d2bda
0x5416e3
0x41dcda
0x7ff41eb8757f
0x487648
---
core/reactor.cc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/core/reactor.cc b/core/reactor.cc
index 9246d12..9017db9 100644
--- a/core/reactor.cc
+++ b/core/reactor.cc
@@ -3488,8 +3488,17 @@ void engine_exit(std::exception_ptr eptr) {
engine().exit(1);
}
+static sstring backtrace_as_string(const char* indent = " ") {
+ sstring s;
+ backtrace([&] (uintptr_t addr) {
+ s += indent;
+ s += sprint("0x%x\n", addr - 1);
+ });
+ return s;
+}
+
void report_failed_future(std::exception_ptr eptr) {
- seastar_logger.warn("Exceptional future ignored: {}", eptr);
+ seastar_logger.warn("Exceptional future ignored: {}\n{}", eptr, backtrace_as_string());
}
future<> check_direct_io_support(sstring path) {
--
2.5.5
--
You received this message because you are subscribed to the Google Groups "seastar-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seastar-dev+unsubscribe@googlegroups.com.
To post to this group, send email to seast...@googlegroups.com.
Visit this group at https://groups.google.com/group/seastar-dev.
To view this discussion on the web visit https://groups.google.com/d/msgid/seastar-dev/1475074762-13356-1-git-send-email-tgrabiec%40scylladb.com.
For more options, visit https://groups.google.com/d/optout.
On Wed, Sep 28, 2016 at 06:53:18PM +0300, Nadav Har'El wrote:
> On Wed, Sep 28, 2016 at 5:59 PM, Tomasz Grabiec <tgra...@scylladb.com>
> wrote:
>
> > Example:
> >
> > WARN 2016-09-28 16:49:26,990 [shard 0] seastar - Exceptional future
> > ignored: seastar::gate_closed_exception (gate closed)
> > 0x498629
> > 0x4f927a
> > 0x6e2bc4
> > 0x48c1c8
> > 0x4d2bda
> > 0x5416e3
> > 0x41dcda
> > 0x7ff41eb8757f
> > 0x487648
> >
>
> Looks good. But just curious: Is it convenient for you that all these
> addresses are on separate lines? Wouldn't it be more convenient if they are
> on the same line, and it will be clearer where the backtrace starts and
> where it ends, and which warning it relates to?
>
+1. The bonus is that "same line" is how you pass them to addr2line
anyway.
That's very strange because it works here:
$ addr2line -Cfpi -e build/release/scylla 0x4665f0 0x4266d0 0x426880 0x426010 0x430cf0
The reason why I did it the way I did is for consistency with how backtrace is usually presented in the logs - stacked. If we add symbol resolution, printing each symbols in separate line would be much more readable. But perhaps you think that's a weak reason?