Mystical panic when RPI2 is left idle for a while

Ian Lepore ian at freebsd.org
Sun Apr 24 16:41:11 UTC 2016


On Sun, 2016-04-24 at 13:53 +0300, Jukka A. Ukkonen wrote:
> Hello all,
> 
> I have a faint recollection that some others have also said
> their RPI2 panics when it is left idle for too long.
> Mine has been giving me those little surprises quite regularly,
> but until I got a 3,3V serial console cable I have had no
> chance to debug the problem any further.
> I hope the attached backtrace is more informative to someone
> else. All I was able to understand was that some process
> apparently tries to sleep while it is not allowed to do that.
> Maybe it is holding some locks or semaphores or something,
> and does not release them before trying to sleep.
> 
> --jau
> _______________________________________________
> freebsd-arm at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org
> "

Based on resettodr() appearing in the backtrace, I'm going to guess
that you have an i2c-based realtime clock chip on the system?  If so,
that's the root of the problem, it gets automatically updated and the
kernel can't tolerate sleeping during the process, and i2c drivers
usually have to sleep as part of talking to their devices.

You can work around it by adding

 machdep.disable_rtc_set=0

to /etc/sysctl.conf.  But that disables keeping the RTC up to date (I
think it still gets updated when you manually set the time, but I'm not
sure of that).

It's on my slow-motion to-do list to fix the resettodr() function, but
doing so is comiplicated and affects every arch, so I never quite seem
to find time for it.

-- Ian



More information about the freebsd-arm mailing list