Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10 error #311

Closed
fpopineau opened this issue May 11, 2020 · 27 comments · Fixed by #321
Closed

Windows 10 error #311

fpopineau opened this issue May 11, 2020 · 27 comments · Fixed by #321

Comments

@fpopineau
Copy link

Hi,

Trying CCL and I get this weird error:

C:\Local\CCL\ccl-dev>wx86cl64.exe
unexpected TLS index value: wanted 16, got 17

I cannot run the binary.
This is with Microsoft Windows [version 10.0.19041.208]
Any idea what is going on here?
Thanks,

@phoe
Copy link
Contributor

phoe commented May 11, 2020

Which CCL version are you using?

@phoe
Copy link
Contributor

phoe commented May 11, 2020

Seems like a duplicate of #201

@fpopineau
Copy link
Author

fpopineau commented May 11, 2020

Yes, it seems a duplicate of #201
I am using the latest version of ccl 1.12: I cloned the git repo and used the binaries in
https://github.com/Clozure/ccl/releases/download/v1.12/windowsx86.zip
I can recompile the kernel, but neither the recompiled kernel nor the one downloaded can start.
I rebooted the computer in case some process was hanging around, but with no effect.

@phoe
Copy link
Contributor

phoe commented May 11, 2020

So the issue happens only after you recompile the kernel? Huh, interesting! Which toolchain did you use to do so?

@fpopineau
Copy link
Author

No, it happens whether I recompile the kernel or I use the one I can download. I am not able to launch any of them, and neither 1.11.5 nor 1.11.

@fpopineau
Copy link
Author

fpopineau commented May 13, 2020

More on this: it is perfectly possible that I allocate the needed TLS slots, only they are not contiguous. In my case, allocation start @ 14, but 16 is unavailable and so is 64. So I don't see an easy solution but rewrite the handling of these indexes with a level of indirection.

@Alkitor
Copy link

Alkitor commented May 14, 2020

It only happens on Windows 10 version 2004, version 1909 dosen't have this problem.

@fpopineau
Copy link
Author

fpopineau commented May 14, 2020 via email

@xrme
Copy link
Member

xrme commented May 14, 2020

The commit message for a079670 explains the strategy of using the slots in TEB block.

But, on 64-bit Windows, we dedicate a GPR as the TCR pointer, so I don't see why it would be necessary to reserve any TEB slots there.

A simple test would be to comment out the call to reserve_tls_slots() in lisp-kernel/pmcl-kernel.c and rebuild the lisp kernel and see if it works. (See https://github.com/Clozure/ccl/blob/master/lisp-kernel/pmcl-kernel.c#L1905)

@fpopineau
Copy link
Author

fpopineau commented May 14, 2020 via email

@astrangeguy
Copy link
Contributor

It seems to be an overly strict check fort continuous TLS indices. CCL seems to require 30-63 to be continuous, but the reserve_tls_slots() also checks if those below are reservable in one continuous block. Totally unnecessary since they get freed afterwards.

@gitthail
Copy link

I have this issue. Any help?

@astrangeguy
Copy link
Contributor

You have to build from scratch for now unfortunately...

@xrme Is it possible to release an official 1.12-r1 build for windows, with just this issue fixed?

@gitthail
Copy link

gitthail commented Oct 30, 2020 via email

@phoe
Copy link
Contributor

phoe commented Dec 22, 2020

Seconding an official 1.12-r1 build for Windows because of #353. @xrme Is it possible for you to perform it? Can I anyhow help with this process?

@ijah4
Copy link

ijah4 commented Jan 21, 2021

Expecting the official release. ccl can't work on the windows 10 20H2. Unfortunately i use ccl on some projects.

@ms4720
Copy link

ms4720 commented Feb 15, 2021

Is there an update on 1.12.1 or how to get the fix deployed? I installed it from scoop on windows and it just dies. this is almost a year old and if rebuilding from source works it would be nice if the project did it once for everyone

@astrangeguy
Copy link
Contributor

Not a clozure dev, but this is the build I use at work.
If you want to do a full rebuild yourself then copy the kernels and images to a new checkout, run it in a cygwin environment with mingw build-tools installed and do a (ccl:rebuild-ccl :full t)

https://github.com/astrangeguy/ccl/releases/tag/1.12

@ms4720
Copy link

ms4720 commented Mar 23, 2021

I don't want to do a full rebuild, I want a working build so the scoop ccl maintainer has a reason to update the package to something that works. I do not want to manage one-offs on my laptop when a customer is not paying me to do so. I would like the maintainers to maintain the project. This is a hard fail bug, ccl does not start.

@Symbolics
Copy link

+1 for this issue. It's been going on nearly year and I've stopped testing CCL builds because of it. Ironic because for many years CCL was the 'go-to' implementation on Windows.

@xrme
Copy link
Member

xrme commented May 21, 2021

I know this issue has lingered for far too long, but I'll find time to make a release (or at the very least provide updated Windows binaries) this weekend.

@ms4720
Copy link

ms4720 commented May 21, 2021

Thank you

@xrme
Copy link
Member

xrme commented May 24, 2021

@ms4720
Copy link

ms4720 commented May 26, 2021

Scoop installed it and (+ 1 1 ) gave me 2

Thanks for fixing this

@ElwinLuo
Copy link

ElwinLuo commented Aug 4, 2021

Thanks for fixing this.

xrme added a commit that referenced this issue Sep 28, 2021
make reserve_tls_slots() more lenient (fixes #311)
@fedandr
Copy link

fedandr commented Nov 6, 2021

Thanks a lot for fixing this.

@xrme
Copy link
Member

xrme commented Aug 11, 2023

But, on 64-bit Windows, we dedicate a GPR as the TCR pointer, so I don't see why it would be necessary to reserve any TEB slots there.

As of fa2bbe8, we don't bother to reserve (uselessly) TEB slots on 64-bit Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.