View Issue Details

IDProjectCategoryView StatusLast Update
0007111Talermechant backendpublic2021-12-01 08:08
Reporterttn Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
PlatformLinuxOSAlpineOS Version3.13
Product Versiongit (master) 
Summary0007111: "make check" fails on test-merchantdb-postgres
DescriptionHEAD at 1893831efb87d2fcf4d2a94531f2457da41f3979
Two logs attached, the "make check" log and the src/backenddb/test-suite.log.
TagsNo tags attached.

Activities

ttn

2021-11-29 23:26

developer  

.ttn.make-check.log (3,280 bytes)   
+ export PGHOST=/home/ttn/pg
+ PGHOST=/home/ttn/pg
+ make check
Making check in .
make[1]: Entering directory '/home/ttn/build/GNU/T/merchant'
make[1]: Leaving directory '/home/ttn/build/GNU/T/merchant'
Making check in src
make[1]: Entering directory '/home/ttn/build/GNU/T/merchant/src'
Making check in include
make[2]: Entering directory '/home/ttn/build/GNU/T/merchant/src/include'
make[2]: Nothing to be done for 'check'.
make[2]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/include'
Making check in mustach
make[2]: Entering directory '/home/ttn/build/GNU/T/merchant/src/mustach'
make  test_mustach_jansson run-original-tests.sh
make[3]: Entering directory '/home/ttn/build/GNU/T/merchant/src/mustach'
  CC       test_mustach_jansson.o
  CCLD     test_mustach_jansson
make[3]: Nothing to be done for 'run-original-tests.sh'.
make[3]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/mustach'
make  check-TESTS
make[3]: Entering directory '/home/ttn/build/GNU/T/merchant/src/mustach'
make[4]: Entering directory '/home/ttn/build/GNU/T/merchant/src/mustach'
SKIP: run-original-tests.sh
PASS: test_mustach_jansson
============================================================================
Testsuite summary for taler-merchant 0.8.4
============================================================================
# TOTAL: 2
# PASS:  1
# SKIP:  1
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[4]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/mustach'
make[3]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/mustach'
make[2]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/mustach'
Making check in backenddb
make[2]: Entering directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
make  test-merchantdb-postgres
make[3]: Entering directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
  CC       test_merchantdb.o
  CCLD     test-merchantdb-postgres
make[3]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
make  check-TESTS
make[3]: Entering directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
make[4]: Entering directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
FAIL: test-merchantdb-postgres
============================================================================
Testsuite summary for taler-merchant 0.8.4
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See src/backenddb/test-suite.log
Please report to taler-bug@gnunet.org
============================================================================
make[4]: *** [Makefile:956: test-suite.log] Error 1
make[4]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
make[3]: *** [Makefile:1064: check-TESTS] Error 2
make[3]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
make[2]: *** [Makefile:1138: check-am] Error 2
make[2]: Leaving directory '/home/ttn/build/GNU/T/merchant/src/backenddb'
make[1]: *** [Makefile:411: check-recursive] Error 1
make[1]: Leaving directory '/home/ttn/build/GNU/T/merchant/src'
make: *** [Makefile:472: check-recursive] Error 1
.ttn.make-check.log (3,280 bytes)   
test-suite.log (6,539 bytes)   
========================================================
   taler-merchant 0.8.4: src/backenddb/test-suite.log
========================================================

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-merchantdb-postgres
==============================

2021-11-29T23:18:31.418899+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Change in PQ event FD to -1
2021-11-29T23:18:31.419052+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO New poll FD is -1
2021-11-29T23:18:31.424981+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Loading SQL resources from `/usr/local/share/taler//sql/merchant/drop'
2021-11-29T23:18:31.426325+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Applying SQL file `/usr/local/share/taler//sql/merchant/drop0001.sql' on database postgres:///talercheck
psql:/usr/local/share/taler/sql/merchant/drop0001.sql:27: ERROR:  Patch merchant-0003 is not installed, so it can't be uninstalled!
CONTEXT:  PL/pgSQL function _v.unregister_patch(text) line 17 at RAISE
2021-11-29T23:18:31.437216+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 WARNING Could not run PSQL on file /usr/local/share/taler//sql/merchant/drop0001.sql: psql exit code was 3
2021-11-29T23:18:31.437250+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 WARNING Failed to load SQL statements from `/usr/local/share/taler//sql/merchant/drop*'
2021-11-29T23:18:31.437324+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Change in PQ event FD to -1
2021-11-29T23:18:31.437344+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO New poll FD is -1
2021-11-29T23:18:31.441729+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Loading SQL resources from `/usr/local/share/taler//sql/merchant/merchant-'
2021-11-29T23:18:31.443572+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Applying SQL file `/usr/local/share/taler//sql/merchant/merchant-0003.sql' on database postgres:///talercheck
2021-11-29T23:18:31.842548+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Change in PQ event FD to 6
2021-11-29T23:18:31.842591+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO New poll FD is 6
2021-11-29T23:18:31.842689+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Change in PQ event FD to -1
2021-11-29T23:18:31.842709+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO New poll FD is -1
2021-11-29T23:18:31.937562+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO Change in PQ event FD to 6
2021-11-29T23:18:31.937603+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 INFO New poll FD is 6
2021-11-29T23:18:32.041817+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Expected 16 bytes for field `salt', got 64
2021-11-29T23:18:32.041847+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at pq_result_helper.c:194.
2021-11-29T23:18:32.041862+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Failed to extract field `salt'
2021-11-29T23:18:32.041879+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at pq.c:174.
2021-11-29T23:18:32.041895+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at plugin_merchantdb_postgres.c:514.
2021-11-29T23:18:32.056705+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Expected 16 bytes for field `salt', got 64
2021-11-29T23:18:32.056737+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at pq_result_helper.c:194.
2021-11-29T23:18:32.056753+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Failed to extract field `salt'
2021-11-29T23:18:32.056782+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at pq.c:174.
2021-11-29T23:18:32.056796+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at plugin_merchantdb_postgres.c:514.
2021-11-29T23:18:32.058620+0100 pq-7637 ERROR Query `insert_account' failed with result: new row for relation "merchant_accounts" violates check constraint "merchant_accounts_salt_check"/Failing row contains (9, 8, \x6094fc8e277a2f22fb8691d94d5f06e8e8bf02f0c456a0e50691f76965a384..., \x02af4cbcf06ab0d1363e2afbb107d657, payto://x-taler-bank/bank.demo.taler.net/4, t)./ERROR:  new row for relation "merchant_accounts" violates check constraint "merchant_accounts_salt_check"
DETAIL:  Failing row contains (9, 8, \x6094fc8e277a2f22fb8691d94d5f06e8e8bf02f0c456a0e50691f76965a384..., \x02af4cbcf06ab0d1363e2afbb107d657, payto://x-taler-bank/bank.demo.taler.net/4, t).
/PGRES_FATAL_ERROR/ERROR:  new row for relation "merchant_accounts" violates check constraint "merchant_accounts_salt_check"
DETAIL:  Failing row contains (9, 8, \x6094fc8e277a2f22fb8691d94d5f06e8e8bf02f0c456a0e50691f76965a384..., \x02af4cbcf06ab0d1363e2afbb107d657, payto://x-taler-bank/bank.demo.taler.net/4, t).

2021-11-29T23:18:32.058663+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at test_merchantdb.c:472.
2021-11-29T23:18:32.058691+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Insert account failed
2021-11-29T23:18:32.058723+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at test_merchantdb.c:616.
2021-11-29T23:18:32.058756+0100 /home/ttn/build/GNU/T/merchant/src/backenddb/.libs/lt-test-merchantdb-postgres-7637 ERROR Assertion failed at test_merchantdb.c:6800.
FAIL test-merchantdb-postgres (exit status: 1)

test-suite.log (6,539 bytes)   

Christian Grothoff

2021-11-30 20:32

manager   ~0018563

Ah, that's an update/migration issue from our various schema changes. Simply do this:

rm -rf /usr/local/share/taler//sql # clean up old installations
dropdb talercheck
createdb talercheck
make install # exchange + merchant

Then it should work again. You're simply stumbling into issues where migrations between Dev versions are not supported/supportable.

ttn

2021-12-01 08:07

developer   ~0018564

Thanks for the clue.
I confirm that after those steps, "make check" passes completely now.
We can close this bug.

ttn

2021-12-01 08:08

developer   ~0018565

Fix confirmed.

Issue History

Date Modified Username Field Change
2021-11-29 23:26 ttn New Issue
2021-11-29 23:26 ttn Status new => assigned
2021-11-29 23:26 ttn Assigned To => Christian Grothoff
2021-11-29 23:26 ttn File Added: .ttn.make-check.log
2021-11-29 23:26 ttn File Added: test-suite.log
2021-11-30 20:32 Christian Grothoff Note Added: 0018563
2021-12-01 08:07 ttn Note Added: 0018564
2021-12-01 08:08 ttn Status assigned => resolved
2021-12-01 08:08 ttn Resolution open => fixed
2021-12-01 08:08 ttn Note Added: 0018565