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

drk subscribe crashed #144

Open
marek22k opened this issue Feb 19, 2023 · 7 comments
Open

drk subscribe crashed #144

marek22k opened this issue Feb 19, 2023 · 7 comments

Comments

@marek22k
Copy link

$./drk subscribe
Subscribing to receive notifications of incoming blocks
Detached subscription to background
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "b77238fa1167c06587891eac3990cb0469cfdd52f2ecec84d952266ee3fa1d7c",
    ),
    epoch: 588,
    slot: 5888,
    timestamp: Timestamp(
        1676844724,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "a3bc57ce8d53bbf6107037a81e1212fccaecb5eee58c06bd8f0548c020aa3eb7",
    ),
    epoch: 588,
    slot: 5889,
    timestamp: Timestamp(
        1676844814,
    ),
    root: MerkleNode(
        0x0d8fb1b081d250414c008568e4acc9989f0ff129e3fd0602e64e8685d87e7587,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 1 transactions
Found Money::Transfer in call 0
Successfully decrypted a Money Note
Witnessing coin in Merkle tree
Found 1 OwnCoin(s) in transaction
OwnCoin: Coin(0x36b060c0e09b7b4621bfdf860944386660d2e12f6ee87a250fd58ba5eb19441b)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/libout123.c:468] error: Found no driver out of [alsa,oss,jack,portaudio,pulse,nas,openal] working with device <default>.
[DAO] Iterating over 1 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "c6183b4e55aa682763c5513dd7ac43ea697e3a7d583163778e6f5c5f1a611443",
    ),
    epoch: 589,
    slot: 5890,
    timestamp: Timestamp(
        1676844906,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "31c6a71e6670b765a1447d8905fa4c85ed678d941edf752c92e5ac8a1176c7e1",
    ),
    epoch: 589,
    slot: 5891,
    timestamp: Timestamp(
        1676844994,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "e26937529747b4bbff34f71faf08734f0bfa20ea1611e689e678e8ef87ff3198",
    ),
    epoch: 589,
    slot: 5892,
    timestamp: Timestamp(
        1676845085,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "2054f517f4787d5063b017550c89a459bbb227c9564dbefb1a93c131474501cf",
    ),
    epoch: 589,
    slot: 5893,
    timestamp: Timestamp(
        1676845174,
    ),
    root: MerkleNode(
        0x3ff0ff02118da8c9edbe795cb8b6f4929d9e042bf7173749190fbac9d547f635,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 1 transactions
Found Money::Transfer in call 0
Successfully decrypted a Money Note
Witnessing coin in Merkle tree
Found 1 OwnCoin(s) in transaction
OwnCoin: Coin(0x34619d9c8a2a4c46501d274d46fc233b7f0df7bef8306831dc5eabfef695309e)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/libout123.c:468] error: Found no driver out of [alsa,oss,jack,portaudio,pulse,nas,openal] working with device <default>.
[DAO] Iterating over 1 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "e5c32c78ee7e15577be8e2b530e54d7f98e6aae0ce0745367bc96bedca14133c",
    ),
    epoch: 589,
    slot: 5894,
    timestamp: Timestamp(
        1676845264,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "2e2e11f0b946aa4dd8821b1654b3dd5dbcc7193138bf048dc6c018fe72de9e7b",
    ),
    epoch: 589,
    slot: 5895,
    timestamp: Timestamp(
        1676845353,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "5dc6e9b1e91c2aee7bc70e8eb8a420c5c373bf058437c2cae02787f4b06c62be",
    ),
    epoch: 589,
    slot: 5896,
    timestamp: Timestamp(
        1676845444,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "98bb963a45bd646bff6e3419ed14505c0b2a65186777ba8016402bc32d51d004",
    ),
    epoch: 589,
    slot: 5897,
    timestamp: Timestamp(
        1676845533,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}
=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 0 transactions
[DAO] Iterating over 0 transactions
thread 'async-std/runtime' panicked at 'called `Result::unwrap()` on an `Err` value: NetworkOperationFailed', bin/drk/src/rpc_blockchain.rs:66:78
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Block subscription failed

Caused by:
    Got error from JSON-RPC: JsonError { jsonrpc: String("2.0"), id: Number(1258843258798613412), error: JsonErrorVal { code: Number(-32603), message: String("Internal error") } }

I have tried the commands from https://darkrenaissance.github.io/darkfi/testnet/payment.html. I don't know exactly what happened, all of a sudden the message JSON-RPC error: "Blockchain is not synced" appeared and then I saw that the other process crashed.

@aggstam
Copy link
Contributor

aggstam commented Feb 20, 2023

Are you on master or tag 0.4.0?
The JSON-RPC error: "Blockchain is not synced" is because wallet needs to be synced with current blockchain state, via subscribe or ./drk scan.

@marek22k
Copy link
Author

I use the 0.4.0 tag as in the instructions. I think the blockchain is not synced is caused by the crash of subscribe.

@aggstam
Copy link
Contributor

aggstam commented Feb 20, 2023

Use the master tag, we are fixing findings and will tag a new version once everything is stable.
Let us know if issues persist.

@a-moreira
Copy link

in v4.0.1 I can still see these errors, although it hasn't crashed (yet)

=======================================
Deserialized successfully. Scanning block...
[Money] Iterating over 1 transactions
Found Money::TransferV1 in call 0
Successfully decrypted a Money Note
Witnessing coin in Merkle tree
Found 1 OwnCoin(s) in transaction
OwnCoin: Coin(0x3c0d02e8297b2a031f10cce40d638d93c65100725a063f7b3c7cf9eb671f8c43)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/libout123.c:454] error: Found no driver out of [alsa,oss,jack,portaudio,pulse,nas,openal] working with device <default>.
[DAO] Iterating over 1 transactions
Got Block notification from darkfid subscription
=======================================
Block header:
Header {
    version: 1,
    previous: Hash(
        "4769a9cd7a45981dcc01791d8c982b000dbaa746ed33fefc83335c774ff9181a",
    ),
    epoch: 6240,
    slot: 62405,
    timestamp: Timestamp(
        1683148055,
    ),
    root: MerkleNode(
        0x2fd8e51a03d9bbe2dd809831b1497aeb68a6e37ddf707ced4aa2d8dff13529ae,
    ),
}

@aggstam
Copy link
Contributor

aggstam commented May 4, 2023

@a-moreira:
Do you have libmpg123-dev installed?
These errors do not affect rest functionality.

@a-moreira
Copy link

@aggstam I do have it installed.

$ apt install libmpg123-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmpg123-dev is already the newest version (1.25.13-1).

I also have libout123 installed (found a reference to this lib while searching for the error).

You are right that it doesn't seem to impair functionality. Also the error seems to appear randomly.

@aggstam
Copy link
Contributor

aggstam commented May 4, 2023

@a-moreira Its not as random as you might think :)
TLDR: terminal is not able to get sound driver lock to play a sound, as its locked by some other app.

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

3 participants