Summary: | dev-python/twisted-12.0.0 fails tests (epoll) on glibc 2.15 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Patrick Lauer <patrick> |
Component: | New packages | Assignee: | Python Gentoo Team <python> |
Status: | RESOLVED OBSOLETE | ||
Severity: | normal | CC: | gentoo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | http://twistedmatrix.com/trac/ticket/5663 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Patrick Lauer
2012-04-27 08:59:57 UTC
I've started debugging this. I believe it is caused by a change in the definition of EPOLLET in /usr/include/sys/epoll.h from glibc 2.14 to 2.15: it was "(1 << 31)" and is now "1u << 31". This changes twisted.python._epoll.ET from -2147483648 to 2147483648. The "flags" argument to the _control method the test calls is defined as "int flags", which it now overflows. As the flags argument is actually used to populate the "flags" field in a struct epoll_event, and that field has always been a uint32_t, I think the new value of ET is actually the correct one and _epoll.pyx needs to be patched so the _control method takes an unsigned int, and ET has the positive value even when compiled with older glibc headers. I've not yet tried to write the patch for that, but intend to do so this weekend and pass it on to upstream. The only user of the _epoll module in twisted itself is the epollreactor, and it does not use _epoll.ET. Nothing outside of twisted *should* use twisted.internet._epoll (note the underscore). So I think fixing this is not urgent: it's a real bug in an internal module, but it looks like only that internal module's tests are actually broken. not present in gentoo.git anymore |