emacs 啟動緩慢 read/poll/writev /org/freedesktop /org/gnome

emacs 啟動緩慢 read/poll/writev /org/freedesktop /org/gnome

在我是非 root 使用者的 Linux CentOS 系統上,每次啟動 emacs-24.5 大約需要 30 秒才能顯示:

strace -tt -o emacs.strace ~/local/bin/emacs-24.5

有一些 read/pool/writev 條目似乎提到了 /org/freedesktop 和 /org/gnome ,並且在 30 秒後超時,但我不知道發生了什麼:

[...]
11:17:14.251692 write(4, "BEGIN\r\n", 7) = 7
11:17:14.251730 poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
11:17:14.251774 writev(4, [{"l\1\0\1\0\0\0\0\1\0\0\0n\0\0\0\1\1o\0\25\0\0\0/org/fre"..., 128}, {"", 0}], 2) = 128
11:17:14.251829 poll([{fd=4, events=POLLIN}], 1, 25000) = 1 ([{fd=4, revents=POLLIN}])
11:17:14.252008 read(4, "l\2\1\1\t\0\0\0\1\0\0\0=\0\0\0\6\1s\0\4\0\0\0:1.0\0\0\0\0"..., 2048) = 258
11:17:14.252072 read(4, 0x186c310, 2048) = -1 EAGAIN (Resource temporarily unavailable)
11:17:14.252153 writev(4, [{"l\1\0\1\0\0\0\0\2\0\0\0_\0\0\0\1\1o\0\20\0\0\0/org/gno"..., 112}, {"", 0}], 2) = 112
11:17:14.252209 poll([{fd=4, events=POLLIN}], 1, 25000) = 0 (Timeout)
11:17:39.276732 writev(4, [{"l\1\0\1\0\0\0\0\3\0\0\0_\0\0\0\1\1o\0\20\0\0\0/org/gno"..., 112}, {"", 0}], 2) = 112
11:17:39.276933 poll([{fd=4, events=POLLIN}], 1, 25000) = 0 (Timeout)
11:18:04.299584 writev(4, [{"l\1\0\1\0\0\0\0\4\0\0\0_\0\0\0\1\1o\0\20\0\0\0/org/gno"..., 112}, {"", 0}], 2) = 112
11:18:04.299693 poll([{fd=4, events=POLLIN}], 1, 25000) = 0 (Timeout)
11:18:29.322840 writev(4, [{"l\1\0\1\0\0\0\0\5\0\0\0_\0\0\0\1\1o\0\20\0\0\0/org/gno"..., 112}, {"", 0}], 2) = 112
11:18:29.322988 poll([{fd=4, events=POLLIN}], 1, 25000) = 0 (Timeout)
11:18:54.339815 writev(4, [{"l\1\0\1\0\0\0\0\6\0\0\0_\0\0\0\1\1o\0\20\0\0\0/org/gno"..., 112}, {"", 0}], 2) = 112
11:18:54.339982 poll([{fd=4, events=POLLIN}], 1, 25000) = 0 (Timeout)
11:19:19.364735 writev(4, [{"l\1\0\1\0\0\0\0\7\0\0\0_\0\0\0\1\1o\0\20\0\0\0/org/gno"..., 112}, {"", 0}], 2) = 112
11:19:19.364810 poll([{fd=4, events=POLLIN}], 1, 25000) = 0 (Timeout)
11:19:44.384454 poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
11:19:44.384515 writev(3, [{"\2\1\4\0|\1\0\0\0\10\0\0\0\0B\0\2O\4\0|\1\0\0\0\10\0\0\0\0\2\0"..., 44}, {NULL, 0}, {"", 0}], 3) = 44
[...]

順便說一句,我注意到在這台機器上,我有一堆 gconfd-2 進程隨著時間的推移而累積:

username   770  0.2  0.0 128432   428 ?        S    Sep07  58:09 /usr/libexec/gconfd-2
username  3096  0.2  0.0 128432   428 ?        S    Sep02  73:37 /usr/libexec/gconfd-2
username  5966  0.1  0.0 128432  2280 ?        S    10:51   0:03 /usr/libexec/gconfd-2
username  6171  0.2  0.0 128432   428 ?        S    Sep07  58:51 /usr/libexec/gconfd-2
username  6339  0.1  0.0 128432  2028 ?        S    Sep26   2:36 /usr/libexec/gconfd-2
username  6524  0.2  0.0 128432   428 ?        S    Sep02  73:32 /usr/libexec/gconfd-2
username  6954  0.2  0.0 128432   444 ?        S    Sep09  52:29 /usr/libexec/gconfd-2
username  7067  0.2  0.0 128432   428 ?        S    Sep06  62:02 /usr/libexec/gconfd-2
username  8035  0.1  0.0 128436  2280 ?        S    11:17   0:00 /usr/libexec/gconfd-2
username  8478  0.1  0.0 128436  2284 ?        S    11:17   0:00 /usr/libexec/gconfd-2
username 16077  0.2  0.0 128432   416 ?        S    Sep05  64:07 /usr/libexec/gconfd-2
username 18245  0.1  0.0 128432  2280 ?        S    11:02   0:02 /usr/libexec/gconfd-2
username 18721  0.2  0.0 128432   428 ?        S    Sep09  52:53 /usr/libexec/gconfd-2
username 19247  0.2  0.0 128432   416 ?        S    Sep02  73:51 /usr/libexec/gconfd-2
username 20655  0.1  0.0 128432  2280 ?        S    10:55   0:02 /usr/libexec/gconfd-2
username 21503  0.1  0.0 128432  2280 ?        S    10:55   0:02 /usr/libexec/gconfd-2
username 22662  0.1  0.0 128432  2264 ?        S    Sep26   1:52 /usr/libexec/gconfd-2
username 23035  0.2  0.0 128432   416 ?        S    Sep05  64:54 /usr/libexec/gconfd-2
username 25380  0.1  0.0 128432  2280 ?        S    10:49   0:03 /usr/libexec/gconfd-2
username 25445  0.1  0.0 128432  2172 ?        S    Sep26   2:03 /usr/libexec/gconfd-2
username 25528  0.1  0.0 128432  2024 ?        S    Sep26   2:43 /usr/libexec/gconfd-2
username 26399  0.1  0.0 128432  2268 ?        S    09:06   0:13 /usr/libexec/gconfd-2
username 26585  0.0  0.0 103252   856 pts/6    S+   11:22   0:00 grep gconfd
username 26752  0.2  0.0 128432   432 ?        S    Sep09  52:17 /usr/libexec/gconfd-2
username 28597  0.2  0.0 128432   432 ?        S    Sep09  52:07 /usr/libexec/gconfd-2
username 29638  0.1  0.0 128432  2176 ?        S    Sep26   2:03 /usr/libexec/gconfd-2

有什麼想法可能會發生什麼嗎?有沒有辦法以不同的方式呼叫 emacs,這樣這種情況就不會繼續發生?

編輯:更多細節

這是我透過 ssh 進入的 CentOS 系統,我假設使用 gnome,因為我從帶有 gnome 的 Ubuntu 14.04 系統進行 ssh:

cat /etc/centos-release 
CentOS release 6.2 (Final)

正如我所說,這是在一個系統上,我只是一個用戶,非 root 訪問權限,所以如果有一種方法可以讓我解決問題,而不必打擾系統管理員,那就太好了。

相關內容