LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-15-2018, 11:56 AM   #1
shivkiyer
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu, Slackware
Posts: 162

Rep: Reputation: 15
Debian 9 system takes a long time to shut down


Hello everyone,

I upgraded by Debian 8 system to a Debian 9 a few months back and everything has been just fine until a couple of weeks. The past 5-6 shutdowns have been taking a long time like 5 minutes. I looked at the /var/log/messages and the only message that looks really odd is:

Jan 13 13:47:06 homecomputer gnome-session[1267]: gnome-session-binary[1267]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

This was around the last time I tried to turn it off. Any ideas if this is the problem and how to solve this? I wonder why this showed up all of a sudden.

Thanks in advance.
 
Old 01-16-2018, 03:35 AM   #2
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Fleury-les-Aubrais, 120 km south of Paris
Distribution: Devuan, Debian, Mandrake, Freeduc (the one I used to work on), Slackware, MacOS X
Posts: 251

Rep: Reputation: 49
Did the system displays all messages when it's shuting down?
 
Old 01-16-2018, 08:53 AM   #3
shivkiyer
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu, Slackware
Posts: 162

Original Poster
Rep: Reputation: 15
Thanks for the response. Almost all the messages in /var/log/messages are actually with respect to startup rather than shutdown. These were the last messages before my next startup the next day which I is why I zoomed in on them. But it is just my guess that they are shutdown messages while they might not be. Are shutdown logs saved anywhere? Or can I save them anywhere to see what is failing to close?

Thanks again.
 
Old 01-17-2018, 02:07 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
i'm sorry i cannot help you!

but this message:
Quote:
Originally Posted by shivkiyer View Post
Jan 13 13:47:06 homecomputer gnome-session[1267]: gnome-session-binary[1267]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
is very likely harmless, pertaining to the user interface only, no connection to systemd shutdown processes.
 
Old 01-17-2018, 03:49 AM   #5
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Fleury-les-Aubrais, 120 km south of Paris
Distribution: Devuan, Debian, Mandrake, Freeduc (the one I used to work on), Slackware, MacOS X
Posts: 251

Rep: Reputation: 49
You should activate displaying of messages of shutdown(sadly it seems that Debian takes the wrong path of hiding things like other mainstream distributions) to see wich step takes time.
 
Old 01-17-2018, 04:56 AM   #6
xamaco
Member
 
Registered: Sep 2009
Location: Bastelicaccia, Corsica
Distribution: Crux
Posts: 48

Rep: Reputation: 7
I have these kind of problems when a samba share is mounted. To solve it I put a corresponding umount command in a script called at shutdown. There must be other solutions using systemd.
 
Old 01-17-2018, 02:47 PM   #7
shivkiyer
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu, Slackware
Posts: 162

Original Poster
Rep: Reputation: 15
Will have to find out how to turn on the shutdown messages. As for a Samba server, I don't think I have one. I have an Apache server running as I use my local machine to try out Wordpress themes. Do you think that might be a problem? Anyway, will get back to you soon.

Thanks for the responses.
 
Old 01-18-2018, 12:55 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
^ it is likely to be network related, but without additional information there's nothing to say.

archwiki has very good articles on systemd: https://wiki.archlinux.org/index.php/Systemd
 
Old 01-18-2018, 01:59 AM   #9
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,791

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
Some advice on increasing logging verbosity...

https://wiki.debian.org/systemd#syst...up_or_shutdown

Analyze the end of the pager from last boot...
Code:
journalctl -b-1 -e
or last 300 messages perhaps...
Code:
journalctl -b-1 -n 300
 
Old 01-19-2018, 04:29 AM   #10
shivkiyer
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu, Slackware
Posts: 162

Original Poster
Rep: Reputation: 15
Thanks for the responses.

During the last shutdown, I noticed a message:

"Performing apt-get update and cleanup"

This is where the system stood still for a long time. So I am guessing it is either trying to connect to the server and could not or else something else happened. So now I guess I need to figure out which conf file has this setting and turn it off.
 
Old 01-19-2018, 04:57 AM   #11
Stéphane Ascoët
Member
 
Registered: Feb 2004
Location: Fleury-les-Aubrais, 120 km south of Paris
Distribution: Devuan, Debian, Mandrake, Freeduc (the one I used to work on), Slackware, MacOS X
Posts: 251

Rep: Reputation: 49
Performing apt-get update at shutdown is nonsense!
 
Old 01-19-2018, 02:44 PM   #12
shivkiyer
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu, Slackware
Posts: 162

Original Poster
Rep: Reputation: 15
So, I uninstalled unattended-upgrades and still it hangs. But now I saw this other message:

A stop job is running on MySQL community server [../10 min]

So it waits for 10 minutes and then kills it. I found this link:
https://askubuntu.com/questions/8920...erver-on-ubunt

Apparently, I need to shut down mysql first. Also, I noticed another problem which the last poster on the thread pointed out. My system clock at startup is one hour ahead. This I think messes up the mysql time. Suggested to run dpkg-reconfigure tzdata.

Will shutdown mysql tonight first and check. Then try out the time reconfiguration. Hopefully, getting closer ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
close() system call takes long time to finish tullo Linux - Kernel 9 03-21-2016 04:02 AM
[SOLVED] 64-current / update-mime-database takes *long* time every system start cthibal Slackware 6 04-27-2015 05:23 PM
fclose() operation takes very long time to execute on ext4 file system rudreshsm Linux - Kernel 4 09-13-2012 08:31 AM
GDM takes a *long* time to start first time grumpybuffalo Linux From Scratch 2 09-09-2007 12:17 PM
login takes long time doorman007 Linux - Software 2 04-25-2005 12:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration