Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of file descriptors open while testing installed tools #166

Open
HugoJH opened this issue Dec 1, 2020 · 6 comments
Open

Lots of file descriptors open while testing installed tools #166

HugoJH opened this issue Dec 1, 2020 · 6 comments
Labels

Comments

@HugoJH
Copy link

HugoJH commented Dec 1, 2020

While doing shed-tools test over my galaxy instance, had a problems of reaching the limit of maximum number of open files.
For the sake of keep running the test, I modified the limit editing /etc/security/limits. Relaunched the shed-tools test command and waited enough time to check the number of open files at that point.

I did lsof | grep shed-tool | grep -v deleted| wc and found out that there where more than 3000 opened files by the shed-tools process. Seems like the files opened for each test are not gettting closed once the test finishes. There should be a mechanism to close all unnecesary file descriptors once the test finishes.

@rhpvorderman
Copy link
Contributor

Hi @HugoJH, I checked out the code and I cannot find the open statement that causes this.
Can you give us some more information?

  • How many tests did you run in parallel?
  • Can you give some of the lsof output? What sort of files does shed-tools open?

@afgane
Copy link
Contributor

afgane commented Dec 1, 2020

@almahmoud, you've experienced this behavior as well, right?

@almahmoud
Copy link
Member

Yes! The problem seems to be in tool-util I think, cause it came up when running the tool tests directly not just with ephemeris. A temporary workaround was setting ulimit -n 20000 (or some other really high number depending on how many tests are run total)

@mvdbeek
Copy link
Member

mvdbeek commented Dec 4, 2020

Are these files or sockets that are open ? Can you also check what version of galaxy-tool-util you've got in your environment ? ( pip freeze| grep galaxy-tool-util)

@almahmoud
Copy link
Member

almahmoud commented Dec 4, 2020

The last time I tried it was installed from source from https://github.com/galaxyproject/galaxy/pull/10767/files. And as far as I can tell, it's at least files, not sure if sockets as well:

Small snippet of lsof 2>/dev/null | grep ubuntu | sort (from an older run with ephemeris)

shed-tool 11126 11143           ubuntu 1367u      REG                8,1       47      34440 /tmp/tmpzvhs83bdmultiCovBed_result1.bed (deleted)
shed-tool 11126 11143           ubuntu 1368u      REG                8,1      259      34448 /tmp/tmp750h1vdqnucBed_result2.bed (deleted)
shed-tool 11126 11143           ubuntu 1369u      REG                8,1       47      34442 /tmp/tmpsglw1g2xmultiCovBed_result1.bed
shed-tool 11126 11143           ubuntu 1370u      REG                8,1      161      34446 /tmp/tmpfotfnew7nucBed_result1.bed
shed-tool 11126 11143           ubuntu 1371u      REG                8,1      259      34450 /tmp/tmpip5lan0gnucBed_result2.bed
shed-tool 11126 11143           ubuntu 1372u      REG                8,1      280      34452 /tmp/tmp7b58k0nhnucBed_result3.bed (deleted)
shed-tool 11126 11143           ubuntu 1373u      REG                8,1      280      34454 /tmp/tmpn5kbmbx6nucBed_result3.bed
shed-tool 11126 11143           ubuntu 1374u      REG                8,1       26      34460 /tmp/tmp7quq5qiisubtractBed_result2.bed (deleted)
shed-tool 11126 11143           ubuntu 1375u      REG                8,1       13      34464 /tmp/tmpy_xh9zrksubtractBed_result3.bed (deleted)
shed-tool 11126 11143           ubuntu 1376u      REG                8,1       26      34462 /tmp/tmph4t2pdorsubtractBed_result2.bed
shed-tool 11126 11143           ubuntu 1377u      REG                8,1      412      34468 /tmp/tmp9c8u2cipbamToBed_result1.bed (deleted)
shed-tool 11126 11143           ubuntu 1378u      REG                8,1       26      34458 /tmp/tmpxj_5dtzusubtractBed_result1.bed
shed-tool 11126 11143           ubuntu 1379u      REG                8,1      412      34470 /tmp/tmpu4s4z_grbamToBed_result1.bed

@mvdbeek
Copy link
Member

mvdbeek commented Dec 4, 2020

Alright, I've traced this too, and galaxyproject/galaxy#10852 prevents accumulating those in a small test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants