Hey Guys, ’
I am developing a rails application for a client. Suffice it to say I
have to do some long running tasks so of course I used my favorite
plugin backgroundrb. Unfortunately I have a problem. I recently put some
new work into a background task that requires the use of ruburple (a gem
for connecting to IM protocols). Since then, I noticed that the worker
that uses it sometimes just stops running with no explanation.
I checked the logs and I assume the relevant code is below:
libnm_glib_nm_state_cb: dbus returned an error.
(org.freedesktop.DBus.Error.ServiceUnknown) The name
org.freedesktop.NetworkManager was not provided by any .service files
** (process:13909): CRITICAL **: xmlnode_set_attrib: assertion `value !=
NULL’ failed
** (process:13909): CRITICAL **: xmlnode_set_attrib: assertion `value !=
NULL’ failed
** (process:13909): CRITICAL **: xmlnode_set_attrib: assertion `value !=
NULL’ failed
#{my_rails_app}/releases/…/vendor/plugins/backgroundrb/framework/core.rb:149:
[BUG] Segmentation fault
ruby 1.8.6 (2007-06-07) [i486-linux]
My question is two-fold:
-
what’s the best way to go about fixing this? How can I get more
detailed information regarding the problem here. I assume the
combination of the CRITICAL and the always fun segmentation fault is
killing the thread. How can I find and eliminate the problem or
implement exception handling so it ignores the issue. -
How can I just force the thread back up if it dies. There has to be a
way to have backgroundrb recreate the thread if it dies, right? I mean
sure, that segmentation fault shouldn’t happen but if it does, I need a
way to bring the thread back online.
So if you could help with that I would appreciate it. I know ezra pokes
around here every once in a while.