[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#846256: failure on boot



On Fri, Jun 23, 2017 at 02:23:04PM +0200, Badics, Alex wrote:
> 
> We also encountered the bug, and to me, it seems to be caused by the
> systemd-tmpfiles-setup.service, shown as "Create Volatile Files and
> Directories". This is because /tmp is listed as "D" in
> /usr/lib/tmpfiles.d/tmp.conf, which means its contents gets removed
> when /bin/systemd-tmpfiles --remove is called, and the service files
> does exactly that.
> 
> You might see it in your journal that the bug only happens if
> console-setup is started before systemd-tmpfiles-setup.

Since I do not know well systemd, I will prefer if some other developer 
looks into this.

The script /bin/setupcon does not require the existence of /tmp because 
it can use alternative directories if necessary (look at the function 
tempfile in setupcon).  However it will use /tmp if it exists.  
Therefore, the following perhaps can explain the bug:

1. The scripts of console-setup are started before 
   systemd-tmpfiles-setup.

2. If they finish in time, this is ok.  Suppose however that 
   systemd-tmpfiles-setup starts before the scripts of console-setup 
   finish their work.  (Is this possible?)

3. Then, ofcourse, if systemd-tmpfiles-setup deletes files that the 
   scripts of console-setup have creaded and expected to be deleted by 
   them and not by some third party, these scripts will fail to work 
   properly.

> I think not having "DefaultDependencies=no" in setup-console's unit
> file or explicitly having systemd-tmpfiles-setup in After would solve
> the problem.

It wourld be preferable if there were a directive to tell systemd not to 
run systemd-tmpfiles-setup during the execution of console-setup.  But 
ofcourse, if this is impossible, then removing DefaultDependencies=no is 
(maybe) also a solution.

> Also, isn't Bug#818065 a duplicate of this?

I doubt this can explain #818065.  If the system uses systemd, then 
after `setupcon --save' has been run, the script setupcon is no longer 
required in order to setup the system.  And the other scripts are short 
and simple and do not require temporary files.

On the other hand, it seems likely to me that this bug is a duplicate of 
#819288.

Anton Zinoviev


Reply to: