Crash dumping SD card using Raspberry Pi 4 #560

Open
opened 2026-01-29 15:22:27 +00:00 by claunia · 0 comments
Owner

Originally created by @TheRogueArchivist on GitHub (Dec 2, 2020).

Prerequisites

  • Are you running the latest version?
  • Can you reproduce the problem in the debug version?

Check and fill as appropriate:

  • I was running Aaru under Raspbian...
  • ...in 64-bit
  • ...using an ARM or Apple Silicon processor
  • Device manufacturer:
  • Model:
  • Bus:
    • Parallel ATA
    • Serial ATA
    • SCSI (any)
    • ATAPI (mark above if parallel or serial)
    • USB
      • USB cable manufacturer:
      • USB cable model:
    • FireWire
    • PCMCIA
    • SecureDigital
      • Using a USB card reader
        • USB card reader manufacturer:
        • USB card reader model:
    • MultiMediaCard
      • Using a USB card reader
        • USB card reader manufacturer:
        • USB card reader model:
  • I was dumping media (disk, tape, etc)...
  • I was analyzing media (disk, tape, etc)...
  • I was scanning media (disk, tape, etc)...

Description

Trying to dump an SD card using the built in SD card reader on the Raspberry Pi 4 (using a USB drive to run the OS) crashes Aaru.

Exact command line used:

aaru m dump /dev/mmcblk0 SD.aaruf

Output of command execution with debug output enabled

aaru 5.1.0.3214
Copyright © 2011-2020 Natalia Portillo

DEBUG (Dump-Media command): --cicm-xml=
DEBUG (Dump-Media command): --debug=True
DEBUG (Dump-Media command): --device=/dev/mmcblk0
DEBUG (Dump-Media command): --encoding=
DEBUG (Dump-Media command): --first-pregap=False
DEBUG (Dump-Media command): --fix-offset=True
DEBUG (Dump-Media command): --force=False
DEBUG (Dump-Media command): --format=
DEBUG (Dump-Media command): --metadata=True
DEBUG (Dump-Media command): --options=
DEBUG (Dump-Media command): --output=SD.aaruf
DEBUG (Dump-Media command): --persistent=False
DEBUG (Dump-Media command): --resume=True
DEBUG (Dump-Media command): --retry-passes=5
DEBUG (Dump-Media command): --skip=512
DEBUG (Dump-Media command): --stop-on-error=False
DEBUG (Dump-Media command): --trim=True
DEBUG (Dump-Media command): --verbose=False
DEBUG (Dump-Media command): --subchannel=any
DEBUG (Dump-Media command): --private=False
DEBUG (Dump-Media command): --fix-subchannel-position=True
DEBUG (Dump-Media command): --retry-subchannel=True
DEBUG (Dump-Media command): --fix-subchannel=False
DEBUG (Dump-Media command): --fix-subchannel-crc=False
DEBUG (Dump-Media command): --generate-subchannels=False
DEBUG (Dump-Media command): --skip-cdiready-hole=True
DEBUG (Dump-Media command): --eject=False
DEBUG (Dump-Media command): Parsed options:
Output image format: Aaru Format.
Device not in database, please create a device report and attach it to a Github issue.
Reading CSD                                                                    
DEBUG (MMC Device): SEND_CSD took 0.0458 ms.
Reading OCR                                                                    
DEBUG (SecureDigital Device): SD_SEND_OP_COND took 0.0213 ms.
Reading SCR                                                                    
DEBUG (SecureDigital Device): SEND_SCR took 0.0169 ms.
Reading CID                                                                    
DEBUG (MMC Device): SEND_CID took 0.0135 ms.
Device reports 1931264 blocks.                                                 
DEBUG (MMC Device): READ_SINGLE_BLOCK took 2.6496 ms.
DEBUG (MMC Device): READ_SINGLE_BLOCK took 0.4613 ms.
Device can read 0 blocks at a time.                                            
DEBUG (Aaru Format plugin): Got a shift of 12 for 4096 sectors per block
DEBUG (Aaru Format plugin): In memory DDT?: True
Reading sector 0 of 1931264 (0.000 MiB/sec.)DEBUG (MMC Device): READ_SINGLE_BLOCK took 0.6127 ms.
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.DivideByZeroException: Attempted to divide by zero.
   at Aaru.DiscImages.AaruFormat.WriteSectors(Byte[] data, UInt64 sectorAddress, UInt32 length) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/AaruFormat/Write.cs:line 1245
   at Aaru.Core.Devices.Dumping.Dump.SecureDigital() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/SecureDigital.cs:line 374
   at Aaru.Core.Devices.Dumping.Dump.Start() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Dump.cs:line 214
   at Aaru.Commands.Media.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean metadata, Boolean trim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel, Boolean private, Boolean fixSubchannelPosition, Boolean retrySubchannel, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels, Boolean skipCdiReadyHole, Boolean eject) in /home/claunia/Development/Aaru/Aaru/Aaru/Commands/Media/Dump.cs:line 632
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext()

Media details

Standard 2 GB micro SD card

Originally created by @TheRogueArchivist on GitHub (Dec 2, 2020). ### Prerequisites * [X] Are you running the latest version? * [X] Can you reproduce the problem in the debug version? ### Check and fill as appropriate: * [X] I was running Aaru under Raspbian... * [X] ...in 64-bit * [X] ...using an ARM or Apple Silicon processor * **Device manufacturer**: * **Model**: * **Bus**: * [ ] Parallel ATA * [ ] Serial ATA * [ ] SCSI (any) * [ ] ATAPI (mark above if parallel or serial) * [ ] USB * **USB cable manufacturer**: * **USB cable model**: * [ ] FireWire * [ ] PCMCIA * [X] SecureDigital * [ ] Using a USB card reader * **USB card reader manufacturer**: * **USB card reader model**: * [ ] MultiMediaCard * [ ] Using a USB card reader * **USB card reader manufacturer**: * **USB card reader model**: * [X] I was dumping media (disk, tape, etc)... * [ ] I was analyzing media (disk, tape, etc)... * [ ] I was scanning media (disk, tape, etc)... ### Description <!-- Description of the bug --> Trying to dump an SD card using the built in SD card reader on the Raspberry Pi 4 (using a USB drive to run the OS) crashes Aaru. ### Exact command line used: `aaru m dump /dev/mmcblk0 SD.aaruf` ### Output of command execution with debug output enabled ``` aaru 5.1.0.3214 Copyright © 2011-2020 Natalia Portillo DEBUG (Dump-Media command): --cicm-xml= DEBUG (Dump-Media command): --debug=True DEBUG (Dump-Media command): --device=/dev/mmcblk0 DEBUG (Dump-Media command): --encoding= DEBUG (Dump-Media command): --first-pregap=False DEBUG (Dump-Media command): --fix-offset=True DEBUG (Dump-Media command): --force=False DEBUG (Dump-Media command): --format= DEBUG (Dump-Media command): --metadata=True DEBUG (Dump-Media command): --options= DEBUG (Dump-Media command): --output=SD.aaruf DEBUG (Dump-Media command): --persistent=False DEBUG (Dump-Media command): --resume=True DEBUG (Dump-Media command): --retry-passes=5 DEBUG (Dump-Media command): --skip=512 DEBUG (Dump-Media command): --stop-on-error=False DEBUG (Dump-Media command): --trim=True DEBUG (Dump-Media command): --verbose=False DEBUG (Dump-Media command): --subchannel=any DEBUG (Dump-Media command): --private=False DEBUG (Dump-Media command): --fix-subchannel-position=True DEBUG (Dump-Media command): --retry-subchannel=True DEBUG (Dump-Media command): --fix-subchannel=False DEBUG (Dump-Media command): --fix-subchannel-crc=False DEBUG (Dump-Media command): --generate-subchannels=False DEBUG (Dump-Media command): --skip-cdiready-hole=True DEBUG (Dump-Media command): --eject=False DEBUG (Dump-Media command): Parsed options: Output image format: Aaru Format. Device not in database, please create a device report and attach it to a Github issue. Reading CSD DEBUG (MMC Device): SEND_CSD took 0.0458 ms. Reading OCR DEBUG (SecureDigital Device): SD_SEND_OP_COND took 0.0213 ms. Reading SCR DEBUG (SecureDigital Device): SEND_SCR took 0.0169 ms. Reading CID DEBUG (MMC Device): SEND_CID took 0.0135 ms. Device reports 1931264 blocks. DEBUG (MMC Device): READ_SINGLE_BLOCK took 2.6496 ms. DEBUG (MMC Device): READ_SINGLE_BLOCK took 0.4613 ms. Device can read 0 blocks at a time. DEBUG (Aaru Format plugin): Got a shift of 12 for 4096 sectors per block DEBUG (Aaru Format plugin): In memory DDT?: True Reading sector 0 of 1931264 (0.000 MiB/sec.)DEBUG (MMC Device): READ_SINGLE_BLOCK took 0.6127 ms. Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DivideByZeroException: Attempted to divide by zero. at Aaru.DiscImages.AaruFormat.WriteSectors(Byte[] data, UInt64 sectorAddress, UInt32 length) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/AaruFormat/Write.cs:line 1245 at Aaru.Core.Devices.Dumping.Dump.SecureDigital() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/SecureDigital.cs:line 374 at Aaru.Core.Devices.Dumping.Dump.Start() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Dump.cs:line 214 at Aaru.Commands.Media.DumpMediaCommand.Invoke(Boolean debug, Boolean verbose, String cicmXml, String devicePath, Boolean resume, String encoding, Boolean firstPregap, Boolean fixOffset, Boolean force, Boolean metadata, Boolean trim, String outputPath, String options, Boolean persistent, UInt16 retryPasses, UInt32 skip, Byte speed, Boolean stopOnError, String format, String subchannel, Boolean private, Boolean fixSubchannelPosition, Boolean retrySubchannel, Boolean fixSubchannel, Boolean fixSubchannelCrc, Boolean generateSubchannels, Boolean skipCdiReadyHole, Boolean eject) in /home/claunia/Development/Aaru/Aaru/Aaru/Commands/Media/Dump.cs:line 632 --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context) at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__19_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseHelp>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass21_0.<<UseTypoCorrections>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__20_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__18_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__10_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__9_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseExceptionHandler>b__0>d.MoveNext() ``` ### Media details <!-- Photo, EAN-13, if possible eBay link --> Standard 2 GB micro SD card
claunia added the bug label 2026-01-29 15:22:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aaru-dps/Aaru-aaru-dps#560