Support #4152
openDDos question
Description
I'm try to test site by apache2-utils
ab -n 100000 -c 1000 http://www.mysite.com /
After some time the site no longer accept connections.
Stop tests.
Expected completion of open sessions( 600 )
But, the site will not accept connections ever.
log:
[2015-Jun-09 08:26:42.129221] 1448 [/ 3J0FefXXhWw71HwY] [info] "WEnvironment: UserAgent: ApacheBench/2.3"
[2015-Jun-09 08:26:42.331433] 1448 - [info] "Wt: session created (#sessions = 100)"
[2015-Jun-09 08:26:42.331775] 1448 [/ rRScWzeFDmsgZRPN] [info] "WEnvironment: UserAgent: ApacheBench/2.3"
[2015-Jun-09 08:26:42.332835] 1448 [/ PJ8ONPDpuITGTV1W] [info] "WebController: timeout: expiring"
[2015-Jun-09 08:26:42.332919] 1448 [/ PJ8ONPDpuITGTV1W] [info] "Wt: session destroyed (#sessions = 99)"
[2015-Jun-09 08:26:42.346094] 1448 - [info] "Wt: session created (#sessions = 100)"
[2015-Jun-09 08:26:42.346430] 1448 [/ 907BcIyabnKPP27g] [info] "WEnvironment: UserAgent: ApacheBench/2.3" << FREEZE
[2015-Jun-09 09:05:25.904934] 1448 - [info] "WebController: shutdown: stopping sessions." << kill process from cmd
[2015-Jun-09 09:05:25.906080] 1448 [/ 0QCiYHfUNPnyMTzy] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.906252] 1448 [/ 0mOmMKTiGdJUzC7A] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.906372] 1448 [/ 0vSfjvhzj07Xqv7s] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.906502] 1448 [/ 1tMIwhwid22syQ3M] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.906626] 1448 [/ 2Rh56rIEMwJ1Ads1] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.906747] 1448 [/ 2gqZKW84sC4eI0HR] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.906849] 1448 [/ 3J0FefXXhWw71HwY] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.907340] 1448 [/ 41PCwPyY9m7vtT5D] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.907456] 1448 [/ 4jxBztoI5iI6HzFK] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.907566] 1448 [/ 4q6KuhHxZeivc8Sv] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.907675] 1448 [/ 50HJ22XwqMic9nGX] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.907791] 1448 [/ 5YJA4DtHE2hDDPk3] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.907948] 1448 [/ 6q7ubr20hhsWNsO9] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908049] 1448 [/ 7BJaY9xG9yQUevlK] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908182] 1448 [/ 7Bu7cwa28nMOwTYX] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908311] 1448 [/ 7GS1awmEIImPX4Hr] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908437] 1448 [/ 7WewQKOZI4lkpjBH] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908568] 1448 [/ 7frdXNLpdCGLgmAR] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908689] 1448 [/ 8GhtYmy50yaMzpLs] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908776] 1448 [/ 8K3tkpxojiT4toQr] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908885] 1448 [/ 907BcIyabnKPP27g] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.908996] 1448 [/ A8CaoaG9kSwoVk2L] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909091] 1448 [/ AEhMSj5DRI6OVCVh] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909169] 1448 [/ B9XPqtgyq0lBDLgU] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909253] 1448 [/ Bi57uSh6Kgiho70I] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909372] 1448 [/ C2EzS3gIrQc2A3ij] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909475] 1448 [/ C86N8oV1HOVetkAx] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909553] 1448 [/ D8vPazh3kEyv9wvp] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909627] 1448 [/ DSTj27qRRfneos99] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909725] 1448 [/ DZIInZ2zbyRcmgpt] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909800] 1448 [/ Dni6h91tLfpQG32y] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909873] 1448 [/ GH1bvDu0CNRjQt2N] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.909946] 1448 [/ Grydqwko759T7hN8] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910019] 1448 [/ HzvlvMq4SOT4SPLJ] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910093] 1448 [/ I6Uggx6TCLmT7kDO] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910166] 1448 [/ IvYyuyCzu0QRlrhY] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910239] 1448 [/ IwI9WsMCqTph5seY] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910312] 1448 [/ JKYikRRKn5XPZVVu] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910385] 1448 [/ JmrSkG08Tqyb8Rrp] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910498] 1448 [/ K7uUuEuNsL718qKE] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910622] 1448 [/ KwLRYQFUTfRdkEa9] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910769] 1448 [/ M0pzz2rLMolTD3fk] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.910851] 1448 [/ ML7RkCDH9rXETxeZ] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911095] 1448 [/ MhIamHkQ224eHdzW] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911206] 1448 [/ Npbt3cJYFc9eR2OP] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911306] 1448 [/ OvayStoIh5nzhcPG] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911381] 1448 [/ PUIE6IDCEfGKKrR4] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911454] 1448 [/ PYSeZYDhOAHLtVha] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911535] 1448 [/ QoOa4AgSYOe4weC9] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911651] 1448 [/ R8LYOwnYX5WhXasX] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911765] 1448 [/ RaArYxDuKPcnnjOm] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911868] 1448 [/ RdCHs2IEO0cyVTrK] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.911971] 1448 [/ SsAOQIWq9LPkEr8c] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.912073] 1448 [/ TReq18nyLj0f8WpI] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.912175] 1448 [/ U28yrKPmJbsw9gy5] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.912279] 1448 [/ VHCSk1iHQotiW33z] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.912378] 1448 [/ Ww9nQmP9jGEmbkV1] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.912480] 1448 [/ YFHyZbA0Vy3k0BEa] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.913681] 1448 [/ ZSkerANhe2M0kP6c] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.914480] 1448 [/ ZaZLk1EJJ1eGkpLp] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.914571] 1448 [/ Zx3YnesfHZA4ev3q] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.914647] 1448 [/ bQMhWkNUlsDV67uH] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.914721] 1448 [/ bpt2SMImKr9kQ0BE] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.914796] 1448 [/ cAWQrtHfMmqSOwCI] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.915578] 1448 [/ cQVyaoTj0LjlrhOr] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.915711] 1448 [/ cijNw2kNUdzQqDb1] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.915832] 1448 [/ dM4d2M2AYvq82Q4o] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.915962] 1448 [/ dlqEUQZCdWge9uPU] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.916117] 1448 [/ fpfuAq6oqq3dAXi6] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.916236] 1448 [/ gbY7sabUC0gw6fyz] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.916358] 1448 [/ hHSuUwfUGwqmdfOa] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.916491] 1448 [/ iNJYSj4K0b6EYk9C] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.916613] 1448 [/ jqAdbodf9qke4Sc0] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.916747] 1448 [/ jtKQF45ghCAzswJK] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.916873] 1448 [/ juPp2ZgRmYxEGNsm] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917019] 1448 [/ k4aRhJ40Mlqf5V26] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917147] 1448 [/ lSwB7IlnYxR514QV] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917272] 1448 [/ nMcUIcIje0ERB7xF] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917400] 1448 [/ oE84S367HMZsMexQ] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917541] 1448 [/ oFbCG3X8hWz93pHl] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917677] 1448 [/ r6GvVGJsasHV0LQ6] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917791] 1448 [/ rGVRymkO60gZpb6Q] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.917908] 1448 [/ rRScWzeFDmsgZRPN] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.918018] 1448 [/ rUcK8ATzpFMoilrX] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.918126] 1448 [/ rq7mO9vBIBOBMXgw] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.918977] 1448 [/ sbHj0nBRod0j5OtO] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919076] 1448 [/ sgR5YFnfeItv5JeL] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919306] 1448 [/ shCJMTMIVph2IbeP] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919395] 1448 [/ tHWgug965GPXUvxh] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919470] 1448 [/ tIGaVDAza1pn5IUZ] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919721] 1448 [/ tnCvWIxTbr1Zc5az] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919808] 1448 [/ uEvZLhDG8ZwdaoqY] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919883] 1448 [/ vdbggLwvRbXpXQGJ] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.919956] 1448 [/ w7unLLjkeH7P1Jg9] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.920052] 1448 [/ wJ3iEpIxO6FZrJfo] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.920158] 1448 [/ wUsvPBjBHmaA1bwE] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.920236] 1448 [/ wYRyhmhiUe4qWN4y] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.920310] 1448 [/ x420mIlR4knz3Aft] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.920383] 1448 [/ xBnmTWfxAISiKVyf] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.920457] 1448 [/ y61d4K99vNdHjzyH] [info] "Wt: session destroyed (#sessions = 0)"
[2015-Jun-09 09:05:25.920533] 1448 - [info] "WServer/wthttp: Shutdown: stopping web server." <<< FREEZE AGAIN
<< kill -9
Files
Updated by Koen Deforche over 9 years ago
- Status changed from New to InProgress
- Assignee set to Benoit Daccache
Updated by Drus Kor over 9 years ago
This situation occurs only when using SSL Connect.
I can not recreate it in the normal http
Updated by Benoit Daccache over 9 years ago
Hey Drus,
Can you give me more information about the configuration of the server ?
Thank you,
Benoit
Updated by Drus Kor over 9 years ago
Perhaps the problem is not Wt.
Very strange, but it falls only if the server is running from this script:
@
#!/usr/bin/expect -f
spawn ./app_web ---docroot ./media ---https-address 0.0.0.0 ---https-port 8080 ---ssl-certificate ssl.crt ---ssl-private-key ssl.key ---ssl-tmp-dh dh.pem
expect "Enter PEM pass phrase:"
send "some_pass\r"
wait
@
But if you run it from the console, the application works well.
yet I do not understand how it is connected.
I tested by 4 servers( ubuntu 14.04 server 64 )
From 1~4 cpu
From 1~4 Gb Mem.
the same everywhere.
The problem is that I do not know the way how to convey PEM-key to application( yet I did not look the source code ).
Updated by Drus Kor over 9 years ago
openssl rsa -in privateKey.pem -out newPrivateKey.pem
Clear key =)
Need add to doc =)
Updated by Wim Dumon over 9 years ago
Also: WServer::setSslPasswordCallback().
Wim.
Updated by Benoit Daccache over 9 years ago
- Status changed from InProgress to Resolved
Updated by Drus Kor over 9 years ago
thx!
i get "A" raiting on ssllabs.com
But get 1 warning "TLS Renegotiation and Denial of Service Attacks".
Need add 2 rows to code:
@
if (config_.sslClientVerification() \"none\") {
ssl_context_.set_verify_mode(asio::ssl::context::verify_none);
} else if (config_.sslClientVerification() "once") {
ssl_context_.set_verify_mode(asio::ssl::context::verify_client_once);
} else if (config_.sslClientVerification() == "optional") {
ssl_context_.set_verify_mode(asio::ssl::context::verify_peer);
ssl_context*.load_verify_file(config*.sslCaCertificates());
} else {
// assume 'required'
ssl_context_.set_verify_mode(asio::ssl::context::verify_peer |
asio::ssl::context::verify_fail_if_no_peer_cert);
ssl_context*.load_verify_file(config*.sslCaCertificates());
}
@
I have not tested it yet
Updated by Benoit Daccache over 9 years ago
- Status changed from Resolved to InProgress
Updated by Benoit Daccache over 9 years ago
- Status changed from InProgress to Resolved
Updated by Drus Kor over 9 years ago
i have a new info about dos =)
for test i use loadimpact.com
and in this simple app i had error "magick/blob.c:4293: WriteBlob: Assertion `image~~blob~~>type != UndefinedStream' failed."
not sure. it may GraphicsMagick error only.
thx =)
Updated by Wim Dumon over 9 years ago
This may be related to the fact that Wt uses the GM API from multiple threads, but I couldn't find a lot of information on the subject in the GM documentation, other than that multiple threads are supported (it seems like proper locking is done inside GM). Could you check if valgrind gives you any sensible information? At this moment, this looks more like a GM error than a Wt error to me...
BR,
Wim.
Updated by Drus Kor over 9 years ago
==16188== 131,091 bytes in 1 blocks are definitely lost in loss record 1,701 of 1,705
==16188== at 0x4C2CE8E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16188== by 0x972D439: MagickRealloc (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x96ACECA: WriteBlob (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x97A892D: ??? (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0xBCC50A8: ??? (in /lib/x86_64-linux-gnu/libpng12.so.0.50.0)
==16188== by 0xBCCB234: png_write_info_before_PLTE (in /lib/x86_64-linux-gnu/libpng12.so.0.50.0)
==16188== by 0xBCCB49C: png_write_info (in /lib/x86_64-linux-gnu/libpng12.so.0.50.0)
==16188== by 0x97AE024: ??? (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x97B095A: ??? (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x96EC4F8: WriteImage (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x96AB767: ImageToBlob (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x67CBD58: Wt::WRasterImage::handleRequest(Wt::Http::Request const&, Wt::Http::Response&) (WRasterImage-gm.C:1008)
==16188==
==16188== 213,408 bytes in 26 blocks are still reachable in loss record 1,702 of 1,705
==16188== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16188== by 0x74B9FE9: __gnu_cxx::new_allocator<std::_List_node<boost::array<char, 8192ul> > >::allocate(unsigned long, void const*) (new_allocator.h:104)
==16188== by 0x74B8FCD: std::_List_base<boost::array<char, 8192ul>, std::allocator<boost::array<char, 8192ul> > >::_M_get_node() (stl_list.h:334)
==16188== by 0x74B78D4: std::list<boost::array<char, 8192ul>, std::allocator<boost::array<char, 8192ul> > >::_M_create_node(boost::array<char, 8192ul> const&) (stl_list.h:484)
==16188== by 0x74B4F78: std::list<boost::array<char, 8192ul>, std::allocator<boost::array<char, 8192ul> > >::_M_insert(std::_List_iterator<boost::array<char, 8192ul> >, boost::array<char, 8192ul> const&) (stl_list.h:1553)
==16188== by 0x74B1F85: std::list<boost::array<char, 8192ul>, std::allocator<boost::array<char, 8192ul> > >::push_back(boost::array<char, 8192ul> const&) (stl_list.h:1016)
==16188== by 0x74A8B4E: http::server::Connection::start() (Connection.C:89)
==16188== by 0x74BDD45: http::server::ConnectionManager::start(boost::shared_ptr<http::server::Connection>) (ConnectionManager.C:42)
==16188== by 0x74EC309: http::server::Server::handleTcpAccept(boost::system::error_code const&) (Server.C:366)
==16188== by 0x74FDBC1: boost::_mfi::mf1<void, http::server::Server, boost::system::error_code const&>::operator()(http::server::Server*, boost::system::error_code const&) const (mem_fn_template.hpp:165)
==16188== by 0x74FDB35: void boost::_bi::list2<boost::_bi::value<http::server::Server*>, boost::arg<1> (*)()>::operator()<boost::_mfi::mf1<void, http::server::Server, boost::system::error_code const&>, boost::_bi::list1<boost::system::error_code const&> >(boost::_bi::type<void>, boost::_mfi::mf1<void, http::server::Server, boost::system::error_code const&>&, boost::_bi::list1<boost::system::error_code const&>&, int) (bind.hpp:313)
==16188== by 0x74FDAC5: void boost::_bi::bind_t<void, boost::_mfi::mf1<void, http::server::Server, boost::system::error_code const&>, boost::_bi::list2<boost::_bi::value<http::server::Server*>, boost::arg<1> (*)()> >::operator()<boost::system::error_code>(boost::system::error_code const&) (bind_template.hpp:47)
==16188==
==16188== 548,160 bytes in 8 blocks are still reachable in loss record 1,703 of 1,705
==16188== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16188== by 0x74E29DC: http::server::RequestHandler::handleRequest(http::server::Request&, boost::shared_ptr<http::server::Reply>&, boost::shared_ptr<http::server::Reply>&, boost::shared_ptr<http::server::Reply>&) (RequestHandler.C:184)
==16188== by 0x74A958A: http::server::Connection::handleReadRequest0() (Connection.C:200)
==16188== by 0x74A9CA4: http::server::Connection::handleReadRequest(boost::system::error_code const&, unsigned long) (Connection.C:244)
==16188== by 0x753A298: void boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>::call<boost::shared_ptr<http::server::TcpConnection>, boost::system::error_code const, unsigned long>(boost::shared_ptr<http::server::TcpConnection>&, void const*, boost::system::error_code const&, unsigned long&) const (mem_fn_template.hpp:271)
==16188== by 0x753A20E: void boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>::operator()<boost::shared_ptr<http::server::TcpConnection> >(boost::shared_ptr<http::server::TcpConnection>&, boost::system::error_code const&, unsigned long) const (mem_fn_template.hpp:286)
==16188== by 0x753A187: void boost::_bi::list3<boost::_bi::value<boost::shared_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()>::operator()<boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>, boost::_bi::list2<boost::system::error_code const&, unsigned long const&> >(boost::_bi::type<void>, boost::_mfi::mf2<void, http::server::Connection, boost::system::error_code const&, unsigned long>&, boost::_bi::list2<boost::system::error_code const&, unsigned long const&>&, int) (bind.hpp:392)
==16188== by 0x753A0F9: void 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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >::operator()<boost::system::error_code, unsigned long>(boost::system::error_code const&, unsigned long const&) (bind_template.hpp:102)
==16188== by 0x753A0AA: 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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>::operator()() (bind_handler.hpp:127)
==16188== by 0x753A04F: void boost::asio::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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long> >(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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>, ...) (handler_invoke_hook.hpp:64)
==16188== by 0x7539F80: void boost_asio_handler_invoke_helpers::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_ptr<http::server::TcpConnection> >, 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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> > >(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_ptr<http::server::TcpConnection> >, 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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >&) (handler_invoke_helpers.hpp:37)
==16188== by 0x7539E1D: void boost::asio::detail::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_ptr<http::server::TcpConnection> >, 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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>(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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>&, 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_ptr<http::server::TcpConnection> >, boost::arg<1> (*)(), boost::arg<2> (*)()> >, boost::system::error_code, unsigned long>*) (bind_handler.hpp:170)
==16188==
==16188== 1,984,000 bytes in 4 blocks are still reachable in loss record 1,704 of 1,705
==16188== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16188== by 0x67C6BFB: Wt::WRasterImage::WRasterImage(std::string const&, Wt::WLength const&, Wt::WLength const&, Wt::WObject*) (WRasterImage-gm.C:145)
==16188== by 0x63C1E2C: Wt::WWidgetRasterPainter::createPaintDevice(bool) (WPaintedWidget.C:647)
==16188== by 0x63C1F0B: Wt::WWidgetRasterPainter::getPaintDevice(bool) (WPaintedWidget.C:658)
==16188== by 0x63BFC80: Wt::WPaintedWidget::createDomElement(Wt::WApplication*) (WPaintedWidget.C:325)
==16188== by 0x6519323: Wt::WWebWidget::createActualElement(Wt::WWidget*, Wt::WApplication*) (WWebWidget.C:2183)
==16188== by 0x653C29E: Wt::WWidget::createSDomElement(Wt::WApplication*) (WWidget.C:365)
==16188== by 0x6250727: Wt::WContainerWidget::createDomChildren(Wt::DomElement&, Wt::WApplication*) (WContainerWidget.C:730)
==16188== by 0x62501A1: Wt::WContainerWidget::createDomElement(Wt::WApplication*, bool) (WContainerWidget.C:663)
==16188== by 0x625012F: Wt::WContainerWidget::createDomElement(Wt::WApplication*) (WContainerWidget.C:651)
==16188== by 0x6519323: Wt::WWebWidget::createActualElement(Wt::WWidget*, Wt::WApplication*) (WWebWidget.C:2183)
==16188== by 0x653C29E: Wt::WWidget::createSDomElement(Wt::WApplication*) (WWidget.C:365)
==16188==
==16188== 2,480,000 bytes in 4 blocks are still reachable in loss record 1,705 of 1,705
==16188== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16188== by 0x9734D37: ??? (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x9738244: ModifyCache (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x9738A94: ??? (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x9738EE6: SetCacheViewPixels (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x96E9F84: ConstituteImage (in /usr/lib/libGraphicsMagick.so.3.11.0)
==16188== by 0x67C6D21: Wt::WRasterImage::WRasterImage(std::string const&, Wt::WLength const&, Wt::WLength const&, Wt::WObject*) (WRasterImage-gm.C:154)
==16188== by 0x63C1E2C: Wt::WWidgetRasterPainter::createPaintDevice(bool) (WPaintedWidget.C:647)
==16188== by 0x63C1F0B: Wt::WWidgetRasterPainter::getPaintDevice(bool) (WPaintedWidget.C:658)
==16188== by 0x63BFC80: Wt::WPaintedWidget::createDomElement(Wt::WApplication*) (WPaintedWidget.C:325)
==16188== by 0x6519323: Wt::WWebWidget::createActualElement(Wt::WWidget*, Wt::WApplication*) (WWebWidget.C:2183)
==16188== by 0x653C29E: Wt::WWidget::createSDomElement(Wt::WApplication*) (WWidget.C:365)
==16188==
==16188== LEAK SUMMARY:
==16188== definitely lost: 131,091 bytes in 1 blocks
==16188== indirectly lost: 0 bytes in 0 blocks
==16188== possibly lost: 137,035 bytes in 2,348 blocks
==16188== still reachable: 6,407,236 bytes in 6,972 blocks
==16188== suppressed: 0 bytes in 0 blocks
Tested ob deian 8 ( gm 1.3.20? ) and ubuntu-server 14.04( gm 1.3.18 )
Updated by Drus Kor over 9 years ago
which query produces a line like
[2015-Jun-30 10:10:20.933952] 5135 [/ MSaQ51INObldNDK7] [info] "Wt: not serving this."
Updated by Koen Deforche over 9 years ago
- Status changed from Resolved to Feedback
That response is sent by Wt if there is a request for a resource from a session that does not exist (has died). Perhaps it should return a Not-Authorized response instead.
The whole thing starts to sounds like a bug in GraphicsMagick: your load tester is (obviously) treated as a plain HTML agent, and thus WRasterImage is used to render a painted widget. This thus stress tests GraphicsMagick.
Regards,
koen
Updated by Drus Kor over 9 years ago
found this
[[[https://sourceforge.net/p/graphicsmagick/bugs/165/]]]
Updated by Koen Deforche over 9 years ago
- Assignee changed from Benoit Daccache to Drus Kor
Ah, so an upgrade of GM did not solve the problem?
Updated by Drus Kor over 9 years ago
Build wt on latest version from repository. It this problem too.
I did several tests ( more than 8 hours in total, 10 + threads on 4 cpus ) with ofstream && write(f). I can not repeat the mistake ...
at evening I'll check it with WRasterImage::handleRequest. May be it usage give this bug.
Updated by Drus Kor over 9 years ago
- File snapshot2.png snapshot2.png added
- File snapshot3.png snapshot3.png added
I have a project wt + qt (the same code, the use of the library is given by define) and BT draws different (in my case wrong). I have not yet figured out the reason. Perhaps we should start with this question.
background is different, others is identical.
Updated by Drus Kor over 9 years ago
1) set setPreferredMethod( PngImage );
2) Open in browser
3) Copy image Url ( such as: http://127.0.0.1:8080/?wtd=oI6O3flGHH3t9QPY&request=resource&resource=or31lge&rand=439 )
4) Past in new tab;
6) refresh many times
7) error: magick/blob.c:4293: WriteBlob: Assertion `image~~blob~~>type != UndefinedStream' failed.
Updated by Drus Kor over 9 years ago
thread in which create WRasterImage, and thread, which call HandleReuest are differents. Adding mutex in each class function solve problem. But i didn't think what it is a right way.