You are not logged in.

#1 2007-12-11 06:24:34

multios
Member
Registered: 2006-05-29
Posts: 36

firestarter gui crash..here is message.log

I've had the gui of firestarter crash a couple of times, and here is what I found in messages.log :
firestarter: *** glibc detected *** firestarter: corrupted double-linked list: 0x08264990 ***

I don't know what it means or what I need to do.

Help?

Last edited by multios (2007-12-12 00:13:23)

Offline

#2 2008-02-01 03:29:30

cell
Member
Registered: 2007-10-23
Posts: 111

Re: firestarter gui crash..here is message.log

Hi

You can try to build from abs and add this patch.

diff -Naur firestarter-1.0.3.orig/src/preferences.c firestarter-1.0.3/src/preferences.c
--- firestarter-1.0.3.orig/src/preferences.c    2005-01-29 12:32:08.000000000 +0000
+++ firestarter-1.0.3/src/preferences.c    2008-01-22 18:15:14.000000000 +0000
@@ -273,7 +273,7 @@
                 1, _("Advanced Options"),
                 -1);
     gtk_tree_iter_free (top_section);
-    gtk_tree_iter_free (iter);
+    g_free (iter);
 
     return GTK_TREE_MODEL (store);
 }
diff -Naur firestarter-1.0.3.orig/src/statusview.c firestarter-1.0.3/src/statusview.c
--- firestarter-1.0.3.orig/src/statusview.c    2005-01-29 12:32:08.000000000 +0000
+++ firestarter-1.0.3/src/statusview.c    2008-01-22 18:15:32.000000000 +0000
@@ -773,7 +773,7 @@
 {
     Connection_entry *entry = (Connection_entry *)data;
     
-    gtk_tree_iter_free (entry->ref);
+    g_free (entry->ref);
     g_free (data);
 }

Saw it on launchpad/ubuntu seems to work.

Offline

#3 2008-03-13 02:17:38

biloky
Member
Registered: 2008-03-02
Posts: 61

Re: firestarter gui crash..here is message.log

Hi cell,

Applied the patch and voila... no more Firestarter GUI crashing. big_smile

While I was at it...
- Grabbed another patch from Ubuntu launchpad that fixes the tray icon transparency.
- Modified the kernel log patch to use iptables.log instead of kernel.log (I believe it's now the default in syslog-ng) to fix the events list being always empty.
- Created another patch to fix the parsing of iptables.log entries.  There was a minor change in the format of the log entries. Syslog-ng does not have the "kernel:" string anymore, rendering Firestarter to always return "Unknown" for the "Direction" field.

Then, makepkg... pacman...

Now, Firestarter is working perfectly like it was before (when I was still using Fedora Core 5).

Thanks for the tip.

Offline

#4 2008-03-28 12:44:25

Shadowed
Member
Registered: 2008-01-19
Posts: 9

Re: firestarter gui crash..here is message.log

biloky wrote:

Hi cell,

Applied the patch and voila... no more Firestarter GUI crashing. big_smile

While I was at it...
- Grabbed another patch from Ubuntu launchpad that fixes the tray icon transparency.
- Modified the kernel log patch to use iptables.log instead of kernel.log (I believe it's now the default in syslog-ng) to fix the events list being always empty.
- Created another patch to fix the parsing of iptables.log entries.  There was a minor change in the format of the log entries. Syslog-ng does not have the "kernel:" string anymore, rendering Firestarter to always return "Unknown" for the "Direction" field.

Then, makepkg... pacman...

Now, Firestarter is working perfectly like it was before (when I was still using Fedora Core 5).

Thanks for the tip.

can you post your pkgbuild ?

Offline

#5 2008-03-29 12:51:40

biloky
Member
Registered: 2008-03-02
Posts: 61

Re: firestarter gui crash..here is message.log

Sure. PKGBUILD + patches smile

PKGBUILD

# $Id: PKGBUILD,v 1.17 2007/04/26 21:11:52 jgc Exp $
# Maintainer: tobias <tobias@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>
# kernel_log_path.patch by Darwin Bautista
# initscript by Graham Forest

# New patches 2008/03/11 (biloky)
#   * 12_firestarter_transparent_icon.patch (from Ubuntu launchpad)
#       - transparent tray icon
#   * 18_fix_memleak.patch (from Ubuntu launchpad)
#       - fix GUI crashes on newer Gnome libs
#   * events-log-fix.patch: tweaked and replaced firestarter-1.0.3-kernel_log_path.patch
#       - fixed parsing of syslog-ng's iptables.log  (format slightly different from syslog)
#       - replaced kernel.log with iptables.log
#   * menu-toolbar-icons-fix.patch: fixed a couple of menu and toolbar icons to follow GTK theme
#   * cleaned up PKGBUILD
#   * force gksu in .desktop file and removed duplicate .desktop file

# TODO: update remaing "outdated" icons (to tango theme, maybe?)

pkgname=firestarter
pkgver=1.0.3
pkgrel=7.5
arch=(i686 x86_64)
license=('GPL')
pkgdesc="A frontend for the ip-tables netfilter, a kernel based firewall."
url="http://www.fs-security.com/"
depends=('libgnomeui>=2.18.1-2' 'iptables' 'logger' 'dhcp')
install=firestarter.install
source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
        firestarter.rc.d
        events-log-fix.patch
        menu-toolbar-icons-fix.patch
        12_firestarter_transparent_icon.patch
        18_fix_memleak.patch)
md5sums=('f46860a9e16dac4b693bd05f16370b03' 
         'a2d2a7c06ea4f680754e7109a45d78f0'
         '879b93984f4084df0f5fafb952b3e4c7' 
         'ea9cd9b92939c554b26ccdfe735a2d90'
         'b657c53280b30f1b4976ec01eff085e8'
         'ac0bae7febdfd8df9c0a717a24879144')

build() {
  cd ${startdir}/src/${pkgname}-${pkgver}/

  patch -Np1 -i ../events-log-fix.patch || return 1
  patch -Np1 -i ../menu-toolbar-icons-fix.patch || return 1
  patch -Np1 -i ../12_firestarter_transparent_icon.patch || return 1
  patch -Np1 -i ../18_fix_memleak.patch || return 1

  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
  make || return 1
  make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR=${startdir}/pkg install

  mkdir -p ${startdir}/pkg/usr/share/gconf/schemas
  gconf-merge-schema ${startdir}/pkg/usr/share/gconf/schemas/${pkgname}.schemas ${startdir}/pkg/etc/gconf/schemas/*.schemas
  rm -f ${startdir}/pkg/etc/gconf/schemas/*.schemas

  # install initscript
  install -Dm755 ../firestarter.rc.d ${startdir}/pkg/etc/rc.d/firestarter

  # we move the .desktop file to a standard location
  install -Dm644 ${startdir}/pkg/usr/share/gnome/apps/Internet/${pkgname}.desktop \
    ${startdir}/pkg/usr/share/applications/${pkgname}.desktop
  # tweak it to use gksu as starter
  sed -i "s|Exec=|TryExec=gksu\n\0gksu |" \
    ${startdir}/pkg/usr/share/applications/${pkgname}.desktop

  rm -rf ${startdir}/pkg/usr/share/gnome
}

12_firestarter_transparent_icon.patch

diff -Naur firestarter-1.0.3.orig/src/eggtrayicon.c firestarter-1.0.3/src/eggtrayicon.c
--- firestarter-1.0.3.orig/src/eggtrayicon.c    2005-01-29 07:32:08.000000000 -0500
+++ firestarter-1.0.3/src/eggtrayicon.c    2006-05-15 19:49:09.000000000 -0400
@@ -59,6 +59,9 @@
                     GValue     *value,
                     GParamSpec *pspec);
 
+static void egg_tray_icon_add (GtkContainer *container,
+                   GtkWidget *widget);
+
 static void egg_tray_icon_realize   (GtkWidget *widget);
 static void egg_tray_icon_unrealize (GtkWidget *widget);
 
@@ -104,14 +107,18 @@
 {
   GObjectClass *gobject_class = (GObjectClass *)klass;
   GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
+  GtkContainerClass *container_class = (GtkContainerClass *)klass;
 
   parent_class = g_type_class_peek_parent (klass);
 
+  
   gobject_class->get_property = egg_tray_icon_get_property;
 
   widget_class->realize   = egg_tray_icon_realize;
   widget_class->unrealize = egg_tray_icon_unrealize;
 
+  container_class->add = egg_tray_icon_add;
+
   g_object_class_install_property (gobject_class,
                    PROP_ORIENTATION,
                    g_param_spec_enum ("orientation",
@@ -122,6 +129,35 @@
                               G_PARAM_READABLE));
 }
 
+static gboolean
+transparent_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer user_data)
+{
+  gdk_window_clear_area (widget->window, event->area.x, event->area.y,
+          event->area.width, event->area.height);
+  return FALSE;
+}
+
+static void
+make_transparent_again (GtkWidget *widget, GtkStyle *previous_style,
+            gpointer user_data)
+{
+  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+}
+
+static void
+make_transparent (GtkWidget *widget, gpointer user_data)
+{
+  if (GTK_WIDGET_NO_WINDOW (widget) || GTK_WIDGET_APP_PAINTABLE (widget))
+    return;
+
+  gtk_widget_set_app_paintable (widget, TRUE);
+  gtk_widget_set_double_buffered (widget, FALSE);
+  gdk_window_set_back_pixmap (widget->window, NULL, TRUE);
+  g_signal_connect (widget, "expose_event",
+            G_CALLBACK (transparent_expose_event), NULL);
+  g_signal_connect_after (widget, "style_set",
+                 G_CALLBACK (make_transparent_again), NULL);
+}
 static void
 egg_tray_icon_get_property (GObject    *object,
                 guint       prop_id,
@@ -343,6 +379,8 @@
   if (GTK_WIDGET_CLASS (parent_class)->realize)
     GTK_WIDGET_CLASS (parent_class)->realize (widget);
 
+  make_transparent (widget, NULL);
+
   screen = gtk_widget_get_screen (widget);
   display = gdk_screen_get_display (screen);
   xdisplay = gdk_x11_display_get_xdisplay (display);
@@ -373,6 +411,14 @@
              egg_tray_icon_manager_filter, icon);
 }
 
+static void
+egg_tray_icon_add (GtkContainer *container,  GtkWidget *widget)
+{
+  g_signal_connect (widget, "realize",
+          G_CALLBACK (make_transparent), NULL);
+  GTK_CONTAINER_CLASS (parent_class)->add (container, widget);
+}
+
 EggTrayIcon *
 egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
 {

18_fix_memleak.patch

diff -Naur firestarter-1.0.3.orig/src/preferences.c firestarter-1.0.3/src/preferences.c
--- firestarter-1.0.3.orig/src/preferences.c    2005-01-29 12:32:08.000000000 +0000
+++ firestarter-1.0.3/src/preferences.c    2008-01-22 18:15:14.000000000 +0000
@@ -273,7 +273,7 @@
                 1, _("Advanced Options"),
                 -1);
     gtk_tree_iter_free (top_section);
-    gtk_tree_iter_free (iter);
+    g_free (iter);
 
     return GTK_TREE_MODEL (store);
 }
diff -Naur firestarter-1.0.3.orig/src/statusview.c firestarter-1.0.3/src/statusview.c
--- firestarter-1.0.3.orig/src/statusview.c    2005-01-29 12:32:08.000000000 +0000
+++ firestarter-1.0.3/src/statusview.c    2008-01-22 18:15:32.000000000 +0000
@@ -773,7 +773,7 @@
 {
     Connection_entry *entry = (Connection_entry *)data;
     
-    gtk_tree_iter_free (entry->ref);
+    g_free (entry->ref);
     g_free (data);
 }

events-log-fix.patch (This was firestarter-1.0.3-kernel_log_path.patch)

--- firestarter-1.0.3.orig/firestarter.schemas.in    2005-01-29 20:32:09.000000000 +0800
+++ firestarter-1.0.3/firestarter.schemas.in    2006-12-20 20:18:02.000000000 +0800
@@ -82,7 +82,7 @@
       <applyto>/apps/firestarter/client/system_log</applyto>
       <owner>Firestarter</owner>
       <type>string</type>
-      <default>/var/log/messages</default>
+      <default>/var/log/iptables.log</default>
       <locale name="C">
         <short>The system log file</short>
         <long>The location of the file the system logging daemon writes to.</long>
--- firestarter-1.0.3.orig/src/logread.c    2005-01-29 20:32:08.000000000 +0800
+++ firestarter-1.0.3/src/logread.c    2008-03-11 21:24:54.000000000 +0800
@@ -12,6 +12,7 @@
 #include <config.h>
 #include <gnome.h>
 #include <netdb.h>
+#include <sys/utsname.h>
 
 #include "globals.h"
 #include "logread.h"
@@ -153,7 +154,11 @@
     /* Take 15 first characters as timestamp */
     h->time = g_strndup (line, 15);
 
-    h->direction = g_strstrip (get_text_between (line, "kernel:", "IN"));
+    /* Retrieve the hostname to parse direction */
+    struct utsname name;
+    uname(&name);
+
+    h->direction = g_strstrip (get_text_between (line, name.nodename, "IN="));
     h->in = get_text_between (line, "IN=", " ");
     h->out = get_text_between (line, "OUT=", " ");
     h->source = get_text_between (line, "SRC=", " ");
@@ -189,6 +194,10 @@
  */
 void
 open_logfile (char *logpath) {
+    /* Check if logpath isn't NULL before proceeding to avoid libgnomevfs-CRITICAL errors */
+    if (logpath == NULL)
+        return;
+
     GnomeVFSAsyncHandle *handle;
 
     gnome_vfs_async_open(&handle, logpath, GNOME_VFS_OPEN_READ, GNOME_VFS_PRIORITY_DEFAULT,
--- firestarter-1.0.3.orig/src/util.c    2005-01-29 20:32:08.000000000 +0800
+++ firestarter-1.0.3/src/util.c    2006-12-20 20:31:06.000000000 +0800
@@ -24,6 +24,7 @@
 #include "util.h"
 #include "hitview.h"
 #include "preferences.h"
+#include "logread.h"
 
 extern int h_errno;
 
@@ -121,13 +122,18 @@
         /* User has specified the log file location */
         path = preferences_get_string (PREFS_SYSLOG_FILE);
 
-        if (path && g_file_test (path, G_FILE_TEST_EXISTS)) {
+        if (path && g_file_test (path, G_FILE_TEST_EXISTS) && parse_log_line (path)->time != "") {
             return path;
-        } else { /* Try to guess some default syslog location */
-            if (g_file_test ("/var/log/messages", G_FILE_TEST_EXISTS))
-                path = g_strdup ("/var/log/messages");
-            else if (g_file_test ("/var/log/kernel", G_FILE_TEST_EXISTS))
+        } else { /* Guess default kernel messages log path: syslog-ng first, then sysklogd and metalog */
+            if (g_file_test ("/var/log/iptables.log", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/iptables.log")->time != "")
+                path = g_strdup ("/var/log/iptables.log");
+            else if (g_file_test ("/var/log/kernel", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/kernel")->time != "")
                 path = g_strdup ("/var/log/kernel");
+            /* Let's try these just in case */
+            else if (g_file_test ("/var/log/messages.log", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/messages.log")->time != "")
+                path = g_strdup ("/var/log/messages.log");
+            else if (g_file_test ("/var/log/messages", G_FILE_TEST_EXISTS) && parse_log_line ("/var/log/messages")->time != "")
+                path = g_strdup ("/var/log/messages");
             else
                 path = NULL;
         }

menu-toolbar-icons-fix.patch

--- firestarter-1.0.3-orig/src/menus.c    2005-01-29 20:32:08.000000000 +0800
+++ firestarter-1.0.3/src/menus.c    2008-03-11 22:25:13.000000000 +0800
@@ -64,12 +64,12 @@
 
     { "RemoveRule", GTK_STOCK_REMOVE, N_("_Remove Rule"), NULL, N_("Remove the selected rule"), policyview_remove_rule },
     { "AddRule", GTK_STOCK_ADD, N_("_Add Rule"), NULL, N_("Add a rule to the selected policy group"), policyview_add_rule },
-    { "EditRule", FIRESTARTER_STOCK_EDIT, N_("_Edit Rule"), NULL, N_("Edit the selected rule"), policyview_edit_rule },
+    { "EditRule", GTK_STOCK_EDIT, N_("_Edit Rule"), NULL, N_("Edit the selected rule"), policyview_edit_rule },
     { "ApplyPolicy", GTK_STOCK_APPLY, N_("A_pply Policy"), NULL, N_("Apply the changes made the policy"), policyview_apply },
 
     { "OpenManual", GTK_STOCK_HELP, N_("Online Users' _Manual"), NULL, N_("Open the online users' manual in a browser"), open_manual },
     { "OpenHomepage", GTK_STOCK_HOME, N_("Firestarter _Homepage"), NULL, N_("Open the Firestarter homepage in a browser"), open_homepage },
-    { "ShowAbout", GNOME_STOCK_ABOUT, N_("_About"), NULL, N_("About Firestarter"), G_CALLBACK (show_about) },
+    { "ShowAbout", GTK_STOCK_ABOUT, N_("_About"), NULL, N_("About Firestarter"), G_CALLBACK (show_about) },
 
     { "AllowInboundFrom", NULL, N_("Allow Connections From Source"), NULL, N_("Allow all connections from this source"), hitview_allow_host },
     { "AllowInboundService", NULL, N_("Allow Inbound Service for Everyone"), NULL, N_("Allow inbound service for everyone"), hitview_allow_service },

big_smile

Offline

#6 2008-03-31 14:54:27

aRcHaTe
Member
Registered: 2006-10-24
Posts: 646

Re: firestarter gui crash..here is message.log

this one fixed all the problms on firestarter....long time no see firestarter working like this XD bye bye nano iptables tongue


Its a sick world we live in....

Offline

#7 2008-12-30 20:31:42

mintcoffee
Member
From: Waterloo, ON
Registered: 2007-10-05
Posts: 120
Website

Re: firestarter gui crash..here is message.log

Any reason why the memleak patch isn't included in the default Firestarter build? It seems to be a fairly critical bug with the program. Debian has it by default, but I know Debian's patching history isn't exactly the most reliable resource smile


Arch on a Thinkpad T400s

Offline

Board footer

Powered by FluxBB