Conky: Random crash depending on locale settings

Created on 18 Aug 2015  ·  5Comments  ·  Source: brndnmtthws/conky

Hi,
I experience random crashes since I switched to conky 1.10 (Debian sid package).
It occurs a few seconds after start. I am not quite sure it is not related to #103 and #106, but it looks different.

I get no specific error message except:
conky: attempt to index a nil value
Exit 1
and gdb gives "No stack."

I investigated with valgrind, and got a bunch of:
==11981== Invalid read of size 1
==11981== at 0x8147260: __GI_strcmp (strcmp.S:180)
==11981== by 0x80F3ECA: _nl_load_locale_from_archive (loadarchive.c:161)
==11981== by 0x80F32B1: _nl_find_locale (findlocale.c:154)
==11981== by 0x80F2BF2: setlocale (setlocale.c:417)
==11981== by 0x46CAB0: fscanf_no_i18n(_IO_FILE_, char const_, ...) (in /usr/bin/conky)
==11981== by 0x46CB16: update_load_average() (in /usr/bin/conky)
==11981== by 0x46A776: conky::priv::callback_base::start_routine() (in /usr/bin/conky)
==11981== by 0x7930DEF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)
==11981== by 0x4E3D0A3: start_thread (pthread_create.c:309)
==11981== by 0x81AD07C: clone (clone.S:111)
==11981== Address 0xfad0e40 is 0 bytes inside a block of size 6 free'd
==11981== at 0x4C29E90: free (vg_replace_malloc.c:473)
==11981== by 0x80F2C82: setname (setlocale.c:201)
==11981== by 0x80F2C82: setlocale (setlocale.c:455)
==11981== by 0x46CA6D: fscanf_no_i18n(_IO_FILE_, char const_, ...) (in /usr/bin/conky)
==11981== by 0x46CB16: update_load_average() (in /usr/bin/conky)
==11981== by 0x46A776: conky::priv::callback_base::start_routine() (in /usr/bin/conky)
==11981== by 0x7930DEF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21)
==11981== by 0x4E3D0A3: start_thread (pthread_create.c:309)
==11981== by 0x81AD07C: clone (clone.S:111)

Since it seems related to locales, I tried with LC_ALL=C. No more errors detected by valgrind, no crash. I tried again with LC_ALL=fr_FR, lots of errors in valgrind, crash.

So there is definitely a problem that appears only when changing locales.

bug

All 5 comments

3 years passed. Can you determine if you're still having this problem today on 1.10.8 or preferably 1.10.9_pre (git)? The older versions are not trustworthy.

If it's still hapening, run gdb conky then (gdb) run -c ~/path/to/conky.conf. Wait for the crash to occur again... then (gdb) bt full to get a backtrace. We want that backtrace. Thank you.

@su8 Yesterday, I tried this for few hours running both LC_ALL=fr_FR.UTF-8 and LC_ALL=en_DK.UTF-8 at same time and had no crash. And looking at OP's history, it might be a long time before we can get a response. I'm considering closing this. Do you see anything useful from the valgrind log?

@lasers Valgrind trace is not useful in this case, you can close this issue.

Closing this stale issue that occurred on 1.10.0... more than 3 years ago today.

Please comment if you're still having this problem on 1.11_pre (git). The older versions are not trustworthy due to too many changes that can be hard to track. Thank you for the report. @aldenis :+1:

Sorry for the delay, I was on vacation.
On my Debian sid machine, with conky 1.10.8, it works ok.
On my Debian stable machine, if I force the upgrade of conky to 1.10.8 from Debian sid, I still get the crash, but gdb doesn't give any usable backtrace. So it looks like the crash depends on an external library that gets updated between Debian stretch and the current sid.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sdban picture sdban  ·  4Comments

zero77 picture zero77  ·  3Comments

bad-interpreter picture bad-interpreter  ·  4Comments

Dimerbone picture Dimerbone  ·  4Comments

Microcrap picture Microcrap  ·  4Comments