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

[Blocking] [ci] CI for R freeze #3280

Closed
guolinke opened this issue Aug 6, 2020 · 22 comments
Closed

[Blocking] [ci] CI for R freeze #3280

guolinke opened this issue Aug 6, 2020 · 22 comments

Comments

@guolinke
Copy link
Collaborator

guolinke commented Aug 6, 2020

refer to https://github.com/microsoft/LightGBM/runs/955837580
It seems the installation of Rtools (with R 4.0) freezes.
ping @jameslamb

@jameslamb
Copy link
Collaborator

Ok I can look in 10 minutes

@jameslamb
Copy link
Collaborator

ok looking right now

@jameslamb
Copy link
Collaborator

I'm going to push changes to #3277 to test, since that is a small R change that was already approved.

@jameslamb
Copy link
Collaborator

jameslamb commented Aug 7, 2020

😕 I tried removing /VERYSILENT so we could get more logs installing Rtools, but no luck. I don't see any other configuration options that can help here.

https://github.com/microsoft/LightGBM/pull/3277/checks?check_run_id=956113469

Telling R to use MinGW
Downloading R and Rtools
Downloading https://cloud.r-project.org/bin/windows/base/old/3.6.3/R-3.6.3-win.exe
Downloading https://cloud.r-project.org/bin/windows/Rtools/Rtools35.exe
Installing R
Done installing R
Installing Rtools
##[error]The operation was canceled.

Those logs tell us that:

  • R was found and could be downloaded
  • Rtools was found and could be downloaded
  • installation of R succeeds
  • installation of Rtools times out

Since there has not been an Rtools release since June 22, and since we're seeing this issue even on Rtools35, I have these theories:

  1. Some service Rtools relies on (like a CTAN mirror or a package server for pacman) is down
  2. some subtle networking thing has changed in Azure that is blocking traffic to some place Rtools wants to hit

I just looked on the pacman mirrors and I see a LOT of errors recently!!!

image

and other mirrors not reporting errors are way out of sync

image

Given this, @guolinke I think you should use your administrator privileges to merge #3071 . We don't know how long it will take for this to be resolved, and it shouldn't hold up releases for all the other non-R components any longer.

@guolinke
Copy link
Collaborator Author

guolinke commented Aug 7, 2020

@jameslamb thank you so much.
No problem, I will merge it first.

@jameslamb
Copy link
Collaborator

I just checked and the pacman repos still seem to be down. I hope it's resolved soon.

@jameslamb
Copy link
Collaborator

I have been trying with #3277 and I still see this issue :/

This is difficult because even after removing the /VERYSILENT, we're still not getting any logs. Going to pull out my Windows laptop and try running this code there.

It seems that a lot of the pacman mirrors are working now...maybe that was never the issue to begin with, I don't know. Maybe something in Rtools is asking for a user input and hung waiting on it.

@jameslamb
Copy link
Collaborator

Ok making progress!!! Now I think that the pacman thing was completely unrelated.

I found that the download code we've been using to get Rtools is returning a successful status, but not actually downloading anything!!!

image

and then if you run the code to install Rtools and the file doesn't exist, you get a dialog box that has to be confirmed in a GUI. That is why it's hanging in CI!!

image

I'm investigating how to fix this. Maybe the download link from CRAN is now redirecting and the powershell code in test_r_package_windows.ps1 isn't following that?

@jameslamb
Copy link
Collaborator

hmmmm doesn't seem like it's a redirect.

image

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Aug 8, 2020

According to your screenshots you are downloading from cran.r-project.org, but our CI tries to download from cloud.r-project.org. Maybe this matters...

Download-File-With-Retries -url "https://cloud.r-project.org/bin/windows/base/old/$env:R_WINDOWS_VERSION/R-$env:R_WINDOWS_VERSION-win.exe" -destfile "R-win.exe"
Download-File-With-Retries -url "https://cloud.r-project.org/bin/windows/Rtools/$env:RTOOLS_EXE_FILE" -destfile "Rtools.exe"

On my local machine CI code works fine and downloads both R and Rtools sucessfully.

@jameslamb
Copy link
Collaborator

😱 😱 😱 😱 😱

@jameslamb
Copy link
Collaborator

when I change to cloud, it still does not download a file on my laptop

image

@jameslamb
Copy link
Collaborator

when I switch to Invoke-WebRequest with the same URL, a file is downloaded!

image

I'm so confused 😕

@jameslamb
Copy link
Collaborator

I just switched to Invoke-WebRequest on #3277 and R Windows jobs for R 3.6 are now passing, but the ones for R 4.0 are still pending after 25 minutes :/

This is tough because you cannot (as far as I know) pin to one distribution of Rtools as long as it is not "frozen" (https://cran.r-project.org/bin/windows/Rtools/history.html).

image

So the Rtools.exe you get today might not be the one you get from the same link tomorrow.

@jameslamb
Copy link
Collaborator

I just pushed a commit to #3277 that switches from cloud. links to cran. links for R and Rtools. I also added an ls after the downloads, so we can see in the logs if the files were downloaded and that that was the issue.

@jameslamb
Copy link
Collaborator

ok from the logs on #3277, it seems that the files ARE getting downloaded successfully.

So something else is failing for Rtools 4.0 specifically :/

image

My guesses now are:

  1. some package manager (pacman or something else) used in the install process is not responding
  2. some weird networking issue with Azure that is preventing Rtools from completing some request
  3. something in Rtools is popping up a user dialogue and hangs forever waiting for it to be answered

When I run this on my laptop

Start-Process -FilePath C:\Users\James\repos\sandbox\Rtools.exe -NoNewWindow -Wait -ArgumentList "/DIR=C:\Users\James\repos\sandbox"

A dialogue box pops up

image

@jameslamb
Copy link
Collaborator

oh I forgot to add /VERYSILENT above. When I do that

Start-Process -FilePath C:\Users\James\repos\sandbox\Rtools.exe -NoNewWindow -Wait -ArgumentList "/VERYSILENT /DIR=C:\Users\James\repos\sandbox\rtools"

the process just hangs forever :/

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Aug 8, 2020

Can you please try to duplicate (escape) \ signs in DIR argument and add SUPPRESSMSGBOXES argument?

https://github.com/r-lib/actions/blob/32bf69a8dfce4486d4f2221a3a6ea9b1dd75eadb/setup-r/lib/installer.js#L270-L272

UPD: OK, according to the screenshot DIR is set correctly.

@jameslamb
Copy link
Collaborator

oooo sure!

I also just found that I can stop the "hangs forever" problem locally by changing the command to this:

 C:\Users\James\repos\sandbox\Rtools.exe /VERYSILENT /DIR=C:\users\James\repos\sandbox\rtools

So maybe something about the new Rtools does not work well with Start-Process on some versions of PowerShell?

@jameslamb
Copy link
Collaborator

hey maybe that is working?

Here is one of the R 4.0 jobs getting past Rtools (https://github.com/microsoft/LightGBM/pull/3277/checks?check_run_id=962455060)

image

I need to step away for a few hours, but hopefully that was it and the build on #3277 will work. @StrikerRUS please feel free to push to that PR if you want, I know that this issue is blocking everything right now. I'll be back on in about 3 hours to try other things.

@jameslamb jameslamb changed the title [Blocking] CI for R freeze [Blocking] [ci] CI for R freeze Aug 10, 2020
@jameslamb
Copy link
Collaborator

this was fixed by #3277

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot removed the blocking label Aug 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants