Skip to content

Memory leaks on [FIRClearcutLogger sendNextPendingRequestWithCompletionHandler:] #1994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
agordeev opened this issue Oct 24, 2018 · 9 comments

Comments

@agordeev
Copy link

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 10.0 (10A255)
  • Firebase SDK version: 5.10.0
  • Firebase Component: Core
  • Component version: 5.1.5

[REQUIRED] Step 3: Describe the problem

Lots of memory leaks on [FIRClearcutLogger sendNextPendingRequestWithCompletionHandler:]. Is it possible to apply the same fix as here: #1917?

Steps to reproduce:

Happens after calling FirebaseApp.configure()

Here's a typical stack trace:

    0 libsystem_malloc.dylib malloc_zone_realloc
    1 libsystem_malloc.dylib realloc
    2 CoreFoundation __CFSafelyReallocate
    3 Foundation _NSMutableDataGrowBytes
    4 Foundation -[NSConcreteMutableData appendBytes:length:]
    5 GoogleUtilities 0x1036c664f
    6 GoogleUtilities 0x1036c1753
    7 App -[FIRClearcutLogger sendNextPendingRequestWithCompletionHandler:]
    8 App -[FIRClearcutLogger sendLogsWithCompletionHandler:]
    9 libdispatch.dylib _dispatch_call_block_and_release
   10 libdispatch.dylib _dispatch_client_callout
   11 libdispatch.dylib _dispatch_lane_serial_drain$VARIANT$mp
   12 libdispatch.dylib _dispatch_lane_invoke$VARIANT$mp
   13 libdispatch.dylib _dispatch_workloop_worker_thread
   14 libsystem_pthread.dylib _pthread_wqthread
   15 libsystem_pthread.dylib start_wqthread

Get about 100 leaks on each launch.

@paulb777
Copy link
Member

@agordeev Thanks for the report. What version of GoogleUtilities do you have installed? Version 5.3.4 includes a fix (#1970) for a crash from FIRClearcutLogger (#1964), that could be related.

@morganchen12
Copy link
Contributor

Also, it seems the two calls to GoogleUtilities are unsymbolicated. Can you get a fully symbolicated stack trace?

@agordeev
Copy link
Author

GoogleUtilities was updated to the latest (5.3.4) version as well.

Also, it seems the two calls to GoogleUtilities are unsymbolicated. Can you get a fully symbolicated stack trace?

How to I do that? That's not the crash log, I was browsing through Xcode's Object graph

@yonomitt
Copy link

yonomitt commented Oct 30, 2018

I think I'm seeing something similar. I'm using Firebase 5.11 downloaded from firebase.google.com and added to the project manually... so I'm not sure which version of GoogleUtilities is bundled with it, but I assume the latest.

If it helps, my calls to GoogleUtilities are symbolicated:

0 libsystem_malloc.dylib malloc_zone_malloc
1 CoreFoundation _CFRuntimeCreateInstance
2 CoreFoundation __CFStringCreateImmutableFunnel3
3 CoreFoundation CFStringCreateWithBytes
4 Foundation +[NSString stringWithUTF8String:]
5 Foundation -[__NSConcreteUUID UUIDString]
6 CFNetwork -[__NSCFURLSession initWithConfiguration:delegate:delegateQueue:]
7 CFNetwork -[__NSURLSessionLocal initWithConfiguration:delegate:delegateQueue:]
8 CFNetwork +[NSURLSession sessionWithConfiguration:delegate:delegateQueue:]
9 Discovery -[GULNetworkURLSession sessionIDFromAsyncPOSTRequest:completionHandler:]
10 Discovery -[GULNetwork postURL:payload:queue:usingBackgroundSession:completionHandler:]
11 Discovery -[FIRClearcutLogger sendNextPendingRequestWithCompletionHandler:]
12 Discovery -[FIRClearcutLogger sendLogsWithCompletionHandler:]
13 libdispatch.dylib _dispatch_call_block_and_release
14 libdispatch.dylib _dispatch_client_callout
15 libdispatch.dylib _dispatch_lane_serial_drain
16 libdispatch.dylib _dispatch_lane_invoke
17 libdispatch.dylib _dispatch_workloop_worker_thread
18 libsystem_pthread.dylib _pthread_wqthread
19 libsystem_pthread.dylib start_wqthread

@paulb777
Copy link
Member

Thanks @yonomitt, but the latest GoogleUtilities didn't make Firebase 5.11.0 - see https://github.com/firebase/firebase-ios-sdk/releases. It will be in the next zip download release.

@Jay-iTechPioneer
Copy link

@paulb777 I have also same issue with latest pod version.

@paulb777
Copy link
Member

@Jay-iTechPioneer To confirm, do you still have the issue with the Google Utilities 5.3.5 that released yesterday?

@Jay-iTechPioneer
Copy link

@Jay-iTechPioneer To confirm, do you still have the issue with the Google Utilities 5.3.5 that released yesterday?

@paulb777 in 5.3.5 it is fixed and works fine.
Thank you !!

@paulb777
Copy link
Member

Thanks to @morganchen12 for the fix!

@firebase firebase locked and limited conversation to collaborators Oct 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants