Too many threads created by admob SDK.

648 views
Skip to first unread message

linli...@j2apps.com

unread,
Dec 24, 2017, 11:02:25 PM12/24/17
to Google Mobile Ads SDK Developers
Hi,

I find there are too many threads created by admob SDK.

Steps:
I use a new project created by Android Studio for testing.

1. Start MainActivity with any code change, there are about less then 30 threads.

2. Add TestAdActivity for AD testing, load one native ‘app install ‘ AD, there are about 110 threads.

3. Exit TestAdActivity, destroy ad in ‘OnDestroy’. There are about 70 threads after a while.

Why does loading ad need so many threads ?
Why are there so many threads hold even if ad has been destroyed ?

I receive too many OOM issues about our app on Google Play, I think threads hold by ad module may one of the reasons.

BR
    Lin

linli...@j2apps.com

unread,
Dec 24, 2017, 11:05:55 PM12/24/17
to Google Mobile Ads SDK Developers




Some screen shots.


Deepika Uragayala- MobileAds SDK team

unread,
Dec 27, 2017, 3:15:19 PM12/27/17
to Google Mobile Ads SDK Developers
Hi there,

Thanks for contacting us. Can you please confirm to us whether you were able to reproduce the issue with our Sample apps using your Ad unit Id? We will then be able to look into this issue and assist you further.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

linli...@j2apps.com

unread,
Dec 27, 2017, 9:06:55 PM12/27/17
to Google Mobile Ads SDK Developers
Hi,

Thanks for replying.

I try again with Interstitial Ad Sample app without any change. Also there are too many threads. followings are screenshots.

Deepika Uragayala- MobileAds SDK team

unread,
Dec 28, 2017, 2:57:04 PM12/28/17
to Google Mobile Ads SDK Developers
Hi there,

Thanks for the details. Could you reattach the screenshots? Also, can you please retest on a different device? I have not been able to reproduce the issue with our sample app and the SDK does free up all of the unnecessary threads if needed by the application. I have tried on Nexus 6 and on an Emulator and have found out that the memory usage was always stable and it would flush out unnecessary memory if needed. It started out with 20 AdWorker threads and saw it reducing it to 1 AdWorker thread. 


Regards,
Deepika Uragayala
Mobile Ads SDK Team

linli...@j2apps.com

unread,
Jan 2, 2018, 9:25:54 PM1/2/18
to Google Mobile Ads SDK Developers
Hi,

Sorry for missing screenshots.



And by the way, According to your testing, Why does it need 20 AdWorker threads for loading one Ad.

linli...@j2apps.com

unread,
Jan 2, 2018, 11:39:17 PM1/2/18
to Google Mobile Ads SDK Developers
Hi, 

I recorded two videos. One is the interstitial ad sample for google without any change,
another is a new app created by Android Studio without Ad.

Empty app only takes about 16 threads.

Ad app takes more than 80 threads when loading Ad, and more than 50 threads when Ad is showing.

I think the number of thread for Ad is too large.

link: video for interstitial Ad.

link: video for empty app.

Regards,
Lin

Deepika Uragayala- MobileAds SDK team

unread,
Jan 3, 2018, 2:51:48 PM1/3/18
to Google Mobile Ads SDK Developers
Hi there,

Thank you for sharing the requested details. I've shared this with the rest of the team for further investigation. I will keep you posted if I have any new information to share.

Regards,
Deepika Uragayala
Mobile Ads SDK Team


Message has been deleted

Jin

unread,
Jan 8, 2018, 3:26:19 AM1/8/18
to Google Mobile Ads SDK Developers
Hi, there

I also occured same issue.


My app is using DoubleClick for Publishers(called 'DFP' from Google) and Admob in recyclerview. I do not know when, but since about last September, scrolling or using the app for a long time will cause a crash. But, if not use dff, admob viewholder, crash never occured. There is a conflict regardless of version and device version. (this logcat log is from Nexus 5, 6.0.0)

I don't know 'AdWorker' and cannot find about that...

Here is app information.(using multi dex and proguard)

compileSdkVersion 26
buildToolsVersion '27.0.3'
minSdkVersion 15
targetSdkVersion 26
multiDexEnabled true

and when crash occured, below logcat log was always shown.

01-08 11:24:46.292 9567-9843/? A/libc: FORTIFY: FD_SET: file descriptor >= FD_SETSIZE

Anyone who has experienced or resolved the same problem?


I think there are too many adworker threads, so it seems to be crashing out of memory. 

Deepika Uragayala- MobileAds SDK team

unread,
Jan 8, 2018, 3:53:44 PM1/8/18
to Google Mobile Ads SDK Developers
Hi there,

It looks like your issue is not related to the actual concern in this forum post. Could you please open a new thread with complete details about the issue that you are seeing for us to debug further? 

Regards,
Deepika Uragyala
Mobile Ads SDK Team

Oleksandr Tereshchuk

unread,
Sep 10, 2018, 11:53:45 AM9/10/18
to Google Mobile Ads SDK Developers
Hi,

any updates so far ?
This issue is especially painful when application is running for a prolonged duration.

середа, 3 січня 2018 р. 21:51:48 UTC+2 користувач Deepika Uragayala- MobileAds SDK team написав:

Oleksandr Tereshchuk

unread,
Sep 10, 2018, 11:55:57 AM9/10/18
to Google Mobile Ads SDK Developers
and by "painful" I mean that it regularly crashes application with Abort message: 'FORTIFY: FD_SET: file descriptor >= FD_SETSIZE' because AdWorker creates too many threads

понеділок, 10 вересня 2018 р. 18:53:45 UTC+3 користувач Oleksandr Tereshchuk написав:

mobileadssdk-a...@google.com

unread,
Sep 11, 2018, 5:25:12 AM9/11/18
to Oleksandr Tereshchuk, Google Mobile Ads SDK Developers
Hi Oleksandr,

Please note that the issue about the "too many threads" created is still actively being worked on by the team. Rest assured that we will update this thread for any official feedback.

As for the "Abort message: 'FORTIFY: FD_SET: file descriptor >= FD_SETSIZE'" error message, this seems to be a different issue. Thus, could you create a new thread and share to us the complete error logs captured on your end? Rest assured that I will share to the team the information you provided as well as the ones provided by other publishers that is related to this error.

Additionally, since we can't fully reproduce the error on our end and it seems like you were able to reproduce the error at certain times ("when application is running for a prolonged duration"), could you test with our sample apps and see if the error is reproducible? You may share your findings in the new thread.

Regards,
Ivan Bautista
Mobile Ads SDK Team



--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/6dfb6e7a-4c0a-4af6-8396-8bd004382174%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Olexandr Tereshchuk

unread,
Sep 12, 2018, 4:23:18 PM9/12/18
to mobileadssdk-a...@google.com, google-adm...@googlegroups.com

вт, 11 вер. 2018 о 12:25 <mobileadssdk-a...@google.com> пише:
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.

mobileadssdk...@google.com

unread,
Jan 30, 2019, 12:31:50 AM1/30/19
to Olexandr Tereshchuk, google-adm...@googlegroups.com
Hi everyone,

For the "too many threads" concern, I just want to check if you still encounter this on your end.

Regards,
Ivan Bautista
Mobile Ads SDK Team


On 09/13/18 04:22:52 riv...@gmail.com wrote:
вт, 11 вер. 2018 о 12:25 <mobileadssdk-advisor+support@google.com> пише:
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Olexandr Tereshchuk

unread,
Jan 30, 2019, 2:14:56 AM1/30/19
to mobileadssdk...@google.com, google-adm...@googlegroups.com
Thread number is OK

ср, 30 січ. 2019 о 07:31 <mobileadssdk...@google.com> пише:
Hi everyone,

For the "too many threads" concern, I just want to check if you still encounter this on your end.

Regards,
Ivan Bautista
Mobile Ads SDK Team



On 09/13/18 04:22:52 riv...@gmail.com wrote:
вт, 11 вер. 2018 о 12:25 <mobileadssdk-a...@google.com> пише:
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages