can't building gerrit master

154 views
Skip to first unread message

Khai Do

unread,
Jun 22, 2016, 2:36:06 AM6/22/16
to Repo and Gerrit Discussion
Hello all, for some reason I can no longer build gerrit master branch.  The timer just counts indefinitely and it never finishes.  I am able to build stable-2.12 branch without problems.  I've tried running `buck clean` and even `rm -rf ~/.gerritcodereview` but my build of master just does the same thing.  Was wondering if anybody can help?  Thanks.

(master)~/temp/gerrit: buck -V
buck version e64a2e2ada022f81e42be750b774024469551398
(master)~/temp/gerrit: buck build gerrit
[-] PROCESSING BUCK FILES...FINISHED 2.0s [100%]
[+] DOWNLOADING... (0.00 B/S, TOTAL: 0.00 B, 0 Artifacts)
[+] BUILDING...911.7s [13%] (147/175 JOBS, 147 UPDATED, 1.1% CACHE MISS)
 |=> IDLE
 |=> //lib/js:webcomponentsjs__download_bower...  909.3s (running genrule[909.2s])
 |=> //lib/js:fetch__download_bower...  909.3s (running genrule[909.2s])
 |=> IDLE
^C
(master)~/temp/gerrit:



Luca Milanesio

unread,
Jun 22, 2016, 2:58:12 AM6/22/16
to Khai Do, Repo and Gerrit Discussion
have you tried executing in verbose mode?

buck build -v 3 gerrit

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zaro

unread,
Jun 22, 2016, 2:17:03 PM6/22/16
to repo-d...@googlegroups.com
Thanks Sasa. Looks like you are correct, `buck build chrome` worked
just fine. Build verbose doesn't seem to give me any further info on
the build that its stuck at. Here's the verbose build output...

