Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Apr 2016 10:41:01 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        "Jukka A. Ukkonen" <jau789@gmail.com>, freebsd-arm <freebsd-arm@FreeBSD.org>
Subject:   Re: Mystical panic when RPI2 is left idle for a while
Message-ID:  <1461516061.1191.49.camel@freebsd.org>
In-Reply-To: <571CA5AD.1090800@gmail.com>
References:  <571CA5AD.1090800@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1461516061.1191.49.camel>