Some Mac applications crash frequently, with "__THE_SYSTEM_HAS_NO_PORT_SETS_AVAILABLE__" in backtrace

4

2

Recently I'm finding that some Mac OS X applications are crashing frequently with backtraces like the following:

Process:         Mail [39226]
Path:            /Applications/Mail.app/Contents/MacOS/Mail
Identifier:      com.apple.mail
Version:         4.4 (1082)
Build Info:      Mail-10820000~1
Code Type:       X86-64 (Native)
Parent Process:  launchd [338]

Date/Time:       2011-01-12 21:59:48.383 -0500
OS Version:      Mac OS X 10.6.6 (10J567)
Report Version:  6

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  12  Dispatch queue: com.apple.root.default-priority

[...]

Thread 12 Crashed:  Dispatch queue: com.apple.root.default-priority
0   com.apple.CoreFoundation        0x00007fff81653975 __THE_SYSTEM_HAS_NO_PORT_SETS_AVAILABLE__ + 5
1   com.apple.CoreFoundation        0x00007fff815a1f69 __CFRunLoopFindMode + 553
2   com.apple.CoreFoundation        0x00007fff815a1c5d __CFRunLoopCreate + 317
3   com.apple.CoreFoundation        0x00007fff815a1a78 _CFRunLoopGet0 + 744
4   com.apple.CoreFoundation        0x00007fff815dc90a CFRunLoopRunInMode + 58
5   com.apple.MessageFramework      0x00007fff81d01183 +[NSRunLoop(MessageExtensions) _flushQueuedEventsAddingSource:] + 120
6   com.apple.MessageFramework      0x00007fff81d010d2 +[NSRunLoop(MessageExtensions) flushQueuedEvents] + 36
7   com.apple.MessageFramework      0x00007fff81ce6515 -[_MFInvocationOperation main] + 275
8   com.apple.Foundation            0x00007fff83921de4 -[__NSOperationInternal start] + 681
9   com.apple.Foundation            0x00007fff83a00beb __doStart2 + 97
10  libSystem.B.dylib               0x00007fff801402c4 _dispatch_call_block_and_release + 15
11  libSystem.B.dylib               0x00007fff8011e831 _dispatch_worker_thread2 + 239
12  libSystem.B.dylib               0x00007fff8011e168 _pthread_wqthread + 353
13  libSystem.B.dylib               0x00007fff8011e005 start_wqthread + 13

[...]

and:

Process:         osascript [34568]
Path:            /usr/bin/osascript
Identifier:      osascript
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  GeekTool [6699]

Date/Time:       2011-01-19 06:06:41.198 -0500
OS Version:      Mac OS X 10.6.6 (10J567)
Report Version:  6

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   com.apple.CoreFoundation        0x00007fff81653975 __THE_SYSTEM_HAS_NO_PORT_SETS_AVAILABLE__ + 5
1   com.apple.CoreFoundation        0x00007fff815a1f69 __CFRunLoopFindMode + 553
2   com.apple.CoreFoundation        0x00007fff815a1c5d __CFRunLoopCreate + 317
3   com.apple.CoreFoundation        0x00007fff815a1988 _CFRunLoopGet0 + 504
4   com.apple.CoreFoundation        0x00007fff815a177f CFRunLoopGetMain + 79
5   com.apple.CoreFoundation        0x00007fff815a08ef _CFXNotificationCenterCreate + 383
6   com.apple.CoreFoundation        0x00007fff815a073b _CFXNotificationGetHostCenter + 75
7   com.apple.CoreFoundation        0x00007fff815a0532 __CFXPreferencesGetSourceForTriplet + 354
8   com.apple.CoreFoundation        0x00007fff8159db49 __CFXPreferencesGetSearchListForBundleID + 217
9   com.apple.CoreFoundation        0x00007fff8159d9fb CFPreferencesCopyAppValue + 43
10  com.apple.CoreFoundation        0x00007fff8159d999 _CFBundleCopyUserLanguages + 665
11  com.apple.CoreFoundation        0x00007fff8159d1b4 _CFBundleAddPreferredLprojNamesInDirectory + 404
12  com.apple.CoreFoundation        0x00007fff8159cc8a _CFBundleGetLanguageSearchList + 170
13  com.apple.CoreFoundation        0x00007fff8159d4ba _CFBundleAddPreferredLprojNamesInDirectory + 1178
14  com.apple.CoreFoundation        0x00007fff8159cc8a _CFBundleGetLanguageSearchList + 170
15  com.apple.CoreFoundation        0x00007fff8159cadf CFBundleCopyResourceURL + 47
16  com.apple.CoreFoundation        0x00007fff815fe4c4 _CFBundleCopyResourceForkURLMayBeLocal + 148
17  com.apple.CoreFoundation        0x00007fff8162c7d0 CFBundleOpenBundleResourceFiles + 144
18  ...ple.CoreServices.CarbonCore  0x00007fff885f3130 _openFrameworkResourceFiles + 137
19  ...ple.CoreServices.CarbonCore  0x00007fff885e048c CLVVisitValuesForKey + 81
20  ...ple.CoreServices.CarbonCore  0x00007fff885f2fee INIT_ResourceManager + 734
21  ...ple.CoreServices.CarbonCore  0x00007fff885f2bed StandardEntry + 57
22  ...ple.CoreServices.CarbonCore  0x00007fff885f2af9 FSOpenResourceFile + 77
23  ...ple.CoreServices.CarbonCore  0x00007fff886543fc FSOpenResFile + 75
24  com.apple.openscripting         0x00007fff844e8884 OSADoIt(short, ComponentInstanceRecord*, FSRef const*, unsigned int, unsigned int, int, unsigned int*, AEDesc*, unsigned char*) + 2715
25  com.apple.openscripting         0x00007fff844e8b6a OSALoadFile + 50
26  osascript                       0x0000000100001898 0x100000000 + 6296
27  osascript                       0x0000000100000fa0 0x100000000 + 4000

Any ideas about what might be causing this and/or how to remedy it?

smokris

Posted 2011-01-13T03:11:51.257

Reputation: 1 352

1Given that Google doesn't know much about that error message could be a very bad sign. Have you recently installed kernel extensions, third party device drivers, etc.? I'd probably reinstall Mac OS X. – Daniel Beck – 2011-01-13T06:27:46.647

Thanks for the input, Daniel. I don't think I've recently installed kexts or drivers on this system. But I have been using this user profile for many years and across several systems... – smokris – 2011-01-14T02:53:13.780

Answers

3

I'm not a kernel programmer, but I'm guessing that message has something to do with running out of Mach ports in the kernel. Do you have a zillion processes running, or are you doing a lot of inter-process communication? Are you possibly low on memory and disk space (no room to expand your swap)?

Try using top or Activity Monitor to see if you have any processes going crazy, like perhaps you've written a recursive AppleScript or shell script that's spawning zillions of child processes (like an accidental "fork bomb").

Pay attention to what apps you have running when you hit this crash. Maybe there's an app that overuses Mach ports and sometimes gobbles them all up. Is this problem more likely to hit when you're running a virtual machine system such as VMware, Parallels, or VirtualBox?

Spiff

Posted 2011-01-13T03:11:51.257

Reputation: 84 656

In Activity Monitor, I turned on the "Ports" column, and noticed the (third-party) Mozy backup process had allocated tens of thousands of ports and was slowly increasing. I've disabled this application for now. – smokris – 2011-05-17T17:18:19.767

0

Hmm. I tried resetting SyncServices --- http://support.apple.com/kb/TS1627 --- and Mail hasn't crashed since then.

smokris

Posted 2011-01-13T03:11:51.257

Reputation: 1 352

And a few days later it's crashing again. That apparently didn't fix it. – smokris – 2011-01-16T16:35:57.897