Re: [smartos-discuss] epoll_ctl and epoll_wait on SmartOS

2014-08-01 Thread Bryan Cantrill via smartos-discuss
Perfect -- thank you! As it turns out, this was -- as you surmised -- a bug in our epoll implementation. I have pushed the fix: https://github.com/joyent/illumos-joyent/commit/471f1f3ef02e25a84d7c36c857ed260ae2b7ac99 Thanks for taking the time for the clean test case -- and apologies for the

Re: [smartos-discuss] epoll_ctl and epoll_wait on SmartOS

2014-08-01 Thread Youzhong Yang via smartos-discuss
Thanks very much for the quick fix. I'll build a new image and also samba, then report back after testing. -Youzhong On Fri, Aug 1, 2014 at 4:56 AM, Bryan Cantrill bryancantr...@gmail.com wrote: Perfect -- thank you! As it turns out, this was -- as you surmised -- a bug in our epoll

Re: [smartos-discuss] epoll_ctl and epoll_wait on SmartOS

2014-08-01 Thread Youzhong Yang via smartos-discuss
I got my new smartos image and alos samba 4.1.10 built, it works, no more 'net ads join' crashes. Your help is absolutely appreciated. Thanks, -Youzhong On Fri, Aug 1, 2014 at 9:42 AM, Youzhong Yang youzh...@gmail.com wrote: Thanks very much for the quick fix. I'll build a new image and

Re: [smartos-discuss] epoll_ctl and epoll_wait on SmartOS

2014-08-01 Thread Bryan Cantrill via smartos-discuss
Youzhong, Nice! Great to hear that it worked, and thanks again for getting it down to such a straightforward test case! - Bryan On Fri, Aug 1, 2014 at 11:12 AM, Youzhong Yang youzh...@gmail.com wrote: I got my new smartos image and alos samba 4.1.10 built, it works, no more 'net

Re: [smartos-discuss] epoll_ctl and epoll_wait on SmartOS

2014-07-31 Thread Youzhong Yang via smartos-discuss
Thanks Bryan. I take back what I said. epoll_* does not ignore epoll_event.data passed in. I managed to reproduce the issue with a program rewritten from yours: # gcc myepoll.c # ./a.out EPOLL_CTL_ADD: fd = 4, ptr = fd7fffdffba0 writing to pipe fd 5 written 6 bytes to fd 5 Got an event on

[smartos-discuss] epoll_ctl and epoll_wait on SmartOS

2014-07-30 Thread Youzhong Yang via smartos-discuss
Hi All, The man page of epoll_ctl says: The data field specifies the datum to be associated with the event and will be returned via epoll_wait(3C). The events field denotes both the desired events (when specified via epoll_ctl()) and the events that have

Re: [smartos-discuss] epoll_ctl and epoll_wait on SmartOS

2014-07-30 Thread Bryan Cantrill via smartos-discuss
Seems like a bug, but not sure I entirely understand: there may be some edge conditions where data specified in the data field of the epoll_event structure via epoll_ctl() is not properly returned, but it's not true that SmartOS simply ignores it. Take, for example, the following program: