memory leak and accpet request faild

11 posts, 0 answers
  1. sawachika
    sawachika avatar
    18 posts
    Member since:
    Feb 2015

    Posted 22 Mar 2015 Link to this post

    My program is very simple, but a memory leak in the run-off after a period of time, because BUG appear in the customer so that way I do not reproduce, and there is another problem, everything is normal in the listening process, but will suddenly appear accept the request fails, chrome tips ERR_PROXY_CONNECTION_FAILED, after refreshing the page correctly, you can help me?
  2. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 23 Mar 2015 Link to this post

    No, we cannot help you debug a program unless you share its code, clearly state the problem you're encountering, and provide information about the reproduction environment (version of FiddlerCore, version of Windows, version of client application, 32bit or 64bit, etc).

    Regards,
    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. sawachika
    sawachika avatar
    18 posts
    Member since:
    Feb 2015

    Posted 02 May 2015 in reply to Eric Lawrence Link to this post

    memory leak!

    My application memory leak, the FiddlerCore4.dll version is 4.4.8.4,  I use NET.Memory.Profiler check , find many byte[] object,

    It looks like a circular reference lead?

     

  4. sawachika
    sawachika avatar
    18 posts
    Member since:
    Feb 2015

    Posted 02 May 2015 in reply to Eric Lawrence Link to this post

    and the fiddlercore use thread have 700+

     

  5. sawachika
    sawachika avatar
    18 posts
    Member since:
    Feb 2015

    Posted 02 May 2015 Link to this post

    I found the reason, I find that when problems arise, fiddlercore been receiving an infinite number of requests, in FiddlerApplication_BeforeRequest, view the Session found that the requesting client socket port from the application itself,and in OnLogString event the LogString value is "Request was missing the required HOST header" , the result is so endless loop causes memory and thread exhausted, I have not changed the Session, why is it so?
  6. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 06 May 2015 Link to this post

    Hello, Sawachika--

    First, I would encourage you to upgrade to the current version of FiddlerCore (4.5.1) to ensure that you have all available fixes.

    A missing Host header will result in the warning message in question, but that problem alone shouldn't break anything, so long as the buggy client supplied a fully-qualified URL in the request line.

    If you send me a SAZ file of the traffic in question it would make it much easier to understand what you're talking about. It would also be helpful to understand what the client application in question is.

    FiddlerCore does not itself keep any list of Sessions, and as a consequence it doesn't really have any way to "leak" memory; if your application holds a list of Sessions and does not periodically prune that list, .NET will of course keep all of the Session objects in memory.

    Regards,
    Eric Lawrence
    Telerik
     
     
  7. sawachika
    sawachika avatar
    18 posts
    Member since:
    Feb 2015

    Posted 28 May 2015 in reply to Eric Lawrence Link to this post

    OK, memory leak ignore , now my question is browser occasionally request faild, chrome error is ERR_PROXY_CONNECTION_FAILED, and fiddlercore set bDebugSpew=true, the logs:

    2015-05-28 16:09:48,675 [17] DEBUG my application - WriteLine: READ 656 FROM [ClientPipe: Test Application:4476; UseCnt: 2[]; Port: 50106; PLAINTTEXT established 2015/5/28 16:09:46]:
    50 4F 53xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx5 2F 6B 63 73 61  POST http://xxxxx.xxxxx HTTP/1.1..Accept: */*..
    41 63 63 65 70 74 2D 4C 61 6E 67 75 61 67 65 3A 20 7A 68 2D 43 4E 0D 0A 52 65 66 65 72 65 72 3A  Accept-Language: zh-CN..Referer:
    20 68 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2F 6D 61 69 6E   http://xxxxxxxx/main
    44 32 2E 73 77 66 3F 61 70 69 5F 74 6F 6B 65 6E 3D 62 63 36 34 61 62 34 63 37 35 31 32 33 37 35  Dxxxxxab4c7512375
    38 31 62 33 xxxxxxxx 66 31 33 34 36 30 32 xxxxxxxxxx4 66 37 65 66 64 61 36 26 61 70 69 5F 73 74  81b356xxxxx7efda6&xxx
    61 72 74 74 69 6D 65 3D 31 34 33 32 38 30 30 33 39 36 34 33 31 2F 5B 5B 44 59 4E 41 4D 49 43 5D  arttxxxxxx96431/[[DYNAMIC]
    5D 2F 31 0D xxxxxxxxxx6 6C 61 73 68 2D 76 65 72 73 69 6F 6E 3A 20 31 36 2C 30 2C 30 2C 33 30 35  ]/1..x-flash-version: 16,0,0,305
    0D 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65 3A 20 61 70 70 6C 69 63 61 74 69 6F 6E 2F 78 2D 77 77  ..Content-Type: application/x-ww
    77 2D 66 6F 72 6D 2D 75 72 6C 65 6E 63 6F 64 65 64 0D 0A 43 6F 6E 74 65 6E 74 2D 4C 65 6E 67 74  w-form-urlencoded..Content-Lengt
    68 3A 20 39 31 0D 0A 41 63 63 65 70 74 2D 45 6E 63 6F 64 69 6E 67 3A 20 67 7A 69 70 2C 20 64 65  h: 91..Accept-Encoding: gzip, de
    66 6C 61 74 65 0D 0A 55 73 65 72 2D 41 67 65 6E 74 3A 20 4D 6F 7A 69 6C 6C 61 2F 34 2E 30 20 28  flate..User-Agent: Mozilla/4.0 (
    63 6F 6D 70 61 74 69 62 6C 65 3B 20 4D 53 49 45 20 38 2E 30 3B 20 57 69 6E 64 6F 77 73 20 4E 54  compatible; MSIE 8.0; Windows NT
    20 36 2E 31 3B 20 57 4F 57 36 34 3B 20 54 72 69 64 65 6E 74 2F 34 2E 30 3B 20 53 4C 43 43 32 3B   6.1; WOW64; Trident/4.0; SLCC2;
    20 2E 4E 45 54 20 43 4C 52 20 32 2E 30 2E 35 30 37 32 37 3B 20 2E 4E 45 54 20 43 4C 52 20 33 2E   .NET CLR 2.0.50727; .NET CLR 3.
    35 2E 33 30 37 32 39 3B 20 2E 4E 45 54 20 43 4C 52 20 33 2E 30 2E 33 30 37 32 39 3B 20 4D 65 64  5.30729; .NET CLR 3.0.30729; Med
    69 61 20 43 65 6E 74 65 72 20 50 43 20 36 2E 30 3B 20 2E 4E 45 54 34 2E 30 43 3B 20 2E 4E 45 54  ia Center PC 6.0; .NET4.0C; .NET
    34 2E 30 45 29 0D 0A 50 72 6F 78 79 2D 43 6F 6E 6E 65 63 74 69 6F 6E 3A 20 4B 65 65 70 2D 41 6C  4.0E)..Proxy-Connection: Keep-Al
    69 76 65 0D 0A 48 6F 73 74 3A 2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 50 72 61 67  ive..Host: xxxxxxxx..Prag
    6D 61 3A 20 6E 6F 2D 63 61 63 68 65 0D 0A 0D 0A                                                  ma: no-cache....                

    2015-05-28 16:09:48,676 [17] DEBUG my application - WriteLine: READ 91 FROM [ClientPipe: Test Application:4476; UseCnt: 2[]; Port: 50106; PLAINTTEXT established 2015/5/28 16:09:46]:
    61 70 69 25 35 46 6D 65 6D 62 65 72 25 35 46 69 64 3D 37 34 38 35 32 38 26 61 70 69 25 35 46 76  api%5Fmember%5Fid=748528&api%5Fv
    65 72 6E 6F 3D 31 26 61 70 69 25 35 46 74 6F 6B 65 6E 3D 62 63 36 34 61 62 34 63 37 35 31 32 33  erno=1&api%5Ftoken=bc64ab4c75123
    37 35 38 31 62 33 35 36 66 66 31 33 34 36 30 32 38 31 66 64 66 37 65 66 64 61 36                 7581b356ff13460281fdf7efda6     

    2015-05-28 16:09:48,676 [17] DEBUG my application - WriteLine: Request for Session #607 for read from [ClientPipe: Test Application:4476; UseCnt: 2[]; Port: 50106; PLAINTTEXT established 2015/5/28 16:09:46].
    2015-05-28 16:09:48,676 [17] DEBUG my application - WriteLine: onstatechange>#607 moving from state 'ReadingRequest' to 'AutoTamperRequestBefore'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at Fiddler.Session._executeObtainRequest()
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:48,677 [17] DEBUG my application - WriteLine: Session #607 bitflags adjusted from ClientPipeReused to ClientPipeReused, ResponseGeneratedByFiddler @    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.set_BitFlags(SessionFlags value)
       at Fiddler.Session.utilCreateResponseAndBypassServer()
       at JPProxy.Power.Filter.Game.GameFilter.LoadFromServer(Session session)
       at JPProxy.Power.Filter.Game.KCSFilter.LoadFromServer(Session session)
       at JPProxy.Power.Filter.Game.GameFilter.BeforeRequest(Session session)
       at JPProxy.Power.Core.Listener.FiddlerApplication_BeforeRequest(Session oSession)
       at Fiddler.Session._executeObtainRequest()
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:48,677 [17] DEBUG my application - WriteLine: onstatechange>#607 moving from state 'AutoTamperRequestBefore' to 'AutoTamperResponseBefore'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at JPProxy.Power.Filter.Game.GameFilter.LoadFromServer(Session session)
       at JPProxy.Power.Filter.Game.KCSFilter.LoadFromServer(Session session)
       at JPProxy.Power.Filter.Game.GameFilter.BeforeRequest(Session session)
       at JPProxy.Power.Core.Listener.FiddlerApplication_BeforeRequest(Session oSession)
       at Fiddler.Session._executeObtainRequest()
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:50,030 [17] DEBUG my application - WriteLine: onstatechange>#607 moving from state 'AutoTamperResponseBefore' to 'AutoTamperResponseBefore'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:50,030 [17] DEBUG my application - WriteLine: onstatechange>#607 moving from state 'AutoTamperResponseBefore' to 'AutoTamperResponseAfter'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:50,031 [17] DEBUG my application - WriteLine: onstatechange>#607 moving from state 'AutoTamperResponseAfter' to 'SendingResponse'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at Fiddler.Session.ReturnResponse(Boolean bForceClientServerPipeAffinity)
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:50,031 [17] DEBUG my application - WriteLine: Creating next session with pipes from 607.
    2015-05-28 16:09:50,031 [17] DEBUG my application - WriteLine: onstatechange>#607 moving from state 'SendingResponse' to 'Done'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at Fiddler.Session.ReturnResponse(Boolean bForceClientServerPipeAffinity)
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:50,031 [17] DEBUG my application - WriteLine: onstatechange>#0 moving from state 'Created' to 'ReadingRequest'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at Fiddler.Session._executeObtainRequest()
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:09:50,031 [17] DEBUG my application - WriteLine: Session #0 bitflags adjusted from None to ClientPipeReused @    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.set_BitFlags(SessionFlags value)
       at Fiddler.ClientChatter.ReadRequest()
       at Fiddler.Session._executeObtainRequest()
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:10:50,532 [17] DEBUG my application - WriteLine: ReadRequest [ClientPipe: Test Application:4476; UseCnt: 3[]; Port: 50106; PLAINTTEXT established 2015/5/28 16:09:46] threw #10060 - 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
    2015-05-28 16:10:50,532 [17] DEBUG my application - WriteLine: Session #608 bitflags adjusted from ClientPipeReused to ClientPipeReused, ResponseGeneratedByFiddler @    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.set_BitFlags(SessionFlags value)
       at Fiddler.ClientChatter.BuildAndReturnResponse(Int32 iStatus, String sStatusText, String sBodyText, Action`1 delLastChance)
       at Fiddler.ClientChatter.FailSession(Int32 iError, String sErrorStatusText, String sErrorBody)
       at Fiddler.ClientChatter.ReadRequest()
       at Fiddler.Session._executeObtainRequest()
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:10:50,532 [17] DEBUG my application - WriteLine: onstatechange>#608 moving from state 'ReadingRequest' to 'Aborted'    at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
       at System.Environment.get_StackTrace()
       at Fiddler.Session.<.ctor>b__0(Object s, StateChangeEventArgs ea)
       at Fiddler.Session.set_state(SessionStates value)
       at Fiddler.ClientChatter.BuildAndReturnResponse(Int32 iStatus, String sStatusText, String sBodyText, Action`1 delLastChance)
       at Fiddler.ClientChatter.FailSession(Int32 iError, String sErrorStatusText, String sErrorBody)
       at Fiddler.ClientChatter.ReadRequest()
       at Fiddler.Session._executeObtainRequest()
       at Fiddler.Session.InnerExecute()
       at Fiddler.Session.Execute(Object objThreadState)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
    2015-05-28 16:10:50,533 [17] DEBUG my application - WriteLine: fiddler.network.clientpipereuse> Closing client socket since bReuseClientSocket was false after returning []
    2015-05-28 16:10:50,533 [17] DEBUG my application - WriteLine: Pipe::End() for C
    2015-05-28 16:10:50,533 [17] DEBUG my application - WriteLine: Reading from client set bAbort or m_requestData was empty
    2015-05-28 16:10:50,533 [17] DEBUG my application - WriteLine: CloseSessionPipes() for Session #608


    my application accept request, and call utilCreateResponseAndBypassServer tamper response,Test Application is a test application, use fiddlercore too ,IE proxy access test program, test application override host to my application ,as below:

    IE->TEST APPLICATION->MY APPLICATION

    chrome have the same problem too.ERR_PROXY_CONNECTION_FAILED errors occasionally occur later F5 to refresh and normal.

    the fiddlercore version is 4.5.1

  8. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 29 May 2015 Link to this post

    Without seeing your code that calls the CreateResponseAndBypassServer, it's difficult to say what exactly is going wrong, but the trace below shows the client sending malformed traffic, perhaps due to whatever you returned.

    Regards,
    Eric Lawrence
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  9. sawachika
    sawachika avatar
    18 posts
    Member since:
    Feb 2015

    Posted 30 Jun 2015 Link to this post

    when i change fullUrl to a cloudflare's url , fiddlercore error , the url is https://xxxxxxx
  10. sawachika
    sawachika avatar
    18 posts
    Member since:
    Feb 2015

    Posted 30 Jun 2015 Link to this post

    the error image
  11. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 30 Jun 2015 Link to this post

    Without seeing your code that calls the CreateResponseAndBypassServer, it's difficult to say what exactly is going wrong.

    Your first screenshot did not come through; the second screenshot suggests that either you've incorrectly tried to secure a socket or there's a bug in the Mono framework. Understanding whether this happens on every server or only specific servers, and whether it happens on Windows or only Mono would be helpful.

    Regards,
    Eric Lawrence
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top