[etherlab-users] ec_igb memory leak?
Michael Reeder
mr at datatroniq.com
Fri Mar 13 09:37:55 CET 2020
Hi,
I had the same issue with the 4.19 ec_igb driver.
When comparing the sources with 4.4 it turned out that a line is missing
in `devices/igb/igb_main-4.19-ethercat.c`
8475| /* retrieve a buffer from the ring */
8476| if(adapter->ecdev) {
8477| unsignedchar*va = page_address(rx_buffer->page) +
rx_buffer->page_offset;
8478| unsignedintsize = le16_to_cpu(rx_desc->wb.upper.length);
8479| ecdev_receive(adapter->ecdev, va, size);
8480| adapter->ec_watchdog_jiffies= jiffies;
*+++ **igb_reuse_rx_page**(rx_ring, rx_buffer); *// copied this line
from igb_main-4.4-ethercat.c -> fix memory leak
8481| }
Adding this line from 4.4 source fixed the leaking for me. (line is also
missing on 4.14)
Please note that I didn't really study the code besides comparing it to
4.4. I do not if this is save to do!
Hope this may help
Michael
--
--
B.Sc. Michael Reeder
DATATRONIQ GmbH
Office Stuttgart: Uhlbacher Strasse 75 • 70329 Stuttgart
Office Berlin: Kastanienallee 29-30 • 10435 Berlin
Email: mr at datatroniq.com
Tel: +49 30 95 999 88 27
Fax: +49 711 65823888
https://www.datatroniq.com
Angaben lt. §35a GmbHG: HRB 753304 B / Amtsgericht Stuttgart,
Geschäftsführer: Jürgen Walter & Stefan Weingärtner, Sitz: Stuttgart
On 12.03.20 23:27, Gavin Lambert wrote:
> The IGB driver is relatively new and probably hasn't been as well tested as the other drivers.
>
> Any chance you can try it with kernel 4.4? This is the only (4.x) version provided by upstream Etherlab, so it'd be good to work out whether the leak is present in that version as well or if I've somehow managed to introduce it during the course of trying to patch it for newer kernel versions.
>
>
> Gavin Lambert
> Senior Software Developer
>
>
>
>
> COMPAC SORTING EQUIPMENT LTD | 4 Henderson Pl | Onehunga | Auckland 1061 | New Zealand
> Switchboard: +49 2630 96520 | https://www.tomra.com
>
> The information contained in this communication and any attachment is confidential and may be legally privileged. It should only be read by the person(s) to whom it is addressed. If you have received this communication in error, please notify the sender and delete the communication.
> -----Original Message-----
> From: Gary Grobe
> Sent: Friday, 13 March 2020 09:57
> To: etherlab-users at etherlab.org
> Subject: [etherlab-users] ec_igb memory leak?
>
> Has anyone else noticed memory leaks when loading the ec_igb mod?
>
> I'm running a 4.19.106 LTS release with RT 44 and Etherlabs 1.5.2 with patch 20190904. I've tested every RT release as far back as 4.19.82 with the same results. I have had days of running the master without issue when used with ec_generic and ec_e1000e.
>
> In this case, it appears to be the ec_igb driver.
>
> I'll boot the kernel without any of the Etherlab modules and watch the used memory in top while performing no other tasks. It'll stay quite stable for as long as I run it. Then I'll add in the ec_master module and other than a slight bump, it'll stay quite stable for as long as I run it.
>
> Then I'll add the ec_igb module and that's when the used mem will continuously increase. Within 5 minutes I noticed an increase of 55320KiB.
>
> I find it strange I've not heard other reports about this happening, but would like to know if anyone else has thoughts on this.
>
> Thanks,
>
>
> --
> _The contents of this email message and any attachments are intended solely for the addressee(s). This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. _Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited. __ _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org
> https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.etherlab.org%2Fmailman%2Flistinfo%2Fetherlab-users&data=02%7C01%7Cgavin.lambert%40tomra.com%7C16903dc803c34ab50f4408d7c6c7df8e%7C4308d118edd143008a37cfeba8ad5898%7C0%7C0%7C637196434059087003&sdata=ko9CgkIEyUJfgEhoNeqYNUf9307tKwCkG8EJ%2BzTUoTI%3D&reserved=0
> _______________________________________________
> etherlab-users mailing list
> etherlab-users at etherlab.org
> http://lists.etherlab.org/mailman/listinfo/etherlab-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20200313/5b05d5aa/attachment-0004.htm>
More information about the Etherlab-users
mailing list