Bug 64285

Summary: telepathy gabble 0.17.3 fails on parallel build
Product: Telepathy Reporter: Dominique Leuenberger <dominique-freedesktop.org>
Component: generalAssignee: Simon McVittie <smcv>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: xclaesse
Version: unspecified   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Attachments: Avoid having two of the same set of commands run in parallel
[Rakia] Avoid having two of the same set of commands run in parallel

Description Dominique Leuenberger 2013-05-06 17:49:49 UTC
While building telepathy-gabble 0.17.3, there is a good chance that parallel build fails, with:

[   64s] /usr/bin/python ../tools/xincludator.py \
[   64s] all.xml > _gen/all.xml.tmp && mv _gen/all.xml.tmp _gen/all.xml
[   64s] /usr/bin/python ../tools/c-constants-gen.py Gabble _gen/all.xml _gen/enums
[   64s] /usr/bin/python ../tools/c-constants-gen.py Gabble _gen/all.xml _gen/enums
[   64s] /usr/bin/python ../tools/glib-gtypes-generator.py \
[   64s] _gen/all.xml _gen/gtypes Gabble
[   64s] /usr/bin/python ../tools/glib-gtypes-generator.py \
[   64s] _gen/all.xml _gen/gtypes Gabble
[   64s] Traceback (most recent call last):
[   64s]   File "../tools/c-constants-gen.py", line 182, in <module>
[   64s]     Generator(argv[0], xml.dom.minidom.parse(argv[1]), argv[2])()
[   64s]   File "../tools/c-constants-gen.py", line 24, in __call__
[   64s]     file_set_contents(self.output_base + '.h', ''.join(self.__header))
[   64s]   File "/home/abuild/rpmbuild/BUILD/telepathy-gabble-0.17.3/tools/libtpcodegen.py", line 42, in file_set_contents
[   64s]     os.rename(filename + '.tmp', filename)
[   64s] OSError: [Errno 2] No such file or directory
[   64s] /usr/bin/python ../tools/glib-gtypes-generator.py \
[   64s] _gen/all.xml _gen/gtypes Gabble
[   64s] make[2]: *** [_gen/enums-gtk-doc.h] Error 1
[   64s] make[2]: *** Waiting for unfinished jobs....
[   64s] make[2]: Leaving directory `/home/abuild/rpmbuild/BUILD/telepathy-gabble-0.17.3/extensions'
[   64s] make[1]: *** [all-recursive] Error 1
[   64s] make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/telepathy-gabble-0.17.3'
[   64s] make: *** [all] Error 2
[   64s] error: Bad exit status from /var/tmp/rpm-tmp.Y0g1MJ (%build)
[   64s] 

using "make -j 1" works around this issue
Comment 2 Simon McVittie 2013-06-03 11:58:09 UTC
Created attachment 80222 [details] [review]
Avoid having two of the same set of commands run in  parallel

A rule like this:

    _gen/x.c _gen/x.h: prerequisites

doesn't consider x.c and x.h together. Instead, it expands to two rules,
one to generate x.c and one to generate x.h, which happen to run the
same commands.

This means that in the worst case, you can end up running x-generator
twice in parallel, and they'll race with each other and overwrite or
delete each other's output.

Based on commit 36c2a545c from telepathy-glib.


We should fix this in all the other CMs, too.
Comment 3 Simon McVittie 2013-06-03 19:20:35 UTC
Created attachment 80244 [details] [review]
[Rakia] Avoid having two of the same set of commands run in  parallel


Basically the same as Attachment #80222 [details], but for telepathy-rakia.
Comment 4 Xavier Claessens 2013-06-04 09:47:37 UTC
Comment 5 Simon McVittie 2013-06-04 11:43:59 UTC
Fixed in git for telepathy-rakia 0.7.5, telepathy-gabble 0.17.5.

Haze, Idle, MC, Salut probably all have the same bug.
Comment 6 GitLab Migration User 2019-12-09 11:22:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-spec/issues/168.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.