Bug 1863

Summary: java.lang.Exception: file gtktreestore.c: line 583 (gtk_tree_store_get_path): assertion failed: (G_NODE (iter->user_data)->parent != NULL)
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Andrew Cagney <cagney>
Severity: normal CC: pmuldoon, swagiaal
Priority: P1    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1838, 2249    

Description Andrew Cagney 2005-11-14 19:25:17 UTC
Occures when frysk is running at the same time as something large/complex is
being built.

java.lang.Exception: file gtktreestore.c: line 583 (gtk_tree_store_get_path):
assertion failed: (G_NODE (iter->user_data)->parent != NULL)
   at org.gnu.glib.GObject.printStackTrace(java.lang.String)
   at .logFunc (/opt/frysk/lib/libgtkjni-2.8.so)
   at .g_logv (/opt/frysk/lib/libglib-2.0.so.0.800.3)
   at .g_log (/opt/frysk/lib/libglib-2.0.so.0.800.3)
   at .g_assert_warning (/opt/frysk/lib/libglib-2.0.so.0.800.3)
   at .gtk_tree_store_remove (/opt/frysk/lib/libgtk-x11-2.0.so.0.800.6)
   at .Java_org_gnu_gtk_TreeStore_gtk_1tree_1store_1remove
   at org.gnu.gtk.TreeStore.gtk_tree_store_remove(org.gnu.glib.Handle,
org.gnu.glib.Handle) (/opt/frysk/lib/libgtkjava-2.8.so)
   at org.gnu.gtk.TreeStore.removeRow(org.gnu.gtk.TreeIter)
   at frysk.gui.monitor.ProcDataModel$ProcDestroyedObserver$4.run()
   at org.gnu.glib.CustomEvents.runEvents() (/opt/frysk/lib/libgtkjava-2.8.so)
   at .function (/opt/frysk/lib/libgtkjni-2.8.so)
   at .dispatch (/opt/frysk/lib/libgtkjni-2.8.so)
   at .g_main_context_dispatch (/opt/frysk/lib/libglib-2.0.so.0.800.3)
   at .g_main_loop_run (/opt/frysk/lib/libglib-2.0.so.0.800.3)
   at .gtk_main (/opt/frysk/lib/libgtk-x11-2.0.so.0.800.6)
   at .Java_org_gnu_gtk_Gtk_gtk_1main (/opt/frysk/lib/libgtkjni-2.8.so)
   at org.gnu.gtk.Gtk.gtk_main() (/opt/frysk/lib/libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.main() (/opt/frysk/lib/libgtkjava-2.8.so)
   at frysk.gui.FryskGui.mainGui(java.lang.String[], java.lang.String[])
   at frysk.bindir.frysk.main(java.lang.String[])
   at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Comment 1 Sami Wagiaalla 2006-01-25 16:21:50 UTC
to produce that bug do the follwing:
run frysk
cd to the frysk directory
./frysk-core/prog/kill/child 0
get the pid of that process ^
kill -SIGHUP that pid
that will case it to fork a child get the pid of the child
kill -SIGHUP that pid
get that pid
kill -SIGHUP that pid
now pkill child
this will agrivate the gtk bug and cause frysk to crash
Comment 2 Sami Wagiaalla 2006-01-26 14:01:25 UTC
When a process is reparented there is no update call to notify the front end
of that change. This results in a corrupt tree and in some cases crash of frysk
with the this error message.
Comment 3 Andrew Cagney 2006-02-12 23:30:45 UTC
This checks that, a deleted process has lost all children (i.e., the children
have had their parent pointer updated before the delete).  Turned out that this
is how it was already working -> no code changes were needed.

This just leaves the question of needing the re-parent observer.

Index: frysk-core/frysk/proc/ChangeLog
2006-02-12  Andrew Cagney  <cagney@redhat.com>

        * TestRefresh.java (testExitLoosesAllChildren): New.
        * LinuxHost.java: Add more comments.
Comment 4 Sami Wagiaalla 2006-02-15 22:58:52 UTC
I added code to the gui that alwasy
reparents children of a process to process 1.

Looks like this fixed the gtk tree store problem
however during my investigation i realized that
proc/task destroyed are arriving from the core in
This leads to some other instability bugs, and npe's
in the reparenting.
Comment 5 Phil Muldoon 2006-11-30 16:36:28 UTC
2006-02-18  Phil Muldoon  <pmuldoon@redhat.com?

        * ProcViewPage.java: Sort and Filter on new
        Boolean DataColumn.
        * ProcDataModel.java: Check thread parentage in a tree
        using a Boolean DataColumn instead of a -1 ...  +1
        model using DataColumnInt.

2006-02-16  Sami Wagiaalla  <swagiaal@redhat.com>

        * ProcDataModel.java : Was removing an iterator before reparenting
        its children... fixed.

2006-02-15  Sami Wagiaalla  <swagiaal@redhat.com>

        * ProcDataModel.java: Added reparent code. few minor spelling