Lokaltog / candybar

WebKit-based status bar for tiling window managers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash with SIGSEGV after a short time running

Jwpe opened this issue · comments

Hi there,

I'm trying out wkline for the first time today - very cool concept. However, I'm running into an issue where the toolbar crashes a short time after being run, failing with a SIGSEGV error. Here is the relevant output:

fish: Job 1, “wkline” terminated by signal SIGSEGV (Address boundary error)
jonathan@UbuntuMaven ~> fixme:advapi:UnregisterTraceGuids 0: stub

The failure happens pretty consistently.

Not sure if it's relevant, but the failure is always accompanied by the fixme:advapi:UnregisterTraceGuids 0: stub message. To my understanding, this is a Wine output. Pipelight seems to be attaching itself to the wkline process, as shown by the startup logs:

jonathan@UbuntuMaven ~> [17:52:18] INFO wkline beta-git-342.b9eee92 (Apr 27 2014 15:09:23)
[PIPELIGHT:LIN:unknown] attached to process.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Pipelight could be the cause of this issue, but it's impossible to tell without any debug info. A simple test could be to uninstall or disable pipelight and see if that resolves the issue.

I've tried telling the web view to not load any third-party plugins, but none of the settings appear to work. Mine loads Java every time, and it annoys the crap out of me that I can't seem to be able to disable loading of third-party plugins for the web view.

Uninstalled Pipelight to see if it was conflicting - experienced the same error. Here is the full wkline output from launch to crash:

wkline

** (wkline:21671): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-JxUKPZEC2W: Connection refused
[13:12:38] INFO wkline beta-git-352.5c69234 (Apr 28 2014 07:38:06)
No bp log location saved, using default.
[000:000] Cpu: 6.58.9, x4, 2501Mhz, 7549MB
[000:000] Computer model: Not available
[000:000] Browser XEmbed support present: 1
[000:000] Browser toolkit is Gtk2.
[000:003] Using Gtk2 toolkit
No bp log location saved, using default.
[000:000] Cpu: 6.58.9, x4, 2501Mhz, 7549MB
[000:000] Computer model: Not available
[000:022] No bp log location saved, using default.
[000:024] Cpu: 6.58.9, x4, 2501Mhz, 7549MB
[000:024] Computer model: Not available
[000:024] Browser XEmbed support present: 1
[000:024] Browser toolkit is Gtk2.
[000:024] Using Gtk2 toolkit
[000:019] No bp log location saved, using default.
[000:020] Cpu: 6.58.9, x4, 2501Mhz, 7549MB
[000:020] Computer model: Not available
[13:12:38] INFO using config file '/home/jonathan/.config/wkline/config.json'
[13:12:38] INFO loading theme 'http://lokaltog.github.io/wkline-theme-default/'
java version "1.6.0_31"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1ubuntu1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
fish: Job 1, “wkline” terminated by signal SIGSEGV (Address boundary error)

Side note: mine also loads Java every time :-p

You receive a lot of output I've never seen before, that's for sure! I only see the wkline debug output.

It would be super helpful if you could compile a debug build as described here, install gdb and run gdb out/bin/wkline, then use the where command in gdb after it segfaults to receive information about where the error occurs. This should pinpoint the point of error if wkline is the culprit, I'm guessing it's an error caused by poor memory handling by me.

On a side note, I've posted a request to the WebkitGTK mailing list regarding disabling plugin loading, let's hope there's some secret function somewhere that allows us to disable loading of third-party plugins.

Compiled the debug build and trying to run it through gdb, and I'm not seeing any evidence of the bar at all. It just doesn't show up.

jonathan@UbuntuMaven:~/Code/wkline$ gdb out/bin/wkline 
GNU gdb (Ubuntu 7.7-0ubuntu3) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from out/bin/wkline...done.
(gdb) 

Ah, execute "run" in gdb first to start it.

Haha, sorry, just got to that bit in the gdb docs. I've never used the tool before. Watching it run now, will report the results.

Here we go:
https://gist.github.com/Jwpe/117762b920c7ba1ea2ad

Ends with:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff4f7fd700 (LWP 11841)]
0x00007fffeabc5e73 in ?? () from /lib/x86_64-linux-gnu/libdbus-1.so.3

What's the output if you execute "list" in gdb after the segfault?

list gives me:

(gdb) list
128     }
129     if (signal == SIGUSR1) {
130         LOG_DEBUG("reloading theme");
131         webkit_web_view_reload_bypass_cache(wkline->web_view);
132     }
133 }
134 
135 int
136 main (int argc, char *argv[]) {
137     char *config_filename = NULL;

Hmmm. Is dbus running? I noticed this error message in your error log:

** (wkline:21671): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-JxUKPZEC2W: Connection refused

I believe so.

jonathan@UbuntuMaven ~> ps ax | grep dbus
  719 ?        Ss     0:04 dbus-daemon --system --fork

I'm not sure what causes this segfault, but it appears to be related to fetching of battery information via dbus. I'll add some error checking in the dbus code to see if that could resolve the issue. I'll report back when it's done, I don't have an ETA but I'll look into it as soon as I can. In the meantime you could try to disable the battery widget (remove it from config.json), it should resolve the issue (as long as the issues is limited to the battery widget).

Awesome, will do. Thanks for getting back to me so quickly. Let me know if there's anything else I can do on the debugging front.

Absolutely, thanks a lot for your help so far!

Confirmed that the bar works fine without the battery widget.