I suggest you try to reproduce the problem reliably with the shortest program you can.
Run this program with both Perl 5.30.0 and Perl 5.32.0 while (in another terminal session) monitor the open files of the offending process.
When you compare the open files output of running the same program with Perl 5.30.0 vs Perl 5.32.0, hopefully something will jump out at you, probably something unexpected (after all, "Too many open files" is a rare error in my experience, usually indicating something is horribly wrong with the system or I made a boo-boo).
As for how to monitor which/how many files are open by a specific ubuntu linux process, you can google,
as I did just now, finding this stack overflow question.
Monitoring the details of open files on Linux can be tricky and requires root permissions for best results.
The following Linux tools may be useful (examples can be found in the above stack overflow question):
- lsof : fantastic tool for monitoring open files of running processes. Found some examples of using lsof at this blog and CatOnMat by Peteris Krumins (see also lsfd).
- The /proc file system in conjunction with the ps command, e.g. ls /proc/$pid/fd/. Examples can be found in earlier stack overflow link.
- The ulimit command.
- Update: System call tracing (e.g. strace). Run the perl process with system call tracing on (for an example, see linux security cookbook). Needs root permissions (update: not always, see Fletch response below). For best results run the perl process directly via the strace command (strace can also be used to attach to a running process). Comparing the strace output (via diff say) between Perl 5.30.0 and Perl 5.32.0 should give you a clue as to what is going on.
HTH. I'm a bit rusty on all this stuff and don't have a test ubuntu system handy.
Updated: Noted that root permissions are often not required with strace (thanks Fletch). Minor clarifications and improvements to wording.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.