Skip to content

Leak in select for a UNIXSocket (at least) #3588

@headius

Description

@headius

The following code leaks like a sieve...up to 1.5GB of total memory in under a minute for me:

s = UNIXServer.new("foofoo")
Thread.new {
  loop {
    c1 = s.accept
    IO.select([c1])
    c1.read(5)
    c1.write("bubye")
    c1.close
  }
}

loop {
  c = UNIXSocket.new("foofoo")
  c.write("hello")
  IO.select([c])
  c.read(5)
  c.close
  print "."
}

It did not leak without the IO.select calls, so I suspect that something in jnr-enxio's implementation of selection there's native memory leaking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions