LoginSignup
0
0

More than 5 years have passed since last update.

If /ets/hosts contains non-ascii character, Creative Cloud Install failed.

Posted at

あるいは Mac での dtrace で如何にこの手の問題を解決するのかメモ。

Adobe Creative Cloud を利用して Photoshop 入らなかったら、10回ぐらい Creative Cloud アンインストール・再インストールとか試して見たけど直らなかった。
結局、 /etc/hosts に non-ascii 文字(?)が(コメントの形で)入っていたのが原因っぽかった。
最初からクラッシュログを見ればよかったけど、クラッシュログにたどり着く為にも dtrace が有効だったのでメモっておく。

dtrace メモ

細かいフィルタ条件はあんまりよく分からない。
IO だけだったら、後ろで grep したほうがいいと思う。プロセス名解らない、というか近代的なアプリケーションでは、一つに特定出来ないので。

% sudo dtrace -n "syscall::open:entry, syscall::stat:entry, syscall::stat64:entry { trace(copyinstr(arg0)) } " 2> /dev/null | grep -i adobe
Password:
  0    160                       open:entry   /Users/kazuki-ma/Library/Logs/DiagnosticReports/Adobe Desktop Service_2016-08-14-014416_mymachine.crash
  0    160                       open:entry   /Users/kazuki-ma/Library/Logs/DiagnosticReports/Adobe Desktop Service_2016-08-14-014554_mymachine.crash

わかったこと
1. MacOS にはクラッシュログがあるっぽい
2. Adobe 関係でクラッシュログを吐いたプロセスがある
3. それは ↑ のパスに保存されている

クラッシュログ

open 'クラッシュログのパス' で OS 標準のビュアーで開いた。普通に code とかで開いてもいいとおもう。

先頭

Process:               Adobe Desktop Service [2786]
Path:                  /Library/Application Support/Adobe/*/Adobe Desktop Service.app/Contents/MacOS/Adobe Desktop Service
Identifier:            com.adobe.acc.AdobeDesktopService
Version:               3.7.5.291 (3.7)
Code Type:             X86 (Native)
Parent Process:        ??? [1]
Responsible:           Adobe Desktop Service [2786]
User ID:               502

Date/Time:             2016-08-14 01:52:21.363 +0900
OS Version:            Mac OS X 10.11.6 (15G31)
Report Version:        11
Anonymous UUID:        BEDEC9B9-150D-2DD8-2E4F-E5F869F0C242


Time Awake Since Boot: 1400 seconds

System Integrity Protection: enabled

Crashed Thread:        20  Dispatch queue: NSOperationQueue 0x7bb46990 :: NSOperation 0x7bbb5480 (QOS: LEGACY)

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0:

Crashed Thread: 20 とあるので、 Thread ID = 20 でクラッシュしたらしい。

Thread ID = 20

Thread 20 Crashed:: Dispatch queue: NSOperationQueue 0x7bb46990 :: NSOperation 0x7bbb5480 (QOS: LEGACY)
0   libsystem_c.dylib               0x9107a040 strlen + 16
1   ContainerBL.dylib               0x03f65e25 HostFileHandler::isHostFileTempered(std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, std::set<std::string, std::less<std::string>, std::allocator<std::string> >&) + 133
2   ContainerBL.dylib               0x03f6678f HostFileHandler::doHostFileSanityCheckAndShowErrorIfAny(std::string const&) + 143
3   ContainerBL.dylib               0x03f1068c 0x3ed0000 + 263820
4   ContainerBL.dylib               0x03f25ab3 0x3ed0000 + 350899
5   ContainerBL.dylib               0x03f1e370 MessageHandler::handle(MessageObject const&) + 160
6   ContainerBL.dylib               0x03f84732 ExternalGateway::processMessageFromOutside(MessageStruct const*, bool (**)(void const*)) + 98
7   ContainerBL.dylib               0x03fe3ffa processMessage + 138
8   Core.dylib                      0x022aba84 ExternalGateway::sendMessageToApplet(MessageObject const&, MessageStruct const*, bool (**)(void const*), char const**) + 2532
9   Core.dylib                      0x022ac1ba ExternalGateway::sendMessageToAllAppletInstances(Applet*, MessageObject&) + 202
10  Core.dylib                      0x022ab235 ExternalGateway::sendMessageToApplet(MessageObject const&, MessageStruct const*, bool (**)(void const*), char const**) + 405
11  Core.dylib                      0x022aae47 ExternalGateway::handleMessage(MessageObject const&, MessageStruct const*, bool (**)(void const*), char const**) + 407
12  Core.dylib                      0x022a9d9f 0x2287000 + 142751
13  com.apple.CoreFoundation        0x9957861d __invoking___ + 29
14  com.apple.CoreFoundation        0x9957855d -[NSInvocation invoke] + 317
15  com.apple.Foundation            0x9e918acb -[NSInvocationOperation main] + 219
16  com.apple.Foundation            0x9e89c204 -[__NSOperationInternal _start:] + 770
17  com.apple.Foundation            0x9e89befb -[NSOperation start] + 71
18  com.apple.Foundation            0x9e89a34f __NSOQSchedule_f + 258
19  libdispatch.dylib               0x97aff83f _dispatch_client_callout + 50
20  libdispatch.dylib               0x97b045f9 _dispatch_queue_drain + 726
21  libdispatch.dylib               0x97b0b278 _dispatch_queue_invoke + 509
22  libdispatch.dylib               0x97b0329c _dispatch_root_queue_drain + 491
23  libdispatch.dylib               0x97b0306b _dispatch_worker_thread3 + 97
24  libsystem_pthread.dylib         0x9bcc125c _pthread_wqthread + 1050
25  libsystem_pthread.dylib         0x9bcbef56 start_wqthread + 34

解ったこと

  1. HostFileHandler::doHostFileSanityCheckAndShowErrorIfAny ここらへんが何やってるかわからないけど、/etc/hosts に関係ありそうだ。
  2. そういえば、コメントに日本語で文字入れて、あとから vim で開くと文字化けしてるけど問題無いから放置してた。
  3. /etc/hosts のコメント消した → 動いた(・∀・)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0