Task Description
Thread safety issue in functions using splines. 3.7.0.RC7.
First vetting in p.bugreports where several users were able to reproduce the fail on the following systems:
1) Ubuntu 12.1 i7 920 using 3.7.0.RC7 2) Ubuntu 12.04, AMD 2431 CPU, Linux 3.2.0-45 kernel using 3.7.0.RC7 (g++ 4.6 @x86_64-unknown-linux-gnu) 3) POV-Ray 3.7.0.RC7 (icpc 13.1.0 @x86_64-unknown-linux-gnu)
Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz
uname -or
2.6.32-279.14.1.el6.x86_64 GNU/Linux
lsb_release -irc
Distributor ID: CentOS
Release: 6.3
Codename: Final
4) Confirmed with openSUSE 12.2. 5) Just to add to the system list: with Windows and a core i7 one yields the same result. 6) “Le_Forgeron” ran under Intel Inspector (XE 2013) and provided this feedback :
...
that might be less than 60 seconds, but with Intel Inspector (XE 2013),
it becomes 42:50 (just 14 data races, oh well, that's just so friendly).
ID Type Sources Modules State
P1 Data race isosurf.cpp; mutex.hpp povray New
P2 Data race mutex.hpp; povms.cpp povray New
P3 Data race povray.cpp povray New
P4 Data race povray.cpp povray New
P5 Data race mutex.hpp; pov_mem.cpp; splines.cpp povray New
P6 Data race mutex.hpp; pov_mem.cpp; splines.cpp povray New
P7 Data race mutex.hpp; pov_mem.cpp; splines.cpp povray New
P8 Data race recursive_mutex.hpp; scene.cpp; task.cpp; taskqueue.cpp;
view.cpp povray New
P9 Data race condition_variable.hpp; vfe.cpp; vfesession.cpp povray New
P10 Data race condition_variable.hpp; unixconsole.cpp; vfesession.cpp
povray New
P11 Data race condition_variable.hpp; unixconsole.cpp; vfesession.cpp
povray New
P12 Data race unixconsole.cpp; vfesession.cpp; vfesession.h povray New
P13 Data race unixconsole.cpp; vfesession.cpp povray New
P14 Data race [Unknown]; unixconsole.cpp; vfesession.cpp
libboost_thread.so.1.49.0; povray New
Numbers 2, 3, 4, 8, 9, 10, 11, 12, 13 & 14 are related to the handling
of session (and occur once or twice only, excepted #8, four times).
Number 1 is about isosurface (adjusting gradient at isosurf.cpp:1099 vs
1098 (testing its value), and copying the isosurface) (IMHO, rendering
threads updating the object... not the best move without some
atomic/protection (and not sure a DBL is/can be atomic)) (occurs 2505
times).
Number 5, 6 and 7 are about splines
* sp->Cache_Type & Cache_Point, splines.cpp :803 vs :814/815 (2024 times)
* sp->Cache_Valid, :805 vs :813 vs :904 (1770 times)
* sp->Cache_Data, :807 vs :903 (5025 times)
Only my 0.02¢ (yes, very cheap), but it seems to confirm
For test code see attached files or SplineThreadSafety.pov attachment to p.bugreports and images were posted to p.b.images.
Issue shows up any time more than one thread is used. Use of AA tends to hide the problem so do not use it if using the output image for testing.
Thanks. Bill P.
|