Bug 818987

Summary: Shut down does not stop system / display anylonger after online update
Product: [openSUSE] openSUSE Tumbleweed Reporter: Frans Leerink <f.leerink>
Component: BasesystemAssignee: Frederic Crozat <fcrozat>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: forgotten_sM9JzehKpy, lars.vogdt, mt
Version: 13.1 Milestone 4   
Target Milestone: ---   
Hardware: i586   
OS: openSUSE 12.3   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: The requested shutdown-log.txt file
the improved shutdow-log.text
dmesg.txt as requested
the new shutdown-log.text
the new dmesg txt
The newly created plymouth-poweroff.service file

Description Frans Leerink 2013-05-08 15:58:03 UTC
Hello

I have updated my Intel Pentium 4 system (2.67 MHz and 1,5 GB memory) from openSUSE/KDE 12.2 to openSUSE/KDE 12.3 and everything worked oke.

Yesterday, 7 may, the system loaded approx 35 online updates and about the same amount of required updates. The system still worked oke until the moment that I want to shutdown the system. I selected system shut down and waited the 30 seconds before the system actually start the shut down process.
The display showed the following:

   MD8000-openSUSE login:


and nothing else happened. The cpu-fan was still running and the display was still on and displayed the above message. So finally I had to press the power button to stop the CPU-fan and turned the display off. Restarting the system went oke, but the problem reocurred during shut down. This happened also if I selected the restart button iso the shut down one


The only thing I changed that day was the installation and Yast configuration of a SMC Wireless PCI adapter, 802.11g - 54 Mbps.  The Wireless network worked oke during the day.

I have googled for this problem but sofar no success. I have searched for the problem in Bugzilla and also looked through the most frequently reported bugs.

How can I find out what the Problem is?

Regards,  Frans
Comment 1 Frans Leerink 2013-05-09 11:21:51 UTC
Hello, 

This is what the display actually showed:

[2.447045] /home/abuild/rpmbuild/BUILD/kernel_default-3.7.10/linux-3.7/drive

doing fast boot

creating device nodes with udev

Welcome to openSUSE 12.3 "Darkmouth" -Kernel 3.7.10-1.4-default (tty1)

MD8000-openSUSE login:-

I cannot type in a login-name at the prompt


Yesterday, 8 may,  at the end of the day I saw 7 new system updates and installed them. I tried to shut down the system and this time it worked correctly. So I wanted to check if the bug was corrected by the updates. But restarting the system and shutting it down after a few minutes resulted again in the problem as reported

Regards,  Frans
Comment 2 Frans Leerink 2013-05-20 20:13:57 UTC
Hello,

Logging in / out of my windows xp system works normally, so my Intel Pentium 4 system (2.67 MHz and 1,5 GB memory) works normally.

Logging in as root in mode 3 and than entering the command "shutdown -h now" does not shutdown the system, actually no respons from the system after entering the shutdown command. I could only restart the system using the failsafe--openSUSE 12.3 entry.

I see now on the internet many URL refering to the same problem using Google with the following search terms: "shutdown problem openSUSE 12.3"
  

Regards,   Frans
Comment 3 Frederic Crozat 2013-05-21 08:54:08 UTC
please follow http://freedesktop.org/wiki/Software/systemd/Debugging#Diagnosing_Shutdown_Problems and attach trace here.
Comment 4 Frans Leerink 2013-05-30 21:37:30 UTC
Hello Frederic,

I my case the "Shutdown never finishes".

I would like to help tracing the problem, but from the 
www/ Software/ systemd/ Debugging URL it is not clear to me what I can do. I am a regular user of openSUSE but no software specialist.

You can help me with that ??

Regards,   Frans
Comment 5 Frederic Crozat 2013-05-31 07:56:38 UTC
could you do the section "Shutdown Completes Eventually" on  http://freedesktop.org/wiki/Software/systemd/Debugging/#Diagnosing_Shutdown_Problems (replacing  /lib/systemd/system-shutdown/debug.sh by  /usr/lib/systemd/system-shutdown/debug.sh ) and after you press power button and restart the system, check if there is a file /shutdown-log.txt and attach it to this bug report.
Comment 6 Frans Leerink 2013-06-03 08:20:04 UTC
Hello Frederic,

Please help

In  /lib/systemd/system-shutdown/    I do not see  debug.sh. I can see only dir system , system-generators and system.preset.

In  /usr/lib/systemd/system-shutdown/    I only see   mdadmin.shutdown.

What should be the content of  debug.sh  or where can I copy it from?

Regards,  Frans
Comment 7 Frederic Crozat 2013-06-03 08:26:00 UTC
you need to create a file /usr/lib/systemd/system-shutdown/debug.sh
with the following content:
#!/bin/sh
mount -o remount,rw /
dmesg > /shutdown-log.txt
mount -o remount,ro /

and then chmod 755 /usr/lib/systemd/system-shutdown/debug.sh
Comment 8 Frans Leerink 2013-06-03 09:44:30 UTC
Created attachment 542355 [details]
The requested shutdown-log.txt file
Comment 9 Frans Leerink 2013-06-03 09:52:29 UTC
Hello Frederic,

See the requested shutdown-log.txt file in comment 8

What I noticed is that during shutdown, after i had created the debug.sh file,  the system shutdown completely and not half way.


What I also noted that the system  reported that there are system updates available but i have them not yet loaded

Regards,   Frans
Comment 10 Frederic Crozat 2013-06-03 10:36:05 UTC
hmm, you also need to boot with "systemd.log_level=debug" on the kernel command line (as specified on http://freedesktop.org/wiki/Software/systemd/Debugging/#Diagnosing_Shutdown_Problems ). The current trace is useless without it.
Comment 11 Frans Leerink 2013-06-04 05:21:57 UTC
Created attachment 542504 [details]
the improved shutdow-log.text

Hello Frederic,

This should be the new shutdown-log.txt. It was made after entering during boot the systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M on the kernel command line. (with only the systemd.log_level=debug, the system would not boot in)

While I was in the rebooted system In the terminal i entered the command dmesg > dmesg.txt. I will attach this also.

I also checked with systemctl list-jobs. There were 0 jobs
Comment 12 Frans Leerink 2013-06-04 05:24:58 UTC
Created attachment 542508 [details]
dmesg.txt as requested

this is the dmesg.txt file as requested


Success

Regards, Frans
Comment 13 Frans Leerink 2013-07-07 20:27:23 UTC
Hallo Frederic,

I installed on the same machine the openSUSE 12.3 EDU Life. In this version the"Shut down problems" are exactly the same as described above.

Regards, Frans
Comment 14 Lars Vogdt 2013-07-07 21:21:38 UTC
*** Bug 828362 has been marked as a duplicate of this bug. ***
Comment 15 Lars Vogdt 2013-07-07 21:24:00 UTC
(In reply to comment #13)
> I installed on the same machine the openSUSE 12.3 EDU Life. In this version
> the"Shut down problems" are exactly the same as described above.

JFYI Frederic:
openSUSE 12.3 Edu-Life is indeed running the same base system as openSUSE 12.3 - the only difference are the included special educational (desktop) applications. That's why I marked bug 828362 as duplicate.
Comment 16 Frederic Crozat 2013-07-26 11:44:43 UTC
please double check shutdown log you attached, it is not from the same kernel as dmesg output (and it wasn't done with systemd.log_level=debug).
Comment 17 Frans Leerink 2013-07-28 13:29:03 UTC
Hello Frederic,

I have made the requested outputs again, this time with Linux version 3.7.10-1.16 default.
Sorry for the mixup. I loaded probaly a system update in between the various actions.

After this message I will upload the requested files


Regards,  Frans
Comment 18 Frans Leerink 2013-07-28 13:33:17 UTC
Created attachment 549821 [details]
the new shutdown-log.text
Comment 19 Frans Leerink 2013-07-28 13:44:45 UTC
Created attachment 549822 [details]
the new dmesg txt
Comment 20 Frederic Crozat 2013-07-29 15:34:52 UTC
[ 1501.877298] systemd[1]: Failed to load configuration for poweroff.service: No such file or directory

sounds wrong but I don't think it is causing your issue.

Could you try the following (as root):
sed -e 's/=poweroff.service/=systemd-poweroff.service/g' /usr/lib/systemd/system/plymouth-poweroff.service > /etc/systemd/system/plymouth-poweroff.service

then run systemctl daemon-reload (as root)

and try to power off your system again.

Does running "poweroff -f" works ? (careful, it will turn off your system just as if you would cut power. Be sure to do that without any open application running)

If it doesn't work, I think it might be a kernel issue
Comment 21 Frans Leerink 2013-07-31 12:08:01 UTC
Hello Frederic,

I could not copy & paste the "sed -e ....... /etc/systemd/system/plymouth-poweroff.service" into  my "terminal for root" ,so I typed in the complete command.
I checked in /etc/systemd/system/ and noticed that above command has created the following file:
 -rw-r--r--  1 root root  357 Jul 31 13:36 plymouth-poweroff.service

I will attach this file.

I have than executed the run systemctl daemon-reload (as root) and powered off the system. The system still hangs half way the shutdown.

Regards,   Frans
Comment 22 Frans Leerink 2013-07-31 12:12:20 UTC
Created attachment 550445 [details]
The newly created plymouth-poweroff.service file
Comment 23 Frederic Crozat 2013-07-31 12:58:49 UTC
thanks, so it doesn't fix the issue.

Cold you test "poweroff -f" ? (careful, it will turn off your system just
as if you would cut power. Be sure to do that without any open application
running)
Comment 24 Frans Leerink 2013-07-31 13:32:23 UTC
Hello  Frederic,

Running "poweroff -f" Shuts the system down completely.

Regards,   Frans
Comment 25 Frederic Crozat 2013-07-31 14:49:21 UTC
unfortunately, I don't see anything special in the logs.

Could you try :
-systemctl enable debug-shell.service
-reboot (adding systemd.log_level=debug systemd.log_target=kmsg to your boot command line)
-then try to shutdown your system

and when it doesn't shutdown, go to tty9, run dmesg to see if you get more informations than in the shutdown log. Check if there is still some process remaining (using ps aux) and then run systemctl --force poweroff to see if it works.
Comment 26 Frans Leerink 2013-08-05 14:47:38 UTC
Hello Frederic,

I have done the 3 "Could you try" steps several times, but all the times the system did not shutdown completely and pressing Ctrl-Alt-F9 did not resulted in tty9. So I could not run dmesg or check whether there is some process remaining and if it could be stopped.

Is this caused by the fact that the system is not completely stopped during step 2 and then pressing the power button to stop the system completely, before I can restart the system.

Regards,   Frans
Comment 27 Frans Leerink 2013-08-16 22:05:06 UTC
Hello,

I have now installed openSUSE/KDE 13.1 - build 4 on this system and the problem is solved, shutdown does stop the system completely.

Regards,   Frans
Comment 28 Frederic Crozat 2013-08-30 15:22:16 UTC
closing as fixed, then !
Comment 29 Frans Leerink 2013-09-02 12:45:43 UTC
Hello Frederic,

Unfortunately the bug is not solved.

After the install install the system shutdown correctly and restarted for the initial reboot.
After this reboot or the next reboot the problem showed-up again repeatedly, so please reopen this bug.

Sorry for the incomplete info

Regards,  Frans
Comment 30 Frederic Crozat 2013-09-02 16:06:48 UTC
reopening
Comment 31 Frans Leerink 2013-10-09 10:52:36 UTC
Hello Frederic,

I have now installed openSUSE 13.1 Beta on this Intel Pentium 4 system (2.67 MHz and 1,5 GB memory) but unfortunately the problem still exists.

Even If I only  select openSUSE31.1 Beta in the boot screen (grub2) and on the log-in screen I select Shutdown/Turn off Computer or Shutdown/Restart Computer the computer does not shutdown completely. The system change its display and display the following:

Welcome to openSUSE 13.1 "Bottle Beta 1" -Kernel 3.11.1-1.g1383321-default (tty1)

MD8000-openSUSE-13-1 login:-

The power is still on and the fan is running.

Regards,  Frans
Comment 32 Frederic Crozat 2013-10-09 11:36:52 UTC
and does it work if you run "halt -p (as root)" ?
Comment 33 Frans Leerink 2013-10-09 14:36:37 UTC
Hallo Frederic,

halt -p works precisely the same as the shutdown or reboot command via the application launcher, so stop only partly. I have given the halt -p command from the terminal with su to work as root. Is that what you wanted?

Regards,  Frans
Comment 34 Frederic Crozat 2013-10-09 14:41:14 UTC
it is not clear if something is preventing the shutdown to happen or if the kernel isn't able to poweroff the system.

I need a trace, similar to the one I asked in comments 5 and 7 (with 13.1).
Comment 35 Frans Leerink 2013-10-11 10:28:57 UTC
Hello Frederic,

I tried several times to make a trace, similar to the one you asked for in comments 5 and 7 (with 13.1).

Unfortunately this does not seem to work now. Could it be that the system 
not shutting down completely is causing this. In all my trials I had to use the power button to really stop the system, only after that i could restart.

What can I do ?

Regards,  Frans

PS ONE question

In the referenced document
http://freedesktop.org/wiki/Software/systemd/Debugging/#Diagnosing_Shutdown_problems

it is stated to save the script debug.sh in the /lib/systemd/system-shutdown directory. Should it be in both /lib/... and /usr/lib/
Comment 36 Frederic Crozat 2013-10-11 11:23:29 UTC
as mentionned in comment 5, use /usr/lib/systemd..., not /lib/systemd/...

if it doesn't work at all, try booting with systemd.log_level=console debug and remove "splash=silent quiet", and shutting down your system, take a photo of the screen, there should be interesting data on it
Comment 37 Frans Leerink 2013-10-11 20:32:06 UTC
Hello Frederic,

It doesn't work at all, so I try booting with systemd.log_level=console debug and
remove "splash=silent quiet", and shutting down the system. It is not needed to take a photo of the screen, since the only additional data display beyond what i mentioned in my comment 31 is the sentence:

 [OK] Started show Plymouth Power Off Screen.


Regards,   Frans


Note:This is booting with systemd.log_level=console debug and
"splash=silent quiet" removed. So not the other elements added during boot like systemd.log_target=kmsg log_buf_len=1M and in the system the file /usr/lib/systemd/system-shutdown/debug.sh was still present
Comment 38 Frans Leerink 2013-10-11 20:51:48 UTC
Hello Frederic,

I tried the same with reboot and than I got 5 additional lines of text namely:


[OK] Stopped LSB:Network time protocol deamon (ntpd)
[OK] Stopped target Host and Network name lookups
[OK] Stopped target Remote file systems (Pre)
[OK] Stopped target Network
     Stopping LSB: Configure network interfaces and set up routing ...


Regards,   Frans
Comment 39 Frederic Crozat 2013-10-14 06:48:24 UTC
Could you try to run "systemctl stop network.service" as root, before issuing reboot (or shutdown) and see if reboot/shutdown is still blocked ?
Comment 40 Frans Leerink 2013-10-16 16:47:05 UTC
Hello Frederic,

I have normally started the system but running as root (via su) "systemctl stop network.service" does not stop the network.service, but hangs the system. No message, nothing. Just press power button after 10 minutes to shutdown the system.

I have checked on the beforehand whether network.service was running.
Should I have entered something special during boot process?

Regards,   Frans
Comment 41 Frederic Crozat 2013-10-17 07:52:46 UTC
Marius, any idea ?
Comment 42 Frans Leerink 2013-11-26 17:18:36 UTC
Hello All,

This is to let you know that the problem is solved in a NEW install of openSUSE 13.1/KDE from the i586.iso DVD.
Unfortunately in an UPDATE install this problem is moved into the new 13.1 system.

Regards,  Frans
Comment 43 Frans Leerink 2013-11-28 09:09:20 UTC
Hello,

It now looks like that the problem introduced with the UPDATE install is now also solved, since I executed the Online Update.

Regards, Frans
Comment 44 Frederic Crozat 2013-12-04 16:22:20 UTC
closing as fixed then.