Hi all,
Despite my research on the net I have not even seen this
issue posted.
We create packaged software and have a good number of clients
in varying server environments with varying versions of ColdFusion.
In our latest version of our software we have finally got around to
using components. I am quite familiar with them and have used them
extensively on other projects so I am certain that I am not
misusing them in any way.
The basic summary of the problem is this:
I have a webpage using frames. When the page is refreshed
each frame makes a concurrent request. I am using components to
handle security on various items on each page. The component loops
through a query that exists in the application scope using
<cfloop query="application.somestructure.qryRS">. Nothing out
of the ordinary. Within the query i check to see if an ID matches
an ID passed into the component function. If it is found, the
component returns a true value. Now, this had worked perfectly in
all our test environments until it got to a client using MX 6.1 on
a hyper threading server. When they refreshed a page only certain
items (subjected to the security component) would be displayed or
hidden (security says that user does not have access) in completely
random order. On debugging we notice that the comparison between
the id that is passed into the component that is being compared to
the id in the query we are looping through never is found. When we
do a dump the query is in tact, as well as the correct variable was
passed in. It is as if the loop is being reindexed in the
background by the other component call?
Proven facts:
- Hyperthreading is the cause. We can turn hyperthreading off
and it will work fine
- MX 6.1 is subjected to this issue, where tests on the same
machine with 7.02 work fine.
- YES i 'var' my variables so they are unique to each
function in a component.
- I do NOT have locks on my application variables. They are
read only and write-once (once when the application scope is
created) therefore there should be no need for read-only locking
- If i put an empty loop to offset the one frames, say 150k
iterations to delay the component calls in one frame, it works
fine. This seems to only be an issue if both pages call the
component at the same time.
- The frames are calling two different components but in the
same .cfc file. We have tried making seperate .cfcs for each
function but this still does not work.
The only thing i can think of is that there is some inherent
undocumented bug in MX6 that has some sort of problem where
components lose scope (application scoper or variables scope?) when
run concurrently.
Has anyone EVER encountered something like this? I've been a
CF developer for 6 years and have never come across something this
obscure. Any help/suggestions would be greatly appreciated!!!
Thanks in advance!