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

timer_create not implemented! #307

Closed
MadcowD opened this Issue May 1, 2016 · 75 comments

Comments

Projects
None yet
@MadcowD
Copy link

MadcowD commented May 1, 2016

After installing pandoc using apt-get, I get the following error on build 14332:
pandoc: timer_create: Function not implemented.

Clearly this function is not implemented on the os-level. See http://man7.org/linux/man-pages/man2/timer_create.2.html

Thanks,

@fredzannarbor

This comment has been minimized.

Copy link

fredzannarbor commented May 2, 2016

I have this issue too and it is on my critical path.

@stehufntdev

This comment has been minimized.

Copy link
Collaborator

stehufntdev commented May 2, 2016

Thanks for reporting the issue, I confirmed WSL currently does not have time_create implemented. Can you please add it to our UserVoice page so we can prioritize?

@sunilmut

This comment has been minimized.

Copy link
Member

sunilmut commented May 5, 2016

Just FYI that you can also view the list of implemented syscalls in the "Release Notes" under the "Syscall" support section.

@fredzannarbor

This comment has been minimized.

Copy link

fredzannarbor commented May 5, 2016

Got it. As an FYI apparently this syscall is required for all Haskell
binaries.

Open source
https://github.com/fredzannarbor/pagekicker-community/wiki

On Wed, May 4, 2016 at 8:26 PM, Sunil Muthuswamy notifications@github.com
wrote:

Just FYI that you can also view the list of implemented syscalls in the "Release
Notes" https://msdn.microsoft.com/en-us/commandline/wsl/release_notes
under the "Syscall" support section.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#307 (comment)

@Eduardogbg

This comment has been minimized.

Copy link

Eduardogbg commented May 12, 2016

I'm having this problem too and need to run GHC and Cabal on Linux (they need the timer_create() syscall) . Besides installing Linux (VM, dualboot etc) how can I do this? Is there any way of implementing it myself or is it unfeasable?

@oscarvarto

This comment has been minimized.

Copy link

oscarvarto commented May 25, 2016

I am also hit by this issue :(
Haskell Stack fails with this error:

$ stack
stack: timer_create: Function not implemented

@benhillis benhillis added the backlog label May 27, 2016

@yarikoptic

This comment has been minimized.

Copy link

yarikoptic commented Jun 13, 2016

Also hit this issue while trying to use git-annex (written in Haskell as well)

@sp4ghet

This comment has been minimized.

Copy link

sp4ghet commented Jun 24, 2016

Also got this using elm-lang (the compiler is written in haskell)

@fredzannarbor

This comment has been minimized.

Copy link

fredzannarbor commented Jun 24, 2016

Does anyone know why Haskell needs this timer_create function and other
languages don't necessarily?

Open source:
https://github.com/fredzannarbor/pagekicker-community/wiki
iOS : https://itunes.apple.com/us/app/pagekicker/id1079882706?ls=1&mt=8
Android:
https://play.google.com/store/apps/details?id=com.pagekicker.www&hl=en
Enterprise: https://www.PageKicker.com

On Fri, Jun 24, 2016 at 3:08 PM, Rikuo Hasegawa notifications@github.com
wrote:

Also got this using elm-lang (the compiler is written in haskell)


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#307 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABHJyyPdGjAkJPQAcVXLyWpjLuHxy6YUks5qPCsugaJpZM4IThCC
.

@jdriordan

This comment has been minimized.

Copy link

jdriordan commented Jun 27, 2016

It may be that it doesn't necessarily need it. See: https://mail.haskell.org/pipermail/beginners/2009-June/001817.html

It may be that compiling with -threaded is a workaround, although I haven't tried it.

@michallepicki

This comment has been minimized.

Copy link

michallepicki commented Jun 27, 2016

  1. Users should not be forced to recompile from source every haskell program with special compiler settings.
  2. Users should be able to use closed-source haskell programs.
@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Jun 27, 2016

@jdriordan thank you for suggesting a workaround. @michallepicki agreed on both points. The timer_create system call is on our backlog and we plan to implement it.

@nh2

This comment has been minimized.

Copy link

nh2 commented Jul 4, 2016

Does anyone know why Haskell needs this timer_create function and other languages don't necessarily?

@fredzannarbor The GHC Haskell runtime supports preemtive scheduling of cooperative threads ("green threads"). In non-preemtive cooperative threading, threads yield to each other. However, when a thread goes into a syscall, it no longer has the control to yield. The only way to wake up from a syscall (and thus to decide wether another thread should be scheduled, inside the runtime, and thus to get preemtive scheduling), is to send a signal to the process that's blocked in the syscall; then the syscall gets interrupted with EINTR and the runtime can do its scheduling decision, and then resume the syscall if needed.

This signal sending is done by setting up a periodic "timer signal" that sends SIGALRM to the process every 10 ms (by default). My guess is that that's done using timer_create.

You may try running the Haskell program with +RTS -V0 to disable the timer signal. See https://downloads.haskell.org/~ghc/7.10.3/docs/html/users_guide/runtime-control.html#rts-options-misc
But not sure if that's going to solve it, as there may be other things that need timer_create.

@profix898

This comment has been minimized.

Copy link

profix898 commented Jul 21, 2016

Same problem here. Is there a UserVoice page (as suggested by @stehufntdev) to vote for priority?

@aseering

This comment has been minimized.

@i2000s

This comment has been minimized.

Copy link

i2000s commented Aug 3, 2016

I encountered this problem when I tried to use pandoc in Bash. I guess since pandoc is written in Haskell, it should be a haskell-implementation problem. Any updates?

@stehufntdev

This comment has been minimized.

Copy link
Collaborator

stehufntdev commented Aug 3, 2016

Thanks for trying out WSL. The timer_create system call is on our backlog and we plan to implement it. We've been prioritizing our work based on the user voice page so please vote there: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13572504-add-support-for-timer-create.

@Qinka

This comment has been minimized.

Copy link

Qinka commented Aug 5, 2016

so dose ghc

@EricGT

This comment has been minimized.

Copy link

EricGT commented Aug 11, 2016

Same problem with Agda.

Details

Using Windows command prompt

lxrun /uninstall /full
bash

then using WSL

sudo apt-get update
sudo apt-get upgrade
sudo rm /etc/hosts
exit

and then restarting WSL to build new /etc/hosts.

When installing Agda

sudo apt-get install agda

Error:

Setting up ghc (7.6.3-10) ...
ghc: timer_create: Function not implemented

Build version obtained using command prompt: Microsoft Windows [Version 10.0.14393]

@octetta

This comment has been minimized.

Copy link

octetta commented Aug 13, 2016

For those of you here because of the timer_create error when running pandoc, I've worked around this by setting the following alias:

alias pandoc='pandoc +RTS -V0 -RTS`

or by using an environment variable:

export GHCRTS=-V0

One note/warning: I've only tested this with the HTML and PDF generation options of pandoc.

(thanks to @nh2 for the clues...)

@michaelkpate

This comment has been minimized.

Copy link

michaelkpate commented Aug 13, 2016

Just to add in - just installed Pandoc and googled this when I tried to run it.

@i2000s

This comment has been minimized.

Copy link

i2000s commented Aug 13, 2016

@octetta I think the trick was to turn off the timer_create (maybe not?), but do you know if there is a better way to make it work for the Pandoc markdown in Jekyll? Your trick doesn't work in Jekyll. I have tried using export GHCRTS=-V0 to turn the timer off, but still got an error

jekyll 3.1.6 | Error: pandoc: Error running filter pandoc-citeproc 
pandoc-citeproc not found in path

But if I run echo $PATH, the pandoc-citeproc installation path is definitely on the list. Everything works in a real Ubuntu system, but not in WSL.

@octetta

This comment has been minimized.

Copy link

octetta commented Aug 13, 2016

@i2000s, I've never used pandoc-citeproc before, but I just apt-get'ed it and when I ran it with either the export or by putting the options on the command-line, I see this message:

pandoc-citeproc: Most RTS options are disabled. Link with -rtsopts to enable them.

...this leads me to believe that pandoc-citeproc truly requires the pre-emptive thread capability that timer_create is being use for in the Haskell run-time.

Without looking at pandoc or Haskell run-time code, I suspect you're stuck until the WSL team adds this syscall.

BTW, I think Jekyll (or pandoc?) isn't properly interpreting the return code from when it tries to run pandoc-citeproc giving you a false error about the program not being in the path.

@i2000s

This comment has been minimized.

Copy link

i2000s commented Aug 13, 2016

@octetta Thank you for the comment. I agree with you, there are some fishy connections between packages and implementing timer_create would be the ultimate fix in WSL. Current workarounds as we have pointed out only work for cases where timer_create is not really needed.

@EricGT

This comment has been minimized.

Copy link

EricGT commented Aug 14, 2016

Same problem (ghc-pkg: timer_create: Function not implemented) with The Maude System

sudo apt-get install maude

Currently there are three programming languages (GHC, Agda, Maude) that I would like to use with WSL that can be resolved with the one issue. The plus side about this is that Agda and Maude are using GHC so fixing it for GHC should hopefully resolve the same problem with Agda and Madue without any extra work. :-)

@nh2

This comment has been minimized.

Copy link

nh2 commented Aug 15, 2016

this leads me to believe that pandoc-citeproc truly requires the pre-emptive thread capability that timer_create is being use for in the Haskell run-time

@octetta I doubt it, I don't see a reason why pandoc-citeproc would require preemtive threading in order to function. More likely it was simply not built with the -rtsopts option, so that you can't override them, and if you built pandoc-citeproc yourself and used -rtsopts during compilation (or petitioned the maintainer to have that happen by default), it would probably work.

BTW, I think Jekyll (or pandoc?) isn't properly interpreting the return code from when it tries to run pandoc-citeproc giving you a false error about the program not being in the path.

That sounds like a but that should be reported.

@pletnes

This comment has been minimized.

Copy link

pletnes commented Nov 15, 2016

I need this too, just to add to the choir.

@shockkolate

This comment has been minimized.

Copy link

shockkolate commented Nov 15, 2016

I'm looking forward to this release coming to the non-insider build as I'd really like to do some Haskell development in the Ubuntu environment.

@lilred

This comment has been minimized.

Copy link

lilred commented Nov 24, 2016

Has this shipped to insiders yet? I'm wondering when we're going to have a build number.

@Weznon

This comment has been minimized.

Copy link

Weznon commented Dec 6, 2016

Has a fix for this been released yet?

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Dec 6, 2016

This change will be in the next Windows Insider fast build which will be released soon.

@russalex russalex added fixed and removed fixinbound labels Dec 8, 2016

@russalex

This comment has been minimized.

Copy link
Contributor

russalex commented Dec 8, 2016

This should be fixed on build 14986 out today.

14986 Release Notes

@jmchapman

This comment has been minimized.

Copy link

jmchapman commented Dec 10, 2016

very happy to be able to install haskell-platform and then agda!

@jgrosso

This comment has been minimized.

Copy link

jgrosso commented Dec 11, 2016

The Linux subsystem now passes the one test that I care about 😉

@i2000s

This comment has been minimized.

Copy link

i2000s commented Dec 12, 2016

I believe I have the latest version of the Windows 10 Insider installed. But still got some errors while building a Jekyll website which builds fine on a real Ubuntu OS. The time_creater error didn't show up at my first glance, but I got

Conversion error: Jekyll::Converters::Markdown encountered an error while converting '_post/***.md':
Broken pipe

after running the command bundle exec jekyll build.
Since it's a markdown problem, I thought it should be related to the Pandoc I was using. So, I type

$ pandoc --version
pandoc: timer_create: Function not implemented

Clearly, I have pandoc 1.16 installed with sudo apt install pandoc earlier, but it's not working in building the jekyll site.

For duplicating this error, you can follow the steps illustrated in the README.md file under my repo here. I guess the time_create is still not fully implemented for the pandoc and jekyll-pandoc case.

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Dec 12, 2016

@i2000s - I suspect you do not have the newest insider build. What is the output of the "ver" command?

@i2000s

This comment has been minimized.

Copy link

i2000s commented Dec 12, 2016

@benhillis You are absolutely right! Sorry, I was so excited to see an update coming to me. My last update didn't bring in the newest build to me. It was just an accumulated update. I double checked the version number, it's still on Build 14965.rs_prerelease.161104-1700 which was released on or before Nov 17th. The Windows Update button doesn't bring me anything, and the latest build is not on the Window preview build download page either. How can I test the latest build sooner than later? I prefer to finish the task during this weekend. Thanks.

@lilred

This comment has been minimized.

Copy link

lilred commented Dec 13, 2016

I switched to the fast ring for this, fingers crossed now...

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Dec 13, 2016

@i2000s - I think it takes about a day between switching Insider rings and being offered an update. I suspect it will be available for you if you check now.

@lilred - I hope this resolves the issues you were seeing. After implementing timer_create I was able to run a number of haskell binaries without issue. Please let me know.

@i2000s

This comment has been minimized.

Copy link

i2000s commented Dec 13, 2016

@benhillis I am always on the fast ring, but there is always a delay to me for some reason. The update has not come as I just checked. I have changed the register table a while ago and then changed it back. There was a parameter I reset to RS_PRERELEASE from RS1_PRERELEASE which I read from some online instruction in order to receive the updates in time. I am not sure this is related. Anyway, I will wait for the update to come.

@i2000s

This comment has been minimized.

Copy link

i2000s commented Dec 13, 2016

For those who still haven't received the Fast Ring update on the latest build 14986, I have tried changing the following reg keys and it's working:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate]
"SupportsUUP"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
\CurrentVersion\WindowsUpdate\Orchestrator]
"EnableUUPScan"=dword:00000000

Can anyone explain why is that? Anyway, I will report back regarding the time_create function once I finish everything at hand.

@Weznon

This comment has been minimized.

Copy link

Weznon commented Dec 13, 2016

Those registry keys control whether the update will be recieved as an esd file or the new UUP format, which was just added in this update. Maybe changing the keys caused the computer to look for an update again?

@lilred

This comment has been minimized.

Copy link

lilred commented Dec 14, 2016

Any more info on .esd and UUP?

@gzh

This comment has been minimized.

Copy link

gzh commented Dec 17, 2016

@benhillis Got Linux GHC working on Windows Insider Preview build 14986. Thank you guys!

@i2000s

This comment has been minimized.

Copy link

i2000s commented Dec 30, 2016

As promised earlier, I am reporting back regarding the pandoc issue in compiling a Jekyll site. It works now! Thanks for fixing the time_create function. I hope this can be delivered to normal Windows users soon. Happy New Year to everyone here!

PS: the 14986 is really unstable. I got a lot of BSOD--basically on every boot in VirtualBox--and make it hard to run bash until today by chance.

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Dec 30, 2016

@i2000s - Thank you very much for letting me know!  I'm glad I was able to make all you Haskell enthusiasts happy :)

The BSOD you mention is likely a TTY ioctl locking issue that we've fixed internally. If you have a dump please send it to secure@microsoft.com and I'll be happy to confirm.

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Jan 10, 2017

Closing this out since support for timer_create reached Insider builds in 14986.

@benhillis benhillis closed this Jan 10, 2017

@steveklabnik

This comment has been minimized.

Copy link

steveklabnik commented Jan 23, 2017

@benhillis just hit this today; when does an "insider build" reach the rest of us? (Sorry for my ignorance on the process here)

@lilred

This comment has been minimized.

Copy link

lilred commented Jan 23, 2017

@steveklabnik Windows 10 Creators Update, scheduled for April 2017.

@steveklabnik

This comment has been minimized.

Copy link

steveklabnik commented Jan 23, 2017

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment