Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#580 closed defect (fixed)

memory corruption in arb_dnarates

Reported by: epruesse Owned by: westram
Priority: normal Milestone: arb7.0
Component: no idea Version: SVN
Keywords: Cc:

Description

When enabling the memory corruption check in glibc (MALLOC_CHECK_=1 or =2), arb_dnarates produces different results, causing the corresponding unit test to fail.

To reproduce:

cd UNIT_TESTS
MALLOC_CHECK_=2 ./tests.slow/test_TOOLS_arb_test_o

Output excerpt:

[Action: 'bash -c 'arb_dnarates tools/dnarates.inp tools/dnarates.arb tools/dnarates_result.arb >stdout_13146.log 2>stderr_13146.log'']
[0x8954]'.' (=0x2e),'.' (=0x2e) 0x2e,0x2e
[0x8955]'.' (=0x2e),'.' (=0x2e) 0x2e,0x2e
[0x8956]'.' (=0x2e),'.' (=0x2e) 0x2e,0x2e
[0x8957]'.' (=0x2e),'.' (=0x2e) 0x2e,0x2e
[0x8958]'.' (=0x2e),'.' (=0x2e) 0x2e,0x2e
[0x8959]'.' (=0x2e),'.' (=0x2e) 0x2e,0x2e
[0x895a]'.' (=0x2e),'.' (=0x2e) 0x2e,0x2e
[0x895b]'2' (=0x32),'"' (=0x22) 0x32,0x22                     <- diff
[0x895c]'"' (=0x22), ^J (=0x0a) 0x22,0xa
[0x895d] ^J (=0x0a), ^I (=0x09) 0xa,0x9
[0x895e] ^I (=0x09), ^I (=0x09) 0x9,0x9
[0x895f] ^I (=0x09), ^I (=0x09) 0x9,0x9
[0x8960] ^I (=0x09),'_' (=0x5f) 0x9,0x5f
[0x8961]'_' (=0x5f),'C' (=0x43) 0x5f,0x43
[0x8962]'C' (=0x43),'A' (=0x41) 0x43,0x41
files_are_equal: equal_bytes=35163
files_are_equal(tools/dnarates_result.arb, tools/dnarates_expected.arb) fails: content differs
arb_test.cxx:270: Error: Failed expectation 'that(arb_test::files_are_equal("tools/dnarates_result.arb","tools/dnarates_expected.arb")).is_equal_to(true)'
expectation fails because
  'arb_test::files_are_equal("tools/dnarates_result.arb","tools/dnarates_expected.arb")' doesnt equal 'true', where
    'arb_test::files_are_equal("tools/dnarates_result.arb","tools/dnarates_expected.arb")' is false, and
    'true'                                                                                 is true
UnitTester: * TEST_SLOW_arb_dna_rates = TRAPPED (147.9 ms)
(null): Error: TEST_SLOW_arb_dna_rates failed (details above)

UnitTester: target=arb_test.o time=1639.1 tests=12 passed=11 failed=1 warnings=1

Change History (5)

comment:1 Changed 10 years ago by westram

  • Owner changed from devel to westram
  • Status changed from new to assigned

got some bugs reported by AddressSanitizer

comment:2 Changed 10 years ago by westram

  • Status changed from assigned to _started

[13010] fails with

'
stderr='Error in arb_dnarates: Filter length (13310) does not match alignment length (14610)
'
/home/ralf/ARB-bilbo/ARB.gcc.491.NDEBUG/TOOLS/arb_test.cxx:269:  Error: Failed expectation 'CommandOutput("arb_dnarates tools/dnarates.inp " "tools/dnarates.arb" " " "tools/dnarates_result.arb", try_valgrind).Contains("\nWriting 'POS_VAR_BY_ML_1'\n", "")'
expectation fails because
  expected 3 fulfilled expectations of(error.equals(NULL), stdoutput.is containing()(expected_std), stderrput.is containing()(expected_err))
    but only 1 is fulfilled, because
      'error' doesnt equal 'NULL', where
        'error' is "System call failed (result=256)\nSystem call was 'bash -c 'arb_dnarates tools/dnarates.inp tools/dnarates.arb tools/dnarates_result.arb >stdout_30431.log 2>stderr_30431.log''\n(Note: console window may contain additional information)", and
        'NULL'  is (null)
      'stdoutput' isnt containing() 'expected_std', where
        'stdoutput'    is "\nDNAml_rates, version 1.0.0, April 11, 1992\n\nPortions based on Joseph Felsenstein's Nucleic acid sequence\nMaximum Likelihood method, version 3.3\n\n8 Species, 406 Sites\n\nThere must be at least 5 informative residues per column\n\nAnalyzing 272 distinct data patterns (columns)\n\nEmpirical Base Frequencies:\n\n   A       0.21997\n   C       0.23183\n   G       0.28456\n  T(U)     0.26365\n\nTransition/transversion ratio =   2.000000\n\n(Transition/transversion parameter =   1.520661)\n\nUser-defined tree:\n\n8 taxon user-supplied tree read\n\nTotal length of tree branches = 3.459060\n\n  Site      Rate\n  ----   ---------\n     1   Undefined\n     2   Undefined\n     3    256.0000\n     4      0.6692\n     5      0.3346\n     6      0.4246\n     7      2.8877\n     8      3.2531\n     9      3.7449\n    10      0.7458\n    11      5.7132\n    12    256.0000\n    13      7.3293\n    14      8.2567\n    15      5.9662\n    16      0.3170\n    17      8.4375\n    18      0.3346\n    19      0.3852\n    20      7.9927\n    21      0.3894\n    22    256.0000\n    23      7.9066\n    24    256.0000\n    25      4.2187\n    26    256.0000\n    27     19.6377\n    28      0.4483\n    29      3.2180\n    30      0.4023\n    31      0.9261\n    32      0.3346\n    33      0.3383\n    34      6.3668\n    35      0.3979\n    36      0.3204\n    37      0.4246\n    38      0.4111\n    39      0.4531\n    40      0.3457\n    41      1.1753\n    42     25.7443\n    43      8.2567\n    44      0.3894\n    45      7.3293\n    46      2.8877\n    47      0.7788\n    48      3.2885\n    49      0.7958\n    50      6.5770\n    51      7.9066\n    52      2.8877\n    53      0.4246\n    54      3.6252\n    55      6.5062\n    56      2.7653\n    57      2.8877\n    58      0.3170\n    59      5.9662\n    60      0.7065\n    61      6.1632\n    62      9.3013\n    63     13.8860\n    64      0.5877\n    65      0.3894\n    66     17.6220\n    67     47.2153\n    68      0.4339\n    69      1.2679\n    70      9.3013\n    71      2.7355\n    72     10.1431\n    73      0.4434\n    74      0.3204\n    75      6.1632\n    76      0.3346\n    77      0.5941\n    78      7.0186\n    79      0.4023\n    80      9.9258\n    81     25.7443\n    82      0.3346\n    83      8.4375\n    84      0.3204\n    85      7.9066\n    86     23.3533\n    87      1.6265\n    88      0.6204\n    89      0.3383\n    90      0.4434\n    91      0.4293\n    92      7.2504\n    93      0.4434\n    94      0.4339\n    95      0.7958\n    96      7.0950\n    97      0.3936\n    98      0.4434\n    99      0.3894\n   100      6.7942\n   101      0.5941\n   102      7.0950\n   103      0.3204\n   104      1.5745\n   105      3.4341\n   106      0.3852\n   107      0.9464\n   108      0.8679\n   109      0.4483\n   110      0.5941\n   111      0.3852\n   112      0.4023\n   113      0.4339\n   114      1.2274\n   115      1.3977\n   116      0.3852\n   117      0.8679\n   118      0.3457\n   119      3.0816\n   120      0.4434\n   121      0.7958\n   122      0.4023\n   123      1.2542\n   124      0.4023\n   125      0.4023\n   126      0.3419\n   127      0.4483\n   128      1.2679\n   129      0.3239\n   130      0.7219\n   131      0.3170\n   132      7.8214\n   133     16.5133\n   134      0.4531\n   135      0.4531\n   136      0.9464\n   137      3.0156\n   138      2.8877\n   139      2.8877\n   140      2.8258\n   141      6.9430\n   142      7.9066\n   143      0.4434\n   144      1.2011\n   145      2.6481\n   146     14.3446\n   147      0.3457\n   148     27.7720\n   149      9.4026\n   150      3.2531\n   151      2.6195\n   152      3.4341\n   153      6.2303\n   154      2.6769\n   155      3.4341\n   156      0.8679\n   157      0.8679\n   158      0.4531\n   159      0.4339\n   160     14.8183\n   161      6.8682\n   162      0.9362\n   163      0.4581\n   164      1.7931\n   165      0.9063\n   166      0.7065\n   167     10.1431\n   168      0.4023\n   169      0.3457\n   170      0.4387\n   171      0.4111\n   172      0.4293\n   173      1.3678\n   174      0.4339\n   175      3.2531\n   176     12.5963\n   177      6.6486\n   178      3.1152\n   179      0.5941\n   180      0.6692\n   181      0.4339\n   182      1.3098\n   183      0.3894\n   184      0.6692\n   185      2.5913\n   186      7.9066\n   187      0.4434\n   188      0.9464\n   189      0.3383\n   190      8.6222\n   191      1.2679\n   192      3.3243\n   193      1.2817\n   194      0.4066\n   195      4.5020\n   196      0.3852\n   197      0.3239\n   198      0.7065\n   199     11.9324\n   200      6.4361\n   201     11.4265\n   202      6.0311\n   203      7.9066\n   204      1.2274\n   205      0.3383\n   206      1.2011\n   207      0.4434\n   208      0.8679\n   209      0.3170\n   210      0.4246\n   211      0.4531\n   212      1.2141\n   213      0.3894\n   214      1.3678\n   215      0.7065\n   216      3.6252\n   217      0.8965\n   218      2.5913\n   219      0.9162\n   220      0.8773\n   221      0.4339\n   222      0.3979\n   223      0.4246\n   224      0.4023\n   225      0.4246\n   226      0.4483\n   227      1.1377\n   228      0.4023\n   229      0.3346\n   230      0.3170\n   231      0.3457\n   232      0.7958\n   233      7.3293\n   234      0.3170\n   235      1.4129\n   236      1.4283\n   237      0.8679\n   238      0.4434\n   239      0.6204\n   240      0.9464\n   241      7.0950\n   242      0.3239\n   243     10.8242\n   244      0.9464\n   245      0.7298\n   246      0.4434\n   247      0.7958\n   248      2.6195\n   249      2.9510\n   250      0.9162\n   251      7.9066\n   252      0.4483\n   253     16.3354\n   254      0.9464\n   255      0.3894\n   256      0.4246\n   257      0.8679\n   258      1.1881\n   259     12.5963\n   260      1.4129\n   261      8.4375\n   262      0.8965\n   263      1.2011\n   264      2.7355\n   265      0.4023\n   266      2.8877\n   267      3.2531\n   268      0.3383\n   269      2.9192\n   270      0.4023\n   271      0.3346\n   272      0.9063\n   273     11.4265\n   274      1.1881\n   275      8.9070\n   276      0.4111\n   277      0.6204\n   278      0.8493\n   279      0.3894\n   280      0.7458\n   281      0.4339\n   282      0.7458\n   283      0.7298\n   284      0.7958\n   285      0.4434\n   286      6.1632\n   287      1.2141\n   288      1.2011\n   289      0.3979\n   290      3.5093\n   291      6.8682\n   292      3.1834\n   293      6.5770\n   294      7.0950\n   295      3.2531\n   296      3.2885\n   297      6.7210\n   298      7.3293\n   299      3.1152\n   300      1.2141\n   301      0.3170\n   302      6.9430\n   303      0.3457\n   304      0.7298\n   305      0.9464\n   306      0.9261\n   307      0.4339\n   308      0.4339\n   309      0.3894\n   310      0.4293\n   311      0.4339\n   312      0.3894\n   313      0.4339\n   314      3.4341\n   315      3.9533\n   316      0.4483\n   317      1.4283\n   318     12.3264\n   319     19.8516\n   320      0.3936\n   321      2.5085\n   322     11.1816\n   323     18.4022\n   324     16.1595\n   325      1.2274\n   326      0.3494\n   327      2.9831\n   328      1.3530\n   329      0.4066\n   330      0.5217\n   331      0.3852\n   332      0.8679\n   333      0.3894\n   334      0.9261\n   335      0.4434\n   336      0.4023\n   337      3.3243\n   338     11.5509\n   339      0.4387\n   340      1.3384\n   341      0.4434\n   342      2.9831\n   343      2.7954\n   344     14.8183\n   345      1.3240\n   346      9.2011\n   347      9.8189\n   348      1.2011\n   349     16.3354\n   350     17.6220\n   351      3.4341\n   352      2.9510\n   353      0.3204\n   354      0.3936\n   355      1.2679\n   356      0.3852\n   357      0.4483\n   358      0.4066\n   359     11.1816\n   360      3.0484\n   361      0.4483\n   362      3.6252\n   363      1.4283\n   364      0.4066\n   365      0.9261\n   366      0.7458\n   367      0.4387\n   368      6.0968\n   369      1.2274\n   370      5.9662\n   371      5.9662\n   372      1.3240\n   373      5.6517\n   374      0.4531\n   375      1.4129\n   376      0.3346\n   377      0.3494\n   378      3.0156\n   379      3.0156\n   380      7.3293\n   381      1.1627\n   382      2.8877\n   383      1.3678\n   384      0.4066\n   385     11.4265\n   386      7.9066\n   387      9.6085\n   388      5.9662\n   389      1.1627\n   390      1.4283\n   391      2.7355\n   392      1.3240\n   393      6.6486\n   394      3.4715\n   395      3.4715\n   396      0.4732\n   397      0.4246\n   398      1.3530\n   399      0.3170\n   400      3.1834\n   401      0.3729\n   402      5.2961\n   403      0.3729\n   404      5.2961\n   405      3.2531\n   406      4.8042\n\n", and
        'expected_std' is "\nWriting 'POS_VAR_BY_ML_1'\n"
UnitTester: * TEST_SLOW_arb_dna_rates = TRAPPED (36.2 ms)
(null): Error: TEST_SLOW_arb_dna_rates failed (details above)

comment:3 Changed 10 years ago by westram

  • Resolution set to fixed
  • Status changed from _started to closed

comment:4 Changed 9 years ago by westram

  • Milestone set to arb6.1

mark changes that got fixed after arb 6.0.x

comment:5 Changed 3 years ago by westram

  • Milestone changed from arb6.1 to arb7.0

Milestone renamed

Note: See TracTickets for help on using tickets.