[MDEV-9507] maria.encrypt-wrong-key test throws "bytes lost" warnings on a debug server Created: 2016-02-02  Updated: 2016-08-27  Resolved: 2016-08-27

Status: Closed
Project: MariaDB Server
Component/s: Encryption, Storage Engine - Aria, Tests
Affects Version/s: 10.1
Fix Version/s: 10.1.12

Type: Bug Priority: Minor
Reporter: Elena Stepanova Assignee: Michael Widenius
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-7069 Fix buildbot failures in main server ... Stalled

 Description   

To reproduce, build server with -DCMAKE_BUILD_TYPE=Debug or, for example, using BUILD/compile-pentium64-debug-max, but without valgrind.

> perl ./mtr maria.encrypt-wrong-key
Logging: ./mtr  maria.encrypt-wrong-key
vardir: /src/10.1-bug/mysql-test/var
Removing old var directory...
Creating var directory '/src/10.1-bug/mysql-test/var'...
Checking supported features...
MariaDB Version 10.1.12-MariaDB-debug
 - SSL connections supported
 - binaries are debug compiled
Collecting tests...
Installing system database...
 
==============================================================================
 
TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------
 
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
maria.encrypt-wrong-key                  [ fail ]  Found warnings/errors in server log file!
        Test ended at 2016-02-02 14:20:40
line
Warning: 8192 bytes lost at 0x7f1d6f2e7870, allocated by T@0 at 0xd7400a, 0xd5c2f1, 0xd65a5e, 0xd662fe, 0xd666a6, 0xdc23b6, 0xd3b058, 0x8bb6e9
^ Found warnings in /src/10.1-bug/mysql-test/var/log/mysqld.1.err
ok
 
 - saving '/src/10.1-bug/mysql-test/var/log/maria.encrypt-wrong-key/' to '/src/10.1-bug/mysql-test/var/log/maria.encrypt-wrong-key/'
--------------------------------------------------------------------------
The servers were restarted 0 times
Spent 0.000 of 17 seconds executing testcases
mysql-test-run: WARNING: Got errors/warnings while running tests, please examine '/src/10.1-bug/mysql-test/var/log/warnings' for details.
 
Failure: Failed 1/1 tests, 0.00% were successful.



 Comments   
Comment by Michael Widenius [ 2016-02-02 ]

The memory loss could happen in Aria with encrypted tables when Aria failed to encrypt a block.
In normal usage this should never happen.

Comment by Michael Widenius [ 2016-02-02 ]

Fixed and pushed

Comment by Elena Stepanova [ 2016-08-27 ]

It was still happening at least 3 months later, in May; or maybe it's a separate problem. Anyway, it needs to be looked at.

http://buildbot.askmonty.org/buildbot/builders/bld-dan-debug/builds/3292/steps/test/logs/stdio

maria.encrypt-wrong-key                  w1 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2016-05-18 15:05:35
line
Warning:  640 bytes lost at 0x7f783402f7c0, allocated by T@0 at 0xdde2bd, 0xdbdc95, 0xdbdd0a, 0xda9f90, 0xdaa0b5, mysys/my_malloc.c:154, sql/encryption.cc:53, sql/sql_plugin.cc:1408
Warning:  640 bytes lost at 0x3bc2ef0, allocated by T@0 at 0xdde2bd, 0xdbdc95, 0xdbdd0a, 0xda9f90, 0xdaa0b5, mysys/my_malloc.c:154, sql/encryption.cc:53, sql/sql_plugin.cc:1408
^ Found warnings in /opt/buildbot-slave/mariadb/dan_demeter1/build/mysql-test/var/1/log/mysqld.1.err

Re-opening, rather than creating a new one, because even though a fix was pushed into 10.1.12, it didn't mention this JIRA item, so it can still be re-used:

commit 55ea26541d4c95e765073c70126d9bb490c572c6 11c2d3c3e21642107db625f33c177f09d8ccd3ca
Author: Monty <monty@mariadb.org>
Date:   Tue Feb 2 19:54:18 2016 +0200
 
    Fixed warnings and one memory loss found by valgrind
    
    The memory loss could happen in Aria with encrypted tables when Aria failed to encrypt a block.
    In normal usage this should never happen.

Comment by Elena Stepanova [ 2016-08-27 ]

Remaining warnings were probably due to the ancient environment on the machine (demeter2). They disappeared after May 22, right after Dan upgraded the box.

Generated at Thu Feb 08 07:35:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.