[Scons-users] Possible threading bug in scons

Tom Tanner (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Mon Jan 18 11:21:39 EST 2016


This is 2.2 with sone of the 2.3 changes in it. I'm hanging off on updates till we get python2.7 but getting that is somewhat of a slow process (as used to be getting updates to open source software).

From: wblevins001 at gmail.com At: Jan 18 2016 15:55:57
To: Tom Tanner (BLOOMBERG/ LONDON)
Subject: Re: [Scons-users] Possible threading bug in scons

What version of SCons are you using? Sorry but we cannot really help without the basics. I imagine 2.3.0 or older due to 2.6.2 usage.

V/R,
William

On Mon, Jan 18, 2016 at 3:34 PM, Tom Tanner (BLOOMBERG/ LONDON) <ttanner2 at bloomberg.net> wrote:

we're still on 2.6.2 for various sad reasons. (and I've just realised that the titile is unfortunate, for which I apologise)

From: wblevins001 at gmail.com At: Jan 18 2016 15:08:37
To: Tom Tanner (BLOOMBERG/ LONDON), scons-users at scons.org
Subject: Re: [Scons-users] Possible threading bug in scons

What version of python are you using?

On Mon, Jan 18, 2016 at 2:48 PM, Tom Tanner (BLOOMBERG/ LONDON) <ttanner2 at bloomberg.net> wrote:

Someone here has been doing a lot of parallel builds and come across what looks like a bug though I'm not sure why:

The problem is with this bit in Taskmaster:

    def execute(self):
        """
        Called to execute the task.

        This method is called from multiple threads in a parallel build,
        so only do thread safe stuff here.  Do thread unsafe stuff in
        prepare(), executed() or failed().
        """
        T = self.tm.trace
        if T: T.write(self.trace_message(u'Task.execute()', self.node))

        try:
            cached_targets = []
            for t in self.targets:
                if not t.retrieve_from_cache():
                    break

The t.retrieve_from_cache ends up doing this:

  File ".../SCons/Node/FS.py", line 1778, in get_csig
    contents = self.get_contents()
  File ".../SCons/Node/FS.py", line 1769, in get_contents
    contents.append('%s %s\n' % (node.get_csig(), node.name))
  File ".../SCons/Node/__init__.py", line 784, in get_csig
    return self.ninfo.csig
AttributeError: 'FileNodeInfo' object has no attribute 'csig'

which goes away if he puts a lock in Node.get_ninfo.

Now, the only way I can think of this triggering is if he's managed to get two rules with the same target. Is that possible? and if so how can you detect it? I don't like the idea of having a lock in Node.get_ninfo.
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
https://pairlist4.pair.net/mailman/listinfo/scons-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160118/143ed34a/attachment-0001.html>


More information about the Scons-users mailing list