SQLite Forum

Failing tests with -DSQLITE_MAX_MMAP_SIZE=8589934592
Login

Failing tests with -DSQLITE_MAX_MMAP_SIZE=8589934592

(1) By 0xjnml on 2020-08-19 12:00:34 [link] [source]

I'm on Devuan 3 (Beowulf).

----

sqlite-src-3330000$ uname -a
Linux ... 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
sqlite-src-3330000$ cat bug.sh 
make distclean
./configure CFLAGS=-DSQLITE_MAX_MMAP_SIZE=8589934592
make testfixture
cd test
../testfixture permutations.test extraquick bigmmap.test
sqlite-src-3330000$ ./bug.sh
rm -f *.lo *.la *.o sqlite3 libsqlite3.la

...

bigmmap-1.0... Ok
bigmmap-1.1... Ok
bigmmap-1.2... Ok
bigmmap-1.3... Ok
bigmmap-1.4... Ok
bigmmap-1.5... Ok
bigmmap-1.6... Ok
bigmmap-1.7... Ok
bigmmap-2.0.0... Ok
bigmmap-2.0.0.1... Ok
bigmmap-2.0.0.2... Ok
bigmmap-2.0.0.3...
! bigmmap-2.0.0.3 expected: [
  QUERY PLAN
  |--SCAN TABLE t0 AS o USING COVERING INDEX sqlite_autoindex_t0_1
  `--CORRELATED SCALAR SUBQUERY
     `--SEARCH TABLE t0 AS i USING INTEGER PRIMARY KEY (rowid=?)
]
! bigmmap-2.0.0.3 got:      [
  QUERY PLAN
  |--SCAN TABLE t0 AS o USING COVERING INDEX sqlite_autoindex_t0_1
  `--CORRELATED SCALAR SUBQUERY xxxxxx
     `--SEARCH TABLE t0 AS i USING INTEGER PRIMARY KEY (rowid=?)
]
bigmmap-2.0.1.1... Ok

...

bigmmap.test-closeallfiles... Ok
bigmmap.test-sharedcachesetting... Ok
Time: bigmmap.test 73 ms
Memory used:          now         24  max    1663896  max-size      87200
Allocation count:     now          1  max        543
Page-cache used:      now          0  max          0  max-size       4360
Page-cache overflow:  now          0  max    1508048
SQLite 2020-08-14 13:23:32 fca8dc8b578f215a969cd899336378966156154710873e68b3d9ac5881b0ff3f
72 errors out of 236 tests on e5-1650 Linux 64-bit little-endian
!Failures on these tests: bigmmap-2.0.0.3 bigmmap-2.0.1.3 bigmmap-2.0.2.3 bigmmap-2.0.3.3 bigmmap-2.0.4.3 bigmmap-2.0.5.3 bigmmap-2.0.6.3 bigmmap-2.0.7.3 bigmmap-2.1.0.3 bigmmap-2.1.1.3 bigmmap-2.1.2.3 bigmmap-2.1.3.3 bigmmap-2.1.4.3 bigmmap-2.1.5.3 bigmmap-2.1.6.3 bigmmap-2.1.7.3 bigmmap-2.2.0.3 bigmmap-2.2.1.3 bigmmap-2.2.2.3 bigmmap-2.2.3.3 bigmmap-2.2.4.3 bigmmap-2.2.5.3 bigmmap-2.2.6.3 bigmmap-2.2.7.3 bigmmap-2.3.0.3 bigmmap-2.3.1.3 bigmmap-2.3.2.3 bigmmap-2.3.3.3 bigmmap-2.3.4.3 bigmmap-2.3.5.3 bigmmap-2.3.6.3 bigmmap-2.3.7.3 bigmmap-2.4.0.3 bigmmap-2.4.1.3 bigmmap-2.4.2.3 bigmmap-2.4.3.3 bigmmap-2.4.4.3 bigmmap-2.4.5.3 bigmmap-2.4.6.3 bigmmap-2.4.7.3 bigmmap-2.5.0.3 bigmmap-2.5.1.3 bigmmap-2.5.2.3 bigmmap-2.5.3.3 bigmmap-2.5.4.3 bigmmap-2.5.5.3 bigmmap-2.5.6.3 bigmmap-2.5.7.3 bigmmap-2.6.0.3 bigmmap-2.6.1.3 bigmmap-2.6.2.3 bigmmap-2.6.3.3 bigmmap-2.6.4.3 bigmmap-2.6.5.3 bigmmap-2.6.6.3 bigmmap-2.6.7.3 bigmmap-2.7.0.3 bigmmap-2.7.1.3 bigmmap-2.7.2.3 bigmmap-2.7.3.3 bigmmap-2.7.4.3 bigmmap-2.7.5.3 bigmmap-2.7.6.3 bigmmap-2.7.7.3 bigmmap-2.8.0.3 bigmmap-2.8.1.3 bigmmap-2.8.2.3 bigmmap-2.8.3.3 bigmmap-2.8.4.3 bigmmap-2.8.5.3 bigmmap-2.8.6.3 bigmmap-2.8.7.3
All memory allocations freed - no leaks
Memory used:          now          0  max    1663896  max-size      87200
Allocation count:     now          0  max        543
Page-cache used:      now          0  max          0  max-size       4360
Page-cache overflow:  now          0  max    1508048
Maximum memory usage: 1663896 bytes
Current memory usage: 0 bytes
Number of malloc()  : -1 calls
sqlite-src-3330000$

(2) By Gunter Hick (gunter_hick) on 2020-08-19 13:35:20 in reply to 1 [link] [source]

This is just a change in EXPLAIN QUERY PLAN output, which is documented to be subject to change without notice.

(3) By 0xjnml on 2020-08-19 13:47:16 in reply to 2 [link] [source]

Ok, the change in the EXPLAIN QUERY PLAN output is not an issue, agreed.

The issue is then to adjust the tests so they pass after the change. The fix seems to be easy and small and I can try to contribute it - if that seems appropriate. (?)

(4) By Ryan Smith (cuz) on 2020-08-19 14:49:21 in reply to 2 [source]

I think the point here is that the test fails, not that the query plan is better/worse/defunct in any way.

Tests should not fail, so either that query plan is actually different (which may/may not be a bug/discrepancy), or the test should be adjusted.

(5) By Dan Kennedy (dan) on 2020-08-19 15:25:12 in reply to 1 [link] [source]