Mac-Osx-Server

這些崩潰的 imapd 程序的原因是什麼?

  • July 13, 2011

我們有一個 Mac OS X 10.5 Leopard Server 郵件伺服器,它最近開始遇到 IMAP 郵箱“格式無效”的問題

$$ s $$” 這個週末。事實證明,在包含 IMAP 數據的捲上存在一些壞塊計數,在修復捲和受影響的郵箱後,該問題並未重新出現。然而,一個持續存在的新問題是imaps程序頻繁崩潰並不斷增加db4“儲物櫃”錯誤如下:

Apr 13 17:01:12 host lmtpunix[31509]: DBERROR db4: 1134 lockers

崩潰imaps程序的錯誤/var/log/system.log如下:

Apr 12 13:43:10 host imaps[11792]: starttls: TLSv1 with cipher AES128-SHA (128/128 bits new) no authentication
Apr 12 13:43:12 host imaps[11792]: starttls: TLSv1 with cipher AES128-SHA (128/128 bits new) no authentication
Apr 12 13:43:13 host imaps[11792]: login: pool-72-92-XXX-XXX.burl.east.myfairpoint.net [72.92.XXX.XXX] user3 CRAM-MD5+TLS User logged in
Apr 12 13:43:15 host ReportCrash[14362]: Formulating crash report for process imapd[11792]
Apr 12 13:43:15 host master[94896]: process 11792 exited, signaled to death by 11
Apr 12 13:43:15 host ReportCrash[14362]: Saved crashreport to /Library/Logs/CrashReporter/imapd_2011-04-12-134315_host.crash using uid: 0 gid: 0, euid: 0 egid: 0

以下來自/var/log/mailaccess.log

Apr 12 13:43:10 host imaps[11792]: accepted connection
Apr 12 13:43:10 host imaps[11792]: mydelete: starting txn 2147495107
Apr 12 13:43:10 host imaps[11792]: mydelete: committing txn 2147495107
Apr 12 13:43:10 host imaps[11792]: mystore: starting txn 2147495108
Apr 12 13:43:10 host imaps[11792]: mystore: committing txn 2147495108
Apr 12 13:43:10 host imaps[11792]: starttls: TLSv1 with cipher AES128-SHA (128/128 bits new) no authentication
Apr 12 13:43:12 host imaps[11792]: accepted connection
Apr 12 13:43:12 host imaps[11792]: mydelete: starting txn 2147495112
Apr 12 13:43:12 host imaps[11792]: mydelete: committing txn 2147495112
Apr 12 13:43:12 host imaps[11792]: mystore: starting txn 2147495113
Apr 12 13:43:12 host imaps[11792]: mystore: committing txn 2147495113
Apr 12 13:43:12 host imaps[11792]: starttls: TLSv1 with cipher AES128-SHA (128/128 bits new) no authentication
Apr 12 13:43:12 host imaps[11792]: AOD: user options: no lookup required for: user3
Apr 12 13:43:13 host imaps[11792]: login: pool-72-92-XXX-XXX.burl.east.myfairpoint.net [72.92.149.161] user3 CRAM-MD5+TLS User logged in
Apr 12 13:43:13 host imaps[11792]: quota set to "unlimited" for mailbox user.user3
Apr 12 13:43:13 host imaps[11792]: open: user user3 opened Other Users/listmaster
Apr 12 13:43:15 host master[94896]: process 11792 exited, signaled to death by 11
Apr 12 13:43:15 host master[94896]: service imaps pid 11792 in BUSY state: terminated abnormally
Apr 12 13:43:15 host master[94896]: process 11792 exited, signaled to death by 11
Apr 12 13:43:15 host master[94896]: service imaps pid 11792 in BUSY state: terminated abnormally

崩潰報告如下:

Process:         imapd [39069]
Path:            /usr/bin/cyrus/bin/imapd
Identifier:      imapd
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  master [38605]

Date/Time:       2011-04-13 18:25:24.068 -0400
OS Version:      Mac OS X Server 10.5.7 (9J61)
Report Version:  6
Anonymous UUID:  223C4DD1-2AE2-4381-8A28-DEB9082281A8

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000077a0ca64
Crashed Thread:  0

Thread 0 Crashed:
0   imapd                               0x0003090c process_records + 588
1   imapd                               0x00031362 mailbox_expunge + 2146
2   imapd                               0x00006fde cmd_close + 179
3   imapd                               0x00018cf8 cmdloop + 2940
4   imapd                               0x0001c1b7 service_main + 1498
5   imapd                               0x00002e73 main + 3502
6   imapd                               0x00002006 start + 54

Thread 0 crashed with X86 Thread State (32-bit):
 eax: 0x61766970  ebx: 0x000306cb  ecx: 0x00000008  edx: 0x77a0ca64
 edi: 0x00bfffa4  esi: 0x162a5fa4  ebp: 0xbfffad48  esp: 0xbfffac90
  ss: 0x0000001f  efl: 0x00010202  eip: 0x0003090c   cs: 0x00000017
  ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
 cr2: 0x77a0ca64

是的,他們都process_recordsmailbox_expunge.

我真的沒有在日誌中看到任何其他錯誤,至少這似乎與崩潰的程序有任何關係,或者像SQUAT failed to open index fileand一樣無害IOERROR: fstating sieve script /usr/sieve/u/user/defaultbc: No such file or directory

我必須承認,我還沒有重建Other Users/listmaster郵箱和user3郵箱。它並不總是同一個使用者。

我們確實有一些使用者發現已發送的電子郵件沒有保存到他們的“已發送消息”郵箱,並且自原始問題之日起就沒有保存。重建他們的郵箱(目前使用sudo mailbfr -m username它除了我通常執行的之外還修復了一些額外的權限sudo /usr/bin/cyrus/bin/reconstruct -r user/username)似乎允許將新發送的電子郵件保存到其中,但我無法找到該問題與此之間的相關性一個(或日誌中的任何其他錯誤)。

任何建議將不勝感激。嘗試刪除消息真的會崩潰嗎?我應該單獨重建所有使用者的郵箱嗎?我真的不想完全重建 Cyrus 數據庫並失去所有消息的所有標記/讀取狀態。

我很久以前就解決了這個問題。

我不記得確切的命令,但我找到了一種方法可以合理地將特定崩潰與特定使用者關聯起來,然後我可以執行mailbfr -m以重建該使用者的郵箱。最終,我能夠重建所有有問題的郵箱並消除伺服器的問題。

我相信損壞的塊進入了不正確的數據庫索引,這會在儲存新數據時導致崩潰。除了重建數據庫之外,您無能為力。您可以備份使用者 .seen 文件並嘗試使用它們,但在測試使用者上測試這個想法。老實說,我認為無論如何應該盡快從伺服器中刪除帶有壞塊的 harrdrive

引用自:https://serverfault.com/questions/259450