Project

General

Profile

Actions

Bug #2821

closed

Segfault in Wt::Http::ResponseContinuation::stop

Added by Emeric Poupon over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
03/14/2014
Due date:
% Done:

0%

Estimated time:

Description

(wt-3.3.2-rc2, with patch applied for the 2814 issue)

When destroying a Resource that is being served and that has continuatuion data set, I get from time to time (difficult to reproduce)

Wrote 131072 bytes

Continuation set!

[2014-Mar-14 13:10:04.676554] 13313 - [error] "Http::ResponseContinuation: WriteError"

[2014-Mar-14 13:10:04.676626] 13313 - [info] "WebRequest: took 475.383ms"

Slider moved to 3839=15.17 bitrate= 225.0kbits/s

Want to play at offset 3839

DESTRUCTING RESOURCE

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0x7fffeb9e2700 (LWP 13319)]

0x000036373d646e61 in ?? ()

(gdb) bt

#0 0x000036373d646e61 in ?? ()

#1 0x00007ffff7161c42 in Wt::Http::ResponseContinuation::stop (this=) at /storage/emeric/MesProgs/wt/wt-3.3.2-rc2/src/Wt/Http/ResponseContinuation.C:66

#2 0x00007ffff700cd69 in Wt::WResource::~WResource (this=0x7fffd800d510, __in_chrg=) at /storage/emeric/MesProgs/wt/wt-3.3.2-rc2/src/Wt/WResource.C:51

#3 0x000000000046252d in AvConvTranscodeStreamResource::~AvConvTranscodeStreamResource (this=0x7fffd800d510, __in_chrg=)

at ../ui/resource/AvConvTranscodeStreamResource.cpp:13

#4 0x0000000000462719 in AvConvTranscodeStreamResource::~AvConvTranscodeStreamResource (this=0x7fffd800d510, __in_chrg=)

at ../ui/resource/AvConvTranscodeStreamResource.cpp:17

#5 0x0000000000436ddc in AudioMediaPlayerWidget::loadPlayer (this=this@entry=0x7fffd0023970) at ../ui/audio/AudioMediaPlayerWidget.cpp:64

#6 0x0000000000436ebc in AudioMediaPlayerWidget::handlePlayOffset (this=0x7fffd0023970, offsetSecs=) at ../ui/audio/AudioMediaPlayerWidget.cpp:100

#7 0x00007ffff6eab975 in operator() (a0=, this=, a1=..., a2=..., a3=..., a4=..., a5=...) at /usr/include/boost/function/function_template.hpp:767

#8 m_invoke (this=, connectionBody=...) at /usr/include/boost/signals2/detail/signal_template.hpp:363

#9 operator() (connectionBody=..., this=) at /usr/include/boost/signals2/detail/signal_template.hpp:345

#10 dereference (this=0x7fffeb9de7a0) at /usr/include/boost/signals2/detail/slot_call_iterator.hpp:82

#11 dereference<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal6_impl<void, int, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::signals2::optional_last_value, int, std::less, boost::function<void(int, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)>, boost::function<void(const boost::signals2::connection&, int, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)>, boost::signals2::mutex>::slot_invoker, std::_List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot6<void, int, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function<void(int, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot6<void, int, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, boost::function<void(int, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass, Wt::NoClass)> >, boost::signals2::mutex> > > (f=...) at /usr/include/boost/iterator/iterator_facade.hpp:514

Actions #1

Updated by Koen Deforche over 10 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
Actions #2

Updated by Koen Deforche over 10 years ago

  • Status changed from InProgress to Feedback

Hey,

I believe the patch below will solve this.

diff --git a/src/Wt/Http/ResponseContinuation.C b/src/Wt/Http/ResponseContinuation.C
index fc7f2dd..a9a967e 100644
--- a/src/Wt/Http/ResponseContinuation.C
+++ b/src/Wt/Http/ResponseContinuation.C
@@ -63,7 +63,10 @@ ResponseContinuation::ResponseContinuation(WResource *resource,

 void ResponseContinuation::stop()
 {
-  response_->flush(WebResponse::ResponseDone);
+  if (response_) {
+    response_->flush(WebResponse::ResponseDone);
+    response_ = 0;
+  }
 }

 void ResponseContinuation::waitForMoreData()

Regards,

koen

Actions #3

Updated by Emeric Poupon over 10 years ago

Thanks for your support,

Good news: so far I'm not able to reproduce it.

I'll futher play with it and tell you if I see it again or not.

Actions #4

Updated by Koen Deforche over 10 years ago

  • Status changed from Feedback to Resolved
Actions #5

Updated by Koen Deforche over 10 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF