Re: epoll_wait returning EFAULT on Linux 3.2.78

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: epoll_wait returning EFAULT on Linux 3.2.78
Дата
Msg-id 10468.1464879020@sss.pgh.pa.us
обсуждение исходный текст
Ответ на epoll_wait returning EFAULT on Linux 3.2.78  (Greg Stark <stark@mit.edu>)
Ответы Re: epoll_wait returning EFAULT on Linux 3.2.78  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
Greg Stark <stark@mit.edu> writes:
> What I'm seeing is that every call to epoll_wait() raises EFAULT.

The man page for epoll_wait suggests that that implies a bad pointer
value for the events array.  You're showingepoll_ret_events = 0x9c0ad4
which is not obviously bad, but it's also only 4-byte aligned.
I notice that CreateWaitEventSet() is being remarkably cavalier
about alignment requirements; maybe it ought to make some effort
to ensure that epoll_ret_events is maxaligned.  Personally I'd
make all the subsidiary arrays maxaligned, just to be sure.
The existing coding is taking it on faith that the alignment
requirements of each later component of the WaitEventSet are no
worse than those of any earlier component; which even if true today
is an assumption that will bite us on the ass someday.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: epoll_wait returning EFAULT on Linux 3.2.78
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Parallel pg_dump's error reporting doesn't work worth squat