[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mpop-users] pipelining=off not working?



I am using:

mpop --host=myhost --user me \ 
 --delivery=mbox,/var/mail/me --tls=off --auth=user --keep=off \
 --pipelining=off

But it hangs everytime I use it. It always hangs when it prints to console 
that it is loading the second message. I kill it with CTRL-C and next time 
it shows next two messages and hangs.

ktrace shows me it downloads a message and then:

 25327      1 mpop     RET   write 7570/0x1d92
 25327      1 mpop     CALL  close(5)
 25327      1 mpop     RET   close 0
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 1\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 2\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 3\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 4\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 5\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 6\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 7\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  sendto(3,0xbfbfe498,8,0,0,0)
 25327      1 mpop     GIO   fd 3 wrote 8 bytes
       "DELE 8\r
       "
 25327      1 mpop     RET   sendto 8
 25327      1 mpop     CALL  recvfrom(3,0x806744c,0x1000,0,0,0)
 25327      1 mpop     GIO   fd 3 read 22 bytes
       "+OK Message 1 marked\r
       "
 25327      1 mpop     RET   recvfrom 22/0x16
 25327      1 mpop     CALL  recvfrom(3,0x806744c,0x1000,0,0,0)
 25327      1 mpop     GIO   fd 3 read 22 bytes
       "+OK Message 2 marked\r
       "
 25327      1 mpop     RET   recvfrom 22/0x16
 25327      1 mpop     CALL  recvfrom(3,0x806744c,0x1000,0,0,0)
 25327      1 mpop     RET   recvfrom -1 errno 4 Interrupted system call
 25327      1 mpop     PSIG  SIGINT caught handler=0x804cdd4 mask=())



It sure looks like it sends multiple DELE at one time before waiting.
And so I use tcpdump and it clearly shows it sends RETR twice before it 
receives the first message.

Now looking at my old build from June 29, I see I must have had same 
problem as I set my POP3_PIPELINE_MIN to 0 and POP3_PIPELINE_MAX to 1. 
(... I am not sure why I didn't report this then.)

My workaround in src/pop3.c is:

+#ifndef POP3_PIPELINE_MIN
 #define POP3_PIPELINE_MIN	20
+#endif
+#ifndef POP3_PIPELINE_MAX
 #define POP3_PIPELINE_MAX	100
+#endif
 
And I set CPPFLAGS to     -DPOP3_PIPELINE_MIN=0   -DPOP3_PIPELINE_MAX=1 
before I do ./configure

Does anyone have fix for pipelining?

(I am a co-author of a POP3 daemon which doesn't do pipelining.)