Menu

30 seconds delay in the folder->getMessage()-function?

Help
2014-03-07
2014-03-07
  • Soulfreezer

    Soulfreezer - 2014-03-07

    Hi,

    I need help receiving mails from pop3 with the vmime-lib. It seems
    that there is a big delay (exact 30 seconds?!) between receiving each mail
    (it is the getMessage()-function!)

    Because we need this functionality in a bigger commercial
    project (probably vmime commercial license in focus), this is not an acceptable
    delay. Does anybody know, how to fix this problem? We tried different protocols
    and differEnt servers with vmime, in all scenarios we have the same problem.
    We also tried the c++ poco-libs, and there all was fine and no delay between
    two mails appeared. Are we doing something wrong?

    Here is a minimal example, which produces the problem.

    //-------------------------------------------------------------------------------
    //Static vmime-lib 64Bit-Version DEBUG (CentOS release 6.4 (Final))
    //-------------------------------------------------------------------------------
    //
    //GIT-Version:
    //  commit 5fb3f5a15fbf1d184c404c9d0229d913568e14d5
    //  Date:   Wed Feb 26 19:12:04 2014 +0100
    //
    //Make-Command:
    //  cd /tmp;
    //  git clone git://github.com/kisli/vmime;
    //  cd vmime;
    //  mkdir build;
    //  mkdir release;
    //  cd build;
    //  cmake28 -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/tmp/vmime/release -DVMIME_BUILD_SAMPLES=OFF -DVMIME_TLS_SUPPORT_LIB_IS_OPENSSL=ON -DVMIME_TLS_SUPPORT_LIB_IS_GNUTLS=OFF -DVMIME_BUILD_STATIC_LIBRARY=ON -DVMIME_BUILD_SHARED_LIBRARY=OFF -DVMIME_HAVE_SASL_SUPPORT=OFF -DCMAKE_BUILD_TYPE=Debug ..;
    //  make;
    //  make install;
    //  cd..;
    //  cd release;
    //  ls -ltr;
    
    #define VMIME_STATIC
    
    #include<vmime/vmime.hpp>
    #include<iostream>
    #include<fstream>
    #include<string>
    
    int main()
    {
        vmime::utility::url url ("pop3://x:y@z.de");
        vmime::shared_ptr <vmime::net::store> store = vmime::make_shared <vmime::net::session>()->getStore(url);
        store->connect();
        vmime::shared_ptr<vmime::net::folder> folder = store->getDefaultFolder();
        folder->open(vmime::net::folder::MODE_READ_WRITE) ;
    
        vmime::utility::outputStreamAdapter out(std::cout);
        for (unsigned int ui = 1; ui <= static_cast<unsigned int>(folder->getMessageCount()); ++ui)
            folder->getMessage(ui)->extract(out); //exact 30 seconds delay for each iteration???!!
    
        return 0;
    }
    

    Here in the Wireshark-output u can also see the delay:

    No. Time Source Destination Protocol Length Info
    1 0.000000 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=1 Ack=1 Win=14600 Len=0

    Frame 1: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 1, Ack: 1, Len: 0

    Deleted Frame 2 and 3 !!

    Frame 4: 71 bytes on wire (568 bits), 71 bytes captured (568 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 24, Ack: 26, Len: 15
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    5 0.166482 XXX.20.XXX.XX XX.2XX.242.X POP 62 C: STAT

    Frame 5: 62 bytes on wire (496 bits), 62 bytes captured (496 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 39, Ack: 42, Len: 6
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    6 0.193045 XXX.20.XXX.XX XX.2XX.242.X POP 64 C: RETR 1

    Frame 6: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 45, Ack: 55, Len: 8
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    7 0.220972 XXX.20.XXX.XX XX.2XX.242.X POP 64 C: RETR 2

    Frame 7: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 53, Ack: 1375, Len: 8
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    8 0.249496 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=61 Ack=4135 Win=22080 Len=0

    Frame 8: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 61, Ack: 4135, Len: 0

    No. Time Source Destination Protocol Length Info
    9 0.250261 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=61 Ack=6895 Win=27600 Len=0

    Frame 9: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 61, Ack: 6895, Len: 0

    No. Time Source Destination Protocol Length Info
    10 0.251252 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=61 Ack=9655 Win=33120 Len=0

    Frame 10: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 61, Ack: 9655, Len: 0

    No. Time Source Destination Protocol Length Info
    11 0.251882 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=61 Ack=11578 Win=38640 Len=0

    Frame 11: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 61, Ack: 11578, Len: 0

    No. Time Source Destination Protocol Length Info
    12 30.495853 XXX.20.XXX.XX XX.2XX.242.X POP 64 C: RETR 3

    Frame 12: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 61, Ack: 11578, Len: 8
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    13 30.524218 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=69 Ack=14338 Win=44160 Len=0

    Frame 13: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 69, Ack: 14338, Len: 0

    No. Time Source Destination Protocol Length Info
    14 30.525450 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=69 Ack=17098 Win=49680 Len=0

    Frame 14: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 69, Ack: 17098, Len: 0

    No. Time Source Destination Protocol Length Info
    15 30.526470 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=69 Ack=19858 Win=55200 Len=0

    Frame 15: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 69, Ack: 19858, Len: 0

    No. Time Source Destination Protocol Length Info
    16 30.526831 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=69 Ack=21724 Win=60720 Len=0

    Frame 16: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 69, Ack: 21724, Len: 0

    No. Time Source Destination Protocol Length Info
    17 60.769822 XXX.20.XXX.XX XX.2XX.242.X POP 64 C: RETR 4

    Frame 17: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 69, Ack: 21724, Len: 8
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    18 60.798709 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=77 Ack=24484 Win=63480 Len=0

    Frame 18: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 77, Ack: 24484, Len: 0

    No. Time Source Destination Protocol Length Info
    19 60.799581 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=77 Ack=27244 Win=63480 Len=0

    Frame 19: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 77, Ack: 27244, Len: 0

    No. Time Source Destination Protocol Length Info
    20 60.800467 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=77 Ack=30004 Win=63480 Len=0

    Frame 20: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 77, Ack: 30004, Len: 0

    No. Time Source Destination Protocol Length Info
    21 60.801243 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=77 Ack=31860 Win=63480 Len=0

    Frame 21: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 77, Ack: 31860, Len: 0

    No. Time Source Destination Protocol Length Info
    22 91.047601 XXX.20.XXX.XX XX.2XX.242.X POP 64 C: RETR 5

    Frame 22: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 77, Ack: 31860, Len: 8
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    23 91.076053 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=85 Ack=34620 Win=63480 Len=0

    Frame 23: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 85, Ack: 34620, Len: 0

    No. Time Source Destination Protocol Length Info
    24 91.076923 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=85 Ack=37380 Win=63480 Len=0

    Frame 24: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 85, Ack: 37380, Len: 0

    No. Time Source Destination Protocol Length Info
    25 91.077999 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=85 Ack=40140 Win=63480 Len=0

    Frame 25: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 85, Ack: 40140, Len: 0

    No. Time Source Destination Protocol Length Info
    26 91.078603 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=85 Ack=42006 Win=63480 Len=0

    Frame 26: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 85, Ack: 42006, Len: 0

    No. Time Source Destination Protocol Length Info
    27 121.322612 XXX.20.XXX.XX XX.2XX.242.X POP 64 C: RETR 6

    Frame 27: 64 bytes on wire (512 bits), 64 bytes captured (512 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 85, Ack: 42006, Len: 8
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    28 121.350603 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=93 Ack=44766 Win=63480 Len=0

    Frame 28: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 93, Ack: 44766, Len: 0

    No. Time Source Destination Protocol Length Info
    29 121.351686 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=93 Ack=47526 Win=63480 Len=0

    Frame 29: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 93, Ack: 47526, Len: 0

    No. Time Source Destination Protocol Length Info
    30 121.352473 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=93 Ack=50286 Win=63480 Len=0

    Frame 30: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 93, Ack: 50286, Len: 0

    No. Time Source Destination Protocol Length Info
    31 121.353034 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [ACK] Seq=93 Ack=52144 Win=63480 Len=0

    Frame 31: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 93, Ack: 52144, Len: 0

    No. Time Source Destination Protocol Length Info
    32 151.599947 XXX.20.XXX.XX XX.2XX.242.X POP 62 C: RSET

    Frame 32: 62 bytes on wire (496 bits), 62 bytes captured (496 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 93, Ack: 52144, Len: 6
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    33 151.626746 XXX.20.XXX.XX XX.2XX.242.X POP 62 C: QUIT

    Frame 33: 62 bytes on wire (496 bits), 62 bytes captured (496 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 99, Ack: 52149, Len: 6
    Post Office Protocol

    No. Time Source Destination Protocol Length Info
    34 151.654613 XXX.20.XXX.XX XX.2XX.242.X TCP 56 40088 > pop3 [FIN, ACK] Seq=105 Ack=52168 Win=63480 Len=0

    Frame 34: 56 bytes on wire (448 bits), 56 bytes captured (448 bits)
    Linux cooked capture
    Internet Protocol Version 4, Src: XXX.20.XXX.XX (XXX.20.XXX.XX), Dst: XX.2XX.242.X (XX.2XX.242.X)
    Transmission Control Protocol, Src Port: 40088 (40088), Dst Port: pop3 (110), Seq: 105, Ack: 52168, Len: 0

     
  • Soulfreezer

    Soulfreezer - 2014-03-07

    @additional info
    If u starting the binary with strace u can see, that when the delay starts, thousands of lines of selects appear (after 2. mail retrieved) ...

    write(1, "YII=\r\n", 6) = 6
    write(1, "\r\n", 2) = 2
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)
    select(4, [3], NULL, NULL, {0, 10000}) = 0 (Timeout)

     
  • Soulfreezer

    Soulfreezer - 2014-03-07

    With GDB u can see the 30 seconds timeout in the waitForData-function

    489 tv.tv_usec = 10000; // 10 ms
    (gdb) step
    491 ssize_t ret = ::select(m_desc + 1, read ? &fds : NULL, write ? &fds : NULL, NULL, &tv);
    (gdb) step
    493 if (ret <= 0)
    (gdb) step
    495 if (ret < 0 && !IS_EAGAIN(errno))
    (gdb) step
    500 if (m_timeoutHandler &&
    (gdb) step
    boost::shared_ptr<vmime::net::timeouthandler>::operator vmime::net::timeoutHandler boost::shared_ptr<vmime::net::timeouthandler>::</vmime::net::timeouthandler> (this=0xb02608)
    at /usr/include/boost/smart_ptr/detail/operator_bool.hpp:47
    47 return px == 0? 0: &this_type::px;
    (gdb) step
    48 }
    (gdb) step
    vmime::platforms::posix::posixSocket::waitForData (this=0xb025f0, read=true, write=false, msecs=30000)
    at /tmp/vmime/src/vmime/platforms/posix/posixSocket.cpp:480
    480 for (int i = 0 ; i <= msecs / 10 ; ++i)
    (gdb) step
    484 FD_ZERO(&fds);
    (gdb) step
    485 FD_SET(m_desc, &fds);
    (gdb) step
    488 tv.tv_sec = 0;
    (gdb) step
    489 tv.tv_usec = 10000; // 10 ms
    (gdb) step
    491 ssize_t ret = ::select(m_desc + 1, read ? &fds : NULL, write ? &fds : NULL, NULL, &tv);
    (gdb) step
    493 if (ret <= 0)
    (gdb) step
    495 if (ret < 0 && !IS_EAGAIN(errno))
    (gdb) step
    500 if (m_timeoutHandler &&
    (gdb) step
    boost::shared_ptr<vmime::net::timeouthandler>::operator vmime::net::timeoutHandler boost::shared_ptr<vmime::net::timeouthandler>::</vmime::net::timeouthandler> (this=0xb02608)
    at /usr/include/boost/smart_ptr/detail/operator_bool.hpp:47
    47 return px == 0? 0: &this_type::px;
    (gdb) step
    48 }
    (gdb) step
    vmime::platforms::posix::posixSocket::waitForData (this=0xb025f0, read=true, write=false, msecs=30000)
    at /tmp/vmime/src/vmime/platforms/posix/posixSocket.cpp:480
    480 for (int i = 0 ; i <= msecs / 10 ; ++i)
    (gdb) step
    484 FD_ZERO(&fds);
    (gdb) step
    485 FD_SET(m_desc, &fds);
    (gdb) step
    488 tv.tv_sec = 0;
    (gdb) step
    489 tv.tv_usec = 10000; // 10 ms
    (gdb) step
    491 ssize_t ret = ::select(m_desc + 1, read ? &fds : NULL, write ? &fds : NULL, NULL, &tv);
    (gdb) step
    493 if (ret <= 0)
    (gdb) step
    515 else if (ret > 0)
    (gdb) step
    517 return true;
    (gdb) step</vmime::net::timeouthandler></vmime::net::timeouthandler>

     
  • Vincent Richard

    Vincent Richard - 2014-03-07

    Hi!

    Thank you for this complete bug report.

    I have fixed the issue, please find a patch here:
    https://github.com/kisli/vmime/commit/012989f8fd572fa1df0f87994530644e4ede2409

    You can also pull the latest version from the Git repository.

    Regards,

    Vincent

     

Log in to post a comment.

MongoDB Logo MongoDB