Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Dat Close Assertion #217

@eu1444

Description

@eu1444

I am reporting:

  • a bug or unexpected behavior
  • general feedback
  • feature request
  • security issue

Bug Report

  • Operating system: Debian GNU/Linux 9 (stretch) 64-bit
  • Node Version: v8.7.0
  • dat-node Version: 3.5.12

Expected behavior

I have some code that opens multiple Dats and then closes them all. The expected behavior is that all of the Dats open and then close without error.

https://gist.github.com/mistersdevelopment/2cddb3760e48de701e602933f3193a40

Actual behavior

The code intermittently asserts in libuv. I realize this may be a libuv issue but it could be how Dat is making use of libuv as well.

node: ../deps/uv/src/unix/udp.c:67: uv__udp_finish_close: Assertion `!uv__io_active(&handle->io_watcher, 0x001 | 0x004)' failed.

The assertion is here:
https://github.com/libuv/libuv/blob/619937c783a05b51fba95cc9a62543deeffe5fa7/src/unix/udp.c#L67

Debug Logs

node libuv-assert.js 
  dat-node archive ready. version: 0 +0ms
  dat-node archive ready. version: 0 +17ms
  dat-node archive ready. version: 0 +3ms
  dat-node Replication error: First shared hypercore must be the same +0ms
  dat-node Stream close +2ms
  dat-node Replication stream ended +5ms
  dat-node Replication error: First shared hypercore must be the same +680ms
  dat-node Stream close +1ms
  dat-node Replication stream ended +1ms
Created Dat "a9e3b0c7acef0417d2840c75ff38eb92b33effbe5843b65f7b7f9db6fcb70a71" with storage "dat-2"
Created Dat "5be8f49de14e6876374207e00260045b6c892cead878f735543bc90c2cc673ca" with storage "dat-0"
Created Dat "2b69b2062aee49b675880f821c5dc80b9f4a3b5adbda0d3f5e830dc1a45c3426" with storage "dat-1"
Destroying Dat "5be8f49de14e6876374207e00260045b6c892cead878f735543bc90c2cc673ca"
  dat-node leaveNetwork() +7s
Destroying Dat "2b69b2062aee49b675880f821c5dc80b9f4a3b5adbda0d3f5e830dc1a45c3426"
  dat-node leaveNetwork() +8ms
Destroying Dat "a9e3b0c7acef0417d2840c75ff38eb92b33effbe5843b65f7b7f9db6fcb70a71"
  dat-node leaveNetwork() +4ms
node: ../deps/uv/src/unix/udp.c:67: uv__udp_finish_close: Assertion `!uv__io_active(&handle->io_watcher, 0x001 | 0x004)' failed.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions