Mike W9MDB and I have done a bunch of testing to try to figure out this
memory leak in jt9. I'm finally ready to make a report.

I have installed the distributed deb binaries and built from source for
1.9.0-rc2 and rc3 on three different versions of Ubuntu, 16.04 LTS (latest
LTS version), 17.10 (latest non-LTS version), and 18.04 (up-coming LTS
pre-release). Here are the results:

Ubuntu 16.04 LTS:
- The distributed binary for 1.9.0-rc2 works, 1.9.0-rc3 not tested.
- Compiled binary for 1.9.0-rc2 works. 1.9.0-rc3 not tested.

Ubuntu 17.10:
- The distributed binaries for 1.9.0-rc2 and rc3 work, no leak.
- The compiled binaries for 1.9.0-rc2 and rc3 have the memory leak problem,
when compiled with the stock gcc, g++, and gfortran at 7.2.0.
- The repositories for 17.10 also include gcc, g++, and gfortran at 6.4.0,
which produces a functional wsjtx and a jt9 that does not leak.

Ubuntu 18.04 LTS pre-release:
- The distributed binaries for 1.9.0-rc2 and 1.9.0-rc3 both fail to
install, wanting dependency "libreadline6 (>= 6.0)" but readline6 is not in
the 18.04 repository for some reason, though versions 5 and 7 are.
- The compiled binaries for rc2 and rc3 both work with no leaks. gcc and
friends are also at 7.3.0 so it must have been fixed.

The bad news:
- there IS a problem if someone running Ubuntu 17.10 tries to compile the
source. (Like me!)
- the currently-distributed binaries will not install on Ubuntu 18.04 LTS
when it comes out, unless they add readline6 to the repository.

The good news:
- the problem is not compiled into the distributed deb binaries.
- the problem is evidently not in the wsjtx code, it's in gcc or its
libraries, and it has already been fixed.
- there is an easy fix if someone wants to compile it on Ubuntu 17.10 -
downgrade gcc to gcc-6

Recommendation:
- the install notes should warn at least that the code may have a memory
leak in jt9 if compiled on gcc 7.2.0, and suggest downgrading to gcc 6.4.0.
Maybe cmake can exclude just that version automatically?
- maybe the dependency in the distributed deb binary could be relaxed to
allow readline7, just in case Ubuntu doesn't get around to including
readline6 (presuming it works, of course)

Doug VE7GNU


On Tue, Feb 20, 2018 at 11:59 AM Doug Collinge <doug.colli...@gmail.com>
wrote:

> There seems to be a memory leak in the jt9 process started by wsjtx. I
> have included a chart showing the memory use growing from about 20MiB to
> over 300MiB in the course of 11 hours. I set wsjtx to monitor 40m overnight
> and recorded the memory stats produced by /proc/*/statm at one minute
> intervals. The change in slope of the curves indicates the band opening and
> more signals being decoded.
>
> The configuration here is Ubuntu 17.10 with an RTL-SDR. gqrx demodulates
> USB, filters and feeds the audio to wsjt-x 1.9.0-rc1 using pulseaudio.
>
> Doug VE7GNU
>
>
> ​
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to