Re: XMLSearch not thread safe

2008-08-11 Thread James Holmes
://www.adobe.com/cfusion/mmform/index.cfm?name=wishform **BUG** Concise problem statement: XMLSearch() is not thread safe. Steps to reproduce bug: 1. Create XML object in a shared scope like APPLICATION. 2. Search the object with different XMLSearch() xpath expressions in multiple requests

Re: XMLSearch not thread safe

2008-08-11 Thread Brad Wood
Thanks for the research, James. Also, thanks for submitting the bug. ~Brad - Original Message - From: James Holmes [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, August 11, 2008 10:25 PM Subject: Re: XMLSearch not thread safe Our testing confirms your

Re: XMLSearch not thread safe

2008-08-11 Thread Mark Mandel
() is not thread safe. Steps to reproduce bug: 1. Create XML object in a shared scope like APPLICATION. 2. Search the object with different XMLSearch() xpath expressions in multiple requests at the same time under significant load. Results: Null pointer errors, incorrect search results. Expected

Re: XMLSearch not thread safe

2008-08-11 Thread James Holmes
Duplicating will always be faster under load than single threading the app with an exclusive lock, as the duplicate can run safely in multiple threads (well, we haven't seen any issues with it yet, anyway). On Tue, Aug 12, 2008 at 11:43 AM, Mark Mandel [EMAIL PROTECTED] wrote: How bizarre! I

Re: XMLSearch not thread safe

2008-08-08 Thread James Holmes
Right, I can now screw up our XML searches at will. The bad news is the same thing happens in CF8.01 as well as CF 7.02 (I just tested both). I have a sizeable XML file (1600 lines or so). Here's a snippet: !-- Top Tab 3 - Future Students -- top_navigation page_title=Future Students

Re: XMLSearch not thread safe

2008-08-08 Thread Jochem van Dieten
James Holmes wrote: Right, I can now screw up our XML searches at will. The bad news is the same thing happens in CF8.01 as well as CF 7.02 (I just tested both). cfset elementArray = XMLSearch(APPLICATION.myXML, /pagesettings/top_navigation[3]) cfset topNavURL = elementArray[1].url.XMLText

Re: XMLSearch not thread safe

2008-08-08 Thread James Holmes
I'll rerun the tests and let you know. On Fri, Aug 8, 2008 at 5:29 PM, Jochem van Dieten [EMAIL PROTECTED] wrote: James Holmes wrote: Right, I can now screw up our XML searches at will. The bad news is the same thing happens in CF8.01 as well as CF 7.02 (I just tested both). cfset

Re: XMLSearch not thread safe

2008-08-08 Thread James Holmes
No, the same null pointer exception occurs (which you'd expect, since the search is being done on the same object and it's just the result that's duplicated). On Fri, Aug 8, 2008 at 6:37 PM, James Holmes [EMAIL PROTECTED] wrote: I'll rerun the tests and let you know. On Fri, Aug 8, 2008 at

Re: XMLSearch not thread safe

2008-08-08 Thread Brad Wood
That was my first though-- duplicate it so it is passed by value instead of reference... But I was thinking you would want to duplicate the application variable BEFORE passing it into the xmlsearch. ~Brad - Original Message - From: Jochem van Dieten [EMAIL PROTECTED] Does the

Re: XMLSearch not thread safe

2008-08-08 Thread Brad Wood
duplicate works on the inside. ~Brad - Original Message - From: James Holmes [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Friday, August 08, 2008 8:57 AM Subject: Re: XMLSearch not thread safe No, the same null pointer exception occurs (which you'd expect, since the search

Re: XMLSearch not thread safe

2008-08-08 Thread James Holmes
A duplicate() deep copy will work in a similar way to the XMLParse as you say. We're comparing various workarounds including duplicate() and reparsing. If anyone else gets the time to do this we can compare notes. On Fri, Aug 8, 2008 at 10:30 PM, Brad Wood [EMAIL PROTECTED] wrote: James, to

Re: XMLSearch not thread safe

2008-08-08 Thread Brad Wood
/ ~Brad - Original Message - From: James Holmes [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Friday, August 08, 2008 10:22 AM Subject: Re: XMLSearch not thread safe A duplicate() deep copy will work in a similar way to the XMLParse as you say. We're comparing various

Re: XMLSearch not thread safe

2008-08-07 Thread Tom Chiverton
On Wednesday 06 Aug 2008, Brad Wood wrote: iframes aren't good for load testing. Browsers like IE follow spec and only allow 2 concurrent connections to a server at once. Even IE lets you adjust this number in the registry, but I use Apache JMeter tbh. -- Tom Chiverton

Re: XMLSearch not thread safe

2008-08-07 Thread James Holmes
Yes, the tests I'll be doing tomorrow will be with jmeter. I'll post the results when we have them. On Thu, Aug 7, 2008 at 4:24 PM, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 06 Aug 2008, Brad Wood wrote: iframes aren't good for load testing. Browsers like IE follow spec and only

XMLSearch not thread safe

2008-08-06 Thread James Holmes
The CF7 version of XMLSearch() is not thread safe (as noted in the livedocs http://livedocs.adobe.com/coldfusion/7/htmldocs/0672.htm by a helpful person and confirmed by us on several unfortunate occasions over the last few days). Does anyone know if this is fixed in CF8? -- mxAjax / CFAjax

Re: XMLSearch not thread safe

2008-08-06 Thread Raymond Camden
updated results, but rather the results that would have been right at the time it began the search. On Wed, Aug 6, 2008 at 1:22 AM, James Holmes [EMAIL PROTECTED] wrote: The CF7 version of XMLSearch() is not thread safe (as noted in the livedocs http://livedocs.adobe.com/coldfusion/7/htmldocs/0672

Re: XMLSearch not thread safe

2008-08-06 Thread James Holmes
() is not thread safe (as noted in the livedocs http://livedocs.adobe.com/coldfusion/7/htmldocs/0672.htm by a helpful person and confirmed by us on several unfortunate occasions over the last few days). Does anyone know if this is fixed in CF8? -- mxAjax / CFAjax docs and other useful articles

Re: XMLSearch not thread safe

2008-08-06 Thread James Holmes
been right at the time it began the search. On Wed, Aug 6, 2008 at 1:22 AM, James Holmes [EMAIL PROTECTED] wrote: The CF7 version of XMLSearch() is not thread safe (as noted in the livedocs http://livedocs.adobe.com/coldfusion/7/htmldocs/0672.htm by a helpful person and confirmed by us

Re: XMLSearch not thread safe

2008-08-06 Thread Tom Chiverton
On Wednesday 06 Aug 2008, James Holmes wrote: Does anyone know if this is fixed in CF8? If you can confirm it, does that mean you have a test case ? -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP

Re: XMLSearch not thread safe

2008-08-06 Thread Dominic Watson
I'm curious, I have a riaforge project, betterXml, that does XPath searches using a different method. I'd be interested to see if this also fails 'thread safety' and if it doesn't, whether it could benefit you here: http://betterxml.riaforge.org/ I'm not up to speed with thread safeness so am

Re: XMLSearch not thread safe

2008-08-06 Thread Tom Chiverton
On Wednesday 06 Aug 2008, Dominic Watson wrote: I'm not up to speed with thread safeness so am not qualified to test it. Just generate a page with (say) 1000 IFRAME's on it, all pointing at your test case(s). -- Tom Chiverton This email

Re: XMLSearch not thread safe

2008-08-06 Thread Dominic Watson
Just generate a page with (say) 1000 IFRAME's on it, all pointing at your test case(s). Sounds like a site I'm working on ;) Will give it a go. I should probably read up on the topic and get a proper understanding... yeh. Dominic

Re: XMLSearch not thread safe

2008-08-06 Thread James Holmes
I'm attempting to produce a simple, definitive test case based on code we know to cause the problem. I'll post it when it's done. On Wed, Aug 6, 2008 at 9:42 PM, Tom Chiverton [EMAIL PROTECTED] wrote: On Wednesday 06 Aug 2008, James Holmes wrote: Does anyone know if this is fixed in CF8? If

Re: XMLSearch not thread safe

2008-08-06 Thread Brad Wood
to the xmlsearch lines of code. I could never figure it out-- but this may have very well been the problem. ~Brad - Original Message - From: James Holmes [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, August 06, 2008 1:22 AM Subject: XMLSearch not thread safe The CF7

Re: XMLSearch not thread safe

2008-08-06 Thread Brad Wood
.mydomain.com sub5.mydomain.com sub6.mydomain.com etc... ~Brad - Original Message - From: Dominic Watson [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, August 06, 2008 9:51 AM Subject: Re: XMLSearch not thread safe Just generate a page with (say) 1000 IFRAME's

Re: XMLSearch not thread safe

2008-08-06 Thread James Holmes
Was that in CF7 or 8? That's definitely the issue we and others see. On Thu, Aug 7, 2008 at 6:40 AM, Brad Wood wrote: This put a giant light bulb over my head. I worked on an app at my last job that would run concurrent xmlsearch's on a shared XML object in the application scope. It always

Re: XMLSearch not thread safe

2008-08-06 Thread Brad Wood
CF 7.0.2, Linux ~Brad - Original Message - From: James Holmes [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Wednesday, August 06, 2008 6:43 PM Subject: Re: XMLSearch not thread safe Was that in CF7 or 8? That's definitely the issue we and others see. On Thu, Aug 7