On Tue, February 21, 2006 1:42 am, Oleg Lapshin wrote: > But there is error: dbmysql.c,db_query: res was not freed after the > previous query!
This isn't really an error just a warning message to developers about the fact that on the previous call to db_query they didn't free the result before calling db_query again. Aaron added my patch for memory leaks and in it was this sort of catch all check as I was seeing a lot of query's that wern't being freeded as the default db_query stores all result's even if it isn't really needed..etc. I will let Aaron comment on the sieve stuff. -leif > > If script has error, temporarily record don't deleted from table > dbmail_sievescripts > > Log: > > > pool.c,child_reg_connected: [27272] > serverchild.c,PerformChildTask: incoming connection from [127.0.0.1] > serverchild.c,PerformChildTask: client info init complete, calling client > handler tims(): incoming buffer: [AUTHENTICATE "PLAIN" {16+}] > tims(): command issued: cmd [AUTHENTICATE], val ["PLAIN" {16+}] > tims(): command looked up as commandtype 4 > misc.c, find_bounded: Found nothing between '"' and '"' misc.c, > find_bounded: Found [16] of length [2] between '{' and '+' so next > skip [4] db.c,db_usermap_resolve: checking userid 'loe' in usermap > db.c,db_usermap_resolve: client on inet socket [inet:127.0.0.1:20000] > dbmysql.c,db_query: executing query [SELECT login, sock_allow, sock_deny, > userid FROM dbmail_usermap WHERE login in ('loe','ANY') ORDER BY > sock_allow, sock_deny] db.c,db_usermap_resolve: login 'loe' not found in > usermap dbmysql.c,db_query: executing query [SELECT user_idnr FROM > dbmail_users WHERE lower(userid) = lower('loe')] dbmysql.c,db_query: > executing query [SELECT user_idnr, passwd, encryption_type FROM > dbmail_users WHERE user_idnr = '2'] authsql.c,auth_validate: validating > using plaintext passwords dbmysql.c,db_query: executing query [UPDATE > dbmail_users SET last_login = '2006-02-21 09:35:58' WHERE user_idnr = '2'] > dbmysql.c,db_query: res was not freed after the previous query! > tims(): incoming buffer: [LOGOUT] > tims(): command looked up as commandtype 0 > serverchild.c,PerformChildTask: client handling complete, closing streams > serverchild.c,client_close: closing write stream > serverchild.c,client_close: closing read stream > serverchild.c,PerformChildTask: connection closed > serverchild.c,PerformChildTask: waiting for connection > pool.c,child_reg_disconnected: [27272] > pool.c,child_reg_connected: [27270] > serverchild.c,PerformChildTask: incoming connection from [127.0.0.1] > serverchild.c,PerformChildTask: client info init complete, calling client > handler tims(): incoming buffer: [AUTHENTICATE "PLAIN" {16+}] > tims(): command issued: cmd [AUTHENTICATE], val ["PLAIN" {16+}] > tims(): command looked up as commandtype 4 > misc.c, find_bounded: Found nothing between '"' and '"' misc.c, > find_bounded: Found [16] of length [2] between '{' and '+' so next > skip [4] db.c,db_usermap_resolve: checking userid 'loe' in usermap > db.c,db_usermap_resolve: client on inet socket [inet:127.0.0.1:20000] > dbmysql.c,db_query: executing query [SELECT login, sock_allow, sock_deny, > userid FROM dbmail_usermap WHERE login in ('loe','ANY') ORDER BY > sock_allow, sock_deny] db.c,db_usermap_resolve: login 'loe' not found in > usermap dbmysql.c,db_query: executing query [SELECT user_idnr FROM > dbmail_users WHERE lower(userid) = lower('loe')] dbmysql.c,db_query: > executing query [SELECT user_idnr, passwd, encryption_type FROM > dbmail_users WHERE user_idnr = '2'] authsql.c,auth_validate: validating > using plaintext passwords dbmysql.c,db_query: executing query [UPDATE > dbmail_users SET last_login = '2006-02-21 09:35:58' WHERE user_idnr = '2'] > dbmysql.c,db_query: res was not freed after the previous query! > tims(): incoming buffer: [LISTSCRIPTS] > tims(): command looked up as commandtype 3 > dbmysql.c,db_query: executing query [SELECT name,active from > dbmail_sievescripts where owner_idnr = 2] tims(): incoming buffer: > [GETSCRIPT "spam"] > tims(): command issued: cmd [GETSCRIPT], val ["spam"] > tims(): command looked up as commandtype 6 > misc.c, find_bounded: Found [spam] of length [4] between '"' and '"' so > next skip [5] dbmysql.c,db_query: executing query [SELECT script from > dbmail_sievescripts where owner_idnr = '2' and name = 'spam'] tims(): > incoming buffer: [PUTSCRIPT "spam" {305+}] tims(): command issued: cmd > [PUTSCRIPT], val ["spam" {305+}] > tims(): command looked up as commandtype 9 > misc.c, find_bounded: Found [spam] of length [4] between '"' and '"' so > next skip [5] misc.c, find_bounded: Found [305] of length [3] between '{' > and '+' so next skip [6] timsieve.c, tims: Client sending script of length > [305] > db.c,db_check_sievescript_quota: updating 2 sievescript quota with 305 > dbmysql.c,db_query: executing query [BEGIN] > dbmysql.c,db_query: executing query [SELECT COUNT(*) FROM > dbmail_sievescripts WHERE owner_idnr = 2 AND name = '@!temp-script!@'] > dbmysql.c,db_query: executing query [DELETE FROM dbmail_sievescripts WHERE > owner_idnr = 2 AND name = '@!temp-script!@'] dbmysql.c,db_query: res was > not freed after the previous query! dbmysql.c,db_query: executing query > [INSERT into dbmail_sievescripts > (owner_idnr, name, script, active) values (2, '@!temp-script!@', '#Mail > filter rules for loe\n#Generated by loe using SmartSieve 0.5.2 2006/02/21 > 09:35:58\n{297+}\r\nrequire \"fileinto\";\r\n\r\nif header :is > \"X-Spam-Flag\" \"YES\" { \r\nfileinto \"SPAM\";} \r\nelsif header :is > \"X-Spam-Flag\" \"NO\" { \r\nfileinto \"INBOX\";} \r\nelse {\r\nfileinto > \"INBOX\";}\n\n\n##PSEUDO script start\n#mode&&advanced\n', 0)] > dbmysql.c,db_query: executing query [COMMIT] > sortsieve.c, sort_getscript: Getting default script named > [EMAIL PROTECTED]@] > dbmysql.c,db_query: executing query [SELECT script from > dbmail_sievescripts where owner_idnr = '2' and name = '@!temp-script!@'] > Error is PARSE:Line is [75], Message is [syntax error, unexpected '{'] > Error is PARSE:Line is [79], Message is [fileinto not required] > Error is PARSE:Line is [81], Message is [fileinto not required] > Error is PARSE:Line is [83], Message is [fileinto not required] > timsieve.c, tims: Script has syntax errrors: [Parse error on line [75]: > syntax error, unexpected '{'Parse error on line [79]: fileinto not > requiredParse error on line [81]: fileinto not requiredParse error on line > [83]: fileinto > not required] tims(): incoming buffer: [LOGOUT] > tims(): command looked up as commandtype 0 > serverchild.c,PerformChildTask: client handling complete, closing streams > serverchild.c,client_close: closing write stream > serverchild.c,client_close: closing read stream > serverchild.c,PerformChildTask: connection closed > serverchild.c,PerformChildTask: waiting for connection > pool.c,child_reg_disconnected: [27270] > > > > (I think, {297+} - is script length, which was added by smartsieve.) > > > And putting script without this "magic" {297+}: > > > pool.c,child_reg_connected: [27272] > serverchild.c,PerformChildTask: incoming connection from [127.0.0.1] > serverchild.c,PerformChildTask: client info init complete, calling client > handler tims(): incoming buffer: [AUTHENTICATE "PLAIN" {16+}] > tims(): command issued: cmd [AUTHENTICATE], val ["PLAIN" {16+}] > tims(): command looked up as commandtype 4 > misc.c, find_bounded: Found nothing between '"' and '"' misc.c, > find_bounded: Found [16] of length [2] between '{' and '+' so next > skip [4] db.c,db_usermap_resolve: checking userid 'loe' in usermap > db.c,db_usermap_resolve: client on inet socket [inet:127.0.0.1:20000] > dbmysql.c,db_query: executing query [SELECT login, sock_allow, sock_deny, > userid FROM dbmail_usermap WHERE login in ('loe','ANY') ORDER BY > sock_allow, sock_deny] db.c,db_usermap_resolve: login 'loe' not found in > usermap dbmysql.c,db_query: executing query [SELECT user_idnr FROM > dbmail_users WHERE lower(userid) = lower('loe')] dbmysql.c,db_query: > executing query [SELECT user_idnr, passwd, encryption_type FROM > dbmail_users WHERE user_idnr = '2'] authsql.c,auth_validate: validating > using plaintext passwords dbmysql.c,db_query: executing query [UPDATE > dbmail_users SET last_login = '2006-02-21 09:38:27' WHERE user_idnr = '2'] > dbmysql.c,db_query: res was not freed after the previous query! > tims(): incoming buffer: [LOGOUT] > tims(): command looked up as commandtype 0 > serverchild.c,PerformChildTask: client handling complete, closing streams > serverchild.c,client_close: closing write stream > serverchild.c,client_close: closing read stream > serverchild.c,PerformChildTask: connection closed > serverchild.c,PerformChildTask: waiting for connection > pool.c,child_reg_disconnected: [27272] > pool.c,child_reg_connected: [27272] > serverchild.c,PerformChildTask: incoming connection from [127.0.0.1] > serverchild.c,PerformChildTask: client info init complete, calling client > handler tims(): incoming buffer: [AUTHENTICATE "PLAIN" {16+}] > tims(): command issued: cmd [AUTHENTICATE], val ["PLAIN" {16+}] > tims(): command looked up as commandtype 4 > misc.c, find_bounded: Found nothing between '"' and '"' misc.c, > find_bounded: Found [16] of length [2] between '{' and '+' so next > skip [4] db.c,db_usermap_resolve: checking userid 'loe' in usermap > db.c,db_usermap_resolve: client on inet socket [inet:127.0.0.1:20000] > dbmysql.c,db_query: executing query [SELECT login, sock_allow, sock_deny, > userid FROM dbmail_usermap WHERE login in ('loe','ANY') ORDER BY > sock_allow, sock_deny] db.c,db_usermap_resolve: login 'loe' not found in > usermap dbmysql.c,db_query: executing query [SELECT user_idnr FROM > dbmail_users WHERE lower(userid) = lower('loe')] dbmysql.c,db_query: > executing query [SELECT user_idnr, passwd, encryption_type FROM > dbmail_users WHERE user_idnr = '2'] authsql.c,auth_validate: validating > using plaintext passwords dbmysql.c,db_query: executing query [UPDATE > dbmail_users SET last_login = '2006-02-21 09:38:27' WHERE user_idnr = '2'] > dbmysql.c,db_query: res was not freed after the previous query! > tims(): incoming buffer: [LISTSCRIPTS] > tims(): command looked up as commandtype 3 > dbmysql.c,db_query: executing query [SELECT name,active from > dbmail_sievescripts where owner_idnr = 2] tims(): incoming buffer: > [GETSCRIPT "spam"] > tims(): command issued: cmd [GETSCRIPT], val ["spam"] > tims(): command looked up as commandtype 6 > misc.c, find_bounded: Found [spam] of length [4] between '"' and '"' so > next skip [5] dbmysql.c,db_query: executing query [SELECT script from > dbmail_sievescripts where owner_idnr = '2' and name = 'spam'] tims(): > incoming buffer: [PUTSCRIPT "spam" {297+}] tims(): command issued: cmd > [PUTSCRIPT], val ["spam" {297+}] > tims(): command looked up as commandtype 9 > misc.c, find_bounded: Found [spam] of length [4] between '"' and '"' so > next skip [5] misc.c, find_bounded: Found [297] of length [3] between '{' > and '+' so next skip [6] timsieve.c, tims: Client sending script of length > [297] > db.c,db_check_sievescript_quota: updating 2 sievescript quota with 297 > dbmysql.c,db_query: executing query [BEGIN] > dbmysql.c,db_query: executing query [SELECT COUNT(*) FROM > dbmail_sievescripts WHERE owner_idnr = 2 AND name = '@!temp-script!@'] > dbmysql.c,db_query: executing query [DELETE FROM dbmail_sievescripts WHERE > owner_idnr = 2 AND name = '@!temp-script!@'] dbmysql.c,db_query: res was > not freed after the previous query! dbmysql.c,db_query: executing query > [INSERT into dbmail_sievescripts > (owner_idnr, name, script, active) values (2, '@!temp-script!@', '#Mail > filter rules for loe\n#Generated by loe using SmartSieve 0.5.2 2006/02/21 > 09:38:27\nrequire \"fileinto\";\r\n\r\nif header :is \"X-Spam-Flag\" > \"YES\" { \r\nfileinto \"SPAM\";} \r\nelsif header :is \"X-Spam-Flag\" > \"NO\" { \r\nfileinto \"INBOX\";} \r\nelse {\r\nfileinto > \"INBOX\";}\n\n\n##PSEUDO script start\n#mode&&advanced\n', 0)] > dbmysql.c,db_query: executing query [COMMIT] > sortsieve.c, sort_getscript: Getting default script named > [EMAIL PROTECTED]@] > dbmysql.c,db_query: executing query [SELECT script from > dbmail_sievescripts where owner_idnr = '2' and name = '@!temp-script!@'] > dbmysql.c,db_query: executing query [BEGIN] > dbmysql.c,db_query: executing query [SELECT COUNT(*) FROM > dbmail_sievescripts WHERE owner_idnr = 2 AND name = 'spam'] > dbmysql.c,db_query: executing query [DELETE FROM dbmail_sievescripts WHERE > owner_idnr = 2 AND name = 'spam'] dbmysql.c,db_query: res was not freed > after the previous query! dbmysql.c,db_query: executing query [UPDATE > dbmail_sievescripts SET name = 'spam' WHERE owner_idnr = 2 AND name = > '@!temp-script!@'] > dbmysql.c,db_query: executing query [COMMIT] > timsieve.c, tims: Script successfully received tims(): incoming buffer: > [LISTSCRIPTS] > tims(): command looked up as commandtype 3 > dbmysql.c,db_query: executing query [SELECT name,active from > dbmail_sievescripts where owner_idnr = 2] tims(): incoming buffer: > [LISTSCRIPTS] > tims(): command looked up as commandtype 3 > dbmysql.c,db_query: executing query [SELECT name,active from > dbmail_sievescripts where owner_idnr = 2] tims(): incoming buffer: > [GETSCRIPT "spam"] > tims(): command issued: cmd [GETSCRIPT], val ["spam"] > tims(): command looked up as commandtype 6 > misc.c, find_bounded: Found [spam] of length [4] between '"' and '"' so > next skip [5] dbmysql.c,db_query: executing query [SELECT script from > dbmail_sievescripts where owner_idnr = '2' and name = 'spam'] tims(): > incoming buffer: [LOGOUT] tims(): command looked up as commandtype 0 > serverchild.c,PerformChildTask: client handling complete, closing streams > serverchild.c,client_close: closing write stream > serverchild.c,client_close: closing read stream > serverchild.c,PerformChildTask: connection closed > serverchild.c,PerformChildTask: waiting for connection > pool.c,child_reg_disconnected: [27272] > > > > > -- > Oleg Lapshin > > > _______________________________________________ > Dbmail-dev mailing list > Dbmail-dev@dbmail.org > http://twister.fastxs.net/mailman/listinfo/dbmail-dev > >