Re: [Dbmail-dev] Troubles: rev-1996
I've just checked in some changes in the server code. SIGHUPs are now handled correctly. Oleg and Aaron, please test and confirm if you don't mind. If this works out, 2.1.4 can be released later this week. Aaron Stone wrote: On Mon, 2006-02-27 at 12:28 +0300, Oleg Lapshin wrote: Hello And again, troubles with address already in use Got it! If I hit the parent process with lots of fast SIGHUPs, I can cause it to die, but leave children that look like parents: nobody 30203 1 0 09:25 /usr/local/sbin/dbmail-imapd nobody 30205 1 0 09:25 /usr/local/sbin/dbmail-imapd Both of those processes think that they're the parent (parent id 1) and neither have any children. Both are handling connections normally. Trying to open a third connection does not work. [snip] imap4.c,IMAPClientHandler: Finished command uid [0] main(): server has exited, exit status [1] This is the parent process reporting that a child exited with a signal. The parent then continues in its fork loop, keeping the right number of children available. Except here that's not happening. Reading the code here, and this is Paul's neck of the woods, so I may well be misunderstanding things, is that at the bottom of the loop the socket is closed, then at the top of the loop the socket is reopened and another child is forked and waited on. If that socket could not be opened, then the process dies (see server.c, dm_bind_and_listen). So I think that it's the parent process here that's somehow lost ownership of the socket and so the parent dies but the children stick around (because their parent is now 1? or is that a sympton?) Aaron ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev -- Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlandshttp://www.nfg.nl
Re: [Dbmail-dev] Troubles: rev-1996
On Mon, 2006-02-27 at 12:28 +0300, Oleg Lapshin wrote: Hello And again, troubles with address already in use Got it! If I hit the parent process with lots of fast SIGHUPs, I can cause it to die, but leave children that look like parents: nobody 30203 1 0 09:25 /usr/local/sbin/dbmail-imapd nobody 30205 1 0 09:25 /usr/local/sbin/dbmail-imapd Both of those processes think that they're the parent (parent id 1) and neither have any children. Both are handling connections normally. Trying to open a third connection does not work. [snip] imap4.c,IMAPClientHandler: Finished command uid [0] main(): server has exited, exit status [1] Strange thing... I copied this files: authmodule.c db.c dbmail.h dbmodule.c lmtp.c main.c misc.c misc.h pipe.c pipe.h serverchild.c sort.c sort.h sortmodule.c sortmodule.h modules/sortnull.c modules/sortsieve.c timsieve.c timsieved.c from revision-1996 to revision-1991 tree (all .c and .h that was changed), configured and compiled as usually And it works for about 18 hours without errors!!! Two words about kmail and sieve. I try to change sieve-script from kmail, but when I try to download script to change it, I get error from kmail protocol error. timsieved log output: authsql.c,auth_validate: validating using plaintext passwords dbmysql.c,db_query: executing query [UPDATE dbmail_users SET last_login = '2006-02-28 11:47:22' 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: [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 main] tims(): command issued: cmd [GETSCRIPT], val [main] tims(): command looked up as commandtype 6 misc.c, find_bounded: Found [main] 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 = 'main'] 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: [1325] When I try to set vacation, kmail say me: Unknown URL sieve://[EMAIL PROTECTED]:2/?x-mech=PLAIN I think both errors - are bugs in kmail Will try to find solutions in google :) -- Oleg Lapshin
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
I've just checked in some changes in the server code. SIGHUPs are now handled correctly. Oleg and Aaron, please test and confirm if you don't mind. If this works out, 2.1.4 can be released later this week. No. The 1st connect from client to dbmail-imapd works fine, but the 2nd - don't at all ;( (in my environment of course) -- Oleg Lapshin
[Dbmail-dev] [DBMail 0000304]: with ref: to ID 0000265 , bug was suspended
The following issue has been SUBMITTED. == http://www.dbmail.org/mantis/view.php?id=304 == Reported By:lakshmi Assigned To: == Project:DBMail Issue ID: 304 Category: IMAP daemon Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 28-Feb-06 11:27 CET Last Modified: 28-Feb-06 11:27 CET == Summary:with ref: to ID 265 , bug was suspended Description: hi , i am getting the same bug as reported by idk with Summary:265: Non US-ASCII character in mail header breaks fetching where its given that this its a bug and given no steps to over come the same. here is my issue; format of response that i am following is as below: Request: lu6h UID FETCH 1:* (BODY.PEEK[HEADER.FIELDS (References X-Ref X-Priority X-MSMail-Priority X-MSOESRec Newsgroups)] ENVELOPE RFC822.SIZE UID FLAGS INTERNALDATE) Response: * 1 FETCH (UID 1 BODY[HEADER.FIELDS (REFERENCES X-REF X-PRIORITY X-MSMAIL-PRIORITY X-MSOESREC NEWSGROUPS)] {2} ENVELOPE (Tue, 31 Jan 2006 11:34:32 +0530 mail1 ((NIL NIL abc test.co.in)) ((NIL NIL abc test.co.in)) ((NIL NIL abc test.co.in)) ((NIL NIL xyz test.co.in)) NIL NIL NIL [EMAIL PROTECTED]) RFC822.SIZE 648 FLAGS (\Seen) INTERNALDATE 31-Jan-2006 11:34:43 +0530) i am not getting any mails to the client. is there any bug or is it an issue with the format i am following. if so kindly correct me. Also i read that the date format should be DD-MMM- hh:mm:ss +HHMM is it so? is it also for internal date format? if there are more than one To: addresses than what is the format to follow? in the address structure. == Issue History Date Modified Username FieldChange == 28-Feb-06 11:27 lakshmiNew Issue ==
[Dbmail-dev] [DBMail 0000304]: with ref: to ID 0000265 , bug was suspended
A NOTE has been added to this issue. == http://www.dbmail.org/mantis/view.php?id=304 == Reported By:lakshmi Assigned To: == Project:DBMail Issue ID: 304 Category: IMAP daemon Reproducibility:always Severity: major Priority: normal Status: new == Date Submitted: 28-Feb-06 11:27 CET Last Modified: 28-Feb-06 11:31 CET == Summary:with ref: to ID 265 , bug was suspended Description: hi , i am getting the same bug as reported by idk with Summary:265: Non US-ASCII character in mail header breaks fetching where its given that this its a bug and given no steps to over come the same. here is my issue; format of response that i am following is as below: Request: lu6h UID FETCH 1:* (BODY.PEEK[HEADER.FIELDS (References X-Ref X-Priority X-MSMail-Priority X-MSOESRec Newsgroups)] ENVELOPE RFC822.SIZE UID FLAGS INTERNALDATE) Response: * 1 FETCH (UID 1 BODY[HEADER.FIELDS (REFERENCES X-REF X-PRIORITY X-MSMAIL-PRIORITY X-MSOESREC NEWSGROUPS)] {2} ENVELOPE (Tue, 31 Jan 2006 11:34:32 +0530 mail1 ((NIL NIL abc test.co.in)) ((NIL NIL abc test.co.in)) ((NIL NIL abc test.co.in)) ((NIL NIL xyz test.co.in)) NIL NIL NIL [EMAIL PROTECTED]) RFC822.SIZE 648 FLAGS (\Seen) INTERNALDATE 31-Jan-2006 11:34:43 +0530) i am not getting any mails to the client. is there any bug or is it an issue with the format i am following. if so kindly correct me. Also i read that the date format should be DD-MMM- hh:mm:ss +HHMM is it so? is it also for internal date format? if there are more than one To: addresses than what is the format to follow? in the address structure. == -- lakshmi - 28-Feb-06 11:31 -- its urgent! Issue History Date Modified Username FieldChange == 28-Feb-06 11:27 lakshmiNew Issue 28-Feb-06 11:30 lakshmiIssue Monitored: lakshmi 28-Feb-06 11:30 lakshmiIssue End Monitor: lakshmi 28-Feb-06 11:30 lakshmiIssue Monitored: lakshmi 28-Feb-06 11:31 lakshmiNote Added: 0001014 ==
Re: [Dbmail-dev] Troubles: rev-1996 (kmail and sieve)
On Tue, 2006-02-28 at 11:54 +0300, Oleg Lapshin wrote: Two words about kmail and sieve. I try to change sieve-script from kmail, but when I try to download script to change it, I get error from kmail protocol error. timsieved log output: The log snippet from DBMail's side of things looked fine. Could you get a tcpdump of the conversation? I suspect that KMail doesn't like the response format of the GETSCRIPT command. I would have to get a *lot* of packages to get KMail on my machine :-\ When I try to set vacation, kmail say me: Unknown URL sieve://[EMAIL PROTECTED]:2/?x-mech=PLAIN Maybe it marked the resource unavailable when the it failed earlier? I think both errors - are bugs in kmail Will try to find solutions in google :) Ok! Aaron
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
Found it. db_check_connection called from StartServer was being called before db_connect which load the module. Oleg Lapshin wrote: I've just checked in some changes in the server code. SIGHUPs are now handled correctly. Oleg and Aaron, please test and confirm if you don't mind. If this works out, 2.1.4 can be released later this week. No. The 1st connect from client to dbmail-imapd works fine, but the 2nd - don't at all ;( (in my environment of course) -- Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlandshttp://www.nfg.nl
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
Here's another one. I'm getting permission denied errors when the parent process tries to grab the socket again after SIGHUP. Before giving the HUP, the parent process is still running with root privs. Feb 28 04:41:11 [dbmail/imap4d] server.c,StartServer: starting main service loop Feb 28 04:41:22 [dbmail/imap4d] MainSigHandler(): got signal [1] Feb 28 04:41:22 [dbmail/imap4d] pool.c,manage_stop_children: General stop requested. Killing children.. Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: accept failed Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: stop requested Feb 28 04:41:22 [dbmail/imap4d] pool.c,child_reg_disconnected: [15908] Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: accept failed Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: stop requested Feb 28 04:41:22 [dbmail/imap4d] pool.c,child_reg_disconnected: [15910] Feb 28 04:41:24 [dbmail/imap4d] imapd.c,main: server done, restart = [1] Feb 28 04:41:24 [dbmail/imap4d] imapd.c,get_config: reading config [set config items] Feb 28 04:41:24 [dbmail/imap4d] server.c,dm_socket: done Feb 28 04:41:24 [dbmail/imap4d] server.c,dm_bind_and_listen: Permission denied Feb 28 04:41:26 [dbmail/imap4d] imapd.c,main: server has exited, exit status [75] Feb 28 04:41:26 [dbmail/imap4d] imapd.c,main: exit On Tue, 2006-02-28 at 12:51 +0100, Paul J Stevens wrote: Found it. db_check_connection called from StartServer was being called before db_connect which load the module. Oleg Lapshin wrote: I've just checked in some changes in the server code. SIGHUPs are now handled correctly. Oleg and Aaron, please test and confirm if you don't mind. If this works out, 2.1.4 can be released later this week. No. The 1st connect from client to dbmail-imapd works fine, but the 2nd - don't at all ;( (in my environment of course)
[Dbmail-dev] kmail and sieve scripts
Hello I tried to change sieve-script from kmail List of scripts was shown, but when I tried to change script. it failed. Dialog from tcpdump: IMPLEMENTATION DBMail timsieved v2.1 SASL PLAIN SIEVE subaddress fileinto reject envelope vacation OK AUTHENTICATE PLAIN skip OK LISTSCRIPTS spam2 main ACTIVE OK LISTSCRIPTS spam2 main ACTIVE OK GETSCRIPT spam2 {299+} LOGOUT #Mail filter rules for loe #Generated by loe using SmartSieve 0.5.2 2006/02/26 05:53:39 require fileinto; if header :is X-Spam-Flag YES { fileinto SPAM;} elsif header :is X-Spam-Flag NO { fileinto INBOX;} else { fileinto INBOX;} ##PSEUDO script start #modeadvanced OK But kmail write: Internal server error. Protocol error. -- Oleg Lapshin
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
Paul, Reading from imapd.c, through server.c, and to pool.c, it looks like the process path is like this: imapd.c: parent process (root) imapd.c: child process (nobody) server.c, pool.c: manage more children (more nobodies) When you send a HUP to the parent, it does this: imapd.c: parent process - Receive the HUP, tell child to restart imapd.c: child process - Told to restart, kill the children server.c, pool.c: told to stop, children are killed. Then this happens: imapd.c: parent process (root) imapd.c: child process (nobody) -- tries to get a new socket, can't! Is that first fork needed to establish the dropped privs before forking each of the children in the pool? It would make sense to have the first child simply terminate when it gets a signal, and then the top level parent restarts everything... This fixes it for me: --- ../dbmail/imapd.c 2006-02-28 04:15:22.556837664 -0800 +++ imapd.c 2006-02-28 10:16:50.398784536 -0800 case 0: /* child process */ drop_privileges(config.serverUser, config.serverGroup); result = StartServer(config); trace(TRACE_INFO, %s,%s: server done, restart = [%d], __FILE__, __func__, result); - + exit(result); break; Aaron On Tue, 2006-02-28 at 04:58 -0800, Aaron Stone wrote: Adding some trace calls to the failed bind: server.c,dm_bind_and_listen: My pid is: 24964 parent is 24963 server.c,dm_bind_and_listen: My uid is: 65534 effective 65534 server.c,dm_bind_and_listen: Permission denied 65534 is nobody on my machine. The process 24963 is still root; 24964 is the first child process, but it's the one trying to perform the restart. Aaron On Tue, 2006-02-28 at 04:44 -0800, Aaron Stone wrote: Here's another one. I'm getting permission denied errors when the parent process tries to grab the socket again after SIGHUP. Before giving the HUP, the parent process is still running with root privs. Feb 28 04:41:11 [dbmail/imap4d] server.c,StartServer: starting main service loop Feb 28 04:41:22 [dbmail/imap4d] MainSigHandler(): got signal [1] Feb 28 04:41:22 [dbmail/imap4d] pool.c,manage_stop_children: General stop requested. Killing children.. Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: accept failed Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: stop requested Feb 28 04:41:22 [dbmail/imap4d] pool.c,child_reg_disconnected: [15908] Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: accept failed Feb 28 04:41:22 [dbmail/imap4d] serverchild.c,PerformChildTask: stop requested Feb 28 04:41:22 [dbmail/imap4d] pool.c,child_reg_disconnected: [15910] Feb 28 04:41:24 [dbmail/imap4d] imapd.c,main: server done, restart = [1] Feb 28 04:41:24 [dbmail/imap4d] imapd.c,get_config: reading config [set config items] Feb 28 04:41:24 [dbmail/imap4d] server.c,dm_socket: done Feb 28 04:41:24 [dbmail/imap4d] server.c,dm_bind_and_listen: Permission denied Feb 28 04:41:26 [dbmail/imap4d] imapd.c,main: server has exited, exit status [75] Feb 28 04:41:26 [dbmail/imap4d] imapd.c,main: exit On Tue, 2006-02-28 at 12:51 +0100, Paul J Stevens wrote: Found it. db_check_connection called from StartServer was being called before db_connect which load the module. Oleg Lapshin wrote: I've just checked in some changes in the server code. SIGHUPs are now handled correctly. Oleg and Aaron, please test and confirm if you don't mind. If this works out, 2.1.4 can be released later this week. No. The 1st connect from client to dbmail-imapd works fine, but the 2nd - don't at all ;( (in my environment of course) ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
Aaron Stone wrote: Paul, Reading from imapd.c, through server.c, and to pool.c, it looks like the process path is like this: imapd.c: parent process (root) imapd.c: child process (nobody) server.c, pool.c: manage more children (more nobodies) check. That's the idea. When you send a HUP to the parent, it does this: imapd.c: parent process - Receive the HUP, tell child to restart imapd.c: child process - Told to restart, kill the children server.c, pool.c: told to stop, children are killed. Then this happens: imapd.c: parent process (root) imapd.c: child process (nobody) -- tries to get a new socket, can't! Is that first fork needed to establish the dropped privs before forking each of the children in the pool? That's correct afaik. You *need* some way to re-establish a new socket as root, and the current setup provides this. It would make sense to have the first child simply terminate when it gets a signal, and then the top level parent restarts everything... This fixes it for me: --- ../dbmail/imapd.c 2006-02-28 04:15:22.556837664 -0800 +++ imapd.c 2006-02-28 10:16:50.398784536 -0800 case 0: /* child process */ drop_privileges(config.serverUser, config.serverGroup); result = StartServer(config); trace(TRACE_INFO, %s,%s: server done, restart = [%d], __FILE__, __func__, result); - + exit(result); Looks like on-target to me :-). The server code offers many opportunities for redesign (understatement). That's very much a set target for post-2.2 development, as far as I am concerned. But bugs in the current, simple setup should and will be fixed during 2.2's lifetime. I'm still a bit unclear though as to why these problems didn't surface earlier. -- Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlandshttp://www.nfg.nl
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
On Tue, Feb 28, 2006, Paul J Stevens [EMAIL PROTECTED] said: Aaron Stone wrote: This fixes it for me: --- ../dbmail/imapd.c 2006-02-28 04:15:22.556837664 -0800 +++ imapd.c 2006-02-28 10:16:50.398784536 -0800 case 0: /* child process */ drop_privileges(config.serverUser, config.serverGroup); result = StartServer(config); trace(TRACE_INFO, %s,%s: server done, restart = [%d], __FILE__, __func__, result); - + exit(result); Looks like on-target to me :-). I'm away from my dev box until 6pm -- would you mind checking in this fix? I also think that we should review the other daemons to apply the same fix-pattern. The stress test that every daemon should pass: for i in `seq 1 10`; do kill -HUP `cat /var/run/dbmail-*.pid`; done I had a little fun with the imap daemon this morning, and did this: while [ 1 -eq 1 ]; do kill -HUP... and eventually smashed the signal stack ;-) The daemon code held up until the stack was smashed, though! The server code offers many opportunities for redesign (understatement). That's very much a set target for post-2.2 development, as far as I am concerned. Agreed. No rush replacing something what works for now. But bugs in the current, simple setup should and will be fixed during 2.2's lifetime. I'm still a bit unclear though as to why these problems didn't surface earlier. Yeah, weird. Let's get 2.1.4 out the door! :-D Aaron
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
On Tue, February 28, 2006 3:42 pm, Aaron Stone wrote: On Tue, Feb 28, 2006, Paul J Stevens [EMAIL PROTECTED] said: Aaron Stone wrote: This fixes it for me: --- ../dbmail/imapd.c 2006-02-28 04:15:22.556837664 -0800 +++ imapd.c 2006-02-28 10:16:50.398784536 -0800 case 0: /* child process */ drop_privileges(config.serverUser, config.serverGroup); result = StartServer(config); trace(TRACE_INFO, %s,%s: server done, restart = [%d], __FILE__, __func__, result); - + exit(result); Looks like on-target to me :-). I'm away from my dev box until 6pm -- would you mind checking in this fix? I also think that we should review the other daemons to apply the same fix-pattern. The stress test that every daemon should pass: for i in `seq 1 10`; do kill -HUP `cat /var/run/dbmail-*.pid`; done I had a little fun with the imap daemon this morning, and did this: while [ 1 -eq 1 ]; do kill -HUP... and eventually smashed the signal stack ;-) The daemon code held up until the stack was smashed, though! The server code offers many opportunities for redesign (understatement). That's very much a set target for post-2.2 development, as far as I am concerned. Agreed. No rush replacing something what works for now. But bugs in the current, simple setup should and will be fixed during 2.2's lifetime. I'm still a bit unclear though as to why these problems didn't surface earlier. Yeah, weird. Let's get 2.1.4 out the door! :-D Guys before 2.1.4 rel, what about that memory leak issue in imapd?, did you find a workaround? This is the malloc for () keys in the command parser I am talking about. -leif Aaron ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
Aaron Stone wrote: On Tue, Feb 28, 2006, Paul J Stevens [EMAIL PROTECTED] said: Aaron Stone wrote: This fixes it for me: --- ../dbmail/imapd.c 2006-02-28 04:15:22.556837664 -0800 +++ imapd.c 2006-02-28 10:16:50.398784536 -0800 case 0: /* child process */ drop_privileges(config.serverUser, config.serverGroup); result = StartServer(config); trace(TRACE_INFO, %s,%s: server done, restart = [%d], __FILE__, __func__, result); - + exit(result); Looks like on-target to me :-). I'm away from my dev box until 6pm -- would you mind checking in this fix? I also think that we should review the other daemons to apply the same fix-pattern. The stress test that every daemon should pass: I've refactored the whole do {} while... loop into a new function in server.c I'll do the stress test later... -- Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlandshttp://www.nfg.nl
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
On Tue, Feb 28, 2006, Leif Jackson [EMAIL PROTECTED] said: Guys before 2.1.4 rel, what about that memory leak issue in imapd?, did you find a workaround? This is the malloc for () keys in the command parser I am talking about. Oh. Hrmm... I'll try to take a look at it tonight. I think the lazy/stupid approach will be to change that global the_args array to be a static variable inside of the build_args function. Every time the function is called, it will reap the memory from the previous call. Exactly the same fix you made for db_query ;-) Aaron
[Dbmail-dev] [DBMail 0000306]: the processes spawn infitnetly until they crash the machine
The following issue has been SUBMITTED. == http://www.dbmail.org/mantis/view.php?id=306 == Reported By:variable Assigned To: == Project:DBMail Issue ID: 306 Category: General Reproducibility:always Severity: crash Priority: normal Status: new == Date Submitted: 28-Feb-06 23:08 CET Last Modified: 28-Feb-06 23:08 CET == Summary:the processes spawn infitnetly until they crash the machine Description: Both on 2.0.7 and 2.0.9 all 3 processes will spawn indefinatly until the machine crashes, I found that if you set the TRACE_LEVEL=5 it will solve the problem, and have been running my production server like this for http://www.dbmail.org/mantis/view.php?id=6#2 months now. Also these open processes keep opening connections to pgsql and quickly use all the connections for pgsql. == Issue History Date Modified Username FieldChange == 28-Feb-06 23:08 variable New Issue ==
Re: [Dbmail-dev] Troubles: rev-1996 and 1997
On Tue, February 28, 2006 4:59 pm, Aaron Stone wrote: On Tue, Feb 28, 2006, Leif Jackson [EMAIL PROTECTED] said: Guys before 2.1.4 rel, what about that memory leak issue in imapd?, did you find a workaround? This is the malloc for () keys in the command parser I am talking about. Oh. Hrmm... I'll try to take a look at it tonight. I think the lazy/stupid approach will be to change that global the_args array to be a static variable inside of the build_args function. Every time the function is called, it will reap the memory from the previous call. Exactly the same fix you made for db_query ;-) That was the issue, you can't reap/free the memory for each allocation because you loose the pointer refernece, it leaks because when the the_args array is free'ed after use you only free the ref to the main allocation. I belive the correct solution would be to change it to a resizeing realloc or somthing of that nature so that when freeing the allocated args it free's all the memory in the buffer because it was realloced each time to point to the whole thing...etc. -leif Aaron ___ Dbmail-dev mailing list Dbmail-dev@dbmail.org http://twister.fastxs.net/mailman/listinfo/dbmail-dev