Ticket #1022 (assigned defect)

Opened 19 months ago

Last modified 19 months ago

CCL does not start on win7 (32bit)

Reported by: KurtR Owned by: gb
Priority: normal Milestone: Clozure CL 1.9
Component: Runtime (threads, GC) Version: trunk
Keywords: TLS Cc:

Description

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

win-patches.txt Download (7.1 KB) - added by KurtR 19 months ago.
list of installed windows 7 patches.

Change History

Changed 19 months ago by KurtR

list of installed windows 7 patches.

comment:1 Changed 19 months 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 19 months 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 19 months ago by gb

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

comment:4 Changed 19 months 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 ?

Note: See TracTickets for help on using tickets.