00:00:01  * ircretaryquit (Remote host closed the connection)
00:00:06  * jasnell_quit (Remote host closed the connection)
00:00:11  * ircretaryjoined
00:04:16  * jasnell_joined
00:09:10  * Fishrock123joined
00:17:40  * ijrothjoined
00:18:50  * ijrothquit (Client Quit)
00:25:30  * s3shsjoined
00:27:01  * alexforsterjoined
00:28:11  * a3fquit (Quit: Zzzzz..)
00:29:00  * avalanche123quit (Remote host closed the connection)
00:31:50  * alexforsterquit (Client Quit)
00:32:24  * jasnell_quit (Remote host closed the connection)
00:37:53  * Wraithanjoined
00:37:57  * Wraithanpart ("WeeChat 0.4.2")
00:45:16  * brsonquit (Quit: leaving)
01:06:48  * dap_quit (Quit: Leaving.)
01:13:13  * jgiquit (Quit: jgi)
01:17:27  * avalanche123joined
01:21:56  * avalanche123quit (Ping timeout: 246 seconds)
01:51:48  * jgijoined
01:57:34  * abraxas_joined
02:08:08  * toothrotquit (Ping timeout: 252 seconds)
02:16:44  * jgiquit (Quit: jgi)
02:27:17  * jasnelljoined
02:40:05  * jasnellquit (Remote host closed the connection)
02:40:46  * jasnelljoined
02:45:03  * jasnellquit (Ping timeout: 248 seconds)
02:50:32  * avalanche123joined
03:00:00  * avalanche123quit (Remote host closed the connection)
03:15:40  * toothrotjoined
03:28:29  * jasnelljoined
03:31:54  * jgijoined
03:32:32  * jgiquit (Client Quit)
03:42:42  * jgijoined
03:57:46  * inolenquit (Ping timeout: 252 seconds)
04:02:12  * rmgquit (Remote host closed the connection)
04:06:28  * jgiquit (Quit: jgi)
04:45:47  * inolenjoined
04:48:51  * jgijoined
05:07:25  * Alcestquit (Ping timeout: 276 seconds)
05:18:34  * Fishrock123quit (Remote host closed the connection)
05:28:33  * jasnellquit (Remote host closed the connection)
05:28:58  * Fishrock123joined
05:29:11  * seishunjoined
05:29:44  * jgiquit (Quit: jgi)
05:31:50  * jgijoined
05:35:06  * jgiquit (Client Quit)
05:43:49  * Fishrock123quit (Ping timeout: 244 seconds)
05:46:00  * Jacob8432joined
05:48:31  * Jacob843quit (Ping timeout: 248 seconds)
05:52:14  * avalanche123joined
05:53:18  * avalanche123quit (Remote host closed the connection)
05:54:33  * a3fjoined
06:15:25  * inolenquit (Ping timeout: 264 seconds)
06:22:49  * Fishrock123joined
06:22:58  * Fishrock123quit (Remote host closed the connection)
06:38:25  * seishunquit (Ping timeout: 276 seconds)
06:41:56  * warehouse13joined
06:44:37  * Left_Turnquit (Ping timeout: 252 seconds)
06:51:02  * s3shsquit (Remote host closed the connection)
06:52:17  * s3shsjoined
06:52:56  * inolenjoined
06:59:29  * Ralithquit (Ping timeout: 256 seconds)
07:01:08  * Ralithjoined
07:18:34  * SergeiRNDjoined
07:19:21  * s3shs_joined
07:23:08  * s3shsquit (Ping timeout: 256 seconds)
07:30:53  * toothrotquit (Ping timeout: 246 seconds)
07:55:48  * a3fquit (Quit: Zzzzz..)
07:58:59  * a3fjoined
07:58:59  * a3fquit (Client Quit)
08:00:11  * tunniclm__joined
08:09:02  * AlexisMochaquit (Ping timeout: 256 seconds)
08:17:19  * SergeiRNDquit (Quit: Leaving.)
08:18:30  * AlexisMochajoined
08:29:14  * jasnelljoined
08:33:34  * jasnellquit (Ping timeout: 255 seconds)
08:35:28  * SergeiRNDjoined
08:39:50  * SergeiRNDquit (Ping timeout: 246 seconds)
08:47:02  * Alcestjoined
08:48:51  * saghuljoined
09:23:08  * SergeiRNDjoined
09:46:11  * rendarjoined
10:33:00  * rmgjoined
10:36:41  * s3shs_quit (Ping timeout: 246 seconds)
10:37:17  * rmgquit (Ping timeout: 244 seconds)
10:47:43  * chris_99joined
11:00:09  * SergeiRNDquit (Quit: Leaving.)
11:05:54  * tobias-swedevjoined
11:17:55  * tobias-swedevquit
11:18:16  * abraxas_quit (Remote host closed the connection)
11:38:27  * SergeiRNDjoined
13:07:23  * abraxas_joined
13:11:49  * abraxas_quit (Ping timeout: 264 seconds)
13:18:21  * tunniclm_joined
13:20:49  * tunniclm__quit (Ping timeout: 264 seconds)
13:28:31  * chris_99quit (Remote host closed the connection)
13:42:10  * alexforsterjoined
13:50:46  * lance|afkchanged nick to lanceball
14:00:35  * alexforsterquit (Ping timeout: 250 seconds)
14:03:20  * kevinswiberjoined
14:15:25  * kevinswiberquit (Remote host closed the connection)
14:22:37  * kevinswiberjoined
14:28:26  * normanmquit (Ping timeout: 252 seconds)
14:29:22  * normanmjoined
14:38:31  * kkaeferjoined
14:38:35  <kkaefer>hey
14:40:32  <kkaefer>I have the following code: thread A runs a uv_loop(). A uv_async handle is constructed in that thread, the handle's callback function immediately closes the uv_async handle by calling uv_close, and then deletes the handle in the callback
14:40:45  <kkaefer>thread B calls uv_async_send() on that handle once
14:41:03  <kkaefer>I'm seeing occasional failures when calling uv_async_send()
14:41:12  <kkaefer>with libuv 0.10.38
14:41:14  <kkaefer>err
14:41:16  <kkaefer>0.10.36
14:41:36  <kkaefer>the abort() function in uv__async_send() gets triggered
14:41:56  * lanceballquit (Quit: Bye bye)
14:42:28  <kkaefer>with errno being 9 (= EBADF)
14:42:48  <kkaefer>am I doing something wrong?
14:42:59  <kkaefer>can I immediately delete the uv_async handle in its callback?
14:43:01  * Jacob8432quit (Quit: Leaving)
14:43:27  * Jacob843joined
14:59:15  <Ralith>kkaefer: in general, it is not safe to delete handles until their close callbacks have been invoked
15:00:16  <kkaefer>Ralith: the handle is deleted in the close callback
15:00:23  * avalanche123joined
15:01:24  <Ralith>that should be safe
15:02:41  <Ralith>try building with addresssanitizer to look for UB
15:02:45  * SergeiRNDquit (Quit: Leaving.)
15:03:12  <Ralith>or just break on writes to the handle's memory in gdb
15:14:36  * seishunjoined
15:16:26  * normanmquit (Changing host)
15:16:26  * normanmjoined
15:16:50  <saghul>kkaefer any chance you're calling uv_async_send on the dead handle?
15:17:04  <saghul>(after uv_close-ing it, that is)
15:17:47  <kkaefer>I don't think so, I think I'm getting the error *while* the uv_async_send is still in progress
15:19:46  <saghul>kkaefer uv_async_send has no protection since it has to be thread-safe: https://github.com/libuv/libuv/blob/v1.x/src/unix/async.c#L60
15:20:04  <saghul>so it's possible that if you call uv_close and after call uv_async_send you get an error
15:20:57  <saghul>hum, wait a sec
15:21:19  <saghul>the loop is still alive, right?
15:22:12  <saghul>on Unix, there is internally a single uv__async handle, so if that fd is closed the loop must have been closed, or someone closed the fd by mistake
15:24:57  * jasnelljoined
15:25:54  <kkaefer>yeah, the loop is still alive in the main thread
15:25:55  <kkaefer>https://gist.github.com/kkaefer/0162e83f74a58417042d
15:26:05  <kkaefer>could something like ^^ happen?
15:26:21  <kkaefer>i.e. deleting the loop while uv_async_send() hasn't returned yet leads to a crash
15:27:39  <kkaefer>@saghul the loop on the main thread stays running; the uv_async_t handle isn't related to the loop's internal handle
15:29:05  <saghul>kkaefer I don't think so. uv_async_send does very little, and doesn't wait. It does access fields in the handle struct, so memory has to be valid though
15:29:21  <kkaefer>yeah, I looked at the code
15:30:01  <kkaefer>https://github.com/libuv/libuv/blob/v1.x/src/unix/async.c#L161
15:30:27  <kkaefer>in my case, r = -1 and len = 1
15:30:37  <kkaefer>(and errno 9)
15:31:06  <kkaefer>and fd is some negative number, which is weird...
15:31:09  <saghul>That fd is global per loop
15:32:12  <saghul>and we only destroy it when the loop is closed: https://github.com/libuv/libuv/blob/60e515d9e6f3d86c0eedad583805201f32ea3aed/src/unix/loop.c#L90
15:32:56  <saghul>kkaefer do you have a reduced test case I could try?
15:33:19  <kkaefer>I'm going to debug a little further and will attempt to create one
15:33:30  <saghul>kewl
15:37:33  <kkaefer>hm, the main loop is still running
15:50:02  * avalanche123quit (Remote host closed the connection)
15:51:16  * davijoined
15:54:22  * avalanche123joined
15:54:46  * rmgjoined
15:56:48  * Ralithquit (Ping timeout: 252 seconds)
15:58:27  * Fishrock123joined
15:58:36  * Ralithjoined
15:59:47  * jgijoined
16:09:14  * kevinswiberquit (Remote host closed the connection)
16:09:48  * kevinswiberjoined
16:22:34  * avalanche123quit (Remote host closed the connection)
16:28:44  * saghulquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
16:32:45  * Ralithquit (Ping timeout: 252 seconds)
16:58:26  * Fishrock123quit (Read error: Connection reset by peer)
16:58:53  * Ralithjoined
16:58:56  * Fishrock123joined
17:03:07  * chris_99joined
17:08:12  * brsonjoined
17:11:02  * SergeiRNDjoined
17:15:52  * kevinswiberquit (Remote host closed the connection)
17:16:04  * kevinswiberjoined
17:16:27  * SergeiRNDquit (Quit: Leaving.)
17:18:42  * daviquit (Ping timeout: 256 seconds)
17:24:48  * avalanche123joined
17:28:28  * reqsharkjoined
17:32:22  * davijoined
17:37:18  * tunniclm_quit (Ping timeout: 240 seconds)
17:43:54  * dap_joined
17:44:41  * qardjoined
17:53:29  * SergeiRNDjoined
18:08:06  * jgiquit (Quit: jgi)
18:33:56  * abraxas_joined
18:38:21  * abraxas_quit (Ping timeout: 250 seconds)
18:41:26  * daviquit (Ping timeout: 246 seconds)
18:47:59  * jgijoined
19:14:51  * avalanche123quit (Remote host closed the connection)
19:19:53  * jgiquit (Quit: jgi)
19:36:25  * s3shsjoined
19:38:39  * reqsharkquit (Ping timeout: 252 seconds)
19:39:16  * reqsharkjoined
19:42:19  * jgijoined
19:42:25  * s3shsquit (Quit: Computer has gone to sleep.)
19:43:19  * davijoined
19:46:35  * davi__joined
19:48:12  * avalanche123joined
19:48:17  * daviquit (Ping timeout: 246 seconds)
19:55:06  * davi__quit (Ping timeout: 256 seconds)
20:20:24  * jgiquit (Quit: jgi)
20:28:02  * jgijoined
20:39:37  * kevinswiberquit (Remote host closed the connection)
20:42:26  * seishunquit (Ping timeout: 264 seconds)
21:06:48  * SergeiRNDquit (Quit: Leaving.)
21:20:37  * rendarquit (Quit: Leaving)
21:57:01  * saghuljoined
21:58:06  * jgiquit (Quit: jgi)
22:00:51  * jgijoined
22:04:38  * saghulquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:39:27  * alexforsterjoined
23:21:49  * chris_99quit (Quit: Ex-Chat)
23:22:35  * alexforsterquit
23:34:30  * s3shsjoined
23:38:35  * s3shsquit (Client Quit)
23:40:19  * brsonquit (Quit: leaving)
23:49:39  * Fishrock123quit (Remote host closed the connection)