Project

General

Profile

Actions

Bug #1034

closed

wtwithqt example crashed when refresh frequently on the browser

Added by Anonymous about 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
Start date:
10/20/2011
Due date:
% Done:

0%

Estimated time:

Description

I compiled and ran the wtwithqt example . When I refreshed on the browser for 3 times (1 second between each refresh) , the wtwithqt process crashed .

This is the backtrace:

#0 0x00000034e88352d5 in raise () from /lib64/libc.so.6

#1 0x00000034e8836beb in abort () from /lib64/libc.so.6

#2 0x00000034e882dc5e in __assert_fail_base () from /lib64/libc.so.6

#3 0x00000034e882dd02 in __assert_fail () from /lib64/libc.so.6

#4 0x0000000000408d34 in boost::mutex::~mutex ()

#5 0x000000000040c540 in Wt::DispatchThread::~DispatchThread() ()

#6 0x000000000040b478 in Wt::WQApplication::notify(Wt::WEvent const&) ()

#7 0x00007f2d0c9d1207 in Wt::WebSession::~WebSession (this=0x7f2ce40015c0, __in_chrg=)

at /Data/Main/临时/wt-3.1.11/src/web/WebSession.C:182

#8 0x00007f2d0c98df72 in checked_deleteWt::WebSession (x=0x7f2ce40015c0) at /usr/include/boost/checked_delete.hpp:34

#9 boost::detail::sp_counted_impl_pWt::WebSession::dispose (this=)

at /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78

#10 0x000000000040a129 in boost::detail::shared_count::~shared_count() ()

#11 0x00007f2d0c9bb38a in ~shared_ptr (this=0x7f2d0534b590, __in_chrg=)

at /usr/include/boost/smart_ptr/shared_ptr.hpp:168

#12 reset (this=0x7f2d0534b550) at /usr/include/boost/smart_ptr/shared_ptr.hpp:386

#13 Wt::WebController::handleRequest (this=0x21d45c0, request=0x7f2cf8001a70)

at /Data/Main/临时/wt-3.1.11/src/web/WebController.C:585

#14 0x00007f2d0d08d479 in http::server::WtReply::consumeRequestBody (this=0x7f2cf80014b0,

begin=0x7f2d00000f21 "request=jsupdate&signal=user&id=app&name=Wt-unload&an=0&selstart=0&selend=0&ol4sqz5=&focus=ol4sqz5&ackId=2564179031&pageId=0&", end=, state=http::server::Request::Complete) at /Data/Main/临时/wt-3.1.11/src/http/WtReply.C:208

#15 0x00007f2d0d06a4ec in http::server::RequestParser::parseBody (this=, req=, reply=...,

begin=, end=) at /Data/Main/临时/wt-3.1.11/src/http/RequestParser.C:135

#16 0x00007f2d0d059f09 in http::server::Connection::handleReadBody (this=0x7f2d00000b30)

at /Data/Main/临时/wt-3.1.11/src/http/Connection.C:228

#17 0x00007f2d0d05b5b7 in http::server::Connection::handleReadRequest0 (this=0x7f2d00000b30)

at /Data/Main/临时/wt-3.1.11/src/http/Connection.C:167

#18 0x00007f2d0d0873a4 in call<boost::shared_ptrhttp::server::Connection, boost::system::error_code const, unsigned long> (b2=read_sleb128: Corrupted DWARF expression.

)

at /usr/include/boost/bind/mem_fn_template.hpp:271

#19 operator()<boost::shared_ptrhttp::server::Connection > (a2=, u=..., this=0x7f2d0534bbd0, a1=...)

at /usr/include/boost/bind/mem_fn_template.hpp:286

#20 operator()<boost::_mfi::mf2<void, http::server::Connection, const boost::system::error_code&, long unsigned int>, boost::_bi::list2<const boost::system::error_code&, const long unsigned int&> > (a=read_sleb128: Corrupted DWARF expression.

) at /usr/include/boost/bind/bind.hpp:392

---Type to continue, or q to quit---

#21 operator()<boost::system::error_code, long unsigned int> (a2=@0x7f2d0534bc00, a1=..., this=0x7f2d0534bbd0)

at /usr/include/boost/bind/bind_template.hpp:102

#22 operator() (this=0x7f2d0534bbd0) at /usr/include/boost/asio/detail/bind_handler.hpp:97

#23 asio_handler_invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long> > (function=access outside bounds of object referenced via synthetic pointer

)

at /usr/include/boost/asio/handler_invoke_hook.hpp:64

#24 invoke<boost::asio::detail::binder2<boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> >, boost::system::error_code, unsigned long>, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > > (context=..., function=...)

at /usr/include/boost/asio/detail/handler_invoke_helpers.hpp:39

#25 boost::asio::detail::reactive_socket_recv_op<boost::asio::mutable_buffers_1, boost::_bi::bind_t<void, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list3<boost::_bi::value<boost::shared_ptrhttp::server::Connection >, boost::arg<1> ()(), boost::arg<2> ()()> > >::do_complete (owner=0x21d3520, base=)

at /usr/include/boost/asio/detail/reactive_socket_recv_op.hpp:106

#26 0x00007f2d0d0714d6 in complete (owner=..., this=0x7f2cd0003010)

at /usr/include/boost/asio/detail/task_io_service_operation.hpp:35

#27 do_one (this_idle_thread=, lock=, this=)

at /usr/include/boost/asio/detail/impl/task_io_service.ipp:278

#28 boost::asio::detail::task_io_service::run (this=0x21d3520, ec=)

at /usr/include/boost/asio/detail/impl/task_io_service.ipp:130

#29 0x00007f2d0d06bda8 in run (this=0x21d61a8) at /usr/include/boost/asio/impl/io_service.ipp:57

#30 http::server::Server::run (this=0x21d60c0) at /Data/Main/临时/wt-3.1.11/src/http/Server.C:223

#31 0x0000003a5720cb89 in thread_proxy () from /usr/lib64/libboost_thread-mt.so.1.46.0

#32 0x00000034e8c07b31 in start_thread () from /lib64/libpthread.so.0

#33 0x00000034e88dfd2d in clone () from /lib64/libc.so.6

This is the output by the wtwithqt example :

bash-4.2# ./WtWithQt ---http-address 0.0.0.0 ---http-port 1567 ---docroot .

[2011-Oct-20 11:50:19.356554] 6046 - [notice] "Wt: initializing built-in httpd"

[2011-Oct-20 11:50:19.356772] 6046 - [notice] "Reading Wt config file: /etc/wt/wt_config.xml (location = './WtWithQt')"

[2011-Oct-20 11:50:19.357322] 6046 - [notice] "Started server: http://0.0.0.0:1567"

[2011-Oct-20 11:50:22.223223] 6046 [/ fAy2YElpZXPJkYU2] [notice] "Session created (#sessions = 1)"

[2011-Oct-20 11:50:22.223410] 6046 [/ fAy2YElpZXPJkYU2] [notice] "UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"

127.0.0.1 - - [2011-Oct-20 11:50:22.224190] "GET / HTTP/1.1" 200 1713

127.0.0.1 - - [2011-Oct-20 11:50:22.262879] "GET /?wtd=fAy2YElpZXPJkYU2&request=style HTTP/1.1" 200 88

127.0.0.1 - - [2011-Oct-20 11:50:22.270391] "GET /?wtd=fAy2YElpZXPJkYU2&sid=2045477752&htmlHistory=true&request=script&rand=3860748334 HTTP/1.1" 200 33495

127.0.0.1 - - [2011-Oct-20 11:50:22.272854] "GET /resources//themes/default/wt.css HTTP/1.1" 404 85

127.0.0.1 - - [2011-Oct-20 11:50:22.273062] "GET /resources/moz-transitions.css HTTP/1.1" 404 85

127.0.0.1 - - [2011-Oct-20 11:50:22.349347] "POST /?wtd=fAy2YElpZXPJkYU2 HTTP/1.1" 200 50

[2011-Oct-20 11:50:23.363637] 6046 [/ 3QodfFvIm0bc2baY] [notice] "Session created (#sessions = 2)"

[2011-Oct-20 11:50:23.363789] 6046 [/ 3QodfFvIm0bc2baY] [notice] "UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"

127.0.0.1 - - [2011-Oct-20 11:50:23.364498] "GET / HTTP/1.1" 200 1709

127.0.0.1 - - [2011-Oct-20 11:50:23.373725] "POST /?wtd=fAy2YElpZXPJkYU2 HTTP/1.1" 200 60

[2011-Oct-20 11:50:23.374436] 6046 [/ fAy2YElpZXPJkYU2] [notice] "Session destroyed (#sessions = 1)"

127.0.0.1 - - [2011-Oct-20 11:50:23.399799] "GET /?wtd=3QodfFvIm0bc2baY&request=style HTTP/1.1" 200 88

127.0.0.1 - - [2011-Oct-20 11:50:23.406065] "GET /resources//themes/default/wt.css HTTP/1.1" 404 85

127.0.0.1 - - [2011-Oct-20 11:50:23.406710] "GET /resources/moz-transitions.css HTTP/1.1" 404 85

127.0.0.1 - - [2011-Oct-20 11:50:23.407474] "GET /?wtd=3QodfFvIm0bc2baY&sid=2564179030&htmlHistory=true&request=script&rand=69671829 HTTP/1.1" 200 33494

127.0.0.1 - - [2011-Oct-20 11:50:23.491806] "POST /?wtd=3QodfFvIm0bc2baY HTTP/1.1" 200 50

[2011-Oct-20 11:50:24.549869] 6046 [/ f1uNRiBwIc5LdqAa] [notice] "Session created (#sessions = 2)"

[2011-Oct-20 11:50:24.550002] 6046 [/ f1uNRiBwIc5LdqAa] [notice] "UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"

127.0.0.1 - - [2011-Oct-20 11:50:24.550675] "GET / HTTP/1.1" 200 1710

127.0.0.1 - - [2011-Oct-20 11:50:24.559371] "POST /?wtd=3QodfFvIm0bc2baY HTTP/1.1" 200 60

WtWithQt: /usr/include/boost/thread/pthread/mutex.hpp:47: boost::mutex::~mutex(): Assertion `!pthread_mutex_destroy(&m)' failed.

已放弃(吐核)

I'm wondering if wt is REALLY compatible with QT ? I used wtwithqt library in one of my project , and it crashes when refresh frequently . And the debugger reports that errors occured in the boost library , or sometimes in the destructor of some Wt classes such as WWebWidget . I didn't understand it and I thought that the wtwithqt was functioning properly. So I tried the wtwithqt example from the Wt source code , and it crashed too.

Is there anyone that has used the wtwithqt library (with QT eventloop) successfully ?

How can I workaround this?

Actions #1

Updated by Kayra Akman about 13 years ago

I have experienced this issue on Windows 7.

Actions #2

Updated by Koen Deforche about 13 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
  • Target version set to 3.2.0
Actions #3

Updated by Koen Deforche about 13 years ago

Hey,

There seems indeed to be a regression in the libwtwithqt lib. I suspect that mixing Qt with Wt code is indeed not such a popular choice (although we have done a few projects with this).

I'll see what is going on with it.

Regards,

koen

Actions #4

Updated by 太极美术工程狮 狮长 about 13 years ago

Thank you.

I'm the original reporter.

;). I know little about boost , so I really need Qt . I need QProcess , QUdpSocket , ... .

And I'm waiting for Wt3.1.12.

Actions #5

Updated by Koen Deforche about 13 years ago

  • Status changed from InProgress to Resolved

Hey,

This has been fixed. Will be in git soon.

Regards,

koen

Actions #6

Updated by 太极美术工程狮 狮长 about 13 years ago

Koen Deforche wrote:

Hey,

This has been fixed. Will be in git soon.

Regards,

koen

Thank you. Can you tell me what the cause of the crash is?

Actions #7

Updated by Koen Deforche about 13 years ago

Hey,

There was a bug in how session destruction was handled.

Regards,

koen

Actions #8

Updated by 太极美术工程狮 狮长 about 13 years ago

Koen Deforche wrote:

Hey,

There was a bug in how session destruction was handled.

Regards,

koen

So you mean that the cause is inside the Wt core and triggered by wtwithqt?

Actions #9

Updated by Koen Deforche about 13 years ago

Hey,

Indeed it was a regression in the Wt library.

Regards,

koen

Actions #10

Updated by Koen Deforche almost 13 years ago

  • Status changed from Resolved to Closed
Actions #11

Updated by Jake Petroules over 12 years ago

This issue appears to still be present as of 8cc41f5 - see http://redmine.emweb.be/boards/2/topics/4336

Actions

Also available in: Atom PDF