kern/64074: vm_swapout.c bug
Vitaly Markitantov
ua_vitaly at ukr.net
Wed Mar 10 16:10:13 PST 2004
>Number: 64074
>Category: kern
>Synopsis: vm_swapout.c bug
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 10 16:10:12 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Vitaly Markitantov
>Release: FreeBSD-5_CURRENT
>Organization:
>Environment:
FreeBSD freedo.umc.com.ua 5.2-CURRENT-20040227-JPSNAP FreeBSD 5.2-CURRENT-20040227-JPSNAP #0: Mon Mar 1 11:11:15 EET 2004 vix at freedo.umc.com.ua:/raid/obj/raid/src/sys/DO i386
>Description:
When unprivileged user starts lots of processes and they used all of
swap space, then kernel kills not only processes of this user.
Sometimes it kills even sshd started by root, so you can't anymore
connect to remote host.
My situation was (from dmesg):
swap_pager: out of swap space
swap_pager_getswapspace(16): failed
pid 446 (oracle), uid 100, was killed: out of swap space
swap_pager_getswapspace(16): failed
pid 450 (oracle), uid 100, was killed: out of swap space
pid 448 (oracle), uid 100, was killed: out of swap space
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
swap_pager_getswapspace(16): failed
pid 525 (sshd), uid 0, was killed: out of swap space
pid 527 (sshd), uid 1001, was killed: out of swap space
>How-To-Repeat:
Simple shell script can expose this problem
#!/bin/sh
export M=`expr ${M:-0} + 1`
echo check $M
JUNK=`cat /boot/kernel/kernel` # this is needed to get more memory
$0
Script recursively launches himself, and when swap space is out, kernel
begins to kill processes.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list