aleph

2017-09-25T03:45:01.000006Z

I'm using aleph and manifold for communicating with the StarCraft II AI API. Yesterday I tried my hand at a run-loop and I completed one of the challenges using Clojure (yay!). I'm using alephs websocket to connect to the api which uses protobuf to communicate. And I utilize streams for the run-loop, but after around 100 steps into the game I get a memory leak notification which later makes the websockets requests fail.

Sep 25, 2017 12:26:19 PM io.netty.util.ResourceLeakDetector reportTracedLeak
SEVERE: LEAK: ByteBuf.release() was not called before it's garbage-collected. See <http://netty.io/wiki/reference-counted-objects.html> for more information.

2017-09-25T03:46:55.000156Z

I'm not sure what could be causing it. I found https://groups.google.com/forum/#!msg/aleph-lib/-41TvS0uKVM/KF7PE_iOErwJ but that should now not happen with the defaults anymore.

2017-09-25T06:43:05.000152Z

Not sure if the stacktrace is visible on slack, I don't have any storage space in my slack workspace :suspect:

miikka 2017-09-25T07:00:13.000374Z

Hmmh. This is 0.4.2, right?

miikka 2017-09-25T07:04:17.000124Z

Quickly browsing the code, I'm not sure what is supposed to release the bytebufs allocated by client.clj:420

2017-09-25T07:09:24.000205Z

it might help to see what I am doing, might be doing stupid stuff: https://github.com/bbss/cljsc2/blob/master/src/cljsc2/clj/core.clj#L56 create a websocket connection to the starcraft 2 client https://github.com/bbss/cljsc2/blob/master/src/cljsc2/clj/core.clj#L33 put requests on the websocket connection

2017-09-25T07:09:44.000090Z

@miikka uhm, not 0.4.2. it is 0.4.3.

miikka 2017-09-25T07:11:51.000301Z

Uh, right. Could you try with 0.4.4-alpha4?

2017-09-25T07:12:01.000328Z

okay, let me try

miikka 2017-09-25T07:12:07.000176Z

0.4.4's changelog inculdes "fix memory lead in handling of binary websocket frames"

miikka 2017-09-25T07:12:26.000015Z

which sounds promising

2017-09-25T07:14:11.000033Z

that does sound very promising, I should have checked that out myself. Fingers crossed haha.

2017-09-25T07:17:30.000010Z

kiitos @miikka the error seems to be gone!

👍 3
ianbishop 2017-09-25T15:30:15.000563Z

Has anyone had any experience with using status as a deferred? I'm looking to use aleph for a proxy-like service where the status will also be decided based off an asynchronous request

ianbishop 2017-09-25T15:47:42.000185Z

I guess I can probably let-flow on the status in middleware