Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random crash depending on locale settings #132

Closed
aldenis opened this issue Aug 18, 2015 · 5 comments
Closed

Random crash depending on locale settings #132

aldenis opened this issue Aug 18, 2015 · 5 comments
Labels
bug Bug report or bug fix PR

Comments

@aldenis
Copy link

aldenis commented Aug 18, 2015

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.

@lasers lasers added the bug Bug report or bug fix PR label Aug 6, 2018
@lasers
Copy link
Contributor

lasers commented Aug 6, 2018

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.

@lasers
Copy link
Contributor

lasers commented Aug 11, 2018

@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?

@su8
Copy link
Collaborator

su8 commented Aug 11, 2018

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

@lasers
Copy link
Contributor

lasers commented Aug 11, 2018

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 👍

@lasers lasers closed this as completed Aug 11, 2018
@aldenis
Copy link
Author

aldenis commented Aug 16, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR
Projects
None yet
Development

No branches or pull requests

3 participants