i am sorry, the previous problem i posted seems to be that libcurl behave different with libevent, but not the fault of libevent.
i think the problem can be explain like this: 1. libcurl detect a sockfd to be BAD or GONE 2. libcurl tell the user's callback func to do a REMOVE to this sockfd 3. user's callback func call epoll_del() to this sockfd 4. in function epoll_del(), epoll_ctl() returns ENOENT or EBADF 2008/6/8 <[EMAIL PROTECTED]>: > recently, i try to use libcurl-7.18.2 + libevent-1.4.4, and i found that > the event_del() call failed so much, but event_add() call are all return > successfully > > i use the curl's example code hiperfifo.c, and dump some runtime info to > stderr.log > below is the beginning part of stderr.log: > ============================below====================================== > after epoll_init, epollop->(epfd, nevents, nfds) = 3,31999,31999 > socket callback: s=8 e=0x805c390 what=IN Adding data: IN > socket callback: s=9 e=0x8072820 what=IN Adding data: IN > socket callback: s=10 e=0x8088ba0 what=IN Adding data: IN > socket callback: s=11 e=0x809ef20 what=IN Adding data: IN > socket callback: s=12 e=0x80b52c8 what=IN Adding data: IN > socket callback: s=13 e=0x80cb658 what=IN Adding data: IN > socket callback: s=14 e=0x80e19e8 what=IN Adding data: IN > socket callback: s=15 e=0x80f7d98 what=IN Adding data: IN > socket callback: s=16 e=0x810e168 what=IN Adding data: IN > socket callback: s=17 e=0x8124548 what=IN Adding data: IN > socket callback: s=18 e=0x813a900 what=IN Adding data: IN > socket callback: s=19 e=0x8150c90 what=IN Adding data: IN > socket callback: s=8 e=0x805c390 what=OUT Changing action from IN to OUT > Error: epoll_del: epoll_ctl return false, fd = 8, op = EPOLL_CTL_MOD, > epoll_ctl() returns ENOENT > epollop->(epfd, nevents, nfds) = 3,31999,31999 > Error: event_del in setsock() return false > socket callback: s=9 e=0x8072820 what=OUT Changing action from IN to OUT > Error: epoll_del: epoll_ctl return false, fd = 9, op = EPOLL_CTL_MOD, > epoll_ctl() returns ENOENT > epollop->(epfd, nevents, nfds) = 3,31999,31999 > Error: event_del in setsock() return false > ...... > ============================above====================================== > > my input is 3000 different urls > >> grep ENOENT stderr.log | wc -l > 2002 > >> grep EBADF stderr.log | wc -l > 1510 > > is it a epoll_ctl system call 's bug? > or libevent misuse the epoll ? > > hoping for your help sincerely > > -- > [EMAIL PROTECTED] -- [EMAIL PROTECTED]
_______________________________________________ Libevent-users mailing list Libevent-users@monkey.org http://monkeymail.org/mailman/listinfo/libevent-users