Jump to content

USER's process survives logout


Guest G3ck0G33k
 Share

Recommended Posts

Guest G3ck0G33k

Hi

 

The following episode seems very strange to me.

 

First USER1 plays around with Gimp. However, Gimp stalls and the computer is locked so I rescue the situation by ctrl-alt-backspace and restart X with startx. Ok, a new X session for USER1 and she continues to play along with Gimp.

 

Then an hour later, the cartoons start and USER1 shuts down X logs out and USER2 logs in and starts X with startx.

 

Then USER2 notes the computer is veeery slow. Checking with KDE System Guard's "System Load" tab, USER2 notes that USER1's old Gimp session is STILL ACTIVE and consumes 28% of the CPU resources! How?!

 

Has anyone else experienced this? I have never seen one USER's processes surviving a logout.

 

I use Mandrake 9.0 (dolphin), kernel 2.4.19-16mdk, and KDE 3.0.3.

Link to comment
Share on other sites

This happens all the time. This happens with lots of processes and on a variety of OSes (linux, solaris, even MS windows) . Basically, killing a parent process should kill the child processes but sometimes that does not happen.

Link to comment
Share on other sites

Guest G3ck0G33k

Hi,

 

Thank you for your prompt reply.

 

Ok, it happens. But, could this really be a wished for behavior?! When, and in what situation(s) could this be a desired feature? I'm not well versed enough to see this as a desired behavior. To me, it still feels like a bug.

Link to comment
Share on other sites

Hi,

 

Thank you for your prompt reply.

 

Ok, it happens. But, could this really be a wished for behavior?!

In the case of Gimp, IMHO, something wrong happened.

 

When, and in what situation(s) could this be a desired feature? I'm not well versed enough to see this as a desired behavior.

In many cases you might want to let some processes running in the background even when you are logged out (a long complation, personal daemons...).

Shell processes can left running after a logout in several ways, being that a very useful feature many times.

 

To me, it still feels like a bug.
In the case of a AFAIK interactive program such Gimp, it smells like a bug.

 

Adding to ndeb post, what hapens time to time are Zombies processes, which are death processes waiting for its parent process to notice. But that is not the case of your ghost gimp, because zombies doesnt take resources.

Link to comment
Share on other sites

Guest G3ck0G33k

When, and in what situation(s) could this be a desired feature? I'm not well versed enough to see this as a desired behavior.

In many cases you might want to let some processes running in the background even when you are logged out (a long complation, personal daemons...).

Shell processes can left running after a logout in several ways, being that a very useful feature many times.

 

Wow! Having a compilation running while logged out does seem useful. Please, where do I read more about this? A link? Or is this standard Unix behaviour?

 

But, if I undestand this correctly, to me, all this _sounds_ dangerous. A USER1 with evil intent may then leave a daemon running doing whatever is permitted while USER2 is logged in and USER1 is logged out. Note that we are not talking about a ROOT daemon. Is it then a kernel feature or a bug?

Link to comment
Share on other sites

Wow! Having a compilation running while logged out does seem useful. Please, where do I read more about this? A link? Or is this standard Unix behaviour?

man nohup

man bash (--> shopt huponexit)

...

 

and in a different way, scheduled tasks as cron, ancron...

 

But, if I undestand this correctly, to me, all this _sounds_ dangerous. A USER1 with evil intent may then leave a daemon running doing whatever is permitted while USER2 is logged in and USER1 is logged out. Note that we are not talking about a ROOT daemon. Is it then a kernel feature or a bug?

What could do user1 against user2? nothing, he won't have permissions to do anything evil. Maybe you are thinking of cpu-usage, that might annoy user2; if that is the case, you, as root are able to set quotas for cpu-usage, disk-usage, ram-usage... (again, man bash --> ulimit)

Link to comment
Share on other sites

USER2 notes that USER1's old Gimp session is STILL ACTIVE and consumes 28% of the CPU resources! How?!
That's what I'd like to know!....28%???I see you're running kde....what kind of cpu do you have because I just opened gimp and it was at 5.4%>then leveled to 1.2%>and when I opened a 1.4MB .png went to 2.3%. Have you tried to cause it to happen again to be sure it wasn't an isolated incident?
Link to comment
Share on other sites

Guest G3ck0G33k

aru: Thank you! Yes, I did some homework too and discovered "nohup" which apparently could be coupled with "nice". Thanks!

 

bvc:

"USER2 notes that USER1's old Gimp session

is STILL ACTIVE and consumes 28% of the CPU

resources!""

"How?! That's what I'd like to

know!....28%???I see you're running

kde....what kind of cpu do you have

because I just opened gimp and it was

at 5.4%>then leveled to 1.2%>and when

I opened a 1.4MB .png went to 2.3%.

Have you tried to cause it to happen

again to be sure it wasn't an isolated

incident?

 

Hi

 

I have an oldish P2-300 w 320MB RAM, Matrox G400-16MB but it is good for near everything, even playing larger .mpeg-files.

 

Actually, I don't know what had happened as it was my daughter (USER1) who fetched me to tell me the pc was stuck in the fist scenario.

 

As for CPU-usage, I get 59.60% usage on "Selective Gaussian Blur" on a 1400x1400 pixel fractal image (Filter > Render > Pattern > Fractal Explorer).

 

No, I have not forced that behaviour again. I had never seen a process surviving a USER switch, i.e. an unprovoked nojhup-behavior. I'll pursue the matter and return here if I cn reproduce it.

 

Thanks again for your support!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...