Project

General

Profile

Bug #1449

Invalid read of size 8

Added by Gaetano Mendola over 9 years ago. Updated over 9 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Target version:
-
Start date:
10/04/2012
Due date:
% Done:

0%

Estimated time:

Description

Hi all,

running my application (it's using wt 3.2.1) with valgrind often SIGSEV due to this:

31098 Thread 16:

31098 Invalid read of size 8

31098 at 0x5AC12ED: Wt::WWidget::askRerender(bool) (WWidget.C:113)

31098 by 0x5AAB6CC: Wt::WWebWidget::repaint(Wt::WFlagsWt::RepaintFlag) (WWebWidget.C:199)

31098 by 0x5AB5CCD: Wt::WWebWidget::removeChild(Wt::WWidget*) (WWebWidget.C:319)

31098 by 0x5AC1581: Wt::WWidget::setParentWidget(Wt::WWidget*) (WWidget.C:55)

31098 by 0x5AAE5E5: Wt::WWebWidget::~WWebWidget() (WWebWidget.C:245)

31098 by 0x8DE5C29: Wt::Chart::WCartesianChart::~WCartesianChart() (WCartesianChart:101)

31098 by 0x8DE5D40: plots::CustomCartesianChart::~CustomCartesianChart() (wtterminal.cpp:22)

31098 by 0x8DDA205: plots::WtTerminal::ChartOwner::~ChartOwner() (wtterminal.cpp:61)

31098 by 0x8DE1EDE: boost::detail::sp_counted_impl_pd<plots::WtTerminal::ChartOwner*, boost::detail::sp_ms_deleterplots::WtTerminal::ChartOwner >::dispose() (make_shared.hpp:52)

31098 by 0x419D3C: boost::detail::shared_count::~shared_count() (sp_counted_base_gcc_x86.hpp:145)

31098 by 0x8DE26FE: boost::_bi::list3<boost::_bi::value<boost::shared_ptrplots::WtTerminal::ChartOwner >, boost::_bi::value<boost::shared_ptrWt::WStandardItemModel >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > > >::~list3() (shared_ptr.hpp:169)

31098 by 0x8DE2C48: boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf2<void, plots::WtTerminal::ChartOwner, boost::shared_ptrWt::WStandardItemModel, std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > >, boost::_bi::list3<boost::_bi::value<boost::shared_ptrplots::WtTerminal::ChartOwner >, boost::_bi::value<boost::shared_ptrWt::WStandardItemModel >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > > > > >::manage(boost::detail::function::function_buffer const&, boost::detail::function::function_buffer&, boost::detail::function::functor_manager_operation_type) (bind.hpp:854)

31098 Address 0x80 is not stack'd, malloc'd or (recently) free'd

at WWidget.C:113 I can see:

WApplication::instance()session()>renderer().needUpdate(this, laterOnly);

I guess one of those pointers is null

#1

Updated by Koen Deforche over 9 years ago

  • Status changed from New to Feedback

Hey Gaetano,

Since you seem to be using shared pointers, are you sure that this happens within the event loop? Widgets can only be deleted from within the event loop, or after taking an application's update lock.

Regards,

koen

#2

Updated by Gaetano Mendola over 9 years ago

You are right we are using a class named ChartOwner that owns a plain pointer to Wt::Chart::WCartesianChart.

We have a WtTerminal class that owns a shared_ptr and whenever we want to draw something we do something like

this:

void WtTerminal::setResolution(const float aResolution) {

if (Wt::WServer::instance()) {

Wt::WServer::instance()->post(theSessionId,

boost::bind(&ChartOwner::setResolution,

theChartOwner,

aResolution));

}

}

as you can see all the async (respect to event loop) operation on the chart via WtTerminal are then posted and the boost::bind

performs a copy of the shared_ptr theChartOwner. So if we destroy our WtTerminal but there is still a post flying then theChartOwner shared_ptr survives.

What I can see in that backtrace is that theChartOwner shared_ptr reached the counter of 0 and then deleted due to a boost::bind being destroyed.

What I fear is that session went destroyed then the post arrived and not finding the session anymore destroyed the functor.

What puzzles me is why this as always worked not running under Valgrind for almost 2 years now.

#3

Updated by Gaetano Mendola over 9 years ago

Also the WtTerminal has a WtContainerWidget that is:

class WtContainerWidget : public Wt::WContainerWidget {
 public:
  WtContainerWidget(WContainerWidget *parent)
      :Wt::WContainerWidget(parent),
       theChart(0)
  {}

  virtual ~WtContainerWidget() {
    if ( children().size() > 0 ) {
      Wt::WContainerWidget::removeWidget(theChart);
    }
  }

  void addWidget( Wt::WWidget *aChart ) {
    if ( children().size() > 0 ) {
      throw std::runtime_error("WtContainerChart can own only a chart at time");
    }
    Wt::WContainerWidget::addWidget(aChart);
    theChart = aChart;
  }

 private:
  Wt::WWidget* theChart;
};

And we put our Wt::Chart::WCartesianChart basically in that Container widget, this way when the WT tree is being destroied we "intercept" it we do not delete the Wt::Chart::WCartesianChart owned by our own ChartOwner.

#4

Updated by Koen Deforche over 9 years ago

  • Status changed from Feedback to InProgress
  • Assignee set to Koen Deforche
#5

Updated by Gaetano Mendola over 9 years ago

Hi,

was you able to replicate it ? We are getting this error even outside a valgrind section.

#6

Updated by Gaetano Mendola over 9 years ago

This is a backtrace outside valgrind environment.

#0  0x00007fea6675e42d in Wt::WWidget::askRerender (this=0x7fea487c8a90, laterOnly=false) at /root/Installed/wt-3.2.1-patched-backported/src/Wt/WWidget.C:113
#1  0x00007fea6674880d in Wt::WWebWidget::repaint (this=0x7fea487c8a90, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at /root/Installed/wt-3.2.1-patched-backported/src/Wt/WWebWidget.C:199
#2  0x00007fea66752e0e in Wt::WWebWidget::removeChild (this=0x7fea487c8a90, child=0x7fea48961a80) at /root/Installed/wt-3.2.1-patched-backported/src/Wt/WWebWidget.C:319
#3  0x00007fea6675e6c2 in Wt::WWidget::setParentWidget (this=0x7fea48961a80, p=0x0) at /root/Installed/wt-3.2.1-patched-backported/src/Wt/WWidget.C:55
#4  0x00007fea6674b726 in ~WWebWidget (this=0x7fea48961a80, __in_chrg=<value optimized out>) at /root/Installed/wt-3.2.1-patched-backported/src/Wt/WWebWidget.C:245
#5  0x00007fea63358fb5 in Wt::Chart::WCartesianChart::~WCartesianChart() () from /opt/essa-suite/lib/libplots.so
#6  0x00007fea63359107 in plots::CustomCartesianChart::~CustomCartesianChart() () from /opt/essa-suite/lib/libplots.so
#7  0x00007fea6334b5f0 in ~ChartOwner (this=0x7fea48912c80, __in_chrg=<value optimized out>) at /home/fbasile/3713/src/Libraries/Plots/wtterminal.cpp:114
#8  0x00007fea63353133 in boost::detail::sp_ms_deleter<plots::WtTerminal::ChartOwner>::destroy (this=0x7fea48912c60) at /usr/include/boost/smart_ptr/make_shared.hpp:52
#9  boost::detail::sp_ms_deleter<plots::WtTerminal::ChartOwner>::operator() (this=0x7fea48912c60) at /usr/include/boost/smart_ptr/make_shared.hpp:75
#10 boost::detail::sp_counted_impl_pd<plots::WtTerminal::ChartOwner*, boost::detail::sp_ms_deleter<plots::WtTerminal::ChartOwner> >::dispose (this=0x7fea48912c60) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:144
#11 0x0000000000419eb5 in boost::detail::sp_counted_base::release (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
#12 ~shared_count (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:217
#13 0x00007fea63354e83 in ~shared_ptr (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:169
#14 ~value (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/bind.hpp:113
#15 ~storage1 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:41
#16 ~storage2 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:77
#17 ~storage3 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:126
#18 ~storage4 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:175
#19 ~list4 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/bind.hpp:409
#20 0x00007fea63354f51 in ~bind_t (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/bind/bind.hpp:854
#21 boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf3<void, plots::WtTerminal::ChartOwner, boost::shared_ptr<Wt::WStandardItemModel>, std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, boost::shared_ptr<plots::WtTerminal::PrintableHistory> >, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<plots::WtTerminal::ChartOwner> >, boost::_bi::value<boost::shared_ptr<Wt::WStandardItemModel> >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > >, boost::_bi::value<boost::shared_ptr<plots::WtTerminal::PrintableHistory> > > > >::manager (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/function/function_base.hpp:381
#22 boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf3<void, plots::WtTerminal::ChartOwner, boost::shared_ptr<Wt::WStandardItemModel>, std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, boost::shared_ptr<plots::WtTerminal::PrintableHistory> >, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<plots::WtTerminal::ChartOwner> >, boost::_bi::value<boost::shared_ptr<Wt::WStandardItemModel> >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > >, boost::_bi::value<boost::shared_ptr<plots::WtTerminal::PrintableHistory> > > > >::manager (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/function/function_base.hpp:404
#23 boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf3<void, plots::WtTerminal::ChartOwner, boost::shared_ptr<Wt::WStandardItemModel>, std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, boost::shared_ptr<plots::WtTerminal::PrintableHistory> >, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<plots::WtTerminal::ChartOwner> >, boost::_bi::value<boost::shared_ptr<Wt::WStandardItemModel> >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > >, boost::_bi::value<boost::shared_ptr<plots::WtTerminal::PrintableHistory> > > > >::manage (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/function/function_base.hpp:432
#24 0x00007fea666b13da in Wt::ApplicationEvent::~ApplicationEvent() () from /usr/local/lib/libwt.so.32
#25 0x00007fea666b16a1 in boost::detail::function::functor_manager<boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, Wt::WebController, Wt::ApplicationEvent const&>, boost::_bi::list2<boost::_bi::value<Wt::WebController*>, boost::_bi::value<Wt::ApplicationEvent> > > >::manage(boost::detail::function::function_buffer const&, boost::detail::function::function_buffer&, boost::detail::function::functor_manager_operation_type) () from /usr/local/lib/libwt.so.32
#26 0x00007fea666341ca in boost::detail::function::basic_vtable0<void>::clear (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_template.hpp:504
#27 boost::function0<void>::clear (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_template.hpp:856
#28 ~function0 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_template.hpp:752
#29 ~function (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_fwd.hpp:33
#30 0x00007fea66637a1a in boost::asio::detail::handler_queue::handler_wrapper<boost::function<void ()()> >::do_call(boost::asio::detail::handler_queue::handler*) () from /usr/local/lib/libwt.so.32
#31 0x00007fea6663ccde in boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false> >::run(boost::system::error_code&) () from /usr/local/lib/libwt.so.32
#32 0x00007fea66632d84 in boost::asio::io_service::run (this=0xb64690) at /usr/include/boost/asio/impl/io_service.ipp:58
#33 Wt::WIOService::run (this=0xb64690) at /root/Installed/wt-3.2.1-patched-backported/src/Wt/WIOService.C:128
#34 0x00007fea64c75b70 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
#35 0x00007fea582ae9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#36 0x00007fea5800b70d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#37 0x0000000000000000 in ?? ()
#7

Updated by Gaetano Mendola over 9 years ago

Consider the fact that ChartOwner was destroyed by a shared_pointer a posted function, something like this:

    Wt::WServer::instance()->post(theSessionId,
                                  boost::bind(&ChartOwner::swapModel,
                                              theChartOwner));

and the crash usually happens when a session expires.

#8

Updated by Gaetano Mendola over 9 years ago

I have another core, this time it crashed for the same reason but not during the Wt::WWidget::askRerender

#0  0x00007f5496712e8c in Wt::WWebWidget::removeChild (this=0x7f5404120fb0, child=<value optimized out>) at /root/ToInstall/wt-3.2.1-patched-backported/src/Wt/WWebWidget.C:358
#1  0x00007f549658b138 in Wt::WContainerWidget::removeChild (this=0x7f5404120fb0, child=0x7f54044eeac0) at /root/ToInstall/wt-3.2.1-patched-backported/src/Wt/WContainerWidget.C:311
#2  0x00007f549671e6c2 in Wt::WWidget::setParentWidget (this=0x7f54044eeac0, p=0x0) at /root/ToInstall/wt-3.2.1-patched-backported/src/Wt/WWidget.C:55
#3  0x00007f549670b726 in ~WWebWidget (this=0x7f54044eeac0, __in_chrg=<value optimized out>) at /root/ToInstall/wt-3.2.1-patched-backported/src/Wt/WWebWidget.C:245
#4  0x00007f5493318fc5 in Wt::Chart::WCartesianChart::~WCartesianChart() () from /opt/essa-suite/lib/libplots.so
#5  0x00007f5493319117 in plots::CustomCartesianChart::~CustomCartesianChart() () from /opt/essa-suite/lib/libplots.so
#6  0x00007f549330b600 in ~ChartOwner (this=0x7f5404001a20, __in_chrg=<value optimized out>) at /home/fbasile/Essa3713/src/Libraries/Plots/wtterminal.cpp:114
#7  0x00007f5493313143 in boost::detail::sp_ms_deleter<plots::WtTerminal::ChartOwner>::destroy (this=0x7f5404001a00) at /usr/include/boost/smart_ptr/make_shared.hpp:52
#8  boost::detail::sp_ms_deleter<plots::WtTerminal::ChartOwner>::operator() (this=0x7f5404001a00) at /usr/include/boost/smart_ptr/make_shared.hpp:75
#9  boost::detail::sp_counted_impl_pd<plots::WtTerminal::ChartOwner*, boost::detail::sp_ms_deleter<plots::WtTerminal::ChartOwner> >::dispose (this=0x7f5404001a00) at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:144
#10 0x0000000000419f15 in boost::detail::sp_counted_base::release (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:145
#11 ~shared_count (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/smart_ptr/detail/shared_count.hpp:217
#12 0x00007f5493314e93 in ~shared_ptr (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/smart_ptr/shared_ptr.hpp:169
#13 ~value (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/bind.hpp:113
#14 ~storage1 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:41
#15 ~storage2 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:77
#16 ~storage3 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:126
#17 ~storage4 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/storage.hpp:175
#18 ~list4 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/bind/bind.hpp:409
#19 0x00007f5493314f61 in ~bind_t (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/bind/bind.hpp:854
#20 boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf3<void, plots::WtTerminal::ChartOwner, boost::shared_ptr<Wt::WStandardItemModel>, std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, boost::shared_ptr<plots::WtTerminal::PrintableHistory> >, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<plots::WtTerminal::ChartOwner> >, boost::_bi::value<boost::shared_ptr<Wt::WStandardItemModel> >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > >, boost::_bi::value<boost::shared_ptr<plots::WtTerminal::PrintableHistory> > > > >::manager (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/function/function_base.hpp:381
#21 boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf3<void, plots::WtTerminal::ChartOwner, boost::shared_ptr<Wt::WStandardItemModel>, std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, boost::shared_ptr<plots::WtTerminal::PrintableHistory> >, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<plots::WtTerminal::ChartOwner> >, boost::_bi::value<boost::shared_ptr<Wt::WStandardItemModel> >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > >, boost::_bi::value<boost::shared_ptr<plots::WtTerminal::PrintableHistory> > > > >::manager (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/function/function_base.hpp:404
#22 boost::detail::function::functor_manager<boost::_bi::bind_t<void, boost::_mfi::mf3<void, plots::WtTerminal::ChartOwner, boost::shared_ptr<Wt::WStandardItemModel>, std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > >, boost::shared_ptr<plots::WtTerminal::PrintableHistory> >, boost::_bi::list4<boost::_bi::value<boost::shared_ptr<plots::WtTerminal::ChartOwner> >, boost::_bi::value<boost::shared_ptr<Wt::WStandardItemModel> >, boost::_bi::value<std::map<unsigned int, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, boost::tuples::tuple<plots::LineStyle, plots::PointType, plots::Color, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type> > > > >, boost::_bi::value<boost::shared_ptr<plots::WtTerminal::PrintableHistory> > > > >::manage (in_buffer=<value optimized out>, out_buffer=..., op=boost::detail::function::clone_functor_tag) at /usr/include/boost/function/function_base.hpp:432
#23 0x00007f54966713da in Wt::ApplicationEvent::~ApplicationEvent() () from /usr/local/lib/libwt.so.32
#24 0x00007f54966716a1 in boost::detail::function::functor_manager<boost::_bi::bind_t<bool, boost::_mfi::mf1<bool, Wt::WebController, Wt::ApplicationEvent const&>, boost::_bi::list2<boost::_bi::value<Wt::WebController*>, boost::_bi::value<Wt::ApplicationEvent> > > >::manage(boost::detail::function::function_buffer const&, boost::detail::function::function_buffer&, boost::detail::function::functor_manager_operation_type) () from /usr/local/lib/libwt.so.32
#25 0x00007f54965f41ca in boost::detail::function::basic_vtable0<void>::clear (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_template.hpp:504
#26 boost::function0<void>::clear (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_template.hpp:856
#27 ~function0 (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_template.hpp:752
#28 ~function (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/boost/function/function_fwd.hpp:33
#29 0x00007f54965f7a1a in boost::asio::detail::handler_queue::handler_wrapper<boost::function<void ()()> >::do_call(boost::asio::detail::handler_queue::handler*) () from /usr/local/lib/libwt.so.32
#30 0x00007f54965fccde in boost::asio::detail::task_io_service<boost::asio::detail::epoll_reactor<false> >::run(boost::system::error_code&) () from /usr/local/lib/libwt.so.32
#31 0x00007f54965f2d84 in boost::asio::io_service::run (this=0x88c460) at /usr/include/boost/asio/impl/io_service.ipp:58
#32 Wt::WIOService::run (this=0x88c460) at /root/ToInstall/wt-3.2.1-patched-backported/src/Wt/WIOService.C:128
#33 0x00007f5494c35b70 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
#34 0x00007f548826e9ca in start_thread (arg=<value optimized out>) at pthread_create.c:300
#35 0x00007f5487fcb16d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#36 0x0000000000000000 in ?? ()
#9

Updated by Koen Deforche over 9 years ago

  • Status changed from InProgress to Feedback

Hey Gaetano,

Can you give an update on this bug? I remember we discussed this on a chat but do not remember a resolution ?

Regards,

koen

#10

Updated by Gaetano Mendola over 9 years ago

Hi Koen,

we rewrote this part to avoid having the WtContainerWidget, we believe the problem was somewhere in how WT manages the distruction of widget tree, hour suspect is that the destruction of wt widget tree is done with multiple threads and that in presence of loops of widgets there is some race condition.

I was told that we had another crash even after the rewrite of this part, as soon I have a core I will give you more details.

Also available in: Atom PDF