boostorg / boostorg/beast

tcp_stream causing SIGABRT | Boost 1.73.0

Open
#2,345 30 comments 0 reactions 1 assignee Claimed by @madmongo1 View on GitHub
Bug
Dominant language
C++
Stars
4.8k
Forks
694
Avg merge
12h 48m
Merged PRs (30d)
1

Description

I am hitting a crash in my websocket server due to sigabrt caused by
`boost/beast/core/detail/stream_base.hpp:81`

All the read/write/close operations are being done in the same strand on the io-context for this web socket server.
Upon, Vinnie's suggestion I replaced tcp_stream with tcp socket, and the crash went away.
Tries with tcp_stream and only one single thread in io-context as well, and the crash happened again, implicating the issue is probably in tcp_stream.

I am attaching the stack trace file here, which has some additional info added in it. The crash occurrence has a timestamp as well, and if we look at step # 31, I have pasted timestamp at this point as well. The thread which crashed seems to be stuck somewhere for more than 3 minutes trying to do a write operation.

The crash is a bit rare but is reproducible under load. Even without significant load the program crashes sometimes with same stacktrace.

I cannot provide the whole transport layer here as the code is proprietary, but if needed we can figure out a way to work around that.

The program is running on
`CentOS Linux release 7.9.2009 (Core)` compiled with `gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)`.

[stack trace.txt](https://github.com/boostorg/beast/files/7570287/stack.trace.txt)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.