[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-04-12 Thread Seth
I had similar trouble, removing 'watch' didn't change a thing for me
(can't seem to get any of these updates while in jaunty_beta?). I
realize therefore my problem is not related to this bug, still I realize
that more people will find this bug when searching for heir answer
later; let me explain how I solved my issue for reference:

FWIW I found out that 'lvchange -a y' was taking ages on my volume group
that contained a snaphot of 18Gb that was 50% full. Ages measuring in
minutes, it would prevent successfull boot. I found out by doing
repeated

/sbin/lvm vgchange -a n
/sbin/lvm vgchange -a y   # takes ages

/sbin/lvm lvremove vg/largish_snapshot

/sbin/lvm vgchange -a n
/sbin/lvm vgchange -a y# takes seconds

Of course I made a backup of the data in the snapshot that I actually
wanted to keep :)

Anyone seeing prolonged disk activity while failing boot, check this.
I'm considering to file this as a bug against lvm2 (unless I find some
documentation on lvm2 that I should have read, stating that this
behaviour is by design).

Regards,
Seth

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-24 Thread Francisco Borges
Is there a reason why there is no new lvm2 package for amd64?

On Mon, Feb 23, 2009 at 11:30 PM, Launchpad Bug Tracker
332...@bugs.launchpad.net wrote:
 This bug was fixed in the package lvm2 - 2.02.39-0ubuntu7

 ---
 lvm2 (2.02.39-0ubuntu7) jaunty; urgency=low

  * debian/patches/open-readonly.patch:
    - Generally we don't need to write to every single block device we open,
      in fact if we do that when scanning we'll make udev think they all
      changed, and it could run lvm vgscan again!  When the file descriptor
      is needed for writing, it will be closed and opened again.  LP: #332270.

  -- Scott James Remnant sc...@ubuntu.com   Mon, 23 Feb 2009 21:44:51
 +

 ** Changed in: lvm2 (Ubuntu Jaunty)
       Status: Triaged = Fix Released

 --
 udev repeatedly generates change events for the same block device(s)
 https://bugs.launchpad.net/bugs/332270
 You received this bug notification because you are a direct subscriber
 of the bug.



-- 
Francisco

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-24 Thread Luke Yelavich
On Tue, Feb 24, 2009 at 07:34:12PM EST, Francisco Borges wrote:
 Is there a reason why there is no new lvm2 package for amd64?

Not that I know of, it built successfully, so should be getting out to
mirrors.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-24 Thread MichaelEvans
The Updates appear to work on my laptop
Disk
|-Swap
|-Boot
|-LVM
|-lv-Crypto-Root
|-lv-Crypto-Home
|-lv-Crypto-Other

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-24 Thread Iain Lane
There is no need to confirm that the update works; it just generates
email to everyone subscribed to the bug. Please only comment if the
update does not fix this specific issue for you. Thanks.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread MichaelEvans
If watch is the problem, what is it supposed to be doing anyway?

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread TJ
Having left the problem alone overnight it occurred to me this morning
that maybe the issue here is the *multiple* watches being created by
similar devices (block + lvm, block +md) in the same event run that is
at the heart of this. This would explain why only systems with some
combination of LVM, crypt, md or dmraid seem to be affected.

With my earlier observations about timing being significant (slowed down
by udev logging, it can avoid the issue) I wonder if it's a case of the
actions in 65-persistent-storage not having completed when 85-lvm2 (for
example) is being processed and therefore creating a positive feedback
loop?

From what I can gather child processes are forked so we could have a
child processes triggering new inotify events unexpectedly.

I did wonder briefly what the effect is when an inotify watch is created
on a node that is already covered by another inotify watch.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread MichaelEvans
TJ if that's the case then this is probably a flaw of the entire block
IO system design.

In my mind, the ideal solution would be to have an abstraction which
eventually reduces to a list of raw devices and block-ranges of action
per device.  When a watch or event occurs it would only be within that
range.  Multiple virtual devices might match against different ranges of
raw block devices.

If the device, block-range, and some type of timestamp of the event were
combined a unique key would be formed.  Generating events only from the
raw device and reflecting them up to directly linked virtual block
abstractions would place an implicit limit in the data-structures and
execution path.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread fishor
I have only lvm and md no crypt. For testing i removed mdadm and md 
device, so it make no difference. After start udev create four instances 
, the first one use 100% CPU. I attach strace of this process.

For other test i removed 85-lvm2.rules on booted system. Now udev 
starting normally with only one instance, but i steal nead this file to 
boot my pc.


** Attachment added: trace
   http://launchpadlibrarian.net/23000807/trace

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread MichaelEvans
Yeah, Fishor if TJ is correct then what's happening is this.

Udev adds watches on any of these devices which you have...
disk/partition
lvm
crypto
raid
(any other device-mapper things)

Only, unfortunately, two or more of those are the same real device.  A
race condition (which would probably be aggravated by SMP systems) can
then occur where a potentially infinite loop of self-chaining change
events starts.  I would presume that at some point it either overflows
or bogs down to the point where so many instances are spawned that it
causes the lag and then lets you past.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread fishor
 Only, unfortunately, two or more of those are the same real device.  A
 race condition (which would probably be aggravated by SMP systems) can
 then occur where a potentially infinite loop of self-chaining change
 events starts.  I would presume that at some point it either overflows
 or bogs down to the point where so many instances are spawned that it
 causes the lag and then lets you past.

hmm... seems to be true. I just disabled one core started udev and 
enabled core again. It's working.


  echo 0   /sys/devices/system/cpu/cpu1/online
  /etc/init.d/udev start
  echo 1   /sys/devices/system/cpu/cpu1/online

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread MichaelEvans
Another workaround -might- be possible within grub then.

During menu-selection hit e to edit
arrow over the kernel line
e to edit the line
add (after a space) to the end 'maxcpus=1' and it might boot.

I'll see if I can test that.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread MichaelEvans
Unfortunately that does not seem to work on my test setup.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Kirit Sælensminde
I'm getting what appears to be this problem on my eee running jaunty
with an encrypted disk. Using the -7 kernel it will boot, using -8 it
won't. If I boot using -7 then restart udev the CPU utilisation reduces
for a while, but then goes back up later on. The volume was created
using the alternate installer for alpha 2 with the default options.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Christian Neugebauer
same problem here. Using raid+cryptsetup+lvm

Could boot kernel 2.6.28-7-server without changing anything. Booting up
needs approximately 5min.

After ~10 hours /dev seems to be full?! Checked it using df :

df
Dateisystem   1K‐Blöcke   Benutzt Verfügbar Ben% Eingehängt auf
/dev/mapper/vg-root2064208519092   1440260  27% /
tmpfs   488552 4488548   1% /lib/init/rw
varrun  488552   276488276   1% /var/run
varlock 488552 0488552   0% /var/lock
udev488552488552 0 100% /dev
tmpfs   488552 0488552   0% /dev/shm
/dev/mapper/vg-home 495844 10524459720   3% /home
/dev/mapper/vg-opt  495844 10510459734   3% /opt
/dev/mapper/vg-srv   598631504 478385084  89837716  85% /srv
/dev/mapper/vg-tmp  495844 38197432047   9% /tmp
/dev/mapper/vg-usr 4128448545064   3373672  14% /usr
/dev/mapper/vg-var 2064208210828   1748524  11% /var
/dev/md0497765 58874413192  13% /boot

The appended munin graph shows the flooding.

** Attachment added: munin-df-day.png
   http://launchpadlibrarian.net/23003705/munin-df-day.png

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Fabián Rodríguez
I have repeating messages like this one at boot (after switching to console), 
after Friday's updates:
  /sys/devices/virtual/block/dm-0 ($NR)

as noted in a previous comment. $NR is a decreasing number.

I was able to perform an upgrade on Saturday after botting into a
previous kernel recovery option, which took quite some time. Once the
upgrade was done I left the machine trying to boot on for the last two
days (until this morning), without noticeable change or progress other
than the number decreasing steadily, looping back again after reaching
0.

This install was done with a Jaunty alpha 3 later updated. Straight use
all disk + lvm + encryption install from Alternate CD, so definitely a
situation the installer can reproduce predictably.

I can't provide logs until I get back home (+9 hrs), though.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant
On Mon, 2009-02-23 at 11:32 +, MichaelEvans wrote:

 Only, unfortunately, two or more of those are the same real device.  A
 race condition (which would probably be aggravated by SMP systems) can
 then occur where a potentially infinite loop of self-chaining change
 events starts.  I would presume that at some point it either overflows
 or bogs down to the point where so many instances are spawned that it
 causes the lag and then lets you past.
 
inotify doesn't work this way.


Actually, it looks like something far simpler is happening:

udev runs lvm vgscan when it detects an LVM Physical Volume.  It looks
like lvm is opening every single block device on the system FOR WRITING;
that triggers the inotify IN_CLOSE_WRITE event, and thus a udev change
event - which means udev runs lvm vgscan (repeat until up to
temperature).

It would be helpful if people could reply if THEY DO NOT have *any* LVM
Physical Volumes on their system, and are still experiencing this bug.

Scott
-- 
Scott James Remnant
sc...@canonical.com

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread MichaelEvans
Scott, you have a strongly supported hypothesis, a problem domain of LVM
and -any- of the other watch rulesets.

Looking over every comment in this bug and everyone that mentions system
setup also seems to be running LVM in one way or another.

The topic in #ubuntu+1 should be updated to help collect the information
you requested.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread fishor
udev 138 introduced new watch option. I just disabled it and every
thing working fine now.

vi  /lib/udev/rules.d/60-persistent-storage.rules

comment
#KERNEL!=sr*, OPTIONS+=watch

and probobly in 65-dmsetup.rules too:
#OPTIONS+=watch

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread TJ
** Description changed:

+ SYMPTOMS
+ 
+ Early in the boot process (during initial ram-disk script processing)
+ the PC appears to stop although there may be a lot of repeated disk
+ activity, possibly accompanied by messages to screen of the form:
+ 
+  UEVENT[1235217664.944992] change
+ /devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda
+ (block)
+ 
+ This happens after an automatic package upgrade to udev to 138-1.
+ 
+ RECOVERY PROCEDURE
+ 
+ If the PC is unable to complete start-up, effectively locking you out,
+ this is how to regain control and install a work-around until a solution
+ is available.
+ 
+  1. When the PC starts enter the GRUB menu.
+  2. Select the Recovery entry and edit it (press e) - this starts in 
single-user mode with minimal services. 
+  3. Select the kernel line and edit it (press e)
+  4. Add  break=top to the end of the line and press Enter.
+  5. With the kernel line highlighted press b to boot using the edited 
entry.
+ 
+ The boot process will stop when the initial ram-disk scripts begin and
+ you'll be faced with a busybox shell.
+ 
+ Edit the rules that contain the problematic watch and remove it:
+ 
+  for rule in /lib/udev/rules.d/*; do sed -i -e '/watch/s/watch//' $rule;
+ done
+ 
+ Modify the init script so the boot can continue:
+ 
+  sed -i -e '/run-init/s,${init},/bin/bash,' /init
+ 
+ Restart the boot process by pressing Ctrl+D
+ 
+ The system *should* now boot to a root prompt although there may still
+ be a delay. Once there, edit the non-initrd system rules:
+ 
+  for rule in /lib/udev/rules.d/*; do sed -i -e '/watch/s/watch//' $rule;
+ done
+ 
+ And rebuild the initial ram-disk image so you don't have to go through
+ this procedure at every boot:
+ 
+ To update just the kernel version that is currently running:
+ 
+  update-initramfs -u -k `uname -r`
+ 
+ or to update for all installed kernels:
+ 
+  update-initramfs -u -k all
+ 
+ Now restart the PC and hopefully the regular multiuser start-up should
+ go normally.
+ 
+ -- TJ
+ 
+ -
  Since todays upgrade of udev jaunty is not able to boot anymore
  affects also recovery mode, of course.
  
  I can see messages like
  /sys/devices/pci:00/:00:1f.1/host0/target0:0:0/0:0:0:0/block/sda 
(9367)
  /sys/devices/pci:00/:00:1f.1/host0/target0:0:0/0:0:0:0/block/sda/sda2 
(9366)
  /sys/devices/pci:00/:00:1f.1/host0/target0:0:0/0:0:0:0/block/sda/sda2 
(9365)
  
  the messages appear in blocks of quite many, always repeating after 5
  minutes or so and the number is counting up.
  
  Harddisk LED is flashing rapidly but no hearable access to the hard disk
  I think it has something to do with udev as this is in the last upgrade log
  
  2009-02-20 20:59:24 upgrade libvolume-id1 137-2 138-1
  2009-02-20 20:59:24 status unpacked libvolume-id1 138-1
  2009-02-20 20:59:24 status unpacked libvolume-id1 138-1
  2009-02-20 20:59:25 configure libvolume-id1 138-1 138-1
  2009-02-20 20:59:25 status unpacked libvolume-id1 138-1
  2009-02-20 20:59:25 status half-configured libvolume-id1 138-1
  2009-02-20 20:59:25 status installed libvolume-id1 138-1
  2009-02-20 20:59:26 upgrade udev 137-2 138-1
  2009-02-20 20:59:27 status unpacked udev 138-1
  2009-02-20 20:59:27 status unpacked udev 138-1
  2009-02-20 20:59:34 upgrade libudev0 137-2 138-1
  2009-02-20 20:59:34 status unpacked libudev0 138-1
  2009-02-20 20:59:34 status unpacked libudev0 138-1
  2009-02-20 20:59:41 configure udev 138-1 138-1
  2009-02-20 20:59:41 status unpacked udev 138-1
  2009-02-20 20:59:41 status unpacked udev 138-1
  2009-02-20 20:59:41 status unpacked udev 138-1
  2009-02-20 20:59:41 status unpacked udev 138-1
  2009-02-20 20:59:41 status unpacked udev 138-1
  2009-02-20 20:59:41 status unpacked udev 138-1
  2009-02-20 20:59:41 status half-configured udev 138-1
  2009-02-20 20:59:41 status installed udev 138-1
  2009-02-20 20:59:47 configure libudev0 138-1 138-1
  2009-02-20 20:59:47 status unpacked libudev0 138-1
  2009-02-20 20:59:47 status half-configured libudev0 138-1
  2009-02-20 20:59:47 status installed libudev0 138-1

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant
** Also affects: lvm2 (Ubuntu)
   Importance: Undecided
   Status: New

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant
There are two parts to this bug.

The actual bug is being caused by lvm vgscan opening all block devices
on the system writable and then closing them again, which triggers the
inotify event.  There seems to be no reason they cannot be opened
readonly, since the only thing it does is call fstat() and read() on
them.

Since the devices include any LVM PVs (which is what it's looking for),
this gives you a recursive loop where LVM PVs appear to have been
changed, so udev calls lvm vgscan again to update its tables.

Part #1 of the fix will be a patch to LVM to only open block devices
with O_RDONLY

Part #2 of the fix will be a patch to udev to not add the inotify watch
until all RUN rules are processed; this will prevent the initial
onslaught on boot, and hopefully guard against anything it runs changing
the device resulting in reprocessing (which is better handled with udev
rules ordering anyway).

It will obviously not protect against a udevadm trigger once booted,
so it's possible that we'll trip over this with another program later
and will have to fix that one in the same manner as LVM.

It's not yet clear why this does not affect _everyone_, there appears to
be a race involved as slowing udev down with various log levels - or
using only one core - is enough to hide the bug for some people.  I need
to work out why that is before uploading the fixes


** Changed in: lvm2 (Ubuntu Jaunty)
   Importance: Undecided = High
   Status: New = Triaged
   Target: None = jaunty-alpha-5

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant

** Attachment added: udev patch to add inotify watch after processing RUN 
rules
   http://launchpadlibrarian.net/23011626/udev.inotify.patch

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Alasdair G. Kergon
On Mon, Feb 23, 2009 at 04:45:18PM -, Scott James Remnant wrote:
 There are two parts to this bug.
 The actual bug is being caused by lvm vgscan opening all block devices
 on the system writable and then closing them again, which triggers the
 inotify event.  There seems to be no reason they cannot be opened
 readonly, since the only thing it does is call fstat() and read() on
 them.
 
Good luck:-)

 Part #1 of the fix will be a patch to LVM to only open block devices
 with O_RDONLY
 
I don't know which lines are the problem, but it's probably opening
them for write in case it decides it needs to fix up the metadata.
(It can't handle promotion from read-write so if any possible code path
includes a write, it opens with write access.)

 Since the devices include any LVM PVs (which is what it's looking for),
 this gives you a recursive loop where LVM PVs appear to have been
 changed, so udev calls lvm vgscan again to update its tables.
 
That's what needs fixing - vgscan is just the wrong approach here.
Upstream (2.02.45) we made a start with a new class of 'pvs' output
fields, Physical Volume Label Fields, e.g. pvs -o pv_name.
If only these fields are specified, the code is meant not to scan
and only access the devices specified on the command line.

We need to sort out the right interface for adding one device at a 
time so you don't need vgscan at all.

Alasdair
-- 
a...@redhat.com

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Alasdair G. Kergon
It's also worth trying it without any vgscans at all - it ought to
cope without nowadays provided all commands access VGs by name 
i.e. 'vgchange -ay vg1' and never 'vgchange -ay'.
It'll trigger a vgscan internally if it can't find a VG that
was explicitly named.

Alasdair
-- 
a...@redhat.com

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant
On Mon, 2009-02-23 at 17:44 +, Alasdair G. Kergon wrote:

 It's also worth trying it without any vgscans at all - it ought to
 cope without nowadays provided all commands access VGs by name 
 i.e. 'vgchange -ay vg1' and never 'vgchange -ay'.
 It'll trigger a vgscan internally if it can't find a VG that
 was explicitly named.
 
Which will cause the exact same problem we're seeing :-/

Scott
-- 
Scott James Remnant
sc...@canonical.com

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Yannis T
I have this one too! I have LVM over RAID (mdadm). I will post my
details tomorrow.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Launchpad Bug Tracker
This bug was fixed in the package udev - 138-2

---
udev (138-2) jaunty; urgency=low

  * Fix inotify watch code to remove any existing watch before beginning rule
processing, and not to add the watch until the rule processing is
complete.  This stops us chasing our own tail if one of the programs we
run writes to the block device, or at least opens it for writing.
LP: #332270

  * Fix inotify code to respond to all events, rather than just the first in
the buffer repeatedly.  Ironically this bug was causing fewer people to be
affected by #332270.

 -- Scott James Remnant sc...@ubuntu.com   Mon, 23 Feb 2009 20:28:58
+

** Changed in: udev (Ubuntu Jaunty)
   Status: Triaged = Fix Released

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant
Please note that the above upload is a _partial_ fix.

If you have only a single LVM PV, it should fix things for you.  After
upgrading, if you've copied the persistent storage rules to
/etc/udev/rules.d, you should remove that file.  If you just edited the
file in /lib/udev/rules.d, it will be overwritten anyway.

If you have multiple LVM PVs, you will still see the problem; though the
effect should be somewhat lessened.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Daniel Hahler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Scott James Remnant wrote:

 If you have multiple LVM PVs, you will still see the problem; though the
 effect should be somewhat lessened.

Is there a fix for this in sight?


- --
Cheers,
Daniel

http://daniel.hahler.de/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJoxakfAK/hT/mPgARApdRAKCMK1g8YB3k5MbANu5kGWLtOeWvJgCg/Yqp
VImu/pg116OuxbQSrVZikjw=
=SDXs
-END PGP SIGNATURE-

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Launchpad Bug Tracker
This bug was fixed in the package lvm2 - 2.02.39-0ubuntu7

---
lvm2 (2.02.39-0ubuntu7) jaunty; urgency=low

  * debian/patches/open-readonly.patch:
- Generally we don't need to write to every single block device we open,
  in fact if we do that when scanning we'll make udev think they all
  changed, and it could run lvm vgscan again!  When the file descriptor
  is needed for writing, it will be closed and opened again.  LP: #332270.

 -- Scott James Remnant sc...@ubuntu.com   Mon, 23 Feb 2009 21:44:51
+

** Changed in: lvm2 (Ubuntu Jaunty)
   Status: Triaged = Fix Released

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant
Alasdair: patch for LVM2 attached - this makes functions that only read
from a block device open with O_RDONLY instead of writable-if-they-can.
If another function comes along and needs it writable, dev_open_flags()
already does the right thing and reopens it anyway.

** Attachment added: Patch for LVM2 to open in readonly when only reading
   http://launchpadlibrarian.net/23021039/open-readonly.patch

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Scott James Remnant
The LVM2 upload constitutes the complete fix.

udev no longer receives inotify events for the specific block device
it's processing the rules for (thus guarding against RUN rules causing
them).

LVM no longer opens all block devices for writing when invoked with
vgscan by udev, so no longer triggers the inotify events for other
block devices.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Martin Pool
 This bug was fixed in the package udev - 138-2

For those who may be wondering why they can't install this fix, it's
because https://edge.launchpad.net/ubuntu/jaunty/+source/udev/138-2
shows that it's still waiting to build on all architectures.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Cafuego
I just built lvm2 and udev from the new sources and indeed, Jaunty boots
again.

Thank you! :-)

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Martin Pool
I can confirm that with only the udev update from jaunty, my laptop
with a single lvm-on-dmcrypt pv works again.

-- 
Martin http://launchpad.net/~mbp/

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread souplin
Can confirm the bug was fixed by installing the package udev-138-2 and
the new lvm2, but somehow leaves bug #325690 The conf/conf.d/cryptroot
isn't created by update-initramfs anymore.

Don't know, if this is also caused by the last udev updates. Also my
other hdds are not mounted - I can't sent them to the sleep modus via
hdparm -Y /dev/sdb any longer. The hdd restarts instantly...

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Peter Klotz
Installation of package udev-138-2 fixed my problems. Thanks a lot.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-23 Thread Kirit Sælensminde
My eee is now booting with the -8 kernel after the latest updates.
Thanks!

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Scott James Remnant
I've put together the following test system:

two disks, sda and sdb

sda1 + sdb1 are an mdadm RAID-1 mirror, containing an ext3 filesystem
mounted as /boot

sda2 + sdb2 are an mdadm RAID-1 mirror, configured as a dm-crypt device,
containing a swap partition

sda3 + sdb3 are an mdadm RAID-1 mirror, configured as an LVM Physical
Volume, with a single Volume Group and Logical Volume, containing an
ext3 filesystem mounted as /


I cannot replicate this bug.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Christian Roessner
I also do have this problem. At the moment I am unable to boot, because
I do not have an alternate kernel.

sda and sdb do two md-devices. md0 is static /boot, while md1 is lvm. On
the lvm there is lv_root, lv_home, lv_swap and lv_data.

I did not find any tricks to interrupt the disc activity. Pressing
alt+shift and del does not interrupt the process and bring me to
busybox, it simply starts rebooting. How can I enter the busybox (wich
command-line parameter could hep me?)

Hopefully the udev stuff gets fixed qucikly ;-)

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Scott James Remnant
Reducing Importance.

This bug so far seems to affect a very small number of people, and is
not replicable by installing with a configuration involving a
combination of MD, LVM and encrypted swap.  It's therefore likely to be
a problem caused by some people's existing configuration, which may not
even be a configuration our installer can create.

Please note that Importance is not Priority - I will still be
investigating this, but right now, we wouldn't stop the release for it.

Your help is required to determine what is unique about your systems
that is causing this bug.

Please attach a tar file containing your /etc/udev/rules.d and
/lib/udev/rules.d directories as well as /dev itself

** Changed in: udev (Ubuntu)
   Importance: Critical = High

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Scott James Remnant
But do track for the release

** Changed in: udev (Ubuntu)
   Target: None = jaunty-alpha-5

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread jh
Scott,

I would respectfully suggest that not even be a configuration our
installer can create is not a helpful condition for downgrading a bug;
the fact remains that a number of users here have Ubuntu systems, with
configurations that in my case have been valid for many years, and now
no longer boot --- this is critical to me.

This machine started with warty, and at some stage, acquired a second
disk, and using Ubuntu tools, raid1, lvm. I don't really expect a new
version to cause me to have to throw away five years of Ubuntu goodness
and reinstall it.  Reinstalling to solve upgrade problems is not a
reason I chose Ubuntu.

I attach the requested tar file; I hope it helps resolve this bug which
is critical to me. If ssh access to the affected machine would help,
please contact me by private email.

-jonathan



** Attachment added: jh-332270.tar.gz
   http://launchpadlibrarian.net/22984702/jh-332270.tar.gz

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Christian Roessner
@Tj: thx. The sed fix worked for me

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Night Shadow
Peoples can't use their computers... And it's not critical... What's
next?

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Anders Kaseorg
According to https://wiki.ubuntu.com/Bugs/Importance, the definition
of a Critical priority bug is one which “has a severe impact on a large
portion of Ubuntu users”.  A High priority bug “has a severe impact on a
small portion of Ubuntu users” or “makes a default Ubuntu installation
generally unusable for some users”.  This bug is believed to fall into
the latter category.  Even as someone who is affected by this bug, that
is fine with me.

Let’s figure out how to fix this bug instead of arguing about its
priority.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Anders Kaseorg
(where of course by “priority” I mean “importance”.  Silly me.)

http://web.mit.edu/andersk/Public/lp-332270/udev_rules.tar.gz
http://web.mit.edu/andersk/Public/lp-332270/dev.tar.gz

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread TJ
I've finally managed to catch the event storm in the act in a log.

First, I built udev 138-1 with --enable-debug. I had to apply a fix to
the udev/Makefile.in and udev/lib/Makefile.in because both were failing
to pass $(DEBUG_CFLAGS) to the compiler and linker.

With the package installed on the lab PC I booted it with serial console
as before, but in addition I used the kernel command-line break
parameter which causes the /init script to stop at the start of the
init-premount stage (just before udev is started).

I manually started  udevd without --daemon mode and with debugging:

 /sbin/udev --debug --debug-trace 

I then enabled kernel hotplug:

 echo  /proc/sys/kernel/hotplug

Then I triggered udev:

 /sbin/udevadm trigger

The attached gzipped log was captured via the serial console with
'screen'. The log starts at kernel boot and includes the busybox
commands. Search for /sbin/udevd to get to the start of the storm.

I left it running for about 5 minutes before doing Ctrl+Alt+Del on the
physical console keyboard.



** Attachment added: Udev event storm during init-premount
   http://launchpadlibrarian.net/22985514/boot-udev-storm.log.gz

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread jayboi
I can also confirm that my system is unbootable until I comment out the
watch line in /lib/udev/rules.d/60-persistent-storage.rules and re-
create the initramfs.

Hardware config:

hda - /  /boot  /home

sda - LVM
sdb - LVM
sdc - LVM
sdd - blank, unused

I am NOT using any RAID, or encryption.  Just a simple LVM.

I was able to boot by disabling my SATA controller (thus disabling the
LVM), I edited the files, update-initramfs and re-enabled the
controller.  All works now.

Not sure when this happened though - my IDE drive (hda) is being
addressed as sde now.

Let me know if addtional info/tests are required.

** Attachment added: udev.tar.gz
   http://launchpadlibrarian.net/22985553/udev.tar.gz

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread FH
I have the same problem. My system is booting without the watch Option
now.

My config:
sda1 = /boot
sda2 = crypt-swap
sda3 = crypt-lvm-root

On boot i have seen also a lot of /sys/devices/virtual/block/dm-0 lines.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread TJ
Further analysis of event storm log.

The crux of the problem is when the LVM VG partition is detected. A
cascade of duplicate synthesised 'change' events begins. This is where
it starts. This sequence is the first. I've cut-out the intervening log
messages:

run  
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda4 
(1014) 'watershed sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -a y''
[1276] util_run_program: 'watershed sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange 
-a y''
[829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda 
closed, synthesising 'change'
[829] event_queue_insert: seq 1035 queued, 'change' 'block'
[829] event_queue_manager: maximum number (1) of childs reached
[829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 
closed, synthesising 'change'
[829] event_queue_insert: seq 1036 queued, 'change' 'block'
[829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 
closed, synthesising 'change'
[829] event_queue_manager: maximum number (1) of childs reached
[829] event_queue_insert: seq 1037 queued, 'change' 'block'
[829] event_queue_manager: maximum number (1) of childs reached
[829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 
closed, synthesising 'change'
[829] event_queue_insert: seq 1038 queued, 'change' 'block'
[829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 
closed, synthesising 'change'
[829] event_queue_manager: maximum number (1) of childs reached
[829] event_queue_insert: seq 1039 queued, 'change' 'block'
[829] event_queue_manager: maximum number (1) of childs reached
[829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 
closed, synthesising 'change'
[829] event_queue_insert: seq 1040 queued, 'change' 'block'
[829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 
closed, synthesising 'change'

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread TJ
More analysis. I grep-ed out just the handle_inotify reports. In this
5-minute log there were 777. Analysing them for uniqueness I get:

sort boot-udev-storm-handle_inotify.log | uniq -c

  1 [829] handle_inotify: [1385] util_run_program: '/lib/udev/watershed' 
(stdout) '  Reading all physical volumes.  This may take a while...'
 61 [829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda 
closed, synthesising 'change'
 92 [829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda1 
closed, synthesising 'change'
 59 [829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda2 
closed, synthesising 'change'
 81 [829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda3 
closed, synthesising 'change'
 97 [829] handle_inotify: device 
/sys/devices/pci:00/:00:09.0/host0/target0:0:0/0:0:0:0/block/sda/sda4 
closed, synthesising 'change'
148 [829] handle_inotify: device /sys/devices/virtual/block/dm-0 closed, 
synthesising 'change'
141 [829] handle_inotify: device /sys/devices/virtual/block/dm-1 closed, 
synthesising 'change'
 97 [829] handle_inotify: device /sys/devices/virtual/block/dm-2 closed, 
synthesising 'change'

** Attachment added: handle_inotify log messages
   http://launchpadlibrarian.net/22986231/boot-udev-storm-handle_inotify.log

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Adrenaline
ctrl-alt-sysrq-E seems to work to get me in to the 2.6.28-8 kernel when
udev is locked in a loop

YMMV

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


Re: [Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Albert Damen
Attached are the requested tar files. I used the modified
60-persistent-storage.rules from comment 49 to be able to boot.

Somehow this feels like I won the lottery today. Only a handful of
systems is affected, but yet, I have two of those

There is a difference though: my laptop (Intel ICH8 / T7500) has the
event storm both in initrd and in / (see comment 10).
My slimline desktop (Intel ICH7 / T7200) only has the storm in /, not in
initrd. I verified (booting with break=premount) that the watch option
was present in 60-persistent-storage.rules and 65-dmsetup.rules in the
initrd.
Both systems run amd64. The laptop was upgraded from Intrepid, the
desktop was freshly installed end of January (alpha3). Both only use
LVM, no raid and no encryption.

All files I attached so far are from the laptop.


** Attachment added: udev_rules.tar.gz
   http://launchpadlibrarian.net/22988235/udev_rules.tar.gz

** Attachment added: dev.tar.gz
   http://launchpadlibrarian.net/22988236/dev.tar.gz

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Eric Shattow
A me too for this bug. I run root-on-LVM.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Alois Hammer
A maybe-helpful note: disabling the watch options in /etc/udev/rules.d/
(60-persistent-storage.rules, 65-dmsetup.rules) seems to cut boot time
from ~90mins to 40mins.  So it seems to at least reduce the impact of
the bug.

I'd experiment more with boot time measurements, but I'm actually using
the laptop for other stuff.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Luke Yelavich
Scott, I have this issue o a fresh install of jaunty from Saturday's
daily alternate amd64 image, so I don't think its a user configuration
issue, since I have not touched any udev rules.

One thing I did do to get my desktop booting at a normal speed, was to
remove calls to the udevadm settle command. I won't tell anyone how to
do it here, and I won't make any packages with this hack, because there
is no certainty it will work for everyone, and one needs to ensure these
scripts are overwritten on next package update.

Logs attached.

** Attachment added: Dpkg package list
   http://launchpadlibrarian.net/22991971/dpkg-l.log

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Luke Yelavich

** Attachment added: /sys/block
   http://launchpadlibrarian.net/22992005/sysblock.log

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Luke Yelavich

** Attachment added: lvm vgs
   http://launchpadlibrarian.net/22992007/lvm-vgs.log

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Luke Yelavich

** Attachment added: lvm pvs
   http://launchpadlibrarian.net/22992009/lvm-pvs.log

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Steve Langasek
I confirm that I'm also seeing this problem here on a system with
root+swap on crypt LVM as set up using the Ubuntu alternate 8.10
installer; so it's definitely a configuration that our installer can
create.  'high' is fine for urgency, regardless.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread chunglam
I have two machines with this issue, both using LVM2 plus 3ware raid
card. One of the machines don't have any alternative way to boot then I
install a fresh jaunty to another hard disk from my internal mirror
using usb netboot, initially I can boot into the new jaunty because I
forgot to enable the raid volume( I have boot manager to hide disk
volume), but after I enable the raid volume thus also enable LVM2 the
fresh jaunty refused to boot. Finally I have to downgrade the udev(and
devmapper) to 137 to get access to my LVM2 volumes. I will send the logs
later.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 332270] Re: udev repeatedly generates change events for the same block device(s)

2009-02-22 Thread Martin Pool
I'm also seeing this in what was originally 333073.  This machine's
configuration was made by fairly straightforward use of gutsy (iirc)
installer options, nothing too exotic.

-- 
udev repeatedly generates change events for the same block device(s)
https://bugs.launchpad.net/bugs/332270
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs