Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17880 - gnome-system-monitor does not respond when killing a process not owned by the current user
Summary: gnome-system-monitor does not respond when killing a process not owned by the...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: Low normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-20 10:22 UTC by Sankara Krishnamoorthy
Modified: 2004-11-08 20:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sankara Krishnamoorthy 2003-03-20 10:22:21 UTC
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
Comment 1 Sankara Krishnamoorthy 2003-03-20 10:24:33 UTC
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"########

Comment 2 Sankara Krishnamoorthy 2003-03-20 10:31:48 UTC
GNOME System Monitor 2.0.4
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2003-05-09 19:39:02 UTC
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 ?
Comment 4 Sankara Krishnamoorthy 2003-05-12 16:04:34 UTC
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.

Comment 5 Mike Gardiner (RETIRED) gentoo-dev 2003-05-27 02:41:27 UTC
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.
Comment 6 Mike Gardiner (RETIRED) gentoo-dev 2003-05-27 04:12:54 UTC
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).
Comment 7 Alastair Tse (RETIRED) gentoo-dev 2003-05-27 04:57:11 UTC
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.
Comment 8 Mike Gardiner (RETIRED) gentoo-dev 2003-05-29 21:57:03 UTC
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().
Comment 9 Alastair Tse (RETIRED) gentoo-dev 2003-06-07 11:58:41 UTC
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
Comment 10 Alastair Tse (RETIRED) gentoo-dev 2003-09-28 14:13:42 UTC
seems to still be a problem with gnome-system-monitor-2.4
Comment 11 foser (RETIRED) gentoo-dev 2004-04-25 13:36:28 UTC
is this still a problem with gsm-2.6 ?
Comment 12 Sankara Krishnamoorthy 2004-04-27 20:10:26 UTC
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?
Comment 13 Sankara Krishnamoorthy 2004-04-27 20:35:50 UTC
this one works better :-)

execlp ("su", "-m", user_p, "-c", exec_p, NULL);
Comment 14 Mike Gardiner (RETIRED) gentoo-dev 2004-11-04 19:46:13 UTC
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.
Comment 15 Mike Gardiner (RETIRED) gentoo-dev 2004-11-08 20:01:39 UTC
Closing, patched.