"raid45: Invalid RAID device offset parameter" error after activating fake raid

Bug #480496 reported by Krzysztof Limburski
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I have found problem after upgrading Ubuntu from version 9.04 to 9.10. I can't get access to my RAID5 volume. I have three 750GB in one group which is split into two volumes:
Volume0, RAID0 ~ 1750 GB
Volume1, RAID5 ~ 300 GB

sudo dmraid -s -g
*** Superset
name : isw_ebgeeadada
size : 4395441159
stride : 0
type : GROUP
status : setup
subsets: 2
devs : 3
spares : 0
--> Active Subset
name : isw_ebgeeadada_Volume0
size : 3451069440
stride : 256
type : stripe
status : ok
subsets: 0
devs : 3
spares : 0
--> Subset
name : isw_ebgeeadada_Volume1
size : 629562624
stride : 128
type : raid5_la
status : ok
subsets: 0
devs : 3
spares : 0

When I try to activate my volumes using "sudo dmraid -ya" it gives me message:
RAID set "isw_ebgeeadada_Volume0" already active
RAID set "isw_ebgeeadada_Volume1" was not activated
...
and dmesg:
...
device-mapper: table: 252:10: raid45: Invalid RAID device offset parameter
device-mapper: ioctl: error adding target to table
...

After some investigation I found problem in "dm-raid45" module. In file dm-raid4-5.c in definition of function dev_params(...) stands:

/* Get offset and device. */
if (sscanf(argv[1], "%llu", &tmp) != 1 || tmp > rs->set.sectors_per_dev)
 TI_ERR("Invalid RAID device offset parameter");

It has no sense. In my case start offset of Voume1 (sored in tmp) equals 1150360584 follow of big Volume0 but Volume1 have only 314781312 sectors. It causes device offset parameter error. Off course it will work if first volume is smaller than second one. When I removed bad comparison:

/* Get offset and device. */
if (sscanf(argv[1], "%llu", &tmp) != 1)
 TI_ERR("Invalid RAID device offset parameter");

everything starts working again like in previous Ubuntu version (before system upgrade). It would be nice If you add this fix to some of next kernel upgrade. It will prevent recompiling bad module.

Regards
Krzysztof

---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: limbur 2370 F.... pulseaudio
 /dev/snd/controlC0: limbur 2370 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xfc100000 irq 22'
   Mixer name : 'Realtek ALC889A'
   Components : 'HDA:10ec0885,1458a002,00100101'
   Controls : 40
   Simple ctrls : 22
Card1.Amixer.info:
 Card hw:1 'Audigy2'/'SB Audigy 2 ZS [SB0350] (rev.4, serial:0x20021102) at 0xd000, irq 19'
   Mixer name : 'SigmaTel STAC9750,51'
   Components : 'AC97a:83847650'
   Controls : 211
   Simple ctrls : 46
DistroRelease: Ubuntu 10.04
HibernationDevice: RESUME=UUID=8cc83280-f0e0-4329-aff8-6b790828ad76
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
MachineType: Gigabyte Technology Co., Ltd. EP35-DS4
NonfreeKernelModules: nvidia
Package: linux 2.6.32.22.23
PackageArchitecture: amd64
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-22-generic root=UUID=595bdc1b-bfc9-4ce1-81b3-b572a877bd6e ro libata.ignore_hpa=0 crashkernel=384M-2G:64M,2G-:128M quiet splash
ProcEnviron:
 LANG=pl_PL.utf8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Regression: No
RelatedPackageVersions: linux-firmware 1.34
Reproducible: Yes
RfKill:

Tags: lucid kconfig needs-upstream-testing
Uname: Linux 2.6.32-22-generic x86_64
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
dmi.bios.date: 06/19/2009
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F6
dmi.board.name: EP35-DS4
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF6:bd06/19/2009:svnGigabyteTechnologyCo.,Ltd.:pnEP35-DS4:pvr:rvnGigabyteTechnologyCo.,Ltd.:rnEP35-DS4:rvr:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: EP35-DS4
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

description: updated
Andy Whitcroft (apw)
tags: added: kernel-series-unknown
tags: added: karmic
removed: kernel-series-unknown
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Krzysztof,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 480496

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Krzysztof Limburski (limbur) wrote :

Hi

Sorry for delay. I had a lot of work. Nothing changed with this bug till today. Bug still exists in latest Ubuntu 10.04 kernel. I have tested kernel 2.6.32-22. This is a patch which makes my raid5 work again:

diff -ruN linux-source-2.6.32/ubuntu/dm-raid4-5/dm-raid4-5.c linux-source-2.6.32-mod/ubuntu/dm-raid4-5/dm-raid4-5.c
--- linux-source-2.6.32/ubuntu/dm-raid4-5/dm-raid4-5.c 2010-04-28 15:27:01.000000000 +0200
+++ linux-source-2.6.32-mod/ubuntu/dm-raid4-5/dm-raid4-5.c 2010-05-09 17:14:56.778161942 +0200
@@ -3700,8 +3700,7 @@
   struct raid_dev *dev = rs->dev + *p;

   /* Get offset and device. */
- if (sscanf(argv[1], "%llu", &tmp) != 1 ||
- tmp > rs->set.sectors_per_dev)
+ if (sscanf(argv[1], "%llu", &tmp) != 1)
    TI_ERR("Invalid RAID device offset parameter");

   dev->start = tmp;

I will prepare bug report too.

Best Regards
Chris

Revision history for this message
Krzysztof Limburski (limbur) wrote : AlsaDevices.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Krzysztof Limburski (limbur) wrote : AplayDevices.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : ArecordDevices.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : BootDmesg.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Card0.Codecs.codec.2.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Card1.Amixer.values.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Card1.Codecs.codec97.0.ac97.0.0.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Card1.Codecs.codec97.0.ac97.0.0.regs.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Dependencies.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Lspci.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : Lsusb.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : PciMultimedia.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : ProcModules.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : UdevDb.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : UdevLog.txt

apport information

Revision history for this message
Krzysztof Limburski (limbur) wrote : WifiSyslog.txt

apport information

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu development release http://cdimage.ubuntu.com/daily-live/current/ . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
Killer/OZ (ksystem)
Changed in linux (Ubuntu):
status: Expired → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
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.