Re: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection
От | Tom Lane |
---|---|
Тема | Re: Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection |
Дата | |
Msg-id | 30898.1386264790@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #8647: Backend process hangs and becomes unkillable when SSL client looses connection (Alexander Kukushkin <cyberdemn@gmail.com>) |
Список | pgsql-bugs |
Alexander Kukushkin <cyberdemn@gmail.com> writes: > For me fix of this issue should look like following: > ---------------------------------------------------------------------------------------------------------------------------- > static int > my_sock_write(BIO *h, const char *buf, int size) > { > int res = 0; > res = send(h->num, buf, size, 0); > + BIO_clear_retry_flags(b); > if (res <= 0) > { > if (errno == EINTR) > { > BIO_set_retry_write(h); > } > } > return res; > } I looked into the source code of current openssl (1.0.1e) and confirmed that there's a BIO_clear_retry_flags step in the code that we're copying (sock_write in crypto/bio/bss_sock.c). Possibly we screwed up when we made that copy, but my money is on the theory that this is a bug fix that appeared in upstream openssl sometime after we cloned the function. (There is a BIO_clear_retry_flag step in sock_read, both our version and theirs.) Anyway, it seems clear that we want to adopt this change, particularly now that you've demonstrated a user-visible bug from not resetting the flags here. Will commit, thanks for the report! regards, tom lane
В списке pgsql-bugs по дате отправления: