[Scons-dev] Odd sconsdb related test failure

Daniel Holth dholth at gmail.com
Mon Sep 19 21:43:50 EDT 2016


A quick fix would be to change L124 to self._pickle_dump(self._dict, f,
PICKLE_PROTOCOL or -1)

My suspicion is that dblite's __del__ method is being called during
interpreter teardown which would explain why the module-level constant
PICKLE_PROTOCOL is None and why pdb doesn't work here, and then it decides
to *write itself to disk* inside __del__().

Actually on further reading I see dblite expects this, and keeps copies of
various constants in its own class. It could do the same with
PICKLE_PROTOCOL.

A less quick fix would be to figure out whether dblite could be made into a
context manager or something and not rely on persistence during interpreter
cleanup.

Daniel

On Mon, Sep 19, 2016 at 7:57 PM William Blevins <wblevins001 at gmail.com>
wrote:

> Daniel,
>
> Apt (Debian package manager) shows 2.7.11-2. Python version shows 2.7.12+.
> I assume this happens on stable versions also.
>
> V/R,
> William
>
> On Mon, Sep 19, 2016 at 6:38 PM, Daniel Holth <dholth at gmail.com> wrote:
>
>> Is the requested pickle protocol something other than an int here? Del
>> can call sync. Just regular python 2.7?
>> https://bitbucket.org/scons/scons/pull-requests/348/centralize-the-preferred-pickle-protocol/diff#Lsrc/engine/SCons/dblite.pyT124
>>
>> On Sat, Sep 17, 2016, 22:58 William Blevins <wblevins001 at gmail.com>
>> wrote:
>>
>>> Not sure if Daniel is on the dev-list, so I'll start a direct chat and
>>> see if he has any thoughts.
>>>
>>> On Sat, Sep 17, 2016 at 8:23 PM, James Corey <jc-scons at neniam.net>
>>> wrote:
>>>
>>>> Yes, that test also fails for me, on debian and fedora.
>>>>
>>>>
>>>> On Sat, Sep 17, 2016 at 3:14 PM, William Blevins <wblevins001 at gmail.com>
>>>> wrote:
>>>> > It appears that the pickle patch from earlier this week is causing a
>>>> test
>>>> > failure.
>>>> >
>>>> >
>>>> https://bitbucket.org/scons/scons/pull-requests/348/centralize-the-preferred-pickle-protocol/diff
>>>> >
>>>> >> 1/1 (100.00%) /usr/bin/python -tt test/Interactive/variant_dir.py
>>>> >> STDOUT
>>>> >>
>>>> =========================================================================
>>>> >> scons: Entering directory `/tmp/testcmd.2983.M_iWAJ/work'
>>>> >> scons>>> scons: building associated VariantDir targets: build
>>>> >> gcc -o build/hello.o -c sub1/hello.c
>>>> >> gcc -o build/hello build/hello.o
>>>> >> scons: `sub1' is up to date.
>>>> >> scons>>> Touch("/tmp/testcmd.2983.M_iWAJ/markers/1")
>>>> >> scons>>> scons: building associated VariantDir targets: build
>>>> >> gcc -o build/hello.o -c sub1/hello.c
>>>> >> gcc -o build/hello build/hello.o
>>>> >> scons: `sub1' is up to date.
>>>> >> scons>>> Touch("/tmp/testcmd.2983.M_iWAJ/markers/2")
>>>> >> scons>>>
>>>> >>
>>>> >> STDERR
>>>> >>
>>>> =========================================================================
>>>> >> 0a1
>>>> >> > Exception TypeError: 'an integer is required' in <bound method
>>>> >> > dblite.__del__ of <SCons.dblite.dblite object at 0x7fcb33c5ee90>>
>>>> ignored
>>>> >> FAILED test of .../SCons/scons/src/script/scons.py
>>>> >>      at line 620 of .../SCons/scons/QMTest/TestCommon.py (_complete)
>>>> >>      from line 674 of .../SCons/scons/QMTest/TestCommon.py (finish)
>>>> >>      from line 109 of test/Interactive/variant_dir.py
>>>> >
>>>> > Anyone else seeing this issue?
>>>> >
>>>> > V/R,
>>>> > William
>>>> >
>>>> > _______________________________________________
>>>> > Scons-dev mailing list
>>>> > Scons-dev at scons.org
>>>> > https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>> >
>>>> _______________________________________________
>>>> Scons-dev mailing list
>>>> Scons-dev at scons.org
>>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>>
>>>
>>> _______________________________________________
>>> Scons-dev mailing list
>>> Scons-dev at scons.org
>>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>>
>>
>> _______________________________________________
>> Scons-dev mailing list
>> Scons-dev at scons.org
>> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>>
>>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20160920/adbda7fe/attachment.html>


More information about the Scons-dev mailing list