Threading issue: the thread scope cannot be modified from outside the owner thread

Description

I have no problem with this code:

But if I move the first line in the thread

I receive this error:

"ERROR","cfthread-0","06/22/2017","09:06:59","","cfthread-0;the thread scope cannot be modified from outside the owner thread;lucee.runtime.exp.ApplicationException: the thread scope cannot be modified from outside the owner thread
at lucee.runtime.thread.ThreadsImpl.errorOutside(ThreadsImpl.java:403)
at lucee.runtime.thread.ThreadsImpl.set(ThreadsImpl.java:274)
at lucee.runtime.type.util.StructSupport.set(StructSupport.java:249)
at lucee.runtime.util.VariableUtilImpl.set(VariableUtilImpl.java:407)
at lucee.runtime.PageContextImpl.set(PageContextImpl.java:1414)
at core.search.searchgateway_cfc$cf.threadCall(/contenscms/core/search/searchgateway.cfc:99)

My workaround was to move stResult as key of searchArgs.

Maybe the issue was introduced with this changeset?
https://github.com/lucee/Lucee/commit/f22a0573df89fe08ac0c97f869fc2aadcfac20a6

Environment

All

Activity

Show:
Lyle Karstensen
October 19, 2020, 8:48 PM

Thanks Zac. I have not reported any of the issues in the past. I will double check everything and report back if there is an issue still

Lyle Karstensen
October 21, 2020, 3:33 AM

The link below is the dump saying <cfset thread.actionsevents = ''> is modifying the thread scope outside the thread which it is obviously not.

https://cdn.bkat.io/temp-30/errorlog/FA4E5972-121C-4776-9EF084521EBBBC8D.html

Version Lucee 5.3.7.43
Version Name Gelert
Release date Oct 19, 2020
Remote IP 0:0:0:0:0:0:0:1
Servlet Container Apache Tomcat/9.0.0.M21
Java 1.8.0_191 (Oracle Corporation) 64bit
Host Name localhost
OS Windows Server 2012 R2 (6.3) 64bit
Architecture 64bit
Inspect Templates (CFM/CFC) Once ( Good )
Key case Convert to upper case (CFML Default)
Null Support Partial Support (CFML Default)
Local scope mode Classic (CFML Default)

Zac Spitzer
October 21, 2020, 4:10 AM
Edited

ok, can we move this discussion to a new issue and link it back?

also it really helps to strip back the test case to the bare minimum required… no need for all that sql

We need something which we can run to reproduce

Lyle Karstensen
October 21, 2020, 5:25 AM

I gave you the full code so it you could see everything it is doing. This is seriously causing me major issues everywhere I am using threads it looks like. I am getting this error all over my thread.log.

 

Wherever you want to move this is fine, I only posted here because it was something someone else had an issue with and it is marked as fixed yet I am still seeing it all over the place.

Zac Spitzer
October 21, 2020, 6:22 AM

but your example is currently useless, as nobody else can run it

I tried reducing your code down to just this, but it works

With Lucee and jira, once a bug is marked deployed, you should always create a new one and link back

please file a new bug, with a reduced test case. happy to help

Fixed

Assignee

Michael Offner

Reporter

Harry Klein

Priority

Blocker

Fix versions

Sprint

None

Affects versions

Configure