Opened 9 years ago

Last modified 4 years ago

#1022 assigned defect

CCL does not start on win7 (32bit)

Reported by: KurtR Owned by: gb
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: TLS Cc: mtstickney@…


Since some windows updates on our site, ccl does not start anymore on windows7 32 bit.

If I start ccl inside a dos shell: wx86cl.exe

I get the following error message immediately.

Can't allocate required TLS indexes. First available index value was 32

Using the latest version of ccl from svn gives me the same error. We can reproduce this error on all win32 machines we can access.

I attached a list of windows updates installed on my pc since Sept 19. I know that I used CCL successfully that day the last time on windows. (win-patches.txt)

I leave the priority to normal, althought this is really a kind of blocker on win32.

Attachments (1)

win-patches.txt (7.1 KB) - added by KurtR 9 years ago.
list of installed windows 7 patches.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by KurtR

list of installed windows 7 patches.

comment:1 Changed 9 years ago by gb

  • Owner set to gb
  • Status changed from new to assigned

I can't reproduce this on a 32-bit "Windows 7 Home Premium" system with all updates installed as of today.

The only entry in your "win-patches.txt" file that I don't have installed is "Security Update for Microsoft Office 2010 (KB2597986) 32-Bit Edition"; I don't have any MS Office products installed on that machine.

Is MS Office (and this update) installed on all of your affected machines ? If so, does (temporarily, experimentally) uninstalling that update affect the problem ? (The security update is supposed to address an obscure but potentially serious problem, so if uninstalling that update allows CCL to start normally that may or may not be an acceptable workaround.)

Whether this update is involved in the problem or not, a more robust fix would likely take a while. "TLS (thread-local storage) indices" are small integers used to identify tread-specific values; TLS indices 0 to 63 can be used to index into a thread-local vector (and are therefore a bit more efficient to access than larger TLS indices - which are effectively keys in a thread-local alist - are.) CCL needs to quickly access a few dozen thread-local values and doesn't have a good place to keep them on Win32, so it basically tries to allocate TLS indices 30 thru 63 early in its startup code. This can only work if those indices haven't already been allocated (by shared library startup code), and the error that you're getting is saying that that's what's happened (the first available index is 32, so indices 30 and 31 aren't available.)

On my Win32 system, the first available TLS index is 20, and it's been "approximately 20" for at least the last few years. There's never been any guarantee that this wouldn't be affected by a system update of some sort, and it seems that that's what happened to you. At this point, it's not yet clear what a good longer-term fix would be but it's fairly clear that one will be needed soon.

comment:2 Changed 9 years ago by gb

FWIW, I installed a demo copy of Office 2010 and all of the updates currently available for it. CCL started up normally.

I don't have a good guess as to what is triggering the problem.

comment:3 Changed 9 years ago by gb

  • Component changed from Compiler to Runtime (threads, GC)

comment:4 Changed 9 years ago by KurtR

Hmm, I did not include several office 2010 and viso 2010 patches, because I did not think that these could be relvant. (I can submit a complete list tomorrow ...) I am not sure, if a can uninstall any of these patches, because all machines are managed through the internal it-department, but I can check this also.

Is the anything else I can provide? Is there any change to find out which program uses TLS entries 30 and 31 ?

comment:5 Changed 6 years ago by johnfredcee

The same happens for me on Windows 10. The one program I have installed that I know for sure does consume TLS indexes is Microsoft SQL server which comes with Visual Studio 2015 Community Edition.

comment:6 Changed 6 years ago by gb

FWIW, I tried CCL 1.10 on a vanilla Windows 10 system and did not get this error.

comment:7 Changed 5 years ago by rme

  • Milestone Clozure CL 1.9 deleted

Milestone Clozure CL 1.9 deleted

comment:8 Changed 4 years ago by mstickney

  • Cc mtstickney@… added

I've had this happen today with 1.11 on a Windows Server 2012 R2 machine. Curiously, I noticed that the error depends on the location of the image being run: if I run it out of a folder in Program Files, I get the TLS index allocation error, but if I copy it to my desktop it runs without a hitch.

My guess is this has something to do with inherited file permissions, but I'm not sure what. Running as an administrator didn't seem to make any difference, just the folder location.

Note: See TracTickets for help on using tickets.