A NOTE has been added to this issue. 
====================================================================== 
http://dbmail.org/mantis/view.php?id=834 
====================================================================== 
Reported By:                jasb
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   834
Category:                   POP3 daemon
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             25-Jan-10 17:06 CET
Last Modified:              05-Oct-11 09:35 CEST
====================================================================== 
Summary:                    Too many open files (POP3D)
Description: 
Howdy Paul,

Since I’m using 2.3.6, maybe from November or so, today happened
something that never did.

The POP3 service just hang.

--
lira:~# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.

Connection closed by foreign host.
lira:~#
--

after killing it and start again everything’s working fine.
I have no debug logs!

I saw on the logs this:

--
Jan 20 13:48:56 lira dbmail/pop3d[3717]: [0x9c07f80] Error:[server]
server_sock_cb(+449): Too many open files
--

Don’t know if this help’s on tracking some leak on POP3D.
One thing that may help that I saw looking at the log, this may happen
‘cause of the “attach” of the spammer sending known users to the
pop3d , and that may be the reason that make it hang with the error “Too
many open files”, so the leak may be there.
Log is attached,
Anything you need say,


Jorge,

====================================================================== 

---------------------------------------------------------------------- 
 (0003018) waza123 (reporter) - 01-Feb-10 17:03
 http://dbmail.org/mantis/view.php?id=834#c3018 
---------------------------------------------------------------------- 
the same !!


Feb 01 09:18:40 www dbmail-pop3d[22070]: [0x8055f60] EMERGENCY:[server]
_sock_cb(+487): getpeername::error [Transport endpoint is not connected]

 

---------------------------------------------------------------------- 
 (0003019) paul (administrator) - 01-Feb-10 16:34
 http://dbmail.org/mantis/view.php?id=834#c3019 
---------------------------------------------------------------------- 
Not the same.

an emergency exit is *not* the same as a segfault.

the getpeername error is an indication that the client has hung up before
a connection could be initialized. This should of course not lead to a
program exit. 

---------------------------------------------------------------------- 
 (0003021) jasb (reporter) - 03-Feb-10 10:38
 http://dbmail.org/mantis/view.php?id=834#c3021 
---------------------------------------------------------------------- 
Paul,
Happened again.
Tell me, the leaks that you have been fixing on HEAD, does anyone has
anything to do with POP3? 

---------------------------------------------------------------------- 
 (0003022) paul (administrator) - 03-Feb-10 13:16
 http://dbmail.org/mantis/view.php?id=834#c3022 
---------------------------------------------------------------------- 
No. Unrelated. Try taking lsof snapshots of the system when the error
occurs. 

---------------------------------------------------------------------- 
 (0003025) jasb (reporter) - 04-Feb-10 21:41
 http://dbmail.org/mantis/view.php?id=834#c3025 
---------------------------------------------------------------------- 
Hum, dificult.
Can i ask you to write a bash or perl script, to issue for example 20.000
login attempts againts POP3D, so that i can catch that information?

I don't have skill's to write that script, sorry :( 

---------------------------------------------------------------------- 
 (0003028) jasb (reporter) - 18-Feb-10 10:43
 http://dbmail.org/mantis/view.php?id=834#c3028 
---------------------------------------------------------------------- 
Paul,
I asked a friend to make me a perl script to do this, and I did the
folowing:

-Issue 50.000 connections with wrong username and passwd, server behave
OK
-Issue 50.000 connection with valid user & passwd, server behave OK

now, o could simulate a login, and message retrieve, to do this, which
commands should i send to server (without delete any message):

1-login
2-STAT
3-LIST
4-RETR msg_id
5-QUIT


confirm me if this OK, so that i can simulate it. 

---------------------------------------------------------------------- 
 (0003281) jasb (reporter) - 04-Oct-11 17:01
 http://dbmail.org/mantis/view.php?id=834#c3281 
---------------------------------------------------------------------- 
Hi Paul,
Since last time I reported this, I got the POP3D hang today, right after a
restart, and I just saw that someone tried to login with several users
(guessing).
Attached there's the log.
Is there a way that you can simulate this to see if in the last GIT still
has this problem?
This can't be the system open file limit 'cause I have it set to 2Milion
(2.000.000). 

---------------------------------------------------------------------- 
 (0003282) jasb (reporter) - 04-Oct-11 17:03
 http://dbmail.org/mantis/view.php?id=834#c3282 
---------------------------------------------------------------------- 
Ah,
I did a small strace to the hang pid, but only had this, and since it
didn't moved for long time, I just canceled it.

lira:~# strace -p 12010
Process 12010 attached - interrupt to quit
clock_gettime(CLOCK_MONOTONIC, {611842, 882460720}) = 0
epoll_wait(9, ^C <unfinished ...>
Process 12010 detached

lira:~# cat /proc/sys/fs/file-max
2000000
lira:~# 

---------------------------------------------------------------------- 
 (0003285) paul (administrator) - 05-Oct-11 09:35
 http://dbmail.org/mantis/view.php?id=834#c3285 
---------------------------------------------------------------------- 
Jorge,

Next time it happens do a 'lsof -p <PID>' to see what files where opened. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
25-Jan-10 17:06  jasb           New Issue                                    
25-Jan-10 17:06  jasb           File Added: pop3_too_many_open_files.zip        
           
01-Feb-10 15:49  waza123        Note Added: 0003018                          
01-Feb-10 16:34  paul           Note Added: 0003019                          
01-Feb-10 17:03  paul           Note Edited: 0003018                         
03-Feb-10 10:38  jasb           Note Added: 0003021                          
03-Feb-10 13:16  paul           Note Added: 0003022                          
04-Feb-10 21:41  jasb           Note Added: 0003025                          
18-Feb-10 10:43  jasb           Note Added: 0003028                          
04-Oct-11 17:01  jasb           Note Added: 0003281                          
04-Oct-11 17:01  jasb           File Added: jasbpop3.zip                     
04-Oct-11 17:03  jasb           Note Added: 0003282                          
05-Oct-11 09:35  paul           Note Added: 0003285                          
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to