This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 36596 - Potential HttpClient Ntlm memory leak
Summary: Potential HttpClient Ntlm memory leak
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Net.Http (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-12-04 13:44 UTC by Chris Hamons
Modified: 2015-12-07 17:02 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Repro part 1 (17.30 KB, application/zip)
2015-12-04 13:44 UTC, Chris Hamons
Details
Repro part 2 (17.30 KB, application/zip)
2015-12-04 13:44 UTC, Chris Hamons
Details
Real repro part 2 (4.32 KB, application/zip)
2015-12-04 13:45 UTC, Chris Hamons
Details

Description Chris Hamons 2015-12-04 13:44:19 UTC
Created attachment 14121 [details]
Repro part 1

From https://forums.xamarin.com/discussion/57141/potential-httpclient-ntlm-memory-leak

It looks like there is a memory leak in HttpClient when using Ntlm authentication. HttpClient seems to work ok if no credentials are used, but when request is authorized (server responds with 200 OK) memory starts to climb.

Attached is a sample app, which makes a connection to the server we have set up (code for the server is also included). We will remove the server in a week, but wanted to make it easy to test for somebody willing to help.

The app is a console app, few lines of code which just makes a connection and checks that response is 200 OK.
If you let it run for a couple of minutes you should see memory rise.

To try, open HttpClientMemoryLeak.zip in Xamarin studio and run (it will make a connection to a server we have set up). You can also run your own server.
Comment 1 Chris Hamons 2015-12-04 13:44:43 UTC
Created attachment 14122 [details]
Repro part 2
Comment 2 Chris Hamons 2015-12-04 13:45:34 UTC
Created attachment 14123 [details]
Real repro part 2
Comment 3 Chris Hamons 2015-12-04 13:46:07 UTC
Repro web server requires asp.net, which I do not have access to a windows dev box to validate.
Comment 4 Marek Safar 2015-12-07 17:02:02 UTC
Fixed in master

Note You need to log in before you can comment on or make changes to this bug.