logo       

Re: Deadlock when calling RunnableQueue.setIdleRunnable: msg#00048

Subject: Re: Deadlock when calling RunnableQueue.setIdleRunnable
hi cameron,

i think it is safe to remove synchronized from setIdleRunnable().
For my taste, there are too many synchronized methods
(setRunHandler..runnableInvoked).
Its difficult to follow the interaction between RunnableQueue and
UpdateManager...

setIdleRunnable() doesnt need to be synchd (on RunnableQueue) because it
operates just on list,
which is locally synchronized.

greetings
dieter


----- Original Message -----
From: "Cameron McCormack" <cam@xxxxxxxxx>
To: <batik-dev@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, December 20, 2006 8:36 AM
Subject: Deadlock when calling RunnableQueue.setIdleRunnable


> Hi.
>
> I’ve come across a deadlock when the SVGAnimationEngine class calls
> RunnableQueue.setIdleRunnable to start the animation ticking, while at
> the same time the RunnableQueue is suspended:
>
>   Found one Java-level deadlock:
>   =============================
>   "Thread-1149":
>     waiting to lock monitor 0x080bb9d8 (object 0xa1cc1b20, a
org.apache.batik.util.RunnableQueue),
>     which is held by "RunnableQueue-26"
>   "RunnableQueue-26":
>     waiting to lock monitor 0x080bbb68 (object 0xa1cc1a28, a
org.apache.batik.bridge.UpdateManager),
>     which is held by "Thread-1149"
>
>   Java stack information for the threads listed above:
>   ===================================================
>   "Thread-1149":
>           at
org.apache.batik.util.RunnableQueue.setIdleRunnable(RunnableQueue.java:494)
>           - waiting to lock <0xa1cc1b20> (a
org.apache.batik.util.RunnableQueue)
>           at
org.apache.batik.bridge.SVGAnimationEngine.start(SVGAnimationEngine.java:428
)
>           at
org.apache.batik.bridge.BaseScriptingEnvironment.dispatchSVGLoadEvent(BaseSc
riptingEnvironment.java:550)
>           at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.jav
a:239)
>           at
org.apache.batik.bridge.UpdateManager.dispatchSVGLoadEvent(UpdateManager.jav
a:220)
>           - locked <0xa1cc1a28> (a org.apache.batik.bridge.UpdateManager)
>           at
org.apache.batik.swing.svg.SVGLoadEventDispatcher.run(SVGLoadEventDispatcher
.java:100)
>   "RunnableQueue-26":
>           at
org.apache.batik.bridge.UpdateManager$UpdateManagerRunHander.executionSuspen
ded(UpdateManager.java:877)
>           - waiting to lock <0xa1cc1a28> (a
org.apache.batik.bridge.UpdateManager)
>           at
org.apache.batik.util.RunnableQueue.executionSuspended(RunnableQueue.java:50
8)
>           - locked <0xa1cc1b20> (a org.apache.batik.util.RunnableQueue)
>           at
org.apache.batik.util.RunnableQueue.run(RunnableQueue.java:167)
>           at java.lang.Thread.run(Thread.java:619)
>
> I’m not so good at threading issues: what’s the correct solution?  Does
> RunnableQueue.setIdleRunnable really need to be synchronized?
>
> Thanks,
>
> Cameron
>
> --
> Cameron McCormack, http://mcc.id.au/
> xmpp:heycam@xxxxxxxxxx  ▪  ICQ 26955922  ▪  MSN cam@xxxxxxxxx
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: batik-dev-help@xxxxxxxxxxxxxxxxxxxxxx
>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe