Bug 25062

Summary: uid0 processes get killed after getswapspace failed caused by normal user process
Product: Base System Reporter: elian <elian>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-RELEASE   
Hardware: Any   
OS: Any   

Description elian 2001-02-13 15:00:01 UTC
Several processes were killed apparently by running out of swapspace. The application used was "convert" from the "ImageMagick" package which we use for tiff>pdf translation. This process ran under normal uid. 

A summery from systctl -a:
[...]
machdep.msgbuf: swap_pager_getswapspace: failed
swap_pager_getswapspace: failed  (repeated several times}
<3>pid 67939 (john), uid 1003, was killed: out of swap space
swap_pager_getswapspace: failed
<3>pid 69085 (top), uid 0, was killed: out of swap space
swap_pager_getswapspace: failed
<3>pid 173 (libhttpd.ep), uid 0, was killed: out of swap space
swap_pager_getswapspace: failed
<3>pid 93 (syslogd), uid 0, was killed: out of swap space
swap_pager_getswapspace: failed
<3>pid 75699 (convert), uid 1003, was killed: out of swap space
swap_pager_getswapspace: failed (repeated several times}
swap_pager_getswapspace: failed
<3>pid 75766 (top), uid 0, was killed: out of swap space
swap_pager_getswapspace: failed
<3>pid 44146 (dnetc), uid 1005, was killed: out of swap space
swap_pager_getswapspace: failed
<3>pid 75771 (cron), uid 0, was killed: out of swap space
<3>pid 75771 (cron), uid 0, was killed: out of swap space
<3>pid 75770 (cron), uid 0, was killed: out of swap space
<3>pid 75770 (cron), uid 0, was killed: out of swap space
<3>pid 75770 (cron), uid 0, was killed: out of swap space
<3>pid 75770 (cron), uid 0, was killed: out of swap space
<3>pid 75769 (cron), uid 0, was killed: out of swap space
<3>pid 75769 (cron), uid 0, was killed: out of swap space
<3>pid 75770 (cron), uid 0, was killed: out of swap space
<3>pid 75770 (cron), uid 0, was killed: out of swap space
<3>pid 75770 (cron), uid 0, was killed: out of swap space
<3>pid 75771 (cron), uid 0, was killed: out of swap space
<3>pid 75765 (convert), uid 1003, was killed: out of swap space
<3>pid 75771 (cron), uid 0, was killed: out of swap space
swap_pager_getswapspace: failed
swap_pager_getswapspace: failed [...]


I dont know if this is normal behaviour under *BSD but I think it would be nicer to kill just that particular memory absorbing process instead of syslogd or any other process not run by that user [etc.]

How-To-Repeat: run the batch convert again
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2001-06-02 10:43:10 UTC
State Changed
From-To: open->closed

This question comes up regularly on the mailing lists; please 
see the archives for more information.