[Kst] [Bug 208832] Segfault while simultaneously reading and plotting data

Andrew Walker arwalker at sumusltd.com
Thu Oct 1 20:11:17 CEST 2009


https://bugs.kde.org/show_bug.cgi?id=208832





--- Comment #6 from Andrew Walker <arwalker sumusltd com>  2009-10-01 20:11:14 ---
Hi Michael,

It seems that the problem is that two different curves are using the same 
vector,
so the additional lock I put in doesn't help in this slightly more unusual 
case.

I'll work out where best tio put a lock that encompasses this situtation.

You seem to have a real aptitude for finding obscure race conditions.

Many thnaks,

Andrew

----- Original Message ----- 
From: "Michael Vincent" <bug.zilla.vynce at neverbox.com>
To: <arwalker at sumusltd.com>
Sent: Thursday, October 01, 2009 11:01 AM
Subject: [Bug 208832] Segfault while simultaneously reading and plotting 
data


> https://bugs.kde.org/show_bug.cgi?id=208832
>
>
>
>
>
> --- Comment #5 from Michael Vincent <bug zilla vynce neverbox com> 
> 2009-10-01 20:00:55 ---
> Doh, I spoke too soon. It's still segfaulting occasionally for me. It does 
> seem
> to be less frequent now though. The backtraces look identical to me.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x005af59e in KstVector::interpolate (this=0x8668d10, in_i=27082, 
> ns_i=46809)
>    at kstvector.cpp:202
> 202      GENERATE_INTERPOLATION
>
>
> Thread 1:
>
> #0  0x005af59e in KstVector::interpolate (this=0x8668d10, in_i=27082,
>    ns_i=46809) at kstvector.cpp:202
> #1  0x009de84b in KstVCurve::paint (this=0x88348b8, context=@0xbfffc9f4)
>    at kstvcurve.cpp:1475
> #2  0x00bf0b68 in Kst2DPlot::draw (this=0x8870360, p=@0xbfffcd20)
>    at kst2dplot.cpp:2903
> #3  0x00bf13b6 in Kst2DPlot::draw (this=0x8870360) at kst2dplot.cpp:2737
> #4  0x00bf148c in Kst2DPlot::updateSelf (this=0x8870360) at 
> kst2dplot.cpp:2661
> #5  0x00c388e5 in KstViewObject::paintUpdate (this=0x8870360)
>    at kstviewobject.cpp:426
> #6  0x00c3b837 in KstViewObject::paint (this=0x8870360, p=@0xbfffd028,
>    bounds=@0xbfffcfc8) at kstviewobject.cpp:340
> #7  0x00c3bb44 in KstViewObject::paint (this=0x84ca678, p=@0xbfffd028,
>    bounds=@0xbfffd198) at kstviewobject.cpp:373
> #8  0x00c5a05f in KstTopLevelView::paint (this=0x84ca678, p=@0xbfffd028,
>    bounds=@0xbfffd198) at ksttoplevelview.cpp:190
> #9  0x00c5130f in KstTopLevelView::paint (this=0x84ca678,
>    type=KstPainter::P_PAINT, bounds=@0xbfffd198) at 
> ksttoplevelview.cpp:209
> #10 0x00c51442 in KstTopLevelView::paint (this=0x84ca678,
>    type=KstPainter::P_PAINT) at ksttoplevelview.cpp:199
> #11 0x00d52199 in KstApp::paintAll (this=0x80b7a50, 
> pt=KstPainter::P_PAINT)
>    at kst.cpp:1970
> #12 0x0124de62 in KstBindCurveCollection::append (this=0xb5bfa188,
>    exec=0xbfffd778, args=@0xbfffd374) at bind_curvecollection.cpp:155
> #13 0x0124818e in KstBindCollection::call (this=0x8852cf0, 
> exec=0xbfffd778,
>    self=@0xbfffd380, args=@0xbfffd374) at bind_collection.cpp:116
> #14 0x053e7cb9 in KJS::Object::call (this=0xbfffd398, exec=0xbfffd778,
>    thisObj=@0xbfffd380, args=@0xbfffd374) at object.cpp:73
> #15 0x05401593 in KJS::FunctionCallNode::evaluate (this=0x82e4838,
>    exec=0xbfffd778) at nodes.cpp:870
> #16 0x053ff006 in KJS::ExprStatementNode::execute (this=0x82e4850,
>    exec=0xbfffd778) at nodes.cpp:1980
> #17 0x053fd638 in KJS::SourceElementsNode::execute (this=0x8303ad8,
>    exec=0xbfffd778) at nodes.cpp:3114
> #18 0x053f87a9 in KJS::BlockNode::execute (this=0x84b9fb0, 
> exec=0xbfffd778)
>    at nodes.cpp:1942
> #19 0x053fe10c in KJS::ForNode::execute (this=0x84b8438, exec=0xbfffd778)
>    at nodes.cpp:2199
> #20 0x053fd638 in KJS::SourceElementsNode::execute (this=0x84d5988,
>    exec=0xbfffd778) at nodes.cpp:3114
> #21 0x053f87a9 in KJS::BlockNode::execute (this=0x848ca80, 
> exec=0xbfffd778)
>    at nodes.cpp:1942
> #22 0x05401f9d in KJS::InterpreterImp::evaluate (this=0x8429b20,
>    code=@0xbfffd834, thisV=@0xbfffd838) at internal.cpp:904
> #23 0x0540237a in KJS::Interpreter::evaluate (this=0x8471490,
>    code=@0xbfffd834, thisV=@0xbfffd838) at interpreter.cpp:166
> #24 0x012cc227 in KJSEmbed::KJSEmbedPart::execute (this=0x83214b0,
>    result=@0x8321544, script=@0xbfffd888, self=@0xbfffd90c)
>    at kjsembedpart.cpp:262
> #25 0x012ca76c in KJSEmbed::KJSEmbedPart::execute (this=0x83214b0,
>    script=@0xbfffd888, self=@0xbfffd90c) at kjsembedpart.cpp:256
> #26 0x012cd499 in KJSEmbed::KJSEmbedPart::runFile (this=0x83214b0,
>    name=@0xbfffd91c, self=@0xbfffd90c) at kjsembedpart.cpp:294
> #27 0x01220021 in KstBindKst::loadScript (this=0x865e7e8, exec=0xbfffdc98,
>    args=@0xbfffda14) at bind_kst.cpp:207
> #28 0x0121f47e in KstBindKst::call (this=0x865e858, exec=0xbfffdc98,
>    self=@0xbfffda20, args=@0xbfffda14) at bind_kst.cpp:182
> #29 0x053e7cb9 in KJS::Object::call (this=0xbfffda38, exec=0xbfffdc98,
>    thisObj=@0xbfffda20, args=@0xbfffda14) at object.cpp:73
> #30 0x05401593 in KJS::FunctionCallNode::evaluate (this=0x844e0e8,
>    exec=0xbfffdc98) at nodes.cpp:870
> #31 0x053ff006 in KJS::ExprStatementNode::execute (this=0x822db20,
>    exec=0xbfffdc98) at nodes.cpp:1980
> #32 0x053fd638 in KJS::SourceElementsNode::execute (this=0x8158030,
>    exec=0xbfffdc98) at nodes.cpp:3114
> #33 0x053f87a9 in KJS::BlockNode::execute (this=0x827ce48, 
> exec=0xbfffdc98)
>    at nodes.cpp:1942
> #34 0x05401f9d in KJS::InterpreterImp::evaluate (this=0x8429b20,
>    code=@0xbfffdd54, thisV=@0xbfffdd58) at internal.cpp:904
> #35 0x0540237a in KJS::Interpreter::evaluate (this=0x8471490,
>    code=@0xbfffdd54, thisV=@0xbfffdd58) at interpreter.cpp:166
> #36 0x012cc227 in KJSEmbed::KJSEmbedPart::execute (this=0x83214b0,
>    result=@0xbfffdda8, script=@0xbfffde84, self=@0xbfffdde0)
>    at kjsembedpart.cpp:262
> #37 0x01203fd3 in JSIfaceImpl::evaluate (this=0x85e8338, 
> script=@0xbfffde84)
>    at jsiface_impl.cpp:50
> #38 0x012c86ad in JSIface::process (this=0x85e8338, fun=@0xbfffe0e4,
>    data=@0xbfffe0dc, replyType=@0xbfffe0d4, replyData=@0xbfffe0cc)
>    at jsiface_skel.cpp:33
> #39 0x00485f8e in DCOPClient::receive (this=0x809bff0, objId=@0xbfffe0ec,
>    fun=@0xbfffe0e4, data=@0xbfffe0dc, replyType=@0xbfffe0d4,
>    replyData=@0xbfffe0cc) at dcopclient.cpp:1643
> #40 0x0048b3d1 in DCOPProcessInternal (d=0x80a3dc8, opcode=2, key=69,
>    dataReceived=@0xbfffe1c0, canPost=true) at dcopclient.cpp:520
> #41 0x0048be2a in DCOPProcessMessage (iceConn=0x809fcc0,
>    clientObject=0x80a3dc8, opcode=2, length=544, replyWait=0x0,
>    replyWaitRet=0xbfffe214) at dcopclient.cpp:432
> #42 0x00498e14 in KDE_IceProcessMessages (iceConn=0x809fcc0, 
> replyWait=0x0,
>    replyReadyRet=0x0) at process.c:326
> #43 0x0047c6df in DCOPClient::processSocketData (this=0x809bff0, fd=12)
>    at dcopclient.cpp:2014
> #44 0x0048bb34 in DCOPClient::qt_invoke (this=0x809bff0, _id=2, 
> _o=0xbfffe36c)
>    at ./dcopclient.moc:176
> #45 0x022b0e4a in QObject::activate_signal (this=0x809f670, 
> clist=0x809f8e0,
>    o=0xbfffe36c) at kernel/qobject.cpp:2359
> #46 0x022b2c43 in QObject::activate_signal (this=0x809f670, signal=2, 
> param=12)
>    at kernel/qobject.cpp:2452
> #47 0x0264a6c0 in QSocketNotifier::activated (this=0x809f670, t0=12)
>    at .moc/release-shared-mt/moc_qsocketnotifier.cpp:85
> #48 0x022d3267 in QSocketNotifier::event (this=0x809f670, e=0xbfffe6a8)
>    at kernel/qsocketnotifier.cpp:261
> #49 0x02247f75 in QApplication::internalNotify (this=0xbffff170,
>    receiver=0x809f670, e=0xbfffe6a8) at kernel/qapplication.cpp:2638
> #50 0x022490c6 in QApplication::notify (this=0xbffff170, 
> receiver=0x809f670,
>    e=0xbfffe6a8) at kernel/qapplication.cpp:2375
> #51 0x02bf1262 in KApplication::notify (this=0xbffff170, 
> receiver=0x809f670,
>    event=0xbfffe6a8) at kapplication.cpp:550
> #52 0x0223b961 in QApplication::sendEvent () at kernel/qapplication.h:523
> #53 QEventLoop::activateSocketNotifiers (this=0x8099110)
>    at kernel/qeventloop_unix.cpp:581
> #54 0x021f0aa3 in QEventLoop::processEvents (this=0x8099110, flags=4)
>    at kernel/qeventloop_x11.cpp:386
> #55 0x02262630 in QEventLoop::enterLoop (this=0x8099110)
>    at kernel/qeventloop.cpp:201
> #56 0x022624f6 in QEventLoop::exec (this=0x8099110)
>    at kernel/qeventloop.cpp:148
> #57 0x0224864f in QApplication::exec (this=0xbffff170)
>    at kernel/qapplication.cpp:2761
> #58 0x080539eb in main (argc=1, argv=0xbffff2f4) at main.cpp:854
>
>
> Thread 2:
>
> #0  0x005b0bc0 in KstVector::resize (this=0x8668d10, sz=62412, 
> reinit=true)
>    at kstvector.cpp:445
> #1  0x005b9e0d in KstRVector::doUpdate (this=0x8668d10, force=false)
>    at kstrvector.cpp:629
> #2  0x005ba4ac in KstRVector::update (this=0x8668d10, update_counter=9)
>    at kstrvector.cpp:459
> #3  0x009dad42 in KstVCurve::update (this=0x866ba28, update_counter=9)
>    at kstvcurve.cpp:249
> #4  0x00cdd5c2 in UpdateThread::doUpdates (this=0x858e748, force=false,
>    gotData=0xb7b1633b) at updatethread.cpp:212
> #5  0x00cdedc7 in UpdateThread::run (this=0x858e748) at 
> updatethread.cpp:114
> #6  0x022414bc in QThreadInstance::start (_arg=0x85900c4)
>    at kernel/qthread_unix.cpp:122
> #7  0x0021251f in start_thread (arg=0xb7b16b90) at pthread_create.c:297
> #8  0x010de04e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
>
> -- 
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kst mailing list