[Scons-users] scons-local-2.5.1 build and clean shows random failure

Hua Yanghao huayanghao at gmail.com
Fri Jul 21 17:17:18 EDT 2017


Dear Scons User,
I am recently experiencing some random failures in both scons build
and scons clean (-c).

Unfortunately the project has more than 2000 .c/.h files and I cannot
create a minimal project to reproduce this issue.

Error message: (scons -c)
Removed output/linux64_full/libusw.a
Removed output/linux64_full/cmdlist.txt
scons: done cleaning targets.

scons: *** Found dependency cycle(s):
  Internal Error: no cycle found for node output/linux64_full
(<SCons.Node.FS.Dir object at 0x5630bcf78c60>) in state pending

File "/home/hua/git/usw/tools/scons-local-2.5.1/SCons/Taskmaster.py",
line 1043, in cleanup

End of error message.

This issue can be reproduced one out of five runs, could happen in
both scons build and scons clean.
This issue happens *only* with parallel builds (-j8), and cannot
reproduce with single thread build.
The project uses scons VariantDir() and many custom builders.

In file SCons/Taskmaster.py, if I simply add a "return" on line 1033,
the problem cannot be reproduced anymore, and builds are fine all the
time (checked many dozens of times):
1033         return # <--------- This line "fixed" the issue ;-)
1034         desc = 'Found dependency cycle(s):\n'
1035         for node, cycle in nclist:
1036             if cycle:
1037                 desc = desc + "  " + " -> ".join(map(str, cycle)) + "\n"
1038             else:
1039                 desc = desc + \
1040                     "  Internal Error: no cycle found for node %s
(%s) in state %s\n" %  \
1041                     (node, repr(node), StateString[node.get_state()])
1042
1043         raise SCons.Errors.UserError(desc)

Does anyone had similar experience? Is scons over-checking something
and made a false alarm?
I am about to promote scons to a much wider audience but this issue
really makes me a little bit nervous.

Thanks a lot for your help,
Yanghao


More information about the Scons-users mailing list