paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.network/
1.87k stars 683 forks source link

Polkadot 1.5.0 dev chain not starting #2774

Closed enriquemanuel closed 2 weeks ago

enriquemanuel commented 10 months ago

Is there an existing issue?

Experiencing problems? Have you tried our Stack Exchange first?

Description of bug

When running polkadot in dev mode it crashes and can't start because it can't launch the subprocess txpool in the background

Essential task `txpool-background` failed. Shutting down service.

Steps to reproduce

Dockerfile

FROM debian:bullseye-slim AS builder
ARG VERSION=1.5.0

ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /

RUN apt-get update -y \
    && apt-get install -y \
        make \
        gcc \
        git \
        jq \
        vim \
                curl \
                unzip \
                build-essential \
                git \
                clang \
                libclang-dev \
                pkg-config \
                libssl-dev \
                lsof

WORKDIR /polkadot

RUN curl -L --fail https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v${VERSION}/polkadot > polkadot
RUN curl -L --fail https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-v${VERSION}/polkadot.asc > polkadot.asc

#RUN gpg --import polkadot.asc
#RUN gpg --verify polkadot.asc polkadot
#RUN rm -rf polkadot.asc
RUN cp /polkadot/polkadot /usr/local/bin/polkadot
RUN chmod +x /usr/local/bin/polkadot

RUN apt-get update -y && apt-get install -y jq vim curl lsof

# default ports
#
#             p2p   rpc  websocket
#                 ↓       ↓         ↓
EXPOSE 30333  9933   9944
  1. docker build -t test .
  2. docker run --rm -it --platform linux/amd64 --entrypoint /bin/bash
  3. start it with
    polkadot --dev
  4. Logs:
    
    root@865b74c1c6d7:/polkadot# polkadot --dev
    <jemalloc>: MADV_DONTNEED does not work (memset will be used instead)
    <jemalloc>: (This is the expected behaviour if you are running under QEMU)
    2023-12-21 17:13:14 Parity Polkadot
    2023-12-21 17:13:14 ✌️  version 1.5.0-a3dc2f15f23
    2023-12-21 17:13:14 ❤️  by Parity Technologies <admin@parity.io>, 2017-2023
    2023-12-21 17:13:14 📋 Chain specification: Development
    2023-12-21 17:13:14 🏷  Node name: frightened-plot-8825
    2023-12-21 17:13:14 👤 Role: AUTHORITY
    2023-12-21 17:13:14 💾 Database: RocksDb at /tmp/substrateKYMYC5/chains/rococo_dev/db/full
    2023-12-21 17:13:16 You're running on a system with a broken `madvise(MADV_DONTNEED)` implementation. This will result in lower performance.
    2023-12-21 17:13:23 Took active validators from set with wrong size
    2023-12-21 17:13:23 Took active validators from set with wrong size
    2023-12-21 17:13:23 Took active validators from set with wrong size.
    2023-12-21 17:13:23 Took active validators from set with wrong size
    2023-12-21 17:13:32 🔨 Initializing Genesis block/state (state: 0x4881…6bcd, header-hash: 0xc6cc…aedf)
    2023-12-21 17:13:32 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
    2023-12-21 17:13:40 Essential task `txpool-background` failed. Shutting down service.
    Error:
    0: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: indirect call type mismatch
      WASM backtrace:
    0: error while executing at wasm backtrace:
          0: 0x30458e - <unknown>!frame_support::storage::unhashed::get::h1edfeae67045bdd1
          1: 0x4bc5aa - <unknown>!BabeApi_configuration
    1: Execution failed: Execution aborted due to trap: wasm trap: indirect call type mismatch
      WASM backtrace:
    1: error while executing at wasm backtrace:
          0: 0x30458e - <unknown>!frame_support::storage::unhashed::get::h1edfeae67045bdd1
          1: 0x4bc5aa - <unknown>!BabeApi_configuration

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets.

bkchr commented 10 months ago

CC @koute

koute commented 10 months ago

@enriquemanuel Looks like your steps to reproduce are incomplete?

Running the (2) docker run --rm -it --platform linux/amd64 --entrypoint /bin/bash I'm getting:

$ docker run --rm -it --platform linux/amd64 --entrypoint /bin/bash
"docker run" requires at least 1 argument.
See 'docker run --help'.

Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Create and run a new container from an image

Otherwise I can't really reproduce your problem. Running polkadot --dev natively works for me.

bkchr commented 10 months ago

@enriquemanuel ping

acatangiu commented 2 weeks ago

closing as stale