Re: [systemd-devel] "dev-xxx.device" is trying to start indefinitely long

2016-09-20 Thread Anton Gerasimov
Hello Martin, hello Andrei

Yes it was all due to missing 99-systemd.rules (udevdir wasn't set
properly for dracut). /sys/block/hda is present.

Thanks,

Anton Gerasimov


On 09/20/16 12:42, Martin Pitt wrote:
> Hello Anton,
>
> please reply on the list too.
>
> Anton Gerasimov [2016-09-20 10:22 +0200]:
>> yes, I think it can be due to missing udev rules. But if the device node
>> is actually there, doesn't it mean that it was noticed by systemd?
> No, only devices with a "systemd" udev tag get represented in systemd;
> this is to avoid unnecessary overhead with creating dozens or hundreds
> of device units and having to follow their states, so the udev rules
> only pick out those which we want to actually use.
>
>> And I still can't get what happens when dev-hda.device is started.
> Block device units are mostly being used to know when the
> corresponding mount units get started.
>
> Anton Gerasimov [2016-09-20 11:37 +0200]:
>> Yes, just adding 'KERNEL=="hda" TAGS+="systemd"' to udev rules did the
>> trick. Thank you!
> That means you are missing /lib/udev/rules.d/99-systemd.rules for some
> reason.
>
> Martin
>

-- 
Anton Gerasimov, ATS Advanced Telematic Systems GmbH
Kantstrasse 162, 10623 Berlin
Managing Directors: Dirk Pöschl, Armin G. Schmidt
Register Court: HRB 151501 B, Amtsgericht Charlottenburg

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] "dev-xxx.device" is trying to start indefinitely long

2016-09-20 Thread Mantas Mikulėnas
On Tue, Sep 20, 2016 at 2:00 PM, Andrei Borzenkov 
wrote:

> On Tue, Sep 20, 2016 at 1:42 PM, Martin Pitt 
> wrote:
> >
> > Anton Gerasimov [2016-09-20 11:37 +0200]:
> >> Yes, just adding 'KERNEL=="hda" TAGS+="systemd"' to udev rules did the
> >> trick. Thank you!
> >
> > That means you are missing /lib/udev/rules.d/99-systemd.rules for some
> > reason.
> >
>
> I'm not sure if legacy IDE drivers even plug into block subsystem at
> all; they are so old I forgot when I have seen such device last time.
>

They should. Surely they're not character devices?

-- 
Mantas Mikulėnas 
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] "dev-xxx.device" is trying to start indefinitely long

2016-09-20 Thread Martin Pitt
Hello Anton,

please reply on the list too.

Anton Gerasimov [2016-09-20 10:22 +0200]:
> yes, I think it can be due to missing udev rules. But if the device node
> is actually there, doesn't it mean that it was noticed by systemd?

No, only devices with a "systemd" udev tag get represented in systemd;
this is to avoid unnecessary overhead with creating dozens or hundreds
of device units and having to follow their states, so the udev rules
only pick out those which we want to actually use.

> And I still can't get what happens when dev-hda.device is started.

Block device units are mostly being used to know when the
corresponding mount units get started.

Anton Gerasimov [2016-09-20 11:37 +0200]:
> Yes, just adding 'KERNEL=="hda" TAGS+="systemd"' to udev rules did the
> trick. Thank you!

That means you are missing /lib/udev/rules.d/99-systemd.rules for some
reason.

Martin

-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] "dev-xxx.device" is trying to start indefinitely long

2016-09-20 Thread Andrei Borzenkov
On Tue, Sep 20, 2016 at 1:42 PM, Martin Pitt  wrote:
>
> Anton Gerasimov [2016-09-20 11:37 +0200]:
>> Yes, just adding 'KERNEL=="hda" TAGS+="systemd"' to udev rules did the
>> trick. Thank you!
>
> That means you are missing /lib/udev/rules.d/99-systemd.rules for some
> reason.
>

I'm not sure if legacy IDE drivers even plug into block subsystem at
all; they are so old I forgot when I have seen such device last time.
@Anton, do you have /sys/block/hda?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] "dev-xxx.device" is trying to start indefinitely long

2016-09-19 Thread Martin Pitt
Hello Anton,

Anton Gerasimov [2016-09-19 18:08 +0200]:
> I'm trying to make some custom initramfs image with systemd and I
> encounter very strange behaviour. Namely, when I boot into it with
> "root=/dev/hda" kernel command line option the boot process stops right
> after "Reached target Basic System" trying to start dev-hda.device, i.e
> I see "A start job is running for dev-hda.device (1min 8s / no limit)"
> forever.
> 
> However, if I break the boot process on an early stage and run the
> rescue shell, I can see /dev/hda and it can also be mounted without any
> problem. But if I 'systemctl start dev-hda.device' manually it also
> waits forever.
> 
> Have anyone here encountered something similar and what dev-hda.device
> unit is actually trying to do? Could you give me any tips for debugging
> this?

Actually yes. Occasionally our upstream CI fails with a similar
problem where it indefinitely hangs waiting for dev-ttyS0.device; and
just today I got a bug report with a similar symptom like your's [2].
Apparently udev sometimes misses to attach the "systemd" tag to that
device which causes systemd to never "see" it.  We don't understand
the bug at all yet, nor are able to reproduce it with reasonable
effort.

Does your problem happen at every boot, or only sometimes? In the
former case it might actually not be a race condition but a more
systematic error, such as missing some udev rules, or not
re-triggering all udev devices during boot, etc.

Martin

[1] 
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-xenial-pitti-systemd-semaphore/xenial/i386/s/systemd-upstream/20160903_005404@/log.gz
[2] https://bugs.launchpad.net/bugs/1625217
-- 
Martin Pitt| http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] "dev-xxx.device" is trying to start indefinitely long

2016-09-19 Thread Andrei Borzenkov
19.09.2016 20:24, Martin Pitt пишет:
> 
> Does your problem happen at every boot, or only sometimes? In the
> former case it might actually not be a race condition but a more
> systematic error, such as missing some udev rules, or not
> re-triggering all udev devices during boot, etc.
> 

CONFIG_FHANDLE comes in mind ...

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel