[Debian-med-packaging] Bug#1079439: Bug#1079439: python-biopython: autopkgtest stuck on riscv64

Étienne Mollier emollier at debian.org
Fri Aug 23 20:59:09 BST 2024


Control: tags -1 + confirmed

Hi Reinhard,

Thanks for your time investigating this issue!  On the good news
front, I confirm I can reproduce the problem with qemu-user, so
this facilitate debugging even without direct access to the real
hardware.

Reinhard Tartler, on 2024-08-23:
> test_Align_clustal ... ok
[…]

> This tells me that there is unlikely a single test that could be disabled get
> the build unstuck.

Probably yes.  The next test would be test_Align_codonalign, and
it does not hang during the test suite execution with minimal
dependencies set (test-name=dependencies).  It only occurs with
the test-name=full_suite which includes all build dependencies.

> Rather, the issue seems triggered by the run_tests.py, and
> might require a change to either run_tests.py [1] or the python interpreter on
> riscv64?
> 
> [1] https://sources.debian.org/src/python-biopython/1.83%2Bdfsg1-3/Tests/run_tests.py/

The test would hang somewhere in this loop:

        start_time = time.time()
        for test in self.tests:
            ok = self.runTest(test)
            if not ok:
                failures += 1
        total = len(self.tests)

which would point fingers to the runTest method, which does all
sorts of things beyond triggering each test.  Assuming output is
properly flushed, I think we hang someplace in the following
hunk:

    def runTest(self, name):
        from Bio import MissingPythonDependencyError
        from Bio import MissingExternalDependencyError

        result = self._makeResult()
        output = StringIO()
        # Restore the language and thus default encoding (in case a prior
        # test changed this, e.g. to help with detecting command line tools)
        global SYSTEM_LANG
        os.environ["LANG"] = SYSTEM_LANG
        # Always run tests from the Tests/ folder where run_tests.py
        # should be located (as we assume this with relative paths etc)
        os.chdir(self.testdir)
        try:
            stdout = sys.stdout
            sys.stdout = output
            if name.startswith("test_"):
                # It's a unittest
                sys.stderr.write(f"{name} ... ")

I'm at loss reasoning about the _makeResult method for now.
Maybe there is something off about output handling by StringIO?
I haven't dug further for the moment.

Upstream recently released Biopython 1.84.  It seems to have a
couple of cosmetic changes to the run_test.py script.  It could
be worth a shot too.

Have a nice day,  :)
-- 
  .''`.  Étienne Mollier <emollier at debian.org>
 : :' :  pgp: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/1, please excuse my verbosity
   `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20240823/50448bd7/attachment.sig>


More information about the Debian-med-packaging mailing list