We have moved to a new Sailfish OS Forum. Please start new discussions there.
13

How to debug occasional restarts?

asked 2014-04-25 14:59:17 +0300

Ragnar Kurm gravatar image

updated 2014-07-24 11:15:40 +0300

jiit gravatar image

My Jolla restarts itself few times per day to tens of times per day. Sometimes when picking a call (and the caller was not written into call log so I don't know who it was / cannot call back). Sometimes it happens within few minutes of the beginning of call and then repeatedly when starting call again. Sometimes just after restart if I try quickly to call, it restarts again. Sometimes when I click "call". Sometimes when I take phone from pocket I see that is starts to reboot and sometimes I discover it went to boot-loop in pocket so I have been unavailable for hours (and people get angry not reaching me). Only removing battery helps for boot-loop. Sometimes phone is in front of me on table and I see it spontaneously restarting. Haven't noticed improvement with Sailfish updates. None of this is repeatable by will.

I have seen a lot of people are struggling with Jolla rebooting, but I have not found how to properly debug this.

Does Sailfish log anything anywhere when and why it restarts?

edit retag flag offensive close delete

Comments

I tried the battery trick (add paper to push battery connector more tight) ... and it worked. At least it has worked one week without spontaneous reboot. It feels very unusual.

I conclude that if /var/log/systemboot.log has missing shutdown and has only startup message - then it is indication for battery connector problem - which is logical.

Unfortunately did not get journalctl properly working with previous log sessions.

Ragnar Kurm ( 2014-05-08 00:18:24 +0300 )edit

5 Answers

Sort by » oldest newest most voted
4

answered 2014-04-25 17:52:16 +0300

tokaru gravatar image

Are you using developer mode? Then you can find a lot of debug messages in journalctl. You need to switch to devel-su to see all messages. E.g. enter journalctl -n 200 to see the last 200 log messages.

Please note: by default, journalctl is configured not to keep previous log messages when rebooting, so you might want to change the configuration to use persistent storage.

edit flag offensive delete publish link more

Comments

Though this is probably most detailed log one can find, but it is much harder to work with than with systemboot.log. Though I have persistent option set, but still I'm unable to get pre-boot messages.

Ragnar Kurm ( 2014-04-29 02:13:40 +0300 )edit
1

Of course it is harder to find anything in all those messages, but on the other hand it is much more detailed (obviously systemboot.log did not give you enough information). Try grepping journalctl's output using a command like journalctl --no-pager | grep "shut" to find only the lines that contain the string "shut" or something like journalctl --no-pager | grep "Apr 16 21:3" to find all messages that have happened on Apr 16th between 21:30 and 21:39:59. Maybe you will find more information then. And yes, that's cumbersome... but that's what debugging is sometimes, unfortunately. If you actually do not see any messages written before the last reboot, check the persistency setting again, maybe there's a typo in it or something else prevented it from being accepted....

tokaru ( 2014-04-29 11:13:43 +0300 )edit
3

answered 2014-04-26 01:18:12 +0300

XiliX gravatar image

one place to look is /var/log/systemboot.log. It gets updated at every startup, and with every software initiated shutdown. One possible solution is cleaning the battery contacts with a folded piece of paper. Worked for me... (for now...)

edit flag offensive delete publish link more

Comments

Thank you. /var/log/systemboot.log was what I was looking for!

Ragnar Kurm ( 2014-04-29 01:53:10 +0300 )edit
1

answered 2014-04-29 01:39:52 +0300

Ragnar Kurm gravatar image

updated 2014-04-29 02:10:12 +0300

Writing this as an answer, because it did not fit to comment.

According to @XiliX, copied /var/log/systemboot.log to my linux and analyzed 3 months of history of my Jolla:

cat systemboot.log | cut -d ' ' -f 2- | sort | uniq -c | sort -n
      1 Received: device (hw_battery) temp status overheated (70C)
      1 Received: device temp normal
      1 Received: device temp overheated
      1 Received: shutdown request from pid 780: /usr/sbin/mce
      1 Received: shutdown request from pid 782: /usr/sbin/mce
      1 Received: shutdown request from pid 791: /usr/sbin/mce
      1 Received: shutdown request from pid 820: /usr/sbin/mce
      1 Shutdown: Device overheated
      1 Shutdown: SW shutdown request
      1 Shutdown: SW update reboot
      1 Startup:  pwr_on_status=pwr_on_by_HW_reboot
      2 Startup:  dsme daemon restarted, not real system startup
      3 Received: dsme internal state REBOOT
      3 Received: reboot request from dsme
      3 Shutdown: Reason Unknown
      5 Received: battery  empty
      5 Shutdown: Battery empty
      5 Shutdown: SW reboot request
      5 Startup:  pwr_on_status=pwr_on_by_SW_reboot
      6 Received: dsme internal state SHUTDOWN
      7 Startup:  preinit ignored pwr_on_by_USB
      8 Startup:  pwr_on_status=pwr_on_by_HW_SMPL
     13 Shutdown: User Power Key
     13 Startup:  pwr_on_status=pwr_on_by_USB
     39 Startup:  pwr_on_status=pwr_on_by_pwr_key
     78 Received: dsme internal state USER
    114 Startup:  pwr_on_status=pwr_on_by_RTC
    221 Startup:  preinit ignored pwr_on_by_RTC

Basically this is what I was looking for, though I can decode only half of it. And it lacks most of shutdown reasons.

edit flag offensive delete publish link more

Comments

@ragnar-kurm just as a side note: please tick the "minor edit" checkbox when updating your posts, otherwise every single change triggers a notification to everyone who participated in this question ;-)

tokaru ( 2014-04-29 10:58:11 +0300 )edit

Sorry for that, I think I ticked it each time...

Ragnar Kurm ( 2014-04-29 11:16:53 +0300 )edit

Never mind :) I have got 10 notifications about this answer, but maybe it's a bug and the checkbox does not work as exptected, who knows....

tokaru ( 2014-04-29 12:17:42 +0300 )edit
0

answered 2014-04-25 20:47:58 +0300

STiAT gravatar image

updated 2014-04-25 20:49:43 +0300

No need to. The phone reboots if you have an active connection (phone call, download) when it switches between 2g/3g. or if you are in 2g connection. Jolla does not like 2g at the moment.

edit flag offensive delete publish link more

Comments

it reboots into asking the pin code and is not very usefull untill entered.

XiliX ( 2014-04-26 01:19:28 +0300 )edit

exactly my observation as well. Seems some dont want to hear that.

Aequanix ( 2014-04-27 13:55:25 +0300 )edit

My aim is to find documentation not mechanical experimentation,

Ragnar Kurm ( 2014-04-29 02:54:43 +0300 )edit
0

answered 2014-04-26 16:27:06 +0300

Neo gravatar image

updated 2014-04-26 16:29:18 +0300

I guess the best thing would be for the reboots not to happen, right? Did you try the folded paper solution, it obviously helped a lot of people with shut downs and reboots: https://together.jolla.com/question/7144/jolla-randomly-shuts-down-10516/#post-id-36965.

See also https://together.jolla.com/question/7144/jolla-randomly-shuts-down-10516/#post-id-37046.

edit flag offensive delete publish link more

Comments

Worked for me.

Ragnar Kurm ( 2014-05-08 00:22:31 +0300 )edit
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2014-04-25 14:59:17 +0300

Seen: 1,454 times

Last updated: Apr 29 '14