[systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Rainer Krienke
Hello,

I i trouble on a openSuSE 12.3 system that is using autofs to mount
users home directories and other shares. The system basically works fine.

When I try to shut down or reboot the system sometimes this works, but
most of the time the system terminates kdm and other processes (eg ssh
access no longer works then) but it won't reboot or turn power off in
case of shutdown.

I added
systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
systemd.sysv_console=1
to the kernel command line and created a debug.sh file

#!/bin/sh
mount -o remount,rw /
dmesg > /shutdown-log.txt
mount -o remount,ro /

in /usr/lib/systemd/system-shutdown. Once I found a /shutdown-log.txt
log file but it did not contain any real hint for me why rebooting seems
to hang.

The problem is that I do not see what is hanging. How can I get better
debugging results from systemd to find out more? Is it possible to
redirect all steps systemd makes when rebooting to a virtual tty? What
else could I do to get more information of what happens during
reboot/shutdown?

Any ideas?

You can download the shutdown-log.txt file that was created on a reboot
that did not succeed here:

http://userpages.uni-koblenz.de/~krienke/tmp/systemd/shutdown-log.txt

Thanks
Rainer
-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Andrey Borzenkov
On Mon, May 13, 2013 at 5:28 PM, Rainer Krienke  wrote:
> Hello,
>
> I i trouble on a openSuSE 12.3 system that is using autofs to mount
> users home directories and other shares. The system basically works fine.
>
> When I try to shut down or reboot the system sometimes this works, but
> most of the time the system terminates kdm and other processes (eg ssh
> access no longer works then) but it won't reboot or turn power off in
> case of shutdown.
>

Using openSUSE 12.3 as well.

How long did you wait? I have the same symptom on my home notebook, it
appears to hang on reboot but after some time (appr 1 - 2 minutes) it
reboots.

> I added
> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
> systemd.sysv_console=1
> to the kernel command line and created a debug.sh file
>
> #!/bin/sh
> mount -o remount,rw /
> dmesg > /shutdown-log.txt
> mount -o remount,ro /
>
> in /usr/lib/systemd/system-shutdown. Once I found a /shutdown-log.txt
> log file but it did not contain any real hint for me why rebooting seems
> to hang.
>
> The problem is that I do not see what is hanging. How can I get better
> debugging results from systemd to find out more? Is it possible to
> redirect all steps systemd makes when rebooting to a virtual tty? What
> else could I do to get more information of what happens during
> reboot/shutdown?
>
> Any ideas?
>
> You can download the shutdown-log.txt file that was created on a reboot
> that did not succeed here:
>
> http://userpages.uni-koblenz.de/~krienke/tmp/systemd/shutdown-log.txt
>

I briefly see "watchdog" message before it reboots too. Did not get
around to debug it further.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Rainer Krienke
Am 13.05.2013 15:45, schrieb Andrey Borzenkov:
> On Mon, May 13, 2013 at 5:28 PM, Rainer Krienke  
> wrote:
>> Hello,
>>
>> I i trouble on a openSuSE 12.3 system that is using autofs to mount
>> users home directories and other shares. The system basically works fine.
>>
>> When I try to shut down or reboot the system sometimes this works, but
>> most of the time the system terminates kdm and other processes (eg ssh
>> access no longer works then) but it won't reboot or turn power off in
>> case of shutdown.
>>
> 
> Using openSUSE 12.3 as well.
> 
> How long did you wait? I have the same symptom on my home notebook, it
> appears to hang on reboot but after some time (appr 1 - 2 minutes) it
> reboots.
> 

I waited at least 5 minutes one time even an hour. It seems most
processes are beeing killed however something hangs. My guess was that
perhaps autofs is not terminated correctly which might cause hanging NFS
mounts, but this is only a guess because I cannot see what happens
inside systemd. Thats why I look for ways to find out more.

Thanks
Rainer
-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Zbigniew Jędrzejewski-Szmek
On Mon, May 13, 2013 at 03:50:41PM +0200, Rainer Krienke wrote:
> Am 13.05.2013 15:45, schrieb Andrey Borzenkov:
> > On Mon, May 13, 2013 at 5:28 PM, Rainer Krienke  
> > wrote:
> >> Hello,
> >>
> >> I i trouble on a openSuSE 12.3 system that is using autofs to mount
> >> users home directories and other shares. The system basically works fine.
> >>
> >> When I try to shut down or reboot the system sometimes this works, but
> >> most of the time the system terminates kdm and other processes (eg ssh
> >> access no longer works then) but it won't reboot or turn power off in
> >> case of shutdown.
> >>
> > 
> > Using openSUSE 12.3 as well.
> > 
> > How long did you wait? I have the same symptom on my home notebook, it
> > appears to hang on reboot but after some time (appr 1 - 2 minutes) it
> > reboots.
> > 
> 
> I waited at least 5 minutes one time even an hour. It seems most
> processes are beeing killed however something hangs. My guess was that
> perhaps autofs is not terminated correctly which might cause hanging NFS
> mounts, but this is only a guess because I cannot see what happens
> inside systemd. Thats why I look for ways to find out more.
There've been a number of fixes in this area since systemd-195.
Most notably http://cgit.freedesktop.org/systemd/systemd/commit/?id=aaf7eb8.
Would be great if you could try with a recent version.

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


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Frederic Crozat
Le lundi 13 mai 2013 à 16:05 +0200, Zbigniew Jędrzejewski-Szmek a
écrit :
> On Mon, May 13, 2013 at 03:50:41PM +0200, Rainer Krienke wrote:
> > Am 13.05.2013 15:45, schrieb Andrey Borzenkov:
> > > On Mon, May 13, 2013 at 5:28 PM, Rainer Krienke  
> > > wrote:
> > >> Hello,
> > >>
> > >> I i trouble on a openSuSE 12.3 system that is using autofs to mount
> > >> users home directories and other shares. The system basically works fine.
> > >>
> > >> When I try to shut down or reboot the system sometimes this works, but
> > >> most of the time the system terminates kdm and other processes (eg ssh
> > >> access no longer works then) but it won't reboot or turn power off in
> > >> case of shutdown.
> > >>
> > > 
> > > Using openSUSE 12.3 as well.
> > > 
> > > How long did you wait? I have the same symptom on my home notebook, it
> > > appears to hang on reboot but after some time (appr 1 - 2 minutes) it
> > > reboots.
> > > 
> > 
> > I waited at least 5 minutes one time even an hour. It seems most
> > processes are beeing killed however something hangs. My guess was that
> > perhaps autofs is not terminated correctly which might cause hanging NFS
> > mounts, but this is only a guess because I cannot see what happens
> > inside systemd. Thats why I look for ways to find out more.
> There've been a number of fixes in this area since systemd-195.
> Most notably http://cgit.freedesktop.org/systemd/systemd/commit/?id=aaf7eb8.
> Would be great if you could try with a recent version.

This patch is already in the maintenance update for 12.3 which was
released some weeks ago.

-- 
Frederic Crozat 
SUSE

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


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Anton Aylward

Rainer Krienke said the following on 05/13/2013 09:28 AM:

I i trouble on a openSuSE 12.3 system that is using autofs to mount
users home directories and other shares. The system basically works fine.


Have you tried not using autofs and using systemd's automount facility 
instead?  Its all in the manual pages and all can wok out of /etc/fstab 
so you can do without extra programs and config files.


Systemd parses /etc/fstab for what local FS it has to mount so the 
extensions to mount remote shares/NFS/CIFS is a pretty straight forward 
thing that means all your FS management is centralised -  no special 
cases.


Back when I had problems with autofs and systemd but they all went away 
when I gave up on autofs.  Yes I had other decisions to make about boot 
time and other parameters like buffer size (use default or specific), 
nfs3 or nfs4, stuff like that, but the bottom line was that IT WORKS.



--
   "Nothing is more difficult to carry out, nor more doubtful of
success, nor more dangerous to handle, than to initiate a new
order of things."   -- Machiavelli
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Frederic Crozat
Le lundi 13 mai 2013 à 15:50 +0200, Rainer Krienke a écrit :
> Am 13.05.2013 15:45, schrieb Andrey Borzenkov:
> > On Mon, May 13, 2013 at 5:28 PM, Rainer Krienke  
> > wrote:
> >> Hello,
> >>
> >> I i trouble on a openSuSE 12.3 system that is using autofs to mount
> >> users home directories and other shares. The system basically works fine.
> >>
> >> When I try to shut down or reboot the system sometimes this works, but
> >> most of the time the system terminates kdm and other processes (eg ssh
> >> access no longer works then) but it won't reboot or turn power off in
> >> case of shutdown.
> >>
> > 
> > Using openSUSE 12.3 as well.
> > 
> > How long did you wait? I have the same symptom on my home notebook, it
> > appears to hang on reboot but after some time (appr 1 - 2 minutes) it
> > reboots.
> > 
> 
> I waited at least 5 minutes one time even an hour. It seems most
> processes are beeing killed however something hangs. My guess was that
> perhaps autofs is not terminated correctly which might cause hanging NFS
> mounts, but this is only a guess because I cannot see what happens
> inside systemd. Thats why I look for ways to find out more.

Did you try to enable a debug-shell, following
http://freedesktop.org/wiki/Software/systemd/Debugging#Early_Debug_Shell ?


-- 
Frederic Crozat 
SUSE

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


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Armin K.

On 05/13/2013 04:05 PM, Zbigniew Jędrzejewski-Szmek wrote:

On Mon, May 13, 2013 at 03:50:41PM +0200, Rainer Krienke wrote:


I waited at least 5 minutes one time even an hour. It seems most
processes are beeing killed however something hangs. My guess was that
perhaps autofs is not terminated correctly which might cause hanging NFS
mounts, but this is only a guess because I cannot see what happens
inside systemd. Thats why I look for ways to find out more.

There've been a number of fixes in this area since systemd-195.
Most notably http://cgit.freedesktop.org/systemd/systemd/commit/?id=aaf7eb8.
Would be great if you could try with a recent version.

Zbyszek


I don't even use autofs, have no network systems mounted and I use 
Systemd 204, but I still get nearly the same behaviour - although I can 
confirm that system shuts down (or hangs at "Power Down" - ACPI bug) 
after minute or two of waiting.



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


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Rainer Krienke
Am 13.05.2013 15:52, schrieb Anton Aylward:
> Rainer Krienke said the following on 05/13/2013 09:28 AM:
>> I i trouble on a openSuSE 12.3 system that is using autofs to mount
>> users home directories and other shares. The system basically works fine.
> 
> Have you tried not using autofs and using systemd's automount facility
> instead?  Its all in the manual pages and all can wok out of /etc/fstab
> so you can do without extra programs and config files.
> 
> Systemd parses /etc/fstab for what local FS it has to mount so the
> extensions to mount remote shares/NFS/CIFS is a pretty straight forward
> thing that means all your FS management is centralised -  no special cases.

Thanks for the hint. I just read systemd.automount. My first impression
is that systemd is not able to get its configuration data from network
sources like NIS or LDAP. Snice we have thousands of users and each day
some are deleted and added it would be impossible to put all this in
/etc/fstab on each linux system where a user might want to log in. So I
think this solution is not yet suitable for our environment.

Thanks
Rainer
-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Rainer Krienke
Am 13.05.2013 16:16, schrieb Frederic Crozat:

>> I waited at least 5 minutes one time even an hour. It seems most
>> processes are beeing killed however something hangs. My guess was that
>> perhaps autofs is not terminated correctly which might cause hanging NFS
>> mounts, but this is only a guess because I cannot see what happens
>> inside systemd. Thats why I look for ways to find out more.
> 
> Did you try to enable a debug-shell, following
> http://freedesktop.org/wiki/Software/systemd/Debugging#Early_Debug_Shell ?
> 
> 

I'll try that and if I find something new I will post it here.

Thanks
Rainer

-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-13 Thread Kok, Auke-jan H
On Mon, May 13, 2013 at 6:28 AM, Rainer Krienke  wrote:
> I i trouble on a openSuSE 12.3 system that is using autofs to mount
> users home directories and other shares. The system basically works fine.
>
> When I try to shut down or reboot the system sometimes this works, but
> most of the time the system terminates kdm and other processes (eg ssh
> access no longer works then) but it won't reboot or turn power off in
> case of shutdown.
>
> I added
> systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
> systemd.sysv_console=1
> to the kernel command line and created a debug.sh file
>
> #!/bin/sh
> mount -o remount,rw /
> dmesg > /shutdown-log.txt
> mount -o remount,ro /
>
> in /usr/lib/systemd/system-shutdown. Once I found a /shutdown-log.txt
> log file but it did not contain any real hint for me why rebooting seems
> to hang.
>
> The problem is that I do not see what is hanging. How can I get better
> debugging results from systemd to find out more? Is it possible to
> redirect all steps systemd makes when rebooting to a virtual tty? What
> else could I do to get more information of what happens during
> reboot/shutdown?

I guess what we need is a similar mechanism that is used to display
messages when we're starting up and waiting for tasks, and have this
appear at shutdown for tasks taking a long time to shut down.

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


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-14 Thread Rainer Krienke
Am 13.05.2013 16:16, schrieb Frederic Crozat:
>>
>> I waited at least 5 minutes one time even an hour. It seems most
>> processes are beeing killed however something hangs. My guess was that
>> perhaps autofs is not terminated correctly which might cause hanging NFS
>> mounts, but this is only a guess because I cannot see what happens
>> inside systemd. Thats why I look for ways to find out more.
> 
> Did you try to enable a debug-shell, following
> http://freedesktop.org/wiki/Software/systemd/Debugging#Early_Debug_Shell ?

In between I tried the debugging shell. On tty9 I get the shell, but  no
matter which command I try (mount, ps, ..) I do not get any results and
the command seems to hang. I can even type nonesense like fff and get no
error but again the "command" hangs. I can interrupt it by Ctrl-C and
get a new shell prompt.

The system is still active, eg I can change ttys the system reacts to
magig sysreq key press.

I disabled the autofs init-script and then tried to start up and reboot
like before. This time it worked each time I tried.

Next I tried to reenable autofs, reboot, then  manually stopped the
service (systemctl stop autofs) and then reboot. Again the system hangs
but this time I still have a remote ssh open and it was not killed so I
could run journalctl to get the log:

http://userpages.uni-koblenz.de/~krienke/tmp/systemd/journalctl

What is striking to me is that the logs shows:

May 14 09:28:27 rzinstal3 systemd[1]: Unit autofs.service entered failed
state

This was exactly the time I manually stopped autofs, which worked. One
existing NFS automount was umounted and no auto* process is now running
any longer.

I'll leave the system in that state (a working shell still open) if
someone has an idea how to find out more about this problem.

A list of all running processes can be seen here:

http://userpages.uni-koblenz.de/~krienke/tmp/systemd/processes

Thanks
Rainer
-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-14 Thread Andrey Borzenkov
On Tue, May 14, 2013 at 11:43 AM, Rainer Krienke  wrote:
>
> Next I tried to reenable autofs, reboot, then  manually stopped the
> service (systemctl stop autofs) and then reboot. Again the system hangs
> but this time I still have a remote ssh open and it was not killed so I
> could run journalctl to get the log:
>
> http://userpages.uni-koblenz.de/~krienke/tmp/systemd/journalctl
>
> What is striking to me is that the logs shows:
>
> May 14 09:28:27 rzinstal3 systemd[1]: Unit autofs.service entered failed
> state
>
> This was exactly the time I manually stopped autofs, which worked.

No, it did not.

May 14 09:28:25 rzinstal3 systemd[1]: Stopping Automounts filesystems
on demand...
May 14 09:28:25 rzinstal3 systemd[1]: About to execute /sbin/killproc
-t 45 -p $PIDFILE automount
May 14 09:28:25 rzinstal3 systemd[1]: Forked /sbin/killproc as 3361
May 14 09:28:25 rzinstal3 systemd[1]: autofs.service changed running -> stop
May 14 09:28:26 rzinstal3 killproc[3361]: killproc: Usage:
May 14 09:28:26 rzinstal3 systemd[1]: Received SIGCHLD from PID 3361 (killproc).
May 14 09:28:26 rzinstal3 systemd[1]: Got SIGCHLD for process 3361 (killproc)
May 14 09:28:26 rzinstal3 systemd[1]: Child 3361 died (code=exited,
status=2/INVALIDARGUMENT)
May 14 09:28:26 rzinstal3 systemd[1]: Child 3361 belongs to autofs.service
May 14 09:28:26 rzinstal3 systemd[1]: autofs.service: control process
exited, code=exited status=2


It failed to properly stop and had to kill.

 One
> existing NFS automount was umounted and no auto* process is now running
> any longer.
>
> I'll leave the system in that state (a working shell still open) if
> someone has an idea how to find out more about this problem.
>
> A list of all running processes can be seen here:
>
> http://userpages.uni-koblenz.de/~krienke/tmp/systemd/processes
>
> Thanks
> Rainer
> --
> Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
> 56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
> PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
> 1001312
>
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-14 Thread Rainer Krienke
Am 14.05.2013 12:00, schrieb Andrey Borzenkov:
> On Tue, May 14, 2013 at 11:43 AM, Rainer Krienke  
> wrote:
>>
>> Next I tried to reenable autofs, reboot, then  manually stopped the
>> service (systemctl stop autofs) and then reboot. Again the system hangs
>> but this time I still have a remote ssh open and it was not killed so I
>> could run journalctl to get the log:
>>
>> http://userpages.uni-koblenz.de/~krienke/tmp/systemd/journalctl
>>
>> What is striking to me is that the logs shows:
>>
>> May 14 09:28:27 rzinstal3 systemd[1]: Unit autofs.service entered failed
>> state
>>
>> This was exactly the time I manually stopped autofs, which worked.
> 
> No, it did not.
> 
> May 14 09:28:25 rzinstal3 systemd[1]: Stopping Automounts filesystems
> on demand...
> May 14 09:28:25 rzinstal3 systemd[1]: About to execute /sbin/killproc
> -t 45 -p $PIDFILE automount
> May 14 09:28:25 rzinstal3 systemd[1]: Forked /sbin/killproc as 3361
> May 14 09:28:25 rzinstal3 systemd[1]: autofs.service changed running -> stop
> May 14 09:28:26 rzinstal3 killproc[3361]: killproc: Usage:
> May 14 09:28:26 rzinstal3 systemd[1]: Received SIGCHLD from PID 3361 
> (killproc).
> May 14 09:28:26 rzinstal3 systemd[1]: Got SIGCHLD for process 3361 (killproc)
> May 14 09:28:26 rzinstal3 systemd[1]: Child 3361 died (code=exited,
> status=2/INVALIDARGUMENT)
> May 14 09:28:26 rzinstal3 systemd[1]: Child 3361 belongs to autofs.service
> May 14 09:28:26 rzinstal3 systemd[1]: autofs.service: control process
> exited, code=exited status=2
> 
> 
> It failed to properly stop and had to kill.
> 
>  One


Thanks for the hint. I tried to find out whats wrong with autofs.

The reason that autofs failed was not that it had problems mounting or
umounting but was rooted in /etc/nsswitch.conf, where long before
systemd was present in openSuSE I had entered ldap as an additional
source of maps and those old "sysv init" days this caused no problems
(eg in openSuSE 12.1 using still sysv init):

automount:  files nis ldap

Actually autmount gets its maps from NIS and our LDAP server is not yet
providing automounter maps and the ldap client isn't configured either
for this. For this reason automount reports an error since it cannot get
maps from ldap:

May 14 13:44:54 rzinstal3 automount[3496]: get_query_dn: lookup(ldap):
query failed for (&(objectclass=nisMap)(nisMapName=auto.direct)):
Invalid DN syntax

So I simply removed the ldap entry from nsswitch.conf because its
actually not needed at the moment. After this things now work and my
system reboots.

After all I still do not understand why this small error prevented
systemd from rebooting the whole system. autofs reported an error but on
the other hand it successfully umounted existing NFS mounts and
terminated the automount process. There was no hanging mount, just the
exit status != 0.

After all the question in my eyes is if this is a bug or a feature of
systemd?

Thanks
Rainer
-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312




smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-15 Thread Rainer Krienke
Am 14.05.2013 14:21, schrieb Rainer Krienke:

> The reason that autofs failed was not that it had problems mounting or
> umounting but was rooted in /etc/nsswitch.conf, where long before
> systemd was present in openSuSE I had entered ldap as an additional
> source of maps and those old "sysv init" days this caused no problems
> (eg in openSuSE 12.1 using still sysv init):
> 
> automount:  files nis ldap
> 
> Actually autmount gets its maps from NIS and our LDAP server is not yet
> providing automounter maps and the ldap client isn't configured either
> for this. For this reason automount reports an error since it cannot get
> maps from ldap:
> 
> May 14 13:44:54 rzinstal3 automount[3496]: get_query_dn: lookup(ldap):
> query failed for (&(objectclass=nisMap)(nisMapName=auto.direct)):
> Invalid DN syntax
> 
> So I simply removed the ldap entry from nsswitch.conf because its
> actually not needed at the moment. After this things now work and my
> system reboots.
> 

I have to add one point to the fix I found for my autofs in combination
with systemd. My solution from above was not complete as hangs in
shutdown still occured.

After all I found out that when I choose to reboot from within a KDE
session managed by kdm, it happenes that at the time systemd terminates
automount, not all of my (kde session)  processes have exited. The
result is that automount cannot umount my NFS home directory and this
leads to a stall in the shutdown process.

My solution was quite simple. I had to change the default autofs.service
file that does not contain a special ExecStop entry, to wait a second
before automount is killed. I did this by adding a ExecStop like this:

ExecStop=/usr/bin/sleep 1 ; /sbin/killproc -p $PIDFILE -t 45
/usr/sbin/automount

It proofed that the sleep is essential, without it, shutdown again
hangs. The sleep seems to wait long enough until all my processes from
my KDE session have died and thus automount can really umount my NFS
home directory.

My wish to systemd would be to offer much more detailed and easy
debugging. I think it would be great to be able to see all stop-actions
systemd performs on a virtual terminal. My problem was that my system
did not shutdown, debug shell did not work and so I was unable to get a
journal by using the trick documented using a
systemd/system-shutdown/debug.sh script. If I could have seen what
happens during shutdown it would have saved me a day of searching.

Thanks
Rainer

-- 
Rainer Krienke, Uni Koblenz, Rechenzentrum, A22, Universitaetsstrasse  1
56070 Koblenz, http://userpages.uni-koblenz.de/~krienke, Tel: +49261287 1312
PGP: http://userpages.uni-koblenz.de/~krienke/mypgp.html,Fax: +49261287
1001312



smime.p7s
Description: S/MIME Kryptografische Unterschrift
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-16 Thread Andrey Borzenkov
В Mon, 13 May 2013 11:16:34 -0700
"Kok, Auke-jan H"  пишет:

> On Mon, May 13, 2013 at 6:28 AM, Rainer Krienke  
> wrote:
> > I i trouble on a openSuSE 12.3 system that is using autofs to mount
> > users home directories and other shares. The system basically works fine.
> >
> > When I try to shut down or reboot the system sometimes this works, but
> > most of the time the system terminates kdm and other processes (eg ssh
> > access no longer works then) but it won't reboot or turn power off in
> > case of shutdown.
> >
> > I added
> > systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
> > systemd.sysv_console=1
> > to the kernel command line and created a debug.sh file
> >
> > #!/bin/sh
> > mount -o remount,rw /
> > dmesg > /shutdown-log.txt
> > mount -o remount,ro /
> >
> > in /usr/lib/systemd/system-shutdown. Once I found a /shutdown-log.txt
> > log file but it did not contain any real hint for me why rebooting seems
> > to hang.
> >
> > The problem is that I do not see what is hanging. How can I get better
> > debugging results from systemd to find out more? Is it possible to
> > redirect all steps systemd makes when rebooting to a virtual tty? What
> > else could I do to get more information of what happens during
> > reboot/shutdown?
> 
> I guess what we need is a similar mechanism that is used to display
> messages when we're starting up and waiting for tasks, and have this
> appear at shutdown for tasks taking a long time to shut down.
> 

Should not 03b717a3c4f9348807fc56e7a7d711d72d4ec0cb also work for
shutdown case? I do not really see any condition limiting it to
booting, although I of course may misunderstand it.

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


Re: [systemd-devel] Debugging systemd shutdown problem on openSuSE 12.3

2013-05-17 Thread Frederic Crozat
Le jeudi 16 mai 2013 à 21:51 +0400, Andrey Borzenkov a écrit :
> В Mon, 13 May 2013 11:16:34 -0700
> "Kok, Auke-jan H"  пишет:
> 
> > On Mon, May 13, 2013 at 6:28 AM, Rainer Krienke  
> > wrote:
> > > I i trouble on a openSuSE 12.3 system that is using autofs to mount
> > > users home directories and other shares. The system basically works fine.
> > >
> > > When I try to shut down or reboot the system sometimes this works, but
> > > most of the time the system terminates kdm and other processes (eg ssh
> > > access no longer works then) but it won't reboot or turn power off in
> > > case of shutdown.
> > >
> > > I added
> > > systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M
> > > systemd.sysv_console=1
> > > to the kernel command line and created a debug.sh file
> > >
> > > #!/bin/sh
> > > mount -o remount,rw /
> > > dmesg > /shutdown-log.txt
> > > mount -o remount,ro /
> > >
> > > in /usr/lib/systemd/system-shutdown. Once I found a /shutdown-log.txt
> > > log file but it did not contain any real hint for me why rebooting seems
> > > to hang.
> > >
> > > The problem is that I do not see what is hanging. How can I get better
> > > debugging results from systemd to find out more? Is it possible to
> > > redirect all steps systemd makes when rebooting to a virtual tty? What
> > > else could I do to get more information of what happens during
> > > reboot/shutdown?
> > 
> > I guess what we need is a similar mechanism that is used to display
> > messages when we're starting up and waiting for tasks, and have this
> > appear at shutdown for tasks taking a long time to shut down.
> > 
> 
> Should not 03b717a3c4f9348807fc56e7a7d711d72d4ec0cb also work for
> shutdown case? I do not really see any condition limiting it to
> booting, although I of course may misunderstand it.

I think it does already..

-- 
Frederic Crozat 
SUSE

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