Bug 235099 - sysutils/conky: attempt to call a nil value (global 'loadstring')
Summary: sysutils/conky: attempt to call a nil value (global 'loadstring')
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-21 08:18 UTC by Kristian Peters
Modified: 2019-01-22 18:42 UTC (History)
0 users

See Also:
madpilot: maintainer-feedback+


Attachments
build log (59.25 KB, text/plain)
2019-01-21 10:47 UTC, Kristian Peters
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Peters 2019-01-21 08:18:20 UTC
Hi all,

I'm on FreeBSD 12.0-RELEASE-p2 and after updating ports (sometime during the last 2 weeks conky-1.10.8_3 was upgraded to conky-1.11.2_1) conky isn't working anymore. Regardless of config file and even with an empty config file with only TEXT in it, it always exits with the following error message:

conky: [string "..."]:159: attempt to call a nil value (global 'loadstring')
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2019-01-21 08:26:22 UTC
Hi,

I'm not seeing this exact behaviour, conky is working for me, at least with my config or an empty one, so something else is at work on your system.

Have you tried launching it with no configuration file at all? What command line are you using exactly?

Have you compiled it on your system or using binary packages?

If you're using a locally compiled version could you share the build log?

Also if you're compiling it in your own poudriere, I'd like to see the full build log.

Could you try the binary package from the "latest" collection?

To actually understand the problem I need to reproduce it or a backtrace from a conky binary compiled with debug symbols.

I suspect this is actually a bug in conky, maybe I'll ask you to file  abug report upstream, we can track there to really fix the problem.
Comment 2 Kristian Peters 2019-01-21 10:47:58 UTC
Created attachment 201305 [details]
build log
Comment 3 Kristian Peters 2019-01-21 10:48:40 UTC
Hi Guido,

thank you for the prompt reply.


I pkg installed conky-1.10.8 from quarterly. No error.

# conky -v
conky 1.10.8 compiled Thu Jan 10 23:41:15 UTC 2019 for FreeBSD 12.0-RELEASE-p2 amd64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/local/lib/conky


 General:
  * math
  * builtin default configuration
  * old configuration syntax
  * OSS mixer support
  * Internationalization support
 X11:
  * Xdamage extension
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/local/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256




I tried to pkg install conky-1.11.2_1 from latest. Same error.

# conky -v
conky 1.11.2 compiled Tue Jan 15 01:44:09 UTC 2019 for FreeBSD 12.0-RELEASE-p2 amd64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/local/lib/conky


 General:
  * math
  * builtin default configuration
  * old configuration syntax
  * OSS mixer support
  * Internationalization support
 X11:
  * Xdamage extension
  * Xshape extension (click through)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * CMUS

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/local/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256



I re-compiled conky-1.11.2_1 in /usr/ports (tree updated yesterday) - as I normally do when I do an upgrade. Same error.  I attached the build log.

I'm not sure how to enable debug. I tried cmake --enable-debug and modified the Makefile in the conky directory, but it doesn't seem to work. You may help me out here. ;) If the error is indeed related to conky itself, I may create an issue on their github.
Comment 4 Guido Falsi freebsd_committer freebsd_triage 2019-01-21 14:16:50 UTC
(In reply to Kristian Peters from comment #3)
> Hi Guido,
> 
> 
> I re-compiled conky-1.11.2_1 in /usr/ports (tree updated yesterday) - as I
> normally do when I do an upgrade. Same error.  I attached the build log.
> 

I forgot to mention, which options did you enable in the port?

Could you send me the output of "make showconfig"

> I'm not sure how to enable debug. I tried cmake --enable-debug and modified
> the Makefile in the conky directory, but it doesn't seem to work. You may
> help me out here. ;) If the error is indeed related to conky itself, I may
> create an issue on their github.

You can build and install any port with debugging symbols with "make WITH_DEBUG=yes clean install" (clean required if there is an old workdir).

You'll have to run that inside gdb to get a backtrace, so you'll have to install gdb too and once the program crashes you can issue the gdb command "bt".
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2019-01-21 14:20:18 UTC
(In reply to Kristian Peters from comment #0)
> Hi all,
> 
> I'm on FreeBSD 12.0-RELEASE-p2 and after updating ports (sometime during the
> last 2 weeks conky-1.10.8_3 was upgraded to conky-1.11.2_1) conky isn't
> working anymore. Regardless of config file and even with an empty config
> file with only TEXT in it, it always exits with the following error message:
> 
> conky: [string "..."]:159: attempt to call a nil value (global 'loadstring')

A quick grep in the conky sources gave me a clue.

loadstring is used in relation to lua.

Which version of lua do you have installed? Could you try to reinstall the lua ports?

Just in case I'll also ask, are you using any lua in your configuration?
Comment 6 Kristian Peters 2019-01-22 16:54:16 UTC
I finally figured the problem out.

The new version of conky seems to parse the config file more strictly.

I had:

double_buffer = yes,

in the old config file. Changing this to true fixed the problem. Not sure why this parsing leads to crashing the program. It should not. I did install lua from binary again. Some thing.

Anyway. Thanks for helping me out. :)

Bug can be closed.
Comment 7 Guido Falsi freebsd_committer freebsd_triage 2019-01-22 18:42:35 UTC
(In reply to Kristian Peters from comment #6)
> I finally figured the problem out.
> 
> The new version of conky seems to parse the config file more strictly.
> 

Yes I can confirm that. There's also some note about this in their release notes.

> I had:
> 
> double_buffer = yes,
> 
> in the old config file. Changing this to true fixed the problem. Not sure
> why this parsing leads to crashing the program. It should not. I did install
> lua from binary again. Some thing.

Actually it should not crash. Crashes are always bugs. It should report an error.

You should build a use case and file a bug on github in the conky repository so they can look at it.