Benchmarking in palimpsest fails with "Error seeking to position -1734254592 for (null): Invalid argument"

Bug #526524 reported by Tobias Wolf
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
udisks
Fix Released
Medium
udisks (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Binary package hint: gnome-disk-utility

Gnome-disk-utility acquired a benchmarking button in palimpsest.
It fails with the error message for both internal SSD and external USB HDD:

Error benchmarking: helper exited with exit code 1: Error seeking to position -1734254592 for (null): Invalid argument

No idea what the helper is.

Revision history for this message
Daniele Napolitano (dnax88) wrote :

I have the same problem.

This is the manual udisk command:

$ sudo /usr/lib/udisks/udisks-helper-drive-benchmark /dev/sda 0
udisks-helper-progress: 0.0
read_transfer_rate: offset 0 rate 50121963.552517
udisks-helper-progress: 0.000000
read_transfer_rate: offset 409821184 rate 50161531.921785
read_transfer_rate: offset 819642368 rate 50068291.105993
read_transfer_rate: offset 1229463552 rate 50186590.338347
read_transfer_rate: offset 1639284736 rate 50145967.676659
read_transfer_rate: offset 2049105920 rate 50103384.598795
Error seeking to position -1836040192 for (null): Invalid argument

$ sudo fdisk -l
Disk /dev/sda: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical / optimal IO): 512 bytes / 512 bytes
Disk identifier: 0x92899289
[...]

$ sudo hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
 Model Number: Maxtor 6Y080L0
 Serial Number: Y3JNVAEE
 Firmware Revision: YAR41VW0
Standards:
 Used: ATA/ATAPI-7 T13 1532D revision 0
 Supported: 7 6 5 4
Configuration:
 Logical max current
 cylinders 16383 16383
 heads 16 16
 sectors/track 63 63
 --
 CHS current addressable sectors: 16514064
 LBA user addressable sectors: 160086528
 LBA48 user addressable sectors: 160086528
 Logical/Physical Sector size: 512 bytes
 device size with M = 1024*1024: 78167 MBytes
 device size with M = 1000*1000: 81964 MBytes (81 GB)
 cache/buffer size = 2048 KBytes (type=DualPortCache)

Only work with USB stick. Benchmark fail with other HD.

affects: gnome-disk-utility (Ubuntu) → udisks (Ubuntu)
Revision history for this message
In , Daniele Napolitano (dnax88) wrote :

Distro: Ubuntu 9.10 (+ some 10.04 packages)
Kernel: 2.6.32-14-generic
UDisks package version: 1.0.0~git20100223.a38230-2ubuntu1

When I try to benchmark my hard disk, it fail.

This is the manual udisk command:

$ sudo /usr/lib/udisks/udisks-helper-drive-benchmark /dev/sda 0
udisks-helper-progress: 0.0
read_transfer_rate: offset 0 rate 50121963.552517
udisks-helper-progress: 0.000000
read_transfer_rate: offset 409821184 rate 50161531.921785
read_transfer_rate: offset 819642368 rate 50068291.105993
read_transfer_rate: offset 1229463552 rate 50186590.338347
read_transfer_rate: offset 1639284736 rate 50145967.676659
read_transfer_rate: offset 2049105920 rate 50103384.598795
Error seeking to position -1836040192 for (null): Invalid argument

$ sudo fdisk -l
Disk /dev/sda: 82.0 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical / optimal IO): 512 bytes / 512 bytes
Disk identifier: 0x92899289
[...]

$ sudo hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
 Model Number: Maxtor 6Y080L0
 Serial Number: Y3JNVAEE
 Firmware Revision: YAR41VW0
Standards:
 Used: ATA/ATAPI-7 T13 1532D revision 0
 Supported: 7 6 5 4
Configuration:
 Logical max current
 cylinders 16383 16383
 heads 16 16
 sectors/track 63 63
 --
 CHS current addressable sectors: 16514064
 LBA user addressable sectors: 160086528
 LBA48 user addressable sectors: 160086528
 Logical/Physical Sector size: 512 bytes
 device size with M = 1024*1024: 78167 MBytes
 device size with M = 1000*1000: 81964 MBytes (81 GB)
 cache/buffer size = 2048 KBytes (type=DualPortCache)
[...]

Benchmark only work with USB sticks. All USB sticks that I have it's OK.

Benchmark fail with every other HD that I have.

Revision history for this message
In , Daniele Napolitano (dnax88) wrote :

The problem seems to be here:

src/helpers/job-drive-benchmark.c

line 175: pos &= ~(page_size - 1);

This operation make "pos" negative, before this line "pos" is positive.

Revision history for this message
In , Daniele Napolitano (dnax88) wrote :

Created an attachment (id=33666)
Patch for bug #26822

This patch solve my bug.

Use lseek64() instead lseek().

Changed in udisks:
status: Unknown → Confirmed
Revision history for this message
Daniele Napolitano (dnax88) wrote :

I've made a patch that solve my bug. Please test it.

Changed in udisks (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Daniele Napolitano (dnax88) wrote :

I've made an updated package with my patch.

https://launchpad.net/~dnax88/+archive/ppa/+sourcepub/982085/+listing-archive-extra

@Tobias, can you test it?

Revision history for this message
Tobias Wolf (towolf) wrote :

Thanks for the test package, Daniele. I can confirm it works now.

I can’t test R/W benchmark because I don’t have an empty disk.

Revision history for this message
In , Martin Pitt (pitti) wrote :

Thanks for this!

I grepped the source, and confirm that job-drive-benchmark.c is the last place which still uses lseek(), the others are already using the 64 bit variant.

Revision history for this message
In , Martin Pitt (pitti) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in udisks (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
status: Triaged → Fix Committed
Revision history for this message
In , Zeuthen (zeuthen) wrote :

Cool - that explains why benchmarking didn't work on my 32-bit box (I mainly use 64-bit boxes these days). Thanks!

Revision history for this message
pvdeynse (vandeynse) wrote :

I can confirm R/W benchmark works also with above patch, thanks

Changed in udisks:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udisks - 1.0.0-0ubuntu1

---------------
udisks (1.0.0-0ubuntu1) lucid; urgency=low

  [ Martin Pitt ]
  * debian/control: Prefer building against current libparted0-dev. Add
    alternative libparted-dev build dependency as well.
  * debian/rules: Build a PO template during package build, to have an up to
    date one for translators. (LP: #538320)
  * Drop debian/local/ubuntu.pkla again: This will be provided by a new
    policykit-desktop-permissions package.

  [ Michael Biebl ]
  * New upstream release.
    - Clean up stale mounts from devices in /etc/fstab, too. (LP: #476654)
    - Fix recognition of unpartitioned VFAT drives, which were previously
      misdetected as MBR. (LP: #536670)
    - Use lseek64() instead of lseek() in job-drive-benchmark.c, to also work
      with large devices. (LP: #526524)
  * Refresh patches.
 -- Martin Pitt <email address hidden> Tue, 16 Mar 2010 14:57:23 +0100

Changed in udisks (Ubuntu):
status: Fix Committed → Fix Released
Changed in udisks:
importance: Unknown → Medium
Changed in udisks:
importance: Medium → Unknown
Changed in udisks:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.