[MDEV-30784] Memory not freed: 264, 280 when using log_bin_trust_function_creators=1 Created: 2023-03-04  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Binary Protocol
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0
Fix Version/s: 10.4, 10.5, 10.6, 10.11

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Andrei Elkin
Resolution: Unresolved Votes: 0
Labels: Memory_leak, memory_not_freed, shutdown

Issue Links:
Relates
relates to MDEV-26335 Memory not freed: 512, 560 bytes on s... Confirmed

 Description   

Lightly sporadic. Similar to MDEV-26335 but a different amount of memory lost.

SET GLOBAL log_bin_trust_function_creators=1;
DELETE FROM mysql.user;
CREATE FUNCTION f (i INT) RETURNS INT RETURN i;
FLUSH PRIVILEGES;
CREATE VIEW c AS SELECT f();
GRANT SELECT (f) ON c TO foo;
SHUTDOWN;

Leads to:

11.0.1 f2dc4d4c10ac36a73b5c1eb765352d3aee808d66 (Optimized)

2023-03-04 11:43:32 0 [Note] /test/MD180223-mariadb-11.0.1-linux-x86_64-opt/bin/mariadbd (initiated by: root[root] @ localhost []): Normal shutdown
2023-03-04 11:43:32 0 [Note] InnoDB: FTS optimize thread exiting.
2023-03-04 11:43:32 0 [Note] InnoDB: Starting shutdown...
2023-03-04 11:43:32 0 [Note] InnoDB: Dumping buffer pool(s) to /test/MD180223-mariadb-11.0.1-linux-x86_64-opt/data/ib_buffer_pool
2023-03-04 11:43:32 0 [Note] InnoDB: Buffer pool(s) dump completed at 230304 11:43:32
 
Warning: Memory not freed: 280

Bug confirmed present in:
MariaDB: 10.3.38 (dbg), 10.3.38 (opt), 10.4.29 (dbg), 10.4.29 (opt), 10.5.20 (dbg), 10.5.20 (opt), 10.6.13 (dbg), 10.6.13 (opt), 10.7.8 (dbg), 10.7.8 (opt), 10.8.8 (dbg), 10.8.8 (opt), 10.9.6 (dbg), 10.9.6 (opt), 10.10.4 (dbg), 10.10.4 (opt), 10.11.2 (dbg), 10.11.2 (opt), 11.0.1 (dbg), 11.0.1 (opt)

Bug (or feature/syntax) confirmed not present in:
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (opt)

No ASAN or UBSAN issues were observed.



 Comments   
Comment by Roel Van de Paar [ 2023-03-04 ]

10.3 and 10.4 have 264 bytes lost instead of 280.

Generated at Thu Feb 08 10:18:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.