{"action":"created","issue":{"url":"https://api.github.com/repos/warmcat/libwebsockets/issues/587","repository_url":"https://api.github.com/repos/warmcat/libwebsockets","labels_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/587/labels{/name}","comments_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/587/comments","events_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/587/events","html_url":"https://github.com/warmcat/libwebsockets/issues/587","id":166957784,"number":587,"title":"websocket crash ","user":{"login":"blueonew","id":18343865,"avatar_url":"https://avatars.githubusercontent.com/u/18343865?v=3","gravatar_id":"","url":"https://api.github.com/users/blueonew","html_url":"https://github.com/blueonew","followers_url":"https://api.github.com/users/blueonew/followers","following_url":"https://api.github.com/users/blueonew/following{/other_user}","gists_url":"https://api.github.com/users/blueonew/gists{/gist_id}","starred_url":"https://api.github.com/users/blueonew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueonew/subscriptions","organizations_url":"https://api.github.com/users/blueonew/orgs","repos_url":"https://api.github.com/users/blueonew/repos","events_url":"https://api.github.com/users/blueonew/events{/privacy}","received_events_url":"https://api.github.com/users/blueonew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-07-22T02:26:48Z","updated_at":"2016-07-27T06:30:06Z","closed_at":null,"body":"the crash log:\r\nlwsts[558]: ****** 39f80 Sending new, pending truncated ...\r\n\r\nin LWS_CALLBACK_SERVER_WRITEABLE:\r\nlws_write is called,  buff len is set to 131072 \r\nthe next time, lws_write is called,  buff len is set to 131072 ,  crash\r\nthe log show, when is sending , the netx lws_write is called, \r\nI want to known whether the lws_write is asynchronous\r\n\r\n\r\nlog:\r\nlws_write len = 131072 , buff=0x7d550 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x7d546, wsi->trunc_alloc:0x5e530, trunc_len:0, trunc_offset:126986\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nsend end\r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x5e530, wsi->trunc_alloc:0x5e530, trunc_len:126986, trunc_offset:0\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x5f530, wsi->trunc_alloc:0x5e530, trunc_len:122890, trunc_offset:4096\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x60530, wsi->trunc_alloc:0x5e530, trunc_len:118794, trunc_offset:8192\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x61530, wsi->trunc_alloc:0x5e530, trunc_len:114698, trunc_offset:12288\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x62530, wsi->trunc_alloc:0x5e530, trunc_len:110602, trunc_offset:16384\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x63530, wsi->trunc_alloc:0x5e530, trunc_len:106506, trunc_offset:20480\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x64530, wsi->trunc_alloc:0x5e530, trunc_len:102410, trunc_offset:24576\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x65530, wsi->trunc_alloc:0x5e530, trunc_len:98314, trunc_offset:28672\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x66530, wsi->trunc_alloc:0x5e530, trunc_len:94218, trunc_offset:32768\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x67530, wsi->trunc_alloc:0x5e530, trunc_len:90122, trunc_offset:36864\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x68530, wsi->trunc_alloc:0x5e530, trunc_len:86026, trunc_offset:40960\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x69530, wsi->trunc_alloc:0x5e530, trunc_len:81930, trunc_offset:45056\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x6a530, wsi->trunc_alloc:0x5e530, trunc_len:77834, trunc_offset:49152\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x6b530, wsi->trunc_alloc:0x5e530, trunc_len:73738, trunc_offset:53248\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x6c530, wsi->trunc_alloc:0x5e530, trunc_len:69642, trunc_offset:57344\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x6d530, wsi->trunc_alloc:0x5e530, trunc_len:65546, trunc_offset:61440\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x6e530, wsi->trunc_alloc:0x5e530, trunc_len:61450, trunc_offset:65536\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x6f530, wsi->trunc_alloc:0x5e530, trunc_len:57354, trunc_offset:69632\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x70530, wsi->trunc_alloc:0x5e530, trunc_len:53258, trunc_offset:73728\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x71530, wsi->trunc_alloc:0x5e530, trunc_len:49162, trunc_offset:77824\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x72530, wsi->trunc_alloc:0x5e530, trunc_len:45066, trunc_offset:81920\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x73530, wsi->trunc_alloc:0x5e530, trunc_len:40970, trunc_offset:86016\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x74530, wsi->trunc_alloc:0x5e530, trunc_len:36874, trunc_offset:90112\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x75530, wsi->trunc_alloc:0x5e530, trunc_len:32778, trunc_offset:94208\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x76530, wsi->trunc_alloc:0x5e530, trunc_len:28682, trunc_offset:98304\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x77530, wsi->trunc_alloc:0x5e530, trunc_len:24586, trunc_offset:102400\r\nlwsts[14794]: lws_ssl_capable_write_no_ssl: sent len 4096 result 4096, 0x1ff80, 7 \r\nsend pcInfo->ring_buffer[2].final = 1, send len 131072 ,buff=0x9d568 \r\nlws_write len = 131072 , buff=0x9d568 \r\nlwsts[14794]: ****** lws_issue_raw 1ff80 sock=7 buf:0x9d55e, wsi->trunc_alloc:0x5e530, trunc_len:20490, trunc_offset:106496\r\nlwsts[14794]: ****** 1ff80 Sending new, pending truncated ...\r\nsend end"},"comment":{"url":"https://api.github.com/repos/warmcat/libwebsockets/issues/comments/235498474","html_url":"https://github.com/warmcat/libwebsockets/issues/587#issuecomment-235498474","issue_url":"https://api.github.com/repos/warmcat/libwebsockets/issues/587","id":235498474,"user":{"login":"blueonew","id":18343865,"avatar_url":"https://avatars.githubusercontent.com/u/18343865?v=3","gravatar_id":"","url":"https://api.github.com/users/blueonew","html_url":"https://github.com/blueonew","followers_url":"https://api.github.com/users/blueonew/followers","following_url":"https://api.github.com/users/blueonew/following{/other_user}","gists_url":"https://api.github.com/users/blueonew/gists{/gist_id}","starred_url":"https://api.github.com/users/blueonew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueonew/subscriptions","organizations_url":"https://api.github.com/users/blueonew/orgs","repos_url":"https://api.github.com/users/blueonew/repos","events_url":"https://api.github.com/users/blueonew/events{/privacy}","received_events_url":"https://api.github.com/users/blueonew/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T06:30:06Z","updated_at":"2016-07-27T06:30:06Z","body":"I found when log is as follows, the partial send completed\r\nfd[2].fd=7 pt->fds[2].revents=5, pt->fds[2].events=4, pt->dummy_pipe_fds[0]=4 \r\n\r\nwhen pt->fds[2].events is 0, the partial is waiting, so it's slowly\r\nfd[2].fd=7 pt->fds[2].revents=5, pt->fds[2].events=0, pt->dummy_pipe_fds[0]=4 \r\n\r\nMy question is  how to change 0 to 4\r\n\r\nI think may be I can call some function to change that .\r\n \r\nThank you very much"}}
{"actor":{"display_login":"blueonew"}}