• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

components on multithreaded/hyperthreaded servers

New Here ,
Dec 29, 2006 Dec 29, 2006

Copy link to clipboard

Copied

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!
TOPICS
Advanced techniques

Views

255

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2007 Jan 02, 2007

Copy link to clipboard

Copied

Sorry for the bump but this one was over holidays and there weren't too many people logged in 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 02, 2007 Jan 02, 2007

Copy link to clipboard

Copied

> - MX 6.1 is subjected to this issue, where tests on the same machine with 7.02
> work fine.

I suspect you've answered your own question. There was a bug in 6.1 that
was fixed in 7. So the remedy for you would be to upgrade to 7.

Not sure what else needs commenting on..?

Good troubleshooting, btw!

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2007 Jan 02, 2007

Copy link to clipboard

Copied

Well this doesnt help the problem since we have many clients who are on 6.1 and of course a CF7 upgrade is not free 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 02, 2007 Jan 02, 2007

Copy link to clipboard

Copied

LATEST
> Well this doesnt help the problem since we have many clients who are on 6.1 and of course a CF7 upgrade is not free :)

Why don't you check which JVM CFMX7 uses - I presume it's a newer one than
CFMX6.1 - and use that instead? I doubt it's actually anything to do with
CF, per se, as CF does not work @ the level that issues like hyperthreading
running/not running would be an issue.

--
Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation