beast: MAC OSX Command + R crashes websocket

Hi Vinnie,

I use beast to handle websocket. One issue I noticed is that in the Web browser, on MAC OSX if I press “Command” + R key, after multiple tries (normally 5 or 6 times). My service quit without any errors in my log. It does generate a core file. Please see attached core file _sbin_stingray.0.crash.zip

Also, I used “strace -p xxx” to attach my serive PID. When it crashes, it is something like below: The last few lines point to “write(2, “stingray: /usr/include/beast/web”…, 988) = -1 EPIPE (Broken pipe)”

sendmsg(35, {msg_name(0)=NULL, msg_iov(1)=[{“\27\3\3\0000vB\255\254S\276\265\232a\254<6\260\365p`hn)z\235\17~IJ{\215”…, 53}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 53 epoll_wait(8, [], 128, 0) = 0 sendmsg(35, {msg_name(0)=NULL, msg_iov(1)=[{“\27\3\3\00002,\177\352\213\204 \357\206\7\366\373ec3\276C8v\316r\6\252\354\207y\373”…, 53}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 53 epoll_wait(8, [], 128, 0) = 0 sendmsg(35, {msg_name(0)=NULL, msg_iov(1)=[{“\27\3\3\0000u\257\rn\27212\215\376y\21L\330\362\272C,>\7\312\321r?\251\3647\34”…, 53}], msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 53 epoll_wait(8, [], 128, 0) = 0 write(2, “stingray: /usr/include/beast/web”…, 988) = -1 EPIPE (Broken pipe) — SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=1221, si_uid=0} — mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5c17275000 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 tgkill(1221, 1221, SIGABRT) = 0 — SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=1221, si_uid=0} — +++ killed by SIGABRT (core dumped) +++

If you could look into this, it would be much appreciated.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 48 (17 by maintainers)

Most upvoted comments

Hi Vinnie,

My understanding is that if a client close the websocket connection, from the server side, there is NO code (e.g. async_close/close) required. Beast Websocket will handle the close automatically for me. Is this correct? Thanks.