我正在使用带有Gnome-Classic的Ubuntu 12.10。我经常在几乎所有大小的程序中都遇到此错误。当我尝试打开它们时,它们没有启动,而是显示一条错误消息“” Could not launch 'Program' - Failed to fork child process (Cannot allocate memory)
。直到最近几周,这才成为问题。
我无法识别导致此错误的程序之间的任何共性。这似乎只是时间问题。我的计算机运行了一段时间(从一天到几天)后,我似乎无法启动任何新程序。
我知道防止此错误的唯一方法是重新启动计算机。
为什么会出现此错误,我该怎么做才能阻止它发生?
我运行了GRUB菜单中可用的memtest,它没有报告任何错误,因此我不认为这是硬件故障。
我也跑了sudo apt-get check
,没有发现错误。
这是一些请求的命令行输出:
$ free -m
total used free shared buffers cached
Mem: 3945 3753 191 0 181 475
-/+ buffers/cache: 3096 848
Swap: 3813 60 3753
$ swapon -s
Filename Type Size Used Priority
/dev/sda6 partition 3905532 61648 -1
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 31421
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 31421
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
ps --sort -rss -eo rss,pid,command | head
错误开始显示后的输出是:
$ ps --sort -rss -eo rss,pid,command | head
RSS PID COMMAND
1963400 2953 gnome-panel
155496 4029 banshee /usr/lib/banshee/Banshee.exe --redirect-log --play-enqueued
104944 15765 /opt/google/chrome/chrome --type=renderer --lang=en-US --force-fieldtrials=ForceCompositingMode/disable/GlobalSdch/global_enable_sdch/InfiniteCache/No/OmniboxDisallowInlineHQP/Standard/OmniboxHUPCreateShorterMatch/Standard/OmniboxHUPCullRedirects/Standard/OmniboxSearchSuggestTrialStarted2012Q4/2/OneClickSignIn/Standard/Prerender/PrerenderEnabled/SBInterstitial/V2/SpdyCwnd/cwndMin10/SpeculativePrefetching/Disabled/Test0PercentDefault/group_01/UMA-Dynamic-Binary-Uniformity-Trial/default/UMA-Session-Randomized-Uniformity-Trial-5-Percent/default/UMA-Uniformity-Trial-1-Percent/group_09/UMA-Uniformity-Trial-10-Percent/group_08/UMA-Uniformity-Trial-20-Percent/group_03/UMA-Uniformity-Trial-5-Percent/group_06/UMA-Uniformity-Trial-50-Percent/group_01/WarmSocketImpact/last_accessed_socket/ --enable-crash-reporter=ECE9000094D279FD3B14B35A74BF72CC,Ubuntu 12.10 --renderer-print-preview --disable-accelerated-2d-canvas --disable-accelerated-video-decode --channel=15654.5.89177240
78164 15654 /opt/google/chrome/chrome
74912 19890 /usr/bin/python /usr/share/oneconf/oneconf-service
65476 12419 /usr/bin/perl /usr/bin/shutter
61096 19626 /usr/bin/python3.2 /usr/sbin/aptd
57832 15708 /opt/google/chrome/chrome --type=renderer --lang=en-US --force-fieldtrials=ForceCompositingMode/disable/GlobalSdch/global_enable_sdch/InfiniteCache/No/OmniboxDisallowInlineHQP/Standard/OmniboxHUPCreateShorterMatch/Standard/OmniboxHUPCullRedirects/Standard/OmniboxSearchSuggestTrialStarted2012Q4/2/OneClickSignIn/Standard/Prerender/PrerenderEnabled/SBInterstitial/V2/SpdyCwnd/cwndMin10/SpeculativePrefetching/Disabled/Test0PercentDefault/group_01/UMA-Dynamic-Binary-Uniformity-Trial/default/UMA-Session-Randomized-Uniformity-Trial-5-Percent/default/UMA-Uniformity-Trial-1-Percent/group_09/UMA-Uniformity-Trial-10-Percent/group_08/UMA-Uniformity-Trial-20-Percent/group_03/UMA-Uniformity-Trial-5-Percent/group_06/UMA-Uniformity-Trial-50-Percent/group_01/WarmSocketImpact/last_accessed_socket/ --enable-crash-reporter=ECE9000094D279FD3B14B35A74BF72CC,Ubuntu 12.10 --extension-process --renderer-print-preview --disable-accelerated-2d-canvas --disable-accelerated-video-decode --channel=15654.2.1555888673
42108 3030 /var/lib/dropbox/.dropbox-dist/dropbox
根据评论和答案中的建议,看来问题可能出在Gnome面板或其小程序上。这是我运行的小程序:
小程序是Indicator Applet 12.10.1
,System Monitor 3.5.92
和“通知区域”。和“日期和时间”,我都无法访问其版本号。
这是一些更多要求的命令行输出:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 19G 12G 6.4G 64% /
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 790M 1.1M 789M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 84K 2.0G 1% /run/shm
none 100M 0 100M 0% /run/user
/dev/sda7 384G 306G 59G 84% /home
mythbuntu@192.168.0.4:/home/mythbuntu 437G 360G 55G 87% /home/dave/Mythbuntu
$ sudo du -csh /var/log
15M /var/log
15M total
memtest
多久?错误通常仅在以后的测试中显示。
memtest
,直到屏幕底部显示一条消息,说所有测试均已完成。