piscsi: Big files make the service crash, value too large for datatype

Info

  • Which version of Pi are you using: Pi4
  • Which github revision of software: develop
  • Which board version: 2.4a fullspec
  • Which computer is the RaSCSI connected to: Macintosh Classic II but its turned off for this case.

Develop branch crashes on a big file when opening the web interface:

Sep 19 23:15:09 raspberrypi RASCSI[1827]: terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
Sep 19 23:15:09 raspberrypi RASCSI[1827]:   what():  filesystem error: cannot get file size: Value too large for defined data type [/home/pi/images/powermac.hda]
Sep 19 23:15:09 raspberrypi systemd[1]: rascsi.service: Main process exited, code=killed, status=6/ABRT
Sep 19 23:15:09 raspberrypi RASCSIWEB[1894]: ERROR:root:The response from RaSCSI did not contain a protobuf header.
Sep 19 23:15:09 raspberrypi systemd[1]: rascsi.service: Failed with result 'signal'.
Sep 19 23:15:09 raspberrypi systemd[1]: rascsi.service: Service RestartSec=100ms expired, scheduling restart.
Sep 19 23:15:09 raspberrypi systemd[1]: rascsi.service: Scheduled restart job, restart counter is at 13.
Sep 19 23:15:09 raspberrypi systemd[1]: Stopped RaSCSI service.
Sep 19 23:15:09 raspberrypi systemd[1]: Started RaSCSI service.
Sep 19 23:15:09 raspberrypi RASCSI[1911]: SCSI Target Emulator RaSCSI(*^..^*) version 21.99 --DEVELOPMENT BUILD-- (Sep 19 2021, 22:58:27)
Sep 19 23:15:09 raspberrypi RASCSI[1911]: Powered by XM6 TypeG Technology / Copyright (C) 2016-2020 GIMONS
Sep 19 23:15:09 raspberrypi RASCSI[1911]: Connect type : FULLSPEC
Sep 19 23:15:09 raspberrypi RASCSI[1911]: [2021-09-19 23:15:09.827] [info] No images currently attached.
Sep 19 23:15:09 raspberrypi RASCSI[1911]: No images currently attached.

File: -rw-r--r-- 1 root root 2621440000 Sep 18 20:29 powermac.hda

It was created with the stable version.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (20 by maintainers)

Most upvoted comments

@uweseimet The issue persists in issue_247 fa63022 – and I didn’t need a 4GB file, it happens also with a 2048 MB file created with develop web ui. It seems that’s the size that triggers it too. If you have a 2047 MB file, there’s no crash (didn’t test down to the byte.)

This is with a Pi 3b with a fresh Pi OS created by the official Pi imager tool, and all packages at the latest version (apt upgrade)