Re: [Ginp-developers] Bug in thred logic
Brought to you by:
burchbri,
dougculnane
From: Justin <ju...@sq...> - 2005-03-25 16:11:41
|
Doug, It would be good if we could reproduce the deadlock or I could at least get a stack trace of it. Why don't you run "kill -QUIT" on the java process and send me the standard out back. The code you removed was an artifact of the older thumb making process. Have you cvs updated lately? I had some old behaviour in the code where it would wait till all the thumbs finished generating before showing the page. I'll look into setting up a jmeter script tonight to try and trigger the deadlock with load. BTW, Here's a quick tutorial on how to do the KILL -QUIT when the process is hung. tail -f ./tomcat/logs/catalina.out & (The next command is all on one line) ps -axf | grep java | grep -v "\_" | grep tomcat | cut -d ' ' -f 1 | xargs kill -QUIT The stacktrace of the jvm running tomcat will print out. If you could copy and paste this and mail it to me when you get the hang that would be great. In the meantime I will look closely at my code and try and reproduce the problem. Thanks, Justin Doug Culnane wrote: > Dear Justin, > > There is a bug in the thread logic. I tried to fix this but I have no > experience with synchronized threads. I would fix this by removing the > synchronized bit out of the application, which you may not approve of. > Therefore please have a look at the code because it does not work on > tomcat. I have to click links several times to get a response. I think > that my encoding problem is related to this, but I can not know for sure > until this is fixed. > > From Configuration I have removed this redundant code which I do not > think is relevant but I thought I would mention it just in case: > private boolean makeThumbsFlag=true; > /** > * Synchronized to make thread safe > * @return whether to launch a make thumbs thread. > */ > public synchronized boolean makeThumbs() { > if (makeThumbsFlag==true) { > makeThumbsFlag=false; > return true; > } > return false; > } > > /** > * Call when the make thumbs thread has finished > */ > public void doneMakingThumbs() { > makeThumbsFlag=true; > } > > If you do not have time for this then let me know and I will reprogram > the synchronized bit out and make a series of images for the different > Thumbnail errors. ThumbnailBeingMadePleaseWaitAndRefresh.jpg > OriginalFileNotFound.jpg > CanNotWriteToDirectory.jpg > ... > > This may not be very elegant but it will be safer. > > All the best, Happy Easter, > > Doug > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Ginp-developers mailing list > Gin...@li... > https://lists.sourceforge.net/lists/listinfo/ginp-developers |