Skip to content

Querying while using ledger in-memory throws "org.apache.avro.AvroRuntimeException: Malformed data. Length is negative: -46" #148

@filipesilva

Description

@filipesilva

I see this while using com/fluree.db@1.0.0-rc34 with fluree/ledger@1.0.0-beta19, setting the following env variables on the docker image:

    environment:
      - FDB_CONSENSUS_TYPE=in-memory
      - FDB_STORAGE_TYPE=memory

Attempting to query over data in this ledger will return

Running this test with the test runner will hang forever after the tests finish:

#error {
 :cause Malformed data. Length is negative: -46
 :via
 [{:type org.apache.avro.AvroRuntimeException
   :message Malformed data. Length is negative: -46
   :at [org.apache.avro.io.BinaryDecoder readString BinaryDecoder.java 308]}]
 :trace
 [[org.apache.avro.io.BinaryDecoder readString BinaryDecoder.java 308]
  [org.apache.avro.io.BinaryDecoder readString BinaryDecoder.java 322]
  [org.apache.avro.io.ResolvingDecoder readString ResolvingDecoder.java 219]
  [abracad.avro.ClojureDatumReader readString ClojureDatumReader.java 84]
  [org.apache.avro.generic.GenericDatumReader readWithoutConversion GenericDatumReader.java 192]
  [org.apache.avro.generic.GenericDatumReader read GenericDatumReader.java 161]
...

I created a repro in https://github.com/filipesilva/fluree-in-memory-error that you can use by following these steps:

git clone https://github.com/filipesilva/fluree-in-memory-error
cd fluree-test-hang
docker-compose up -d fluree
clojure -X:test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions