Memory leak with TRIGGER ON TRANSACTION COMMIT ----------------------------------------------
Key: CORE-4216 URL: http://tracker.firebirdsql.org/browse/CORE-4216 Project: Firebird Core Issue Type: Bug Components: Engine Affects Versions: 2.5.2 Update 1, 2.5.3 Environment: Win 7 x64, FB V2.5.3.26690 x64 SuperClassic Reporter: Valery Priority: Critical When a non-empty TRIGGER ON TRANSACTION COMMIT is defined, each commit leaks ~1-2 kB of memory. Seems to depend on the presence of a role when connecting. Test DB: ============ SET SQL DIALECT 3; SET NAMES UTF8; CREATE DATABASE 'localhost:RTData' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 16384 DEFAULT CHARACTER SET UTF8 COLLATION UTF8; SET TERM ^ ; CREATE TRIGGER TRIG_TR_COMMIT ACTIVE ON TRANSACTION COMMIT POSITION 0 AS DECLARE VARIABLE Debug_Log SMALLINT; BEGIN select RDB$RELATION_ID from RDB$DATABASE INTO :Debug_Log; END ^ SET TERM ; ^ CREATE ROLE ROL_FILL_MSRS; GRANT ROL_FILL_MSRS TO WRITER; ============ Memory consumption detection: select MON$STAT_ID as STAT_ID, MON$STAT_GROUP as STAT_GR, MON$MEMORY_USED as MEM_USED, MON$MEMORY_ALLOCATED as MEM_ALLOC from MON$MEMORY_USAGE where MON$MEMORY_USED=(select max(MON$MEMORY_USED) from MON$MEMORY_USAGE); ============== Steps to reproduce: 1. Add user WRITER 2. Connect as WRITER with role ROL_FILL_MSRS and cycle performing a commit. See the memory consumption grow. Notes: 1. Empty trigger with begin..end only or even "begin if (something) then begin end end" doesn't produce a leak. 2. Executing as SYSDBA doesn't produce a leak. 3. Executing as WRITER with no role doesn't produce a leak. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel