Skip to content

raw readinto() returned invalid length 4494852078 (should have been between 0 and 2297167872) #93287

Closed as not planned
@ThomasWaldmann

Description

@ThomasWaldmann

Bug report

A python file read crashes weirdly with raw readinto() returned invalid length 4494852078 (should have been between 0 and 2297167872).

See there:

borgbackup/borg#6140 (comment)

That "returned invalid length" is even more than the total file length.

It is currently rather unclear what the root cause of this is, this is why I am asking for help / clarification here.

Considering it crashes at a sanity check within the python stdlib, I suspect the bug is either somewhere deeper in CPython or in some lower layer (like fs or os / kernel / hardware level).

Your environment

  • CPython versions tested on: 3.7
  • Operating system and architecture: Linux 64bit / ZFS (Hetzner Storage Box, Server hw with ECC memory)

Note:

I of course already tried to find more information about this kind of error doing a web search. But all I found are cases of:

  • network reads (but in our cases we have a normal fs read and the fs is locally attached to the storage box as Hetzner told us)
  • terminal / text encoding / crlf related stuff, also does not match our case

I guess this is the place that raises this exception:

Metadata

Metadata

Labels

topic-IOtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions