Re: Bug#956324: Clustalo bus error on mipsel (Was: Bug#956324: python-biopython: FTBFS on mipsel)
Matthew Fernandez <[email protected]>
| Newsgroups | gmane.linux.debian.devel.mentors,gmane.linux.debian.ports.mips |
|---|---|
| Message-ID | <[email protected]> |
> On Apr 17, 2020, at 04:20, Andreas Tille <[email protected]> wrote: > > Control: tags -1 help > > Hi, > > as it can be seen on the recent build log of clustalo on mips[1] the > build fails with > > > # Run additional test from python-biopython package to verify that > # this will work as well > src/clustalo -i debian/tests/biopython_testdata/f002 --guidetree-out temp_test.dnd -o temp_test.aln --outfmt clustal --force > make[1]: *** [debian/rules:25: override_dh_auto_test-arch] Bus error > > > I injected that extra test since this very test failed inside the > python-biopython package. To track it down I logged in to > eller.debian.org tried to build the package and was able to reproduce > the error. Thus I fired up gdb in this session and got: > > > (sid_mipsel-dchroot)tille@eller:~/clustalo-1.2.4$ gdb --args src/clustalo -i debian/tests/biopython_testdata/f002 --guidetree-out temp_test.dnd -o temp_test.aln --outfmt clustal --force > GNU gdb (Debian 9.1-3) 9.1 > ... > Reading symbols from src/clustalo... > (gdb) run > Starting program: /home/tille/clustalo-1.2.4/src/clustalo -i debian/tests/biopython_testdata/f002 --guidetree-out temp_test.dnd -o temp_test.aln --outfmt clustal --force > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/mipsel-linux-gnu/libthread_db.so.1". > > Program received signal SIGBUS, Bus error. > 0x5556a188 in PairDistances (distmat=0x7fff278c, mseq=0x55692a38, pairdist_type=<optimized out>, bPercID=<optimized out>, istart=0, iend=3, jstart=0, jend=3, fdist_in=0x0, fdist_out=0x0) at pair_dist.c:346 > 346 NewProgress(&prProgress, LogGetFP(&rLog, LOG_INFO), > (gdb) > > > So it seems the bus error occures somehow here: > > https://salsa.debian.org/med-team/clustalo/-/blob/master/src/clustal/pair_dist.c#L346 > > > I have no idea how to continue from here. I'm hoping that someone with > some more detailed knowledge might have a clue how to fix this issue on > mipsel. Otherwise I personally do not see any better solution than to > remove clustalo from mipsel architecture. As a jumping off point, the attached patch fixes some issues with logging calls in the upstream 1.2.4 source release.
clustalo-log-format-calls.patch
(application/octet-stream, 5.4 KB)
commit 10b157d257d892b782cdcf56a91698f851395411 Author: Matthew Fernandez <[email protected]> Date: Fri Apr 17 07:32:23 2020 -0700 fix mismatched logging arguments This change corrects some logging calls that were passing format strings that did not align with their arguments. These issues were detected by tagging the Log() function with __attribute__((format(printf, 3, 4))). diff --git a/src/clustal-omega.c b/src/clustal-omega.c index f6ccfd2..c0c5d93 100644 --- a/src/clustal-omega.c +++ b/src/clustal-omega.c @@ -1327,7 +1327,7 @@ Align(mseq_t *prMSeq, CKFREE(piOrderLR); if (NULL != pdSeqWeights) CKFREE(pdSeqWeights); - Log(&rLog, LOG_INFO, "Computing new guide tree (iteration step %d)"); + Log(&rLog, LOG_INFO, "Computing new guide tree (iteration step %d)", iIterationCounter); if (AlignmentOrder(&piOrderLR, &pdSeqWeights, prMSeq, ((SEQTYPE_PROTEIN == prMSeq->seqtype) && (TRUE == prOpts->bUseKimura)) ? PAIRDIST_SQUIDID_KIMURA : PAIRDIST_SQUIDID, NULL, prOpts->pcDistmatOutfile, diff --git a/src/clustal/hhalign_wrapper.c b/src/clustal/hhalign_wrapper.c index 269fc56..a8eedff 100644 --- a/src/clustal/hhalign_wrapper.c +++ b/src/clustal/hhalign_wrapper.c @@ -1041,7 +1041,7 @@ HHalignWrapper(mseq_t *prMSeq, int *piOrderLR, int i, j; /* aux */ Log(&rLog, LOG_DEBUG, - "merge profiles at node %d", iN, piOrderLR[riAux]); + "merge profiles at node %d", iN); /* iNodeCount - prMSeq->nseqs = total # of merge-nodes * unless in profile/profile alignment mode diff --git a/src/clustal/muscle_tree.c b/src/clustal/muscle_tree.c index c4ba70d..fbb6701 100644 --- a/src/clustal/muscle_tree.c +++ b/src/clustal/muscle_tree.c @@ -763,10 +763,10 @@ ValidateNode(uint uNodeIndex, tree_t *tree) n3 = tree->m_uNeighbor3[uNodeIndex]; if (NULL_NEIGHBOR == n2 && NULL_NEIGHBOR != n3) { - Log(&rLog, LOG_FATAL, "Tree::ValidateNode, n2=null, n3!=null", uNodeIndex); + Log(&rLog, LOG_FATAL, "Tree::ValidateNode(%u), n2=null, n3!=null", uNodeIndex); } if (NULL_NEIGHBOR == n3 && NULL_NEIGHBOR != n2) { - Log(&rLog, LOG_FATAL, "Tree::ValidateNode, n3=null, n2!=null", uNodeIndex); + Log(&rLog, LOG_FATAL, "Tree::ValidateNode(%u), n3=null, n2!=null", uNodeIndex); } if (n1 != NULL_NEIGHBOR) @@ -1221,7 +1221,7 @@ GetGroupFromFile(FILE *fp, uint uNodeIndex, double *ptrdEdgeLength, tree_t *tree ; else if (NTT_Comma == NTT) { if (ungetc(',', fp)==EOF) - Log(&rLog, LOG_FATAL, "%s" "ungetc failed"); + Log(&rLog, LOG_FATAL, "%s", "ungetc failed"); return FALSE; } else Log(&rLog, LOG_FATAL, "Tree::GetGroupFromFile, expected ')' or ',', got '%s'", szToken); @@ -1248,7 +1248,7 @@ GetGroupFromFile(FILE *fp, uint uNodeIndex, double *ptrdEdgeLength, tree_t *tree return TRUE; } if (ungetc(c, fp)==EOF) - Log(&rLog, LOG_FATAL, "%s" "ungetc failed"); + Log(&rLog, LOG_FATAL, "%s", "ungetc failed"); return FALSE; } @@ -1293,7 +1293,7 @@ FileSkipWhiteX(FILE *fp) return TRUE; if (!isspace(c)) { if (ungetc(c, fp)==EOF) - Log(&rLog, LOG_FATAL, "%s" "ungetc failed"); + Log(&rLog, LOG_FATAL, "%s", "ungetc failed"); break; } } @@ -1383,7 +1383,7 @@ GetToken(FILE *fp, char szToken[], uint uBytes) case NTT_String: if (0 != strchr("():;,", c)) { if (ungetc(c, fp)==EOF) - Log(&rLog, LOG_FATAL, "%s" "ungetc failed"); + Log(&rLog, LOG_FATAL, "%s", "ungetc failed"); return NTT_String; } if (isspace(c)) diff --git a/src/clustal/seq.c b/src/clustal/seq.c index 27cca14..e2ef756 100644 --- a/src/clustal/seq.c +++ b/src/clustal/seq.c @@ -471,7 +471,7 @@ ReadSequences(mseq_t *prMSeq, char *seqfile, } if ((int)strlen(cur_seq)>iMaxSeqLen) { Log(&rLog, LOG_ERROR, "Sequence '%s' has %d residues and is therefore longer than allowed (max. sequence length is %d)", - cur_sqinfo.name, strlen(cur_seq), iMaxSeqLen); + cur_sqinfo.name, (int)strlen(cur_seq), iMaxSeqLen); return -1; } if ((int)strlen(cur_seq)==0) { diff --git a/src/clustal/util.c b/src/clustal/util.c index f3e0d89..d31df9b 100644 --- a/src/clustal/util.c +++ b/src/clustal/util.c @@ -480,7 +480,7 @@ FileIsWritable(char *pcFileName) } else { bIsWritable = TRUE; if (0 != fclose(prFilePointer)) { - Log(&rLog, LOG_ERROR, "Couldn't close temporily created file %s. Expect trouble..."); + Log(&rLog, LOG_ERROR, "Couldn't close temporily created file %s. Expect trouble...", pcFileName); } } @@ -495,7 +495,7 @@ FileIsWritable(char *pcFileName) */ if (FALSE==bFileAlreadyExisted && TRUE==bIsWritable) { if (0 != remove(pcFileName)) { - Log(&rLog, LOG_ERROR, "Removing of temporarily created file %s failed. Expect trouble..."); + Log(&rLog, LOG_ERROR, "Removing of temporarily created file %s failed. Expect trouble...", pcFileName); } } return bIsWritable;