(master)~/work-gerrit/gerrit: buck build -v 3 gerrit
[-] PARSING BUCK FILES...FINISHED 1.5s [100%]
BUILT //gerrit-util-ssl:ssl (1/749 JOBS)
BUILT //gerrit-antlr:query_parser (2/749 JOBS)
BUILT //lib/commons:oro (3/747 JOBS)
..
..
..
BUILT //lib/js:iron-meta__renamed (138/197 JOBS)
BUILT //lib:LICENSE-polymer (139/197 JOBS)
BUILT //gerrit-openid:openid (140/193 JOBS)
BUILT //gerrit-pgm:pgm (141/193 JOBS)
rm -r -f /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower/fetch__download_bower.zip
mkdir -p /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower
BUILT //lib/js:web-animations-js (142/193 JOBS)
rm -r -f /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower__tmp
&& mkdir -p /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower__tmp
rm -r -f /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower/webcomponentsjs__download_bower.zip
rm -r -f /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower__srcs
&& mkdir -p /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower__srcs
mkdir -p /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower
(cd /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower__srcs
&& OUT=/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/fetch__download_bower/fetch__download_bower.zip
/bin/bash -e -c 'true
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/LICENSE-fetch/LICENSE-fetch;
/usr/local/bin/python2
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/tools/js/download_bower.pex
-b "/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/tools/js/run_npm_binary.pex
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/bower/bo...@1.7.9.npm_binary.tgz"
-n fetch -p fetch -v 1.0.0 -s 1b05a2bb40c73232c2909dc196de7519fe4db7a9
-o $OUT')
rm -r -f /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower__tmp
&& mkdir -p /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower__tmp
rm -r -f /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower__srcs
&& mkdir -p /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower__srcs
(cd /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower__srcs
&& OUT=/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower/webcomponentsjs__download_bower.zip
/bin/bash -e -c 'true
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/LICENSE-polymer/LICENSE-polymer;
/usr/local/bin/python2
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/tools/js/download_bower.pex
-b "/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/tools/js/run_npm_binary.pex
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/bower/bo...@1.7.9.npm_binary.tgz"
-n webcomponentsjs -p webcomponentsjs -v 0.7.22 -s
8ba97a4a279ec6973a19b171c462a7b5cf454fb9 -o $OUT')
BUILT //gerrit-sshd:sshd (143/185 JOBS)
BUILT //gerrit-gwtui:ui_optdbg (144/175 JOBS)
BUILT //gerrit-war:init (145/174 JOBS)
BUILT //gerrit-server:server (146/174 JOBS)

It just hangs at this point.



On Wed, Jun 22, 2016 at 1:51 AM, Saša Živkov <ziv...@gmail.com> wrote:
> If this is what you see then it looks like it cannot download some bower
> components.
> Maybe it is just waiting indefinitely.
> As Luca suggested run it is verbose mode to see what is going on.
>
> You can also try building just the "old" UI and just for chrome:
> $ buck build chrome
>
> This should work as it doesn't need the bower components (which are only
> needed for the new polymer UI).

David Ostrovsky

unread,
Jun 23, 2016, 2:26:11 AM6/23/16
to Repo and Gerrit Discussion
On Wednesday, June 22, 2016 at 8:17:03 PM UTC+2, Khai Do wrote:
Thanks Sasa.  Looks like you are correct, `buck build chrome` worked
just fine.  Build verbose doesn't seem to give me any further info on
the build that its stuck at. Here's the verbose build output...


[...]
  
(cd /Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower__srcs
&& OUT=/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/webcomponentsjs__download_bower/webcomponentsjs__download_bower.zip
/bin/bash -e -c 'true
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/LICENSE-polymer/LICENSE-polymer;
/usr/local/bin/python2
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/tools/js/download_bower.pex
-b "/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/tools/js/run_npm_binary.pex
/Users/zaro0508/work-gerrit/gerrit/buck-out/gen/lib/js/bower/bo...@1.7.9.npm_binary.tgz"
-n webcomponentsjs -p webcomponentsjs -v 0.7.22 -s
8ba97a4a279ec6973a19b171c462a7b5cf454fb9 -o $OUT')

This seems to be the offending command. The toolchain involved here is:

Buck -> Pex -> Python -> nodejs

Buck is calling download_bower.py, that is calling run_npm_binary.py that is calling nodejs.
For some reasons one of the links in the chain above hang for you.

To isoalte the reason, we just take all unrealted stuff out of the picture: Buck, Pex and Python.

So I just patched download_bower.py, removed caching, moved some methods around
from util.py and added some verbose outputs: [1].

Now I can say this: [2], and getting this output: [3]. This should give you an idea how to proceed
from here: either you can reproduce the failure already now, or you can take download_bower.py
out of the picture and issue direct run_npm_bbinary.py: [4], replace PEX with Python, add verbose
outputs in run_npm_binary.py, etc.


Khai Do

unread,
Jun 23, 2016, 8:17:08 PM6/23/16
to Repo and Gerrit Discussion
Hi David, Followed your instructions, applied the patch, then ran the commands you suggested.  I didn't get any errors when I ran the commands individually however when I ran `buck build gerrit` again it continues to hang, http://paste.openstack.org/show/521764/  

Would appreciate any other suggestions to try. -Khai

David Ostrovsky

unread,
Jun 24, 2016, 12:22:32 AM6/24/16
to Repo and Gerrit Discussion
Hi Khai,


On Friday, June 24, 2016 at 2:17:08 AM UTC+2, Khai Do wrote:
Hi David, Followed your instructions, applied the patch, then ran the commands you suggested.  I didn't get any errors when I ran the commands individually however when I ran `buck build gerrit` again it continues to hang, http://paste.openstack.org/show/521764/  

Would appreciate any other suggestions to try. -Khai

What happens, when you issue these commands:

   $ buck build //lib/js:webcomponentsjs__download_bower
   $ buck build //lib/js:fetch__download_bower

In my case I'm getting this output: [1].

Khai Do

unread,
Jun 24, 2016, 1:21:10 AM6/24/16
to Repo and Gerrit Discussion
First command will just hang.  http://paste.openstack.org/show/521827/

Khai Do

unread,
Jun 24, 2016, 12:26:59 PM6/24/16
to Repo and Gerrit Discussion
More info here.  I got out my old MAC computer and noticed that I could build master no problems with this machine.  Now I'm thinking it's something to do with the environment on my new MAC machine however I still have not figured out why it's not working on this machine.  Here is a comparison between the two:  

Old mac (works): java 1.8.0_51-b16, python 2.7.5, node 4.1.1, npm 2.14.4, maven 3.3.3, buck e64a2e2ada022f81e42be750b774024469551398
new mach (not working): java 1.8.0_92, python 2.7.5, node 6.2.2, npm 3.9.5, maven 3.3.9, buck e64a2e2ada022f81e42be750b774024469551398

What is  `buck build //lib/js:webcomponentsjs__download_bower` doing?  It must be doing more than downloading bower components because I've installed bower manually on my new machine and can download those components without problems.  It only hangs when attempting to download with buck?

/tmp/npmtmp: bower install fetch
bower validate      1.0.0 against https://github.com/github/fetch.git#*
/tmp/npmtmp: bower install webcomponentsjs
bower validate      0.7.22 against https://github.com/Polymer/webcomponentsjs.git#*
bower install       webcomponentsjs#0.7.22

David Ostrovsky

unread,
Jul 3, 2016, 10:50:54 AM7/3/16
to Repo and Gerrit Discussion

On Friday, June 24, 2016 at 6:26:59 PM UTC+2, Khai Do wrote:
More info here.  I got out my old MAC computer and noticed that I could build master no problems with this machine.  Now I'm thinking it's something to do with the environment on my new MAC machine however I still have not figured out why it's not working on this machine.  Here is a comparison between the two:  

Old mac (works): java 1.8.0_51-b16, python 2.7.5, node 4.1.1, npm 2.14.4, maven 3.3.3, buck e64a2e2ada022f81e42be750b774024469551398
new mach (not working): java 1.8.0_92, python 2.7.5, node 6.2.2, npm 3.9.5, maven 3.3.9, buck e64a2e2ada022f81e42be750b774024469551398

What is  `buck build //lib/js:webcomponentsjs__download_bower` doing?

It is fetching and archiving web component as a zip, ignoring the dependencies.
The deps are managed manually. In addition, the zipped final artifacts are cached.
So I've instrumented the bower_component() rule in this diff: [1].

Now you can see that it's cached: [2]. Note, that it's not enough to just remove the cached
component, because after doing just this, the artifact is fetched form Buck's cache and nothing
happens: [3]. You would need to change the Python script download_bower.py, e.g. add some
white spaces, to avoid Buck's cache hit. Now you can see the whole truth: [4].

See, what is the last output for you with this patch; this shoud give us a hint what is going wrong
in your case.


Khai Do

unread,
Jul 4, 2016, 9:20:09 PM7/4/16
to Repo and Gerrit Discussion
Hi David,  I tried changing many things and was finally able to get passed this issue however it's definitely not fixed.   I did not use your patches to get this working because it wasn't providing more info than just using option '-v 3'.

This is my worked around.

1. I ran `buck build -v 3 //lib/js:webcomponentsjs__download_bower` then manually ctrl-C when it hung.  I then manually re-ran the last command to download webcomponentsjs which ran without problems (had to do the same for  'fetch__download_bower'). 

Just to note, previous attempts at run this last command would hang as well so I'm not sure why it works now and didn't work before. 

2. Once these dependencies were downloaded then `buck build -v 3 //lib/js:webcomponentsjs__download_bower` would not hang anymore.
3. At this point I am able to run `buck build gerrit` and `./tools/eclipse/project.py` without hangs.   

I did notice that if I `rm -rf ~/.gerritcodereview buck-out` then re-ran `buck build -v 3 //lib/js:webcomponentsjs__download_bower` then I am able to reproduce the hang once again.

My current environment: osx 10.11.5, java 1.8.0_92, python 2.7.11, node 4.1.1, npm 2.14.4, maven 3.3.9, buck e64a2e2ada022f81e42be750b774024469551398
 
-Khai

Khai Do

unread,
Jul 4, 2016, 9:59:45 PM7/4/16
to Repo and Gerrit Discussion

David Ostrovsky

unread,
Jul 5, 2016, 1:44:09 AM7/5/16
to Repo and Gerrit Discussion

On Tuesday, July 5, 2016 at 3:59:45 AM UTC+2, Khai Do wrote:

So, first time download_bower.pex invocation hangs. As I tried to explain,
buck -v 3 only tells you, that this one command hangs, but my verbose patch
traces the invocation of every single command from this script, so yes, this
should give us a hint where the problem is. Just reproduce the problem with
my last patch, and post here the traces.

Khai Do

unread,
Jul 5, 2016, 11:25:36 PM7/5/16
to Repo and Gerrit Discussion
Ok.  here's the output i get when using your change 79700 : http://paste.openstack.org/show/526249/

David Ostrovsky

unread,
Jul 5, 2016, 11:34:13 PM7/5/16
to Repo and Gerrit Discussion

On Wednesday, July 6, 2016 at 5:25:36 AM UTC+2, Khai Do wrote:
Ok.  here's the output i get when using your change 79700 : http://paste.openstack.org/show/526249/

 
Was [1] really applied? I don't see any verbose traces. This what I would expect to see: [2].
Can you also omit -v option?


Khai Do

unread,
Jul 5, 2016, 11:57:02 PM7/5/16
to Repo and Gerrit Discussion
Yes, I the change is applied however i'm not seeing the same thing:  http://paste.openstack.org/show/526251/
Reply all
Reply to author
Forward
0 new messages