Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core dump in ubuntu22.04 #644

Open
MDGSF opened this issue Nov 29, 2024 · 0 comments
Open

core dump in ubuntu22.04 #644

MDGSF opened this issue Nov 29, 2024 · 0 comments

Comments

@MDGSF
Copy link

MDGSF commented Nov 29, 2024

2024-11-29_133032

os: ubuntu22.04
libhv: 1.3.3
openssl: openssl-1.1.1t

libhv build command:

cmake -DCMAKE_SYSTEM_NAME=Linux \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_PREFIX="/path/to/libhv-1.3.3/output" \
      -DBUILD_SHARED=ON \
      -DBUILD_STATIC=ON \
      -DWITH_OPENSSL=ON \
      .

I use libhv websocket client to communicate with golang websocket server.

I limit the bandwith to 10KB/s ~ 100KB/s, the client is very likely to core dump.

When I don't limit the bandwidth, everything works fine.

Now, I have temporarily modified the code in hevent.c as follows:

bool hio_is_opened(hio_t* io) {
    if (io == NULL) return false;
    if (io->io_type == HIO_TYPE_SSL && io->ssl == NULL) return false;
    return io->ready == 1 && io->closed == 0;
}

bool hio_is_connected(hio_t* io) {
    if (io == NULL) return false;
    if (io->io_type == HIO_TYPE_SSL && io->ssl == NULL) return false;
    return io->ready == 1 && io->connected == 1 && io->closed == 0;
}

bool hio_is_closed(hio_t* io) {
    if (io == NULL) return true;
    if (io->io_type == HIO_TYPE_SSL && io->ssl == NULL) return true;
    return io->ready == 0 && io->closed == 1;
}

but this maybe not a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant