POV-Ray : Newsgroups : povray.beta-test : Linux Beta 28 segfaults on Slackware and Kubuntu : Re: Linux Beta 28 segfaults on Slackware and Kubuntu Server Time
2 May 2024 15:43:08 EDT (-0400)
  Re: Linux Beta 28 segfaults on Slackware and Kubuntu  
From: Le Forgeron
Date: 28 Aug 2008 13:58:14
Message: <48b6e736@news.povray.org>
Le Thu, 28 Aug 2008 13:15:03 -0400, Le Forgeron a modifié des petits
morceaux de l'univers pour nous faire lire :

> Le Thu, 28 Aug 2008 10:00:49 -0400, geep999 a modifié des petits
> morceaux de l'univers pour nous faire lire :
> 
> [snip]
> 
> I'm getting a memory fault here too (amd64, linux gentoo)...
> "recompiling for debugger" in progress


Operations seems to SigSegV on memory allocation/release
(first is on pixels.reserve(pixels.size()*5), with pixels.size()==1024)
second is on pool.push_back(ptr); on destroy of Ref object,
third is on         vector<double> rands(count); with count==32768 )

first was done with -WT1, second & third without...

Either that, or the C++ memory allocator/deallocator is not thread-
safe... or the one in libc.6 (missing an option for malloc thread-safe ?)


gcc (GCC) 4.2.4
kernel 2.6.24-gentoo-r7

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x43009950 (LWP 10206)]
0x00002ab94487c378 in ?? () from /lib/libc.so.6
(gdb) where
#0  0x00002ab94487c378 in ?? () from /lib/libc.so.6
#1  0x00002ab94487e67c in ?? () from /lib/libc.so.6
#2  0x00002ab9448803b0 in malloc () from /lib/libc.so.6
#3  0x00002ab94413108b in operator new () from /usr/lib/gcc/x86_64-pc-
linux-gnu/4.2.4/libstdc++.so.6
#4  0x000000000048b7b7 in __gnu_cxx::new_allocator<float>::allocate 
(this=0x43008ac0, __n=5120) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/
include/g++-v4/ext/new_allocator.h:91
#5  0x000000000048b7df in std::_Vector_base<float, std::allocator<float> 
>::_M_allocate (this=0x43008ac0, __n=5120) at /usr/lib/gcc/x86_64-pc-
linux-gnu/4.2.4/include/g++-v4/bits/stl_vector.h:128
#6  0x000000000048bcdd in std::vector<float, std::allocator<float> 
>::_M_allocate_and_copy<float*> (this=0x43008ac0, __n=5120, __first=0x0, 
__last=0x0) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4/bits/
stl_vector.h:763
#7  0x000000000048bd89 in std::vector<float, std::allocator<float> 
>::reserve (this=0x43008ac0, __n=5120) at /usr/lib/gcc/x86_64-pc-linux-
gnu/4.2.4/include/g++-v4/bits/vector.tcc:77
#8  0x0000000000480128 in pov::ViewData::CompletedRectangle 
(this=0x9dd270, rect=@0x43008d00, serial=0, pixels=@0x43008c78, size=1, 
final=true) at scene/view.cpp:232
#9  0x000000000058aab4 in pov::TraceTask::NonAdaptiveSupersamplingM1 
(this=0x9ded60) at render/tracetask.cpp:619
#10 0x000000000058ab84 in pov::TraceTask::Run (this=0x9ded60) at render/
tracetask.cpp:339
#11 0x0000000000598279 in pov::Task::TaskThread (this=0x9ded60, 
completion=@0x9ae9d0) at support/task.cpp:233
#12 0x00000000005992d2 in boost::_mfi::mf1<void, pov::Task, 
boost::function0<void, std::allocator<boost::function_base> > 
const&>::operator() (this=0x9ae9b8, p=0x9ded60, a1=@0x9ae9d0) at /usr/
include/boost/bind/mem_fn_template.hpp:162
#13 0x0000000000599382 in 
boost::_bi::list2<boost::_bi::value<pov::Task*>, 
boost::_bi::value<boost::function0<void, 
std::allocator<boost::function_base> > > >::operator()
<boost::_mfi::mf1<void, pov::Task, boost::function0<void, 
std::allocator<boost::function_base> > const&>, boost::_bi::list0> 
(this=0x9ae9c8, f=@0x9ae9b8, a=@0x43008fef) at /usr/include/boost/
bind.hpp:289
#14 0x00000000005993c2 in boost::_bi::bind_t<void, boost::_mfi::mf1<void, 
pov::Task, boost::function0<void, std::allocator<boost::function_base> > 
const&>, boost::_bi::list2<boost::_bi::value<pov::Task*>, 
boost::_bi::value<boost::function0<void, 
std::allocator<boost::function_base> > > > >::operator() (this=0x9ae9b8) 
at /usr/include/boost/bind/bind_template.hpp:20
#15 0x00000000005993e0 in 
boost::thread::thread_data<boost::_bi::bind_t<void, 
boost::_mfi::mf1<void, pov::Task, boost::function0<void, 
std::allocator<boost::function_base> > const&>, 
boost::_bi::list2<boost::_bi::value<pov::Task*>, 
boost::_bi::value<boost::function0<void, 
std::allocator<boost::function_base> > > > > >::run (this=0x9ae8b0) at /
usr/include/boost/thread/pthread/thread.hpp:130
#16 0x00002ab943e4bf1f in thread_proxy () from /usr/lib/libboost_thread-
mt.so
#17 0x00002ab941cd4067 in start_thread () from /lib/libpthread.so.0
#18 0x00002ab9448d1edd in clone () from /lib/libc.so.6
#19 0x0000000000000000 in ?? ()

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x4400b950 (LWP 10302)]
0x00002b2b5192b17c in ?? () from /lib/libc.so.6
(gdb) where
#0  0x00002b2b5192b17c in ?? () from /lib/libc.so.6
#1  0x00002b2b5192d3b0 in malloc () from /lib/libc.so.6
#2  0x00002b2b511de08b in operator new () from /usr/lib/gcc/x86_64-pc-
linux-gnu/4.2.4/libstdc++.so.6
#3  0x0000000000567ba5 in 
__gnu_cxx::new_allocator<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> >*>::allocate (this=0xa60d90, __n=8) at /
usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4/ext/
new_allocator.h:91
#4  0x0000000000567bcd in std::_Vector_base<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> >*, 
std::allocator<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> >*> >::_M_allocate (this=0xa60d90, 
__n=8) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4/bits/
stl_vector.h:128
#5  0x0000000000567f89 in std::vector<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> >*, 
std::allocator<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> >*> >::_M_insert_aux (this=0xa60d90, 
__position={_M_current = 0x9fe180}, __x=@0x44009660) at /usr/lib/gcc/
x86_64-pc-linux-gnu/4.2.4/include/g++-v4/bits/vector.tcc:271
#6  0x0000000000568142 in std::vector<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> >*, 
std::allocator<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> >*> >::push_back (this=0xa60d90, 
__x=@0x44009660) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4/
bits/stl_vector.h:605
#7  0x0000000000568161 in pov::RefPool<std::vector<pov::Trace::WNRX, 
std::allocator<pov::Trace::WNRX> > >::release (this=0xa60d90, 
ptr=0x9b2450) at ../../source/backend/frame.h:1276
#8  0x0000000000568195 in ~Ref (this=0x44009b10) at ../../source/backend/
frame.h:1301
#9  0x000000000057c8bb in pov::Trace::ComputeLightedTexture 
(this=0xa60cc0, resultcolour=@0x4400a480, texture=0xadcb60, 
warps=@0x9b2430, ipoint=@0x4400a430, rawnormal=@0x4400a450, 
ray=@0x4400a7b0, weight=1, isect=@0x4400a630) at render/trace.cpp:1046
#10 0x000000000057450e in pov::Trace::ComputeOneTextureColour 
(this=0xa60cc0, resultcolour=@0x4400a480, texture=0xadcb60, 
warps=@0x9b2430, ipoint=@0x4400a430, rawnormal=@0x4400a450, 
ray=@0x4400a7b0, weight=1, isect=@0x4400a630, shadowflag=false, 
photonPass=false) at render/trace.cpp:600
#11 0x000000000057649a in pov::Trace::ComputeTextureColour 
(this=0xa60cc0, isect=@0x4400a630, colour=@0x4400aaa0, ray=@0x4400a7b0, 
weight=1, photonPass=false) at render/trace.cpp:532
#12 0x000000000057cc45 in pov::Trace::TraceRay (this=0xa60cc0, 
ray=@0x4400a7b0, colour=@0x4400aaa0, weight=1) at render/trace.cpp:216
#13 0x00000000005916d0 in pov::TracePixel::operator() (this=0xa60cc0, 
x=39.061198001106582, y=18.279306997855503, width=200, height=200, 
colour=@0x4400aaa0) at render/tracepixel.cpp:326
#14 0x0000000000587fdd in pov::TraceTask::SupersampleOnePixel 
(this=0xa60c30, x=39, y=18, col=@0x96b73c) at render/tracetask.cpp:711
#15 0x000000000058839d in 
pov::TraceTask::NonAdaptiveSupersamplingForOnePixel (this=0xa60c30, x=39, 
y=18, leftcol=@0x96b728, topcol=@0x96b4bc, curcol=@0x96b73c, 
sampleleft=@0x4400acfb, sampletop=@0x4400acfa, samplecurrent=@0x4400acf9) 
at render/tracetask.cpp:692
#16 0x000000000058a9b4 in pov::TraceTask::NonAdaptiveSupersamplingM1 
(this=0xa60c30) at render/tracetask.cpp:606
#17 0x000000000058ab84 in pov::TraceTask::Run (this=0xa60c30) at render/
tracetask.cpp:339
#18 0x0000000000598279 in pov::Task::TaskThread (this=0xa60c30, 
completion=@0x982180) at support/task.cpp:233
#19 0x00000000005992d2 in boost::_mfi::mf1<void, pov::Task, 
boost::function0<void, std::allocator<boost::function_base> > 
const&>::operator() (this=0x982168, p=0xa60c30, a1=@0x982180) at /usr/
include/boost/bind/mem_fn_template.hpp:162
#20 0x0000000000599382 in 
boost::_bi::list2<boost::_bi::value<pov::Task*>, 
boost::_bi::value<boost::function0<void, 
std::allocator<boost::function_base> > > >::operator()
<boost::_mfi::mf1<void, pov::Task, boost::function0<void, 
std::allocator<boost::function_base> > const&>, boost::_bi::list0> 
(this=0x982178, f=@0x982168, a=@0x4400afef) at /usr/include/boost/
bind.hpp:289
#21 0x00000000005993c2 in boost::_bi::bind_t<void, boost::_mfi::mf1<void, 
pov::Task, boost::function0<void, std::allocator<boost::function_base> > 
const&>, boost::_bi::list2<boost::_bi::value<pov::Task*>, 
boost::_bi::value<boost::function0<void, 
std::allocator<boost::function_base> > > > >::operator() (this=0x982168) 
at /usr/include/boost/bind/bind_template.hpp:20
#22 0x00000000005993e0 in 
boost::thread::thread_data<boost::_bi::bind_t<void, 
boost::_mfi::mf1<void, pov::Task, boost::function0<void, 
std::allocator<boost::function_base> > const&>, 
boost::_bi::list2<boost::_bi::value<pov::Task*>, 
boost::_bi::value<boost::function0<void, 
std::allocator<boost::function_base> > > > > >::run (this=0x982060) at /
usr/include/boost/thread/pthread/thread.hpp:130
#23 0x00002b2b50ef8f1f in thread_proxy () from /usr/lib/libboost_thread-
mt.so
#24 0x00002b2b4ed81067 in start_thread () from /lib/libpthread.so.0
#25 0x00002b2b5197eedd in clone () from /lib/libc.so.6
#26 0x0000000000000000 in ?? ()


(gdb) where
#0  0x00002b9ec6341378 in ?? () from /lib/libc.so.6
#1  0x00002b9ec634367c in ?? () from /lib/libc.so.6
#2  0x00002b9ec63453b0 in malloc () from /lib/libc.so.6
#3  0x00002b9ec5bf608b in operator new () from /usr/lib/gcc/x86_64-pc-
linux-gnu/4.2.4/libstdc++.so.6
#4  0x00000000005569d5 in __gnu_cxx::new_allocator<double>::allocate 
(this=0xbc7ad0, __n=32768) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/
include/g++-v4/ext/new_allocator.h:91
#5  0x00000000005569fd in std::_Vector_base<double, 
std::allocator<double> >::_M_allocate (this=0xbc7ad0, __n=32768) at /usr/
lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4/bits/stl_vector.h:128
#6  0x000000000059b9f9 in _Vector_base (this=0xbc7ad0, __n=32768, 
__a=@0x4180504f) at /usr/lib/gcc/x86_64-pc-linux-gnu/4.2.4/include/g++-v4/
bits/stl_vector.h:114
#7  0x000000000059bb07 in vector (this=0xbc7ad0, __n=32768, 
__value=@0x41805050, __a=@0x4180504f) at /usr/lib/gcc/x86_64-pc-linux-
gnu/4.2.4/include/g++-v4/bits/stl_vector.h:212
#8  0x000000000059a329 in pov::RandomDoubles (minval=0, maxval=1, 
count=32768) at support/randomsequences.cpp:132
#9  0x000000000059a3e9 in RandomDoubleSequence (this=0xbc7ad0, minval=0, 
maxval=1, count=32768) at support/randomsequences.cpp:184
#10 0x00000000004b0f2c in MediaFunction (this=0xbc7ac8, td=0x9b6ef0, 
t=0xbc7968, pg=0xbc7b10) at interior/media.cpp:289
#11 0x000000000055b609 in RadiosityFunction (this=0xbc7960, 
sd=@0x41805250, td=0x9b6ef0, mtl=5, adcb=0.0039215686274509803, 
rs=@0x956eb8, rc=@0x968268, cf=@0xbc7908, ft=true) at lighting/
radiosity.cpp:241
#12 0x0000000000589510 in TraceTask (this=0xbc7360, vd=0x9680b0, tm=1, 
js=1, aat=0.30000001192092896, aad=3, ps=0, psc=false, final=true) at 
render/tracetask.cpp:294
#13 0x0000000000484d36 in pov::View::StartRender (this=0x967fb0, 
renderOptions=@0x41805cc0) at scene/view.cpp:813
#14 0x000000000046bba3 in pov::RenderBackend::StartRender 
(this=0x41805e80, msg=@0x41805cc0) at control/renderbackend.cpp:602
#15 0x0000000000470535 in 
POVMS_MessageReceiver::MemberHandlerOO<pov::RenderBackend>::Call 
(this=0x93d580, msg=@0x41805cc0, result=@0x41805ce0, mode=1) at ../../
source/base/povmscpp.h:382
#16 0x00000000005df671 in POVMS_MessageReceiver::ReceiveHandler 
(msg=0x41805e30, result=0x41805e20, mode=1, privatedataptr=0x41805e80) at 
povmscpp.cpp:1774
#17 0x00000000005dca3c in POVMS_Receive (contextref=0x93d000, 
msg=0x41805e30, result=0x41805e20, mode=1) at povms.cpp:943
#18 0x00000000005ddd01 in POVMS_ProcessMessages (contextref=0x93d000, 
blocking=true, yielding=true) at povms.cpp:687
#19 0x0000000000468386 in MainThreadFunction () at povray.cpp:540
#20 0x0000000000468dc8 in boost::_bi::list0::operator()<void (*)(), 
boost::_bi::list0> (this=0x93ce60, f=@0x93ce58) at /usr/include/boost/
bind.hpp:178
#21 0x0000000000468e00 in boost::_bi::bind_t<void, void (*)(), 
boost::_bi::list0>::operator() (this=0x93ce58) at /usr/include/boost/bind/
bind_template.hpp:20
#22 0x0000000000468e1e in 
boost::thread::thread_data<boost::_bi::bind_t<void, void (*)(), 
boost::_bi::list0> >::run (this=0x93cd50) at /usr/include/boost/thread/
pthread/thread.hpp:130
#23 0x00002b9ec5910f1f in thread_proxy () from /usr/lib/libboost_thread-
mt.so
#24 0x00002b9ec3799067 in start_thread () from /lib/libpthread.so.0
#25 0x00002b9ec6396edd in clone () from /lib/libc.so.6
#26 0x0000000000000000 in ?? ()


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.