GithubHelp home page GithubHelp logo

Comments (8)

qmfrederik avatar qmfrederik commented on August 12, 2024

The Debug Memory Graph raises warnings about 6 leaked types, of which OS_dispatch_queue_serial and OS_dispatch_source seem to be the most interesting. Printing their description yields:

Printing description of $7:
<OS_dispatch_source:
source[0x281400180] = 
{ 
  xref = 1,
  ref = 1,
  target = GCDAsyncSocket[0x28143c580],
  ident = 0xffffffff,
  mask = 0x0,
  pending_data = 0x0,
  registered = 0,
  armed = 0,
  cancelled,
  deleted,
  timer = { target = 0x6963374e1c, deadline = 0x6963374e1c, interval = 0x7fffffffffffffff, flags = 0x0 },
  kevent = 0x281400100,
  filter = timer
}>

from webdriveragent.

mykola-mokhnach avatar mykola-mokhnach commented on August 12, 2024

This is our fork of RoutingHTTPServer lib: https://github.com/appium/RoutingHTTPServer. Feel free to debug it and propose your fixes.

from webdriveragent.

mykola-mokhnach avatar mykola-mokhnach commented on August 12, 2024

This also might be related to appium/appium#14416, which was fixed also on the client side in appium@beta. Worth checking anyway

from webdriveragent.

qmfrederik avatar qmfrederik commented on August 12, 2024

Thanks, I had a look at appium/appium#14416, it seems unrelated at first sight.

I can reproduce the issue by simply initiating a TCP connection (e.g. echo exit | telnet localhost 8100). Doing this in a loop leaks memory in the WDA process. This test never establishes a valid HTTP connection, so much of the middleware of RoutingHttpServer is never invoked.

It makes me think the issue is rather at the CocoaHTTPServer (also forked by appium) or at the GCDAsyncSocket level. For example, the CocoaAsyncSocket source files used by CocaoHTTPServer haven't been updated in 7 years.

I'll have a look and let you know what I find. On the other hand, can you reproduce this problem on your machine? Would be good to know I'm not the only one seeing this :).

from webdriveragent.

mykola-mokhnach avatar mykola-mokhnach commented on August 12, 2024

Closed as fixed

from webdriveragent.

nanoscopic avatar nanoscopic commented on August 12, 2024

In what way is this fixed? I continue to see related issues with the HTTP server used.

from webdriveragent.

qmfrederik avatar qmfrederik commented on August 12, 2024

I could no longer reproduce the issue described in this ticket after #348 and #349 got merged.

Are you seeing you still see this issue (memory leak by just running echo exit | telnet localhost 8100 or curl -X GET http://localhost:8100/health in a loop)?

from webdriveragent.

nanoscopic avatar nanoscopic commented on August 12, 2024

As shared in other thread, the built in HTTP server is 1.x only, and requires Keep-Alive header as a result to re-use connections. This resolves the issue I was seeing.

from webdriveragent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.