Patches item #1447670, was opened at 2006-03-11 01:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684977&aid=1447670&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gili Tzabari (cowwoc)
Assigned to: Nobody/Anonymous (nobody)
Summary: Thread-safety bug in SharedResources.java

Initial Comment:
I can't create a patch file because CVS is down but
this is an easy patch so you can do it by hand.

SharedResources.javs line 448 reads:

                resourceState.touch(key);

please replace this with:

                synchronized (resourceState)
                {
                        resourceState.touch(key);
                }

Otherwise, you end up with:

java.lang.IllegalStateException: Task already scheduled
or cancelled
        at java.util.Timer.sched(Timer.java:358)
        at java.util.Timer.schedule(Timer.java:170)
        at
wicket.SharedResources$ResourceState.makeCacheTask(SharedResources.java:94)
        at
wicket.SharedResources$ResourceState.touch(SharedResources.java:143)
        at
wicket.SharedResources.onResourceRequested(SharedResources.java:448)
        at
wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:104)
        at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)
        at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)
        at
wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:824)
        at
wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:856)
        at wicket.RequestCycle.step(RequestCycle.java:931)
        at
wicket.RequestCycle.steps(RequestCycle.java:1005)
        at
wicket.RequestCycle.request(RequestCycle.java:451)
        at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:212)

because two threads hit the same resource at the same
time, and ResourceState is not thread-safe.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684977&aid=1447670&group_id=119783


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to