Assume you started a process, as root inside GNOME2 and it stops responding. You start gnome-system-monitor->select the process->right-click->kill process. system acknowledges that you need to provide the password for the user who stated it and prompts you for one. You provide the process. then gnome-system-monitor stops responding. trying to kill the password dialog prompts another message saying that the "kill process has stopped responding" thusly the whole app crashes Reproducible: Always Steps to Reproduce: 1.run something as a different user inside GNOME2, gnome-terminal->su'ed root->nano 2.run gnome-system-monitor->select the nano process->right click->kill process 3. provide password -> wait and see Actual Results: gnome-system-monitor crashes Expected Results: kill the selected process with the provided legit password
system acknowledges that you need to provide the password for the user who stated it and prompts you for one. #########You provide the process.######should be read as "You provide the password"########
GNOME System Monitor 2.0.4
i couldn't reproduce this when it was reported or even now. can you run gnome-system-monitor in gdb and give us a backtrace ?
hmm..When I said crashes - it just becomes un-responsive - not a crash like "this app has crashed, send a bug report" crash. It just stops, unable to repaint itself - To check if it would come back, I killed the process from a terminal(the one that I wanted killed through the gnome-system-monitor) to see if it would realize that the process in question doesn't exist anymore and come back. It didn't, eventually I killed it from the terminal. The original bug was from a different machine - so I think it is a bug or I'm repeating something on both machines - you know stupidity from my part. Again, the process in question belong to root. Another thing I noticed is even if you give the wrong password it hangs the same way it hangs with the right password.
I can confirm this crash (using gnome-system-monitor-2.3.0). The three windows gnome-system-monitor is displaying by the time you enter the password all freeze for me (tested several times with vim running as root). Will endeavour to prod it with gdb.
i compiled this outside portage without stripping and ran it in gdb. it did freeze (as soon as the password is accepted). here is the relevant gdb bt. (i halted it in the wait4( ) function) #0 0x40934fc9 in wait4 () from /lib/libc.so.6 #1 0x409b2494 in __DTOR_END__ () from /lib/libc.so.6 #2 0x40841ab3 in waitpid () from /lib/libpthread.so.0 #3 0x08057687 in exec_su ( exec_path=0xfffffe00 <Address 0xfffffe00 out of bounds>, user=0x805eb99 "root", pwd=0x0) at util.c:110 #4 0x080578b0 in su_run_with_password ( exec_path=0xfffffe00 <Address 0xfffffe00 out of bounds>, password=0xfffffe00 <Address 0xfffffe00 out of bounds>) at util.c:186 #5 0x0805bb99 in procdialog_create_root_password_dialog (type=0, procdata=0x80978b8, pid=13901, extra_value=9, text=0x3af5 <Address 0x3af5 out of bounds>) at procdialogs.c:902 #6 0x080589ee in kill_single_process (model=0xfffffe00, path=0x821da48, iter=0xfffffe00, data=0xfffffe00) at procactions.c:127 #7 0x405a8cae in gtk_tree_selection_selected_foreach () from /usr/lib/libgtk-x11-2.0.so.0 #8 0x08058a80 in kill_process (procdata=0x80978b8, sig=9) at procactions.c:169 #9 0x08058eb5 in kill_dialog_button_pressed (dialog=0x80978b8, id=100, data=0x0) at procdialogs.c:130 finally: something else that may be relevant (perhaps incorrect su usage by the program) is that after pressing the accept button after entering the root password in the dialog box, if you run gnome-system-monitor from the console, you'll notice it pop up the su Password: prompt (it still hangs here no matter what you type).
hmm, thats gnome-system-monitor-2.3.0 which is part of the development series. not the one in portage, so that crash maybe totally unrelated to the one reported here.
i repeated my last test with gnome-2.0.4-r1 (the latest stable in portage) with the identical results. a backtrace again showed it stuck in wait4() from exec_su().
ok, i can reproduce this with the current gnome-system-monitor (2.0.5) as well. i've forwarded this upstream as well. http://bugzilla.gnome.org/show_bug.cgi?id=114644
seems to still be a problem with gnome-system-monitor-2.4
is this still a problem with gsm-2.6 ?
ok, gsm-2.6.0 1. killing a root process as normal user 2. password dialog comes up, I enter root password 3. I get an error dialog "Wrong Password." 4. Same thing happens when I give a made up password Here is some more info the su command that is executed with exceclp like: execlp ("su", "su", "-m", user_p, "-c", exec_p, NULL); doesn't work, I'm no guru in this matter but works great with execlp ("su", "-", user_p, "-c", exec_p, NULL); file name : src/util.c +272 If someone can try it out and give an explanation?
this one works better :-) execlp ("su", "-m", user_p, "-c", exec_p, NULL);
Finally applied this to a new revision of gnome-system-tools, version 2.7.0-r1. Could you please test? Thanks for all your work Sankara, it's very much appreciated.
Closing, patched.