I’m using valgrind 3.10.1 to look for races in my Wt application.
When I run valgrind’s helgrind thread tool on the Wt example ‘blog’
application, it warns me of several races.
/usr/local/bin/valgrind --tool=helgrind --verbose \
--suppressions=/home/vanandel/valgrind/wt_valgrind_suppressions \
--suppressions=/home/vanandel/valgrind/boost_thread.sup \
--gen-suppressions=yes \
--vgdb=yes --vgdb-error=0 \
../../build_boost_1_57_0/examples/blog/blog.wt --docroot . --http-address
0.0.0.0 --http-port 8081
FYI: I get similar warnings from helgrind if I compile against boost
1_56_0.
I’ve attached two of the races the helgrind detects.
wt_boost_race1 <http://pastebin.com/831vMuK5>
The following race condition is quite interesting:
It appears that a http::server::TcpConnection object is being destroyed as
a result of a boost:shared_ptr() being destroyed, while another thread is
still using the TcpConnection object.
Since boost::shared_ptr is supposed to be thread safe, it isn’t obvious how
this could happen.
wt_boost_TcpConnec… <http://pastebin.com/zErMzYvL>
I’d be happy to post more examples of race conditions detected by helgrind.
Joe VanAndel
NCAR/EOL
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest