Crash dumping to QCOW2 #552

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

Originally created by @claunia on GitHub (Nov 22, 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 Windows 10 20H2...
  • ...in 64-bit
  • ...using an Intel / AMD processor
  • Device manufacturer: Unknown
  • Model: Essentials
  • Bus:
    • USB
  • I was dumping media (disk, tape, etc)...

Description

Exception when dumping to QCOW2. Same drive works in other formats.

Exact command line used:

Aaru media dump --force --metadata=false \\.\PHYSICALDRIVE3 image.qcow2

Expected behavior:

Correct dump.

Actual behavior:

Crashed.

Output of command execution with debug output enabled

aaru 5.1.99.3216+6877589c built by zeus in Debug, modified
Copyright c 2011-2020 Natalia Portillo

Output image format: QEMU Copy-On-Write disk image v2.
Device in database since 13/11/2020 1:52:37.

Requesting MODE SENSE (10).
Requesting MODE SENSE (6).
Using SCSI READ (10) command.
Media has 1968128 blocks of 512 bytes/each. (for a total of 961,000 MiB)
Device reports 1968128 blocks (1007681536 bytes).
Device can read 64 blocks at a time.
Device reports 512 bytes per logical block.
Device reports 512 bytes per physical block.
SCSI device type: DirectAccess.
SCSI medium type: 0.
SCSI density type: 0.
SCSI floppy mode page present: False.
Media identified as Unknown
Output format does not support SCSI_INQUIRY.
Output format does not support SCSI_MODESENSE_10.
Output format does not support SCSI_MODESENSE_6.
Several media tags not supported, continuing...
Reading 64 sectors at a time.
Reading sector 1048576 of 1968128 (5,612 MiB/sec.)Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentOutOfRangeException: Trying to write past L1 table, position 1 of a max 1 (Parameter 'l1Off')
   at Aaru.DiscImages.Qcow2.WriteSector(Byte[] data, UInt64 sectorAddress) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/QCOW2/Write.cs:line 213
   at Aaru.DiscImages.Qcow2.WriteSectors(Byte[] data, UInt64 sectorAddress, UInt32 length) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/QCOW2/Write.cs:line 306
   at Aaru.Core.Devices.Dumping.Dump.ReadSbcData(UInt64& blocks, UInt32& maxBlocksToRead, UInt32& blockSize, DumpHardwareType currentTry, ExtentsULong extents, Double& currentSpeed, Double& minSpeed, Double& maxSpeed, Double& totalDuration, Reader scsiReader, MhddLog mhddLog, IbgLog ibgLog, Double& imageWriteDuration, Boolean& newTrim) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Sbc/Data.cs:line 103
   at Aaru.Core.Devices.Dumping.Dump.Sbc(Dictionary`2 mediaTags, MediaType dskType, Boolean opticalDisc) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Sbc/Dump.cs:line 651
   at Aaru.Core.Devices.Dumping.Dump.Scsi() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/SCSI.cs:line 251
   at Aaru.Core.Devices.Dumping.Dump.Start() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Dump.cs:line 224
   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, UInt32 maxBlocks) in /home/claunia/Development/Aaru/Aaru/Aaru/Commands/Media/Dump.cs:line 646
   --- End of inner exception stack trace ---
lean 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()
Uploading statistics
Originally created by @claunia on GitHub (Nov 22, 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 Windows 10 20H2... * [x] ...in 64-bit * [x] ...using an Intel / AMD processor * **Device manufacturer**: Unknown * **Model**: Essentials * **Bus**: * [x] USB * [x] I was dumping media (disk, tape, etc)... ### Description Exception when dumping to QCOW2. Same drive works in other formats. ### Exact command line used: `Aaru media dump --force --metadata=false \\.\PHYSICALDRIVE3 image.qcow2` ### Expected behavior: Correct dump. ### Actual behavior: Crashed. ### Output of command execution with debug output enabled ``` aaru 5.1.99.3216+6877589c built by zeus in Debug, modified Copyright c 2011-2020 Natalia Portillo Output image format: QEMU Copy-On-Write disk image v2. Device in database since 13/11/2020 1:52:37. Requesting MODE SENSE (10). Requesting MODE SENSE (6). Using SCSI READ (10) command. Media has 1968128 blocks of 512 bytes/each. (for a total of 961,000 MiB) Device reports 1968128 blocks (1007681536 bytes). Device can read 64 blocks at a time. Device reports 512 bytes per logical block. Device reports 512 bytes per physical block. SCSI device type: DirectAccess. SCSI medium type: 0. SCSI density type: 0. SCSI floppy mode page present: False. Media identified as Unknown Output format does not support SCSI_INQUIRY. Output format does not support SCSI_MODESENSE_10. Output format does not support SCSI_MODESENSE_6. Several media tags not supported, continuing... Reading 64 sectors at a time. Reading sector 1048576 of 1968128 (5,612 MiB/sec.)Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Trying to write past L1 table, position 1 of a max 1 (Parameter 'l1Off') at Aaru.DiscImages.Qcow2.WriteSector(Byte[] data, UInt64 sectorAddress) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/QCOW2/Write.cs:line 213 at Aaru.DiscImages.Qcow2.WriteSectors(Byte[] data, UInt64 sectorAddress, UInt32 length) in /home/claunia/Development/Aaru/Aaru/Aaru.Images/QCOW2/Write.cs:line 306 at Aaru.Core.Devices.Dumping.Dump.ReadSbcData(UInt64& blocks, UInt32& maxBlocksToRead, UInt32& blockSize, DumpHardwareType currentTry, ExtentsULong extents, Double& currentSpeed, Double& minSpeed, Double& maxSpeed, Double& totalDuration, Reader scsiReader, MhddLog mhddLog, IbgLog ibgLog, Double& imageWriteDuration, Boolean& newTrim) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Sbc/Data.cs:line 103 at Aaru.Core.Devices.Dumping.Dump.Sbc(Dictionary`2 mediaTags, MediaType dskType, Boolean opticalDisc) in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Sbc/Dump.cs:line 651 at Aaru.Core.Devices.Dumping.Dump.Scsi() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/SCSI.cs:line 251 at Aaru.Core.Devices.Dumping.Dump.Start() in /home/claunia/Development/Aaru/Aaru/Aaru.Core/Devices/Dumping/Dump.cs:line 224 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, UInt32 maxBlocks) in /home/claunia/Development/Aaru/Aaru/Aaru/Commands/Media/Dump.cs:line 646 --- End of inner exception stack trace --- lean 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() Uploading statistics ```
claunia added the bugdump image format labels 2026-01-29 15:22:16 +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#552