On Tue, 2015-10-13 at 18:54 +0200, - wrote:
> On Sun, Oct 04, 2015 at 14:21:37 +0100, Ian Campbell wrote:
> > On Mon, 2015-08-31 at 23:51 +0200, - wrote:
> > > Package: qcontrol
> > > Version: 0.5.4-1+deb8u1
> > > Severity: normal
> > >
> > > Aug 7 10:34:32 host qcontrol[332]: Error calling lua function
> > > temp: /etc/qcontrol.conf:73: attempt to perform arithmetic on
> > > global 'last_temp_value' (a string value)
> >
> > Interesting.
> >
> > I'm stumped. I take it qcontrol.conf (=> qcontrol/ts219.lua) is
> > completely unmodified from the version shipped by the package? What
> > is
> > the output of
> > md5sum /etc/qcontrol.conf
> > ? Or, perhaps better, please attach your version.
> >
> > If you can reproduce this then perhaps you could instrument the
> > logtemp() function to unconditionally log the temp and
> > last_temp_value
> > so we can see what it is? (This will be quite verbose, but no worse
> > than the error messages you are getting now...)
> >
>
> Hi, the ts219.lua should be unmodified, and the output is:
>
> md5sum /etc/qcontrol.conf
> 823304351b0bbd70f2e5ea9393185d88 /etc/qcontrol.conf
So pristine as per v0.5.4-1+deb8u1, thanks.
> It seems to happen only on some reboots.
>
> I can try to instrument with some additional debug logging. It's been
> a while since I ever looked at lua, do you have a suggested
> modification to make?
I'm not much of a lua guru. I'd think that sprinking some of these
around:
logprint(string.format("last_temp_value has type %s and value %s",
type(last_temp_value), string.format(last_temp_value)))
(adding some words to give the context).
I'd put these at least:
* Right after the initial initialisation
* One entry to logtemp and should_log
* Right before and after the two places which update last_temp_value
Maybe one of those will result in a clue...