RTEMS Tools | rtems-test: Leaks pipes when using a gdb based simulator (#15)
Joel Sherrill (@joel)
gitlab at rtems.org
Tue Oct 15 21:28:36 UTC 2024
Joel Sherrill created an issue: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/15
## Summary
When used with a gdb based simulator like psim, rtems-test uses multiple file descriptors -- one for gdb.cfg and multiple for pipes. On a server with 56 cores, I encountered the following failure:
`[572/675] p:491 f:5 u:6 e:22 I:0 B:3 t:0 L:0 i:0 W:0 | powerpc/psim: spsem_err02.exe
[564/675] p:491 f:5 u:6 e:22 I:0 B:3 t:0 L:0 i:0 W:0 | powerpc/psim: spregion_err01.exe
error: error opening config file: /home/joel/rtems-cron-6.1-rc4/tools/6/share/rtems/tester/rtems/version.cfg
`
The error opening the config file is because the process rtems-test has exceeded its allowed maximum of file descriptors. The following snippet is from watching lsof with the pid for rtems-test. We can see that gdb.cfg is open 52 times which seems reasonable give a 56 core machine.
I did the rtems-test run in one terminal and the lsof commands in another.
```
$ lsof -p 1232936 | grep gdb.cfg | wc -l
52
```
But the process has an increasing number of pipes open as the tests continue to execute.
```
[joel at gitlab ~]$ lsof -p 1232936 | grep pipe | wc -l
776
[joel at gitlab ~]$ lsof -p 1232936 | grep pipe | wc -l
819
[joel at gitlab ~]$ lsof -p 1232936 | grep pipe | wc -l
842
[joel at gitlab ~]$ lsof -p 1232936 | grep pipe | wc -l
943
[joel at gitlab ~]$ lsof -p 1232936 | grep pipe | wc -l
951
```
At ~55/675 tests, there are ~165 pipes in the lsof. At ~160/675 tests, there are ~300 pipes in the lsof. It continues to increase.
All go away when the rtems-test fails and exits.
The number of file descriptors open for rtems-test do **NOT** increase when using SIS.
## Steps to reproduce
You should be able to see the number of pipe file descriptors increase on any multi-core machine when using a gdb based simulator. But there must be some mechanism that is able to reclaim them that is able to run. It must not be happening in the higher core environment.
### Pre-set options
--
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/issues/15
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241015/d9df1513/attachment-0001.htm>
More information about the bugs
mailing list