Crash:Exceeded system-wide per-process Port Limit

Hi everyone,

I’m encountering a crash in my app and need help understanding what’s causing it and how to resolve it.

As stated in the crash report, the issue is caused by exceeding the system-wide per-process port limit. Can you tell me how to locate and identify why this is happening?

Below are the full report of the crash log:


Summary of Crash:



-------------------------------------

Translated Report (Full Report Below)

-------------------------------------



Incident Identifier: B509FF2B-C8D8-4E9F-B664-E24464CFD5F8

CrashReporter Key:   b390cfe931a83efde49bd8b523023a275b55ef64

Hardware Model:      iPhone14,2

Process:             MyApp [22515]

Path:                /private/var/containers/Bundle/Application/F73212A7-4CB9-485A-A8B7-8114F4E9A9AB/MyApp.app/MyApp

Identifier:          com.beeasy.app.id.enterprise

Version:             3.41.38-ID-MySDKMemory-12261114 (3.41.38-ID-MySDKMemory-12261114)

Code Type:           ARM-64 (Native)

Role:                Foreground

Parent Process:      launchd [1]

Coalition:           com.beeasy.app.id.enterprise [515]



Date/Time:           2024-12-29 01:29:48.3023 +0800

Launch Time:         2024-12-26 16:38:36.7895 +0800

OS Version:          iPhone OS 16.6.1 (20G81)

Release Type:        User

Baseband Version:    2.80.01

Report Version:      104



Exception Type:  EXC_RESOURCE (SIGKILL)

Exception Codes: 0x000000000001c1d6, 0x0000000000000000

Termination Reason: PORT_SPACE 14123288431433990614 (Limit 115158 ports) Exceeded system-wide per-process Port Limit



Triggered by Thread:  64



Thread 64 name:  AURemoteIO::IOThread

Thread 64 Crashed:

0   libsystem_kernel.dylib        	       0x20ce5eca4 mach_msg2_trap + 8

1   libsystem_kernel.dylib        	       0x20ce71b74 mach_msg2_internal + 80

2   libsystem_kernel.dylib        	       0x20ce71e4c mach_msg_overwrite + 540

3   libsystem_kernel.dylib        	       0x20ce5f1e8 mach_msg + 24

4   libEmbeddedSystemAUs.dylib    	       0x238bb2148 void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, AURemoteIO::IOThread::IOThread(AURemoteIO&, caulk::thread::attributes const&, caulk::mach::os_workgroup_managed const&)::'lambda'(), std::__1::tuple<>>>(void*) + 556

5   libsystem_pthread.dylib       	       0x22dcda6b8 _pthread_start + 148

6   libsystem_pthread.dylib       	       0x22dcd9b88 thread_start + 8

The report suggests that it may be because the app is creating an enormous number of threads.

Thank you for sharing the post and the crash file in a readable format. This is a very interesting crash, some threads look exactly like other thread and they finish with the wait commend.

I concur with @endecotp assessment that it appears as though you are awaiting the unlocking of a thread. If you have completed using the thread, kindly allow it to return so that it can be cleaned up. It seems that you are locking multiple threads after their usage, which may be causing resource issue you are seeing.

To identify potential deadlocks, I recommend inspecting your application thread management.

However, additional information about the application would be beneficial. Additionally, Instruments can provide valuable insights into the resources utilized by the application.

Very interested to know the resolution of this crash personally.

Albert Pascual
  Worldwide Developer Relations.

Crash:Exceeded system-wide per-process Port Limit
 
 
Q