conky crashed with SIGSEGV in __libc_start_main()

Bug #405188 reported by Vish
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
conky (Debian)
Fix Released
Unknown
conky (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: conky

I'm starting the new bug , since there was a mention that the new apport support provides more information [https://bugs.launchpad.net/ubuntu/+source/conky/+bug/331958/comments/5]

ProblemType: Crash
Architecture: i386
Date: Mon Jul 27 12:51:11 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/conky
Package: conky 1.7.1.1-0ubuntu1
ProcCmdline: conky
ProcEnviron:
 LANG=en_IN
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-4.22-generic
SegvAnalysis:
 Segfault happened at: 0x805ea0e <g_strlcpy@plt+72098>: fldl 0x178(%eax)
 PC (0x0805ea0e) ok
 source "0x178(%eax)" (0x00000178) not located in a known VMA region (needed readable region)!
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: conky
Stacktrace:
 #0 0x0805ea0e in ?? ()
 #1 0x08064a34 in ?? ()
 #2 0x08068ded in ?? ()
 #3 0x00e657c5 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
 #4 0x0804d0a1 in ?? ()
StacktraceTop:
 ?? ()
 ?? ()
 ?? ()
 __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
 ?? ()
Title: conky crashed with SIGSEGV in __libc_start_main()
Uname: Linux 2.6.31-4-generic i686
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Related branches

Revision history for this message
Vish (vish) wrote :
Revision history for this message
Vish (vish) wrote :

This happens mostly[random] when mounting/unmounting a new partition/drive...

Seems due to excessive use of "$font" in the .conkyrc , can this be fixed or is the only solution to use less "$font"

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:generate_text_internal (p=<value optimized out>,
update_text () at conky.c:5588
main (argc=1, argv=0xbfe848a4) at conky.c:6575

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in conky (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
visibility: private → public
Changed in conky (Ubuntu):
status: New → In Progress
assignee: nobody → Cesare Tirabassi (norsetto)
Revision history for this message
Vish (vish) wrote :

@Cesare Tirabassi :
Thanx for picking this up...

On a different issue,
1> In karmic the background of the conky turns grey[random] , this does not happen when i dual boot into jaunty and using the same .conkyrc
I ran conky from terminal ,but there is no error when this happens.

It returns to normal transparent background,at random or when i either restart it , or when if_mounted triggers a refresh of the conky size.

I'v attached the screenshot of the greying of the background.

Should i open a separate bug for this?

2> This is more of a question... $user_times gives a wrong output, it is either more by 30~40 mins . or not always the user login time.
[Actually, i would like to have an output for the number of hours the *current* user is logged in , something like uptime for user login, is this possible?]

Thanx in advance.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

>Should i open a separate bug for this?

Yes pls., I expect there is no problem with compiz off?

>$user_times gives a wrong output

On my system there is a constant 1 hour offset, which I don' t yet know if it is by design or a mistake (perhaps linked to some UTC or Summer Time offset), this needs further investigation.
Conky just takes the login time from utmp, the same source used for instance by who, and compute the user_time(s) by diffing with the current time.

>i would like to have an output for the number of hours the *current* user is logged in

This should be feasible, but all your problems/questions are really for upstream. I would suggest you open a bug report there (and link it here for traceability) so that upstream developers can see and comment.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Checking the source I see where the problem with user_times lies. The call to localtime applied to the time difference is pretty bogus. I need to discuss this with Brenden.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

This patch is a possible solution to the user_times problem.
Note that this also add seconds to the time, which might not be wished.
Perhaps, it could also be worth cleaning users.c using macros from readutmp.h (from the gnu library collection).

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

A very long shot in the dark, but re. the grey problem, I'm wondering if thats because of your gtk version, since thats the one with the new client side windows code. Event though conky doesn' t use gtk+, thats obviously used by gnome.
There was a new upload a couple of hours ago, could you check if that impacts anything?

Revision history for this message
Vish (vish) wrote :

@Cesare Tirabassi :
I'v already opened a separate launchpad bug report for the grey background.
As for the updates, you are referring to the libgtk2.0 updates, right ? ok... just applied them , will report back how it works on the other bug report itself.

To report the user_times issue upstream , I'm unable to find the conky package in bugzilla :( .
Am i missing something?

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Don't worry, I already submitted the patch upstream, they are looking into that. In the future, you may want to use their but tracker at http://sourceforge.net/tracker/?group_id=143975&atid=757308.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Separate bug reports issued for the two other problems as well, bug #405701 and bug #405707, please lets keep discussing them there, if needs be.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

I'm not able to reproduce this. I took your configuration file, adapted it to my hardware, set up all the needed fonts, and even went as far as using an external script to mount/dismount several times various drives and partitions and never had any crash.
The backtrace indicates that the crash is in a diskiograph call, which is then totally unrelated to fonts and the mounting of partitions, so I suspect that these aspects are not really related to your problem.
As a test, can you try to just use the diskiograph portions of your configuration file and see if that alone will cause any crash?

Revision history for this message
Vish (vish) wrote :

I ran conky from the terminal, and when conky crashes it says , "You dont need so many fonts sorry".
So i figured it was due to the fonts.

I have 3 partitions and if i attach another pendrive or external drive ,this happens,

This was worse when i had more $fonts in the harddrive section , which used to crash every time i mounted a partition ,
Previously i had more $font for the trash too, this further gave the same "fonts too many warning only"
I reduced the $font used in the conky and changed the behavior of the trash and now the crashes are less.

To reproduce , mount 3 or more *extra* partitions/drives that are defined in the if_mounted , this happens fairly commonly , with more than 3 partitions only now,

Or *add more $fonts* to either the if_mounted or the trash or for any if_* , this[too many fonts] will occur almost always when the if_ is either true or false and the output now needs more $fonts to display.

I'v attached the output from the terminal, note the crash at the end.

Revision history for this message
Vish (vish) wrote :

Also the crash doesnt occur when the conky is restarted, with the same number of drives.
only occurs when the if_* refreshes the conky and conky tries to use more $fonts.

My present .conkyrc has few $fonts , i dont have the old conkyrc[which had different $fonts for diskI/O , size/free almost everything else in the conky had a different font],
But you can easily reproduce it by adding more $fonts to the present if_* ones , or anywhere in the conkyrc will also do it.

It should be fairly easy to reproduce. with more $fonts.
Its just that , there seems to be a maximum limit for $font use.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

The number of fonts you can use has already been raised in the version you are using (was 64 is now 256). Exceeding the font limit will anyhow not crash the program, the crash you reported through apport has nothing to do with fonts.

Revision history for this message
Vish (vish) wrote :

Oh... Ok... I thought it was the same since the crash happened during the mount dismount, i thought this was related to the fonts...

"As a test, can you try to just use the diskiograph portions of your configuration file and see if that alone will cause any crash?"
I dont understand ... you are asking me to run conky only using the diskIO portion and
 wait till any crash occurs on its own?
 or do i have to trigger the crash, if so how[simple mount/unmount]?

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

If the crash happens during a mount/dismount than it is because the problem is for one of the diskiograph which are if_mounted.
I would like you to try and trigger the crash with the least possible configuration file, to be sure about exactly what is it that is causing it. I can't reproduce it so its pretty difficult to understand what the problem is and how to fix it.
If you also use the -D option when you launch conky, this will print extra debug info to the console.
If you can reliably trigger the crash then telling me how you do that and what are the boundary conditions (for instance if it is the same device that consistently cause the crash while mounted) could give me some hints.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

It shouldn't make any difference for your problem, but, just in case you want to check it out, I just uploaded to my ppa (https://edge.launchpad.net/%7Enorsetto/%2Barchive) the second release candidate for 1.7.2.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

The Debian bug is somewhat similar to this, even though the reporter claims it wasn't seen on 1.7.0

Changed in conky (Ubuntu):
assignee: Cesare Tirabassi (norsetto) → nobody
status: In Progress → Incomplete
Changed in conky (Debian):
status: Unknown → New
Revision history for this message
Vish (vish) wrote :

I think i'm able to reproduce this crash with fair consistency, i believe it has something to do with my Western Digital USB Drive,
But however , since I'm running the ppa , apport is not collecting the info :(

I think i should be able to provide more info once 1.7.2 is pushed to main repo.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

I guess the problem with apport is that there are no debugging symbols available for a ppa package. Anyhow, if you can trigger the crash consistently you can at least tell us how you do that. If you downgrade to 1.7.1.1 you can then also provide a backtrace (you can simply downgrade using sudo aptitude install conky=1.7.1.1-0ubuntu1, next time you do an upgrade it will automatically upgrade to 1.7.2rc3 if the ppa is in your sources.list). It would be better if we can fix this before 1.7.2 is released.

Revision history for this message
Vish (vish) wrote :

Oops , i totally forgot about the downgrade ;)

I tested this with Conky1.7.1.1..& I correct myself... I can reproduce this *very* consistently.

To reproduce:
1: Run conky from terminal
2: Mount any external drive/pendrive
3: As soon as an external drive is mounted , conky crashes with Segmentation fault.
[does not happen for partitions, partitions only *rarely* give the too many fonts error i reported earlier.]

I tested this with 2 external drives and 1 pendrive. This happened consistently at *every* mount for all the drives ,
but unmount doesnt cause any crash.

I'm not sure if this existed previously , maybe as reported upstream this has started only from 1.7.1 .

----------
Attaching the backtrace Debugger and the valgrind logs:
Legend:
/gdb-conkySV.txt - from a Sony Vault pendrive
/gdb-conkyWD.txt - from a Western Digital External drive
/valgrind1.log
/valgrind2.log - I'v attached two valgrind logs for the Sony pendrive , because Valgrind Kept crashing on me at the end of the test
, both seem to have the same info ,
I'v attached 2 of each[both look same to me] maybe they have more info you recognize ...

Changed in conky (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Vish (vish) wrote :

@Cesare Tirabassi :
I'm not sure if you follow the Answers section , just to bring to your attention my question >
https://answers.launchpad.net/ubuntu/+source/conky/+question/80019

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Yes, I can see where the problem is now, but to fix this is not trivial, it would need a redesign of the whole module.

>I'm not sure if you follow the Answers section

Not on a daily basis, but your question is also linked to this problem. For the time being I can only advise you to redirect stderr when you call conky (for instance, launching conky with $>conky 2>.conky.err will log all errors to a file called .conky.err in the current directory).

Changed in conky (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Fixed upstream, will be in the next release.

Changed in conky (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package conky - 1.7.2-0ubuntu1

---------------
conky (1.7.2-0ubuntu1) karmic; urgency=low

  * New upstream release:
    - Improved Lua API (lua_read_parse has been removed in favour of the
      conky_parse() Lua API call).
    - Cairo and Imlib2 bindings for Lua.
    - Built-in weather support.
    - Added own_window_type panel.
    - Added border_inner_margin and border_outer_margin.
      The border_margin config option is now deprecated.
    - Added format_human_readable option.
    - Added fancy new 'temperature gradients'.
    - Several new variables such as $blink, $curl, $desktop, $entropy_perc,
      $swapfree, $to_byte and $top_io.
    - Comments in TEXT section are now possible.
      If necessary the comment character (#) can be escaped with a
      backslash (\#).
    - Added a different default configuration file for builds without X11.
    - Added io_perc, io_read and io_write to $top.
    - Alignment special variables can now be used with objects that span
      multiple lines.
    - Enhanced Imlib2 cache control.
    - $battery_short can now also display F (full), N (not present),
      E (empty) or U (unknown).
    - Counteless bug fixes (LP: #405701, LP: #405340, LP: #405188).
  * Complete overhaul of the packaging (LP: #294933, LP: #387209):
    3 binary packages are now created: conky-cli, conky and conky-all.
    conky-cli is a basic package that could be used in servers
    or piped with dzen2,
    conky supports the most commonly used variables,
    conky-all includes almost all of the available support.
    Use conky-all if you are not sure of your needs.
    Some of the packaging changes include:
    - copyright is now in line with the new format specification
    - rules has been overly simplified
    - short/long descriptions have been updated
    - TODO is not installed anymore, lua.html is installed
    - README.Debian has been obsoleted
    - no change bump of Standards-Version
    - added NEWS and README.source
    - changed automake from automake1.10 to automake1.11, since the former
      has been obsoleted.

 -- Cesare Tirabassi <email address hidden> Tue, 25 Aug 2009 11:27:23 +0200

Changed in conky (Ubuntu):
status: Fix Committed → Fix Released
Changed in conky (Debian):
status: New → Fix Committed
Changed in conky (Debian):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.