[SOLVED] Shutdown hangs Jessie i386

If none of the more specific forums is the right place to ask

[SOLVED] Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-06 14:16

The computer occasionally hangs during shutdown. When it finally shuts down, after maybe 2 minutes, the messages on the screen flash by so fast that I don't get a chance to see where the problem is. I tried journalctl on the next boot but there is no journal information available. I also looked at systemctl but nothing is obvious to me, mainly because none of the info in systemctl is dated so I have no idea when things occurred.

So what tool, or what options for journalctl, can I use to see what happened at the last shutdown.

UPDATE: I tried using
Code: Select all
 journalctl --since=2017-04-05
and there are no entries for that time period, only for today. Maybe I am doing it incorrectly.

UPDATE 2: If what I have read is correct, then journals are not kept from previous shutdowns unless I do some kind of setup. Not sure exactly what I need to do as the only reference I have found thus far, is related to CentOs (or some such). Not sure where to go from here. Some explicit instructions would be helpful (and telling me to go to H--- would not be helpful. LOL) .

UPDATE 3: Okay. Maybe this is what I need to do (from /usr/share/doc/systemd/README.Debian)
Code: Select all
install -d -g systemd-journal /var/log/journal
setfacl -R -nm g:adm:rx,d:g:adm:rx /var/log/journal

If correct, this would apparently set up persistent logging. Will the first line actually create /var/log/journal or do I need to do that as root?
Once enabled, and I discover the problem, how do I turn off persistent logging?
Last edited by ticojohn on 2017-04-08 13:11, edited 1 time in total.
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Shutdown hangs Jessie i386

Postby pylkko » 2017-04-06 18:05

User avatar
pylkko
 
Posts: 909
Joined: 2014-11-06 19:02

Re: Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-06 19:15

pylkko wrote:https://freedesktop.org/wiki/Software/systemd/Debugging/#index2h1

Thanks. That's totally clear to me. :?
Okay. After more reading it looks like this line
Code: Select all
systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M printk.devkmsg=on enforcing=0

from the referenced link goes in /etc/default/grub; something like this
Code: Select all
GRUB_CMDLINE_LINUX="systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M printk.devkmsg=on enforcing=0"

Is that correct? And then I save the following script
Code: Select all
#!/bin/sh
mount -o remount,rw /
dmesg > /shutdown-log.txt
mount -o remount,ro /

as /usr/lib/systemd/system-shutdown/debug.sh and make it executable. An affirmative response would be welcome.
Last edited by ticojohn on 2017-04-06 20:06, edited 1 time in total.
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Shutdown hangs Jessie i386

Postby Head_on_a_Stick » 2017-04-06 20:01

ticojohn wrote:Okay. Maybe this is what I need to do (from /usr/share/doc/systemd/README.Debian)
Code: Select all
install -d -g systemd-journal /var/log/journal
setfacl -R -nm g:adm:rx,d:g:adm:rx /var/log/journal

If correct, this would apparently set up persistent logging. Will the first line actually create /var/log/journal or do I need to do that as root?
Once enabled, and I discover the problem, how do I turn off persistent logging?

You should instead edit the file at /etc/systemd/journald.conf (as root!) and change this line:
Code: Select all
#Storage=auto

Edit that line so that it looks like this instead:
Code: Select all
Storage=persistent

To revert this change, simply comment out the line again.

For more, read the output of:
Code: Select all
man journald.conf
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6491
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-06 20:09

Head_on_a_Stick wrote:
ticojohn wrote:You should instead edit the file at /etc/systemd/journald.conf (as root!) and change this line:
Code: Select all
#Storage=auto

Edit that line so that it looks like this instead:
Code: Select all
Storage=persistent

To revert this change, simply comment out the line again.

For more, read the output of:
Code: Select all
man journald.conf

Hey, thanks man. That looks a lot more simple than the previous suggestion. I did read the man page but wasn't sure about making that change. I'll give it a try.

Just one more question, if I may. To then look at a previous days journal would I use something like
Code: Select all
journalctl -b -1

or will the journal just be continuous over whatever time frame I have persistent enabled?
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Shutdown hangs Jessie i386

Postby Head_on_a_Stick » 2017-04-06 20:37

I do not understand your question, please read this general guide:

https://www.digitalocean.com/community/ ... stemd-logs
“Controlling complexity is the essence of computer programming."Brian Kernighan

Please read before posting How to report a problem
User avatar
Head_on_a_Stick
 
Posts: 6491
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-06 20:59

Head_on_a_Stick wrote:I do not understand your question, please read this general guide:

https://www.digitalocean.com/community/ ... stemd-logs

Sorry. What I meant was will the journal log just keep appending each time I shut down, and if so and if there is a lengthy file, is there a simple way to look for a specific date range? I suspect it might be something like
Code: Select all
journalctl --since=DATE

I'll figure it out. Thanks HOAS
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Shutdown hangs Jessie i386

Postby cronoik » 2017-04-06 23:09

You have a --since and an --until parameter to look for logs within a specific time frame.
Have a nice day!
cronoik
 
Posts: 205
Joined: 2015-05-20 21:17

Re: Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-07 12:03

cronoik wrote:You have a --since and an --until parameter to look for logs within a specific time frame.

Thanks. Figured it out.
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-07 12:54

Well, this is strange. I edited the journal.conf file to have persistent storage, and that seems to be working. I then commented out the line for persistent storage and after reboot all of the previous journal records are still there and the journal keeps growing in size. What do I do about that? I don't want the journal to grow forever and the --vacuum-size option is apparently not available for Jessie! YIKES!
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Shutdown hangs Jessie i386

Postby cronoik » 2017-04-08 12:09

This is normal beheaviour.
man journald.conf wrote:..."auto" is similar to "persistent" but the directory /var/log/journal is not created if needed, so that its existence controls where log data goes....Defaults to "auto".

If you don't want to keep the logs, set it to 'none' or delete the file. If you want to keep them, check the SystemMaxUse parameter.
Have a nice day!
cronoik
 
Posts: 205
Joined: 2015-05-20 21:17

Re: Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-08 13:11

cronoik wrote:This is normal beheaviour.
man journald.conf wrote:..."auto" is similar to "persistent" but the directory /var/log/journal is not created if needed, so that its existence controls where log data goes....Defaults to "auto".

If you don't want to keep the logs, set it to 'none' or delete the file. If you want to keep them, check the SystemMaxUse parameter.

Thanks for that info.

I may have fixed the issue with the shutdown hanging. Not sure. Found this in the log.
Code: Select all
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object

Strange because the graphics and audio is handled by this chipset
Code: Select all
lspci -vnn | grep VGA -A 12
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller

Anyway, the last time the system hung, and after waiting a couple of minutes, I did a CTRL-ALT-DLT and saw a couple of line indicating that the system was stopping and saving the audio card and video card information, but was not progressing past that point. So, I thought to myself, these problems started after upgrading my motherboard to an Intel i5 (Haswell) system. Aha, thought me (FINALLY)! So I installed, from jessie backports, xserver-xorg-video-intel and firmware-linux.

Have not seen the system hang during shutdown since doing that. Hope that solves that issue. Consider this closed.
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-08 21:08

cronoik wrote:This is normal beheaviour.
man journald.conf wrote:..."auto" is similar to "persistent" but the directory /var/log/journal is not created if needed, so that its existence controls where log data goes....Defaults to "auto".

If you don't want to keep the logs, set it to 'none' or delete the file. If you want to keep them, check the SystemMaxUse parameter.


As I don't think I need a huge log file, I set MaxFileSec=2day . That should be sufficient to find any issues that crop up. Hope so. I can always change it if need be. Thanks for your feedback.
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: [SOLVED] Shutdown hangs Jessie i386

Postby ticojohn » 2017-04-11 22:56

It appears that updating firmware-linux and xserver-xorg-video-intel, from jessie-backports, did NOT take care of the problem (Shutdown hangs), and I have not been able to find anything in any logs that would indicate what is causing the problem.

I did, however, find that if I Log Out of my XFCE session and then reboot, or shutdown, the system does not hang. Don't know what that might indicate. Some smart person (if they happen to read this) might have a solution. As for me, I'll just do the Log Out first and be done with it.

It may be interesting to note that I have Stretch (amd64) installed on a HDD and it does not seem to experience the "hang" issue. I need to keep my Jessie (i386) installation as there are some things that I use; primarily a printer with only 32 bit drivers, and I can't get it to run on 64 bit Stretch. So for the foreseeable future I'll be sticking with i386 systems. May install Stretch i386 on the HDD to see how things go before trying to update Jessie to Stretch. Jessie is on a SSD and I really like the speed but want to be sure all is good before updating. In fact, I may install Jessie on the HDD and go through the upgrade process just to be sure it all works smoothly.

Thanks for all the suggestions, even though they were mainly about journalctl and not directly related to the "hang" problem.
I'm not irrational, I'm just quantum probabilistic.
User avatar
ticojohn
 
Posts: 645
Joined: 2009-08-29 18:10
Location: Costa Rica

Re: [SOLVED] Shutdown hangs Jessie i386

Postby bw123 » 2017-04-11 23:05

It appears that updating firmware-linux and xserver-xorg-video-intel, from jessie-backports, did NOT take care of the problem (Shutdown hangs), and I have not been able to find anything in any logs that would indicate what is causing the problem.

I did, however, find that if I Log Out of my XFCE session and then reboot, or shutdown, the system does not hang.


That's a workaround. That's good, but not really a solution, so i hope you keep trying for a real solution. At the very least you seem close to finding out the right place to file a bug report.

Thanks for all the suggestions, even though they were mainly about journalctl and not directly related to the "hang" problem.


I really didn't understand why the system journal was relevant. But the thought occurs, while sysV init is still available and working in jessie, have you thought about installing package sysvinit-core and seeing what happens?
jessie/KDE4.14.2 plasma netbook, 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
User avatar
bw123
 
Posts: 2378
Joined: 2011-05-09 06:02
Location: TN_USA

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable