I wrote a little program that happens to use Tempfile. Whenever it got
to that point, it would crash with a "too many open files" error.
Investigation (via "puts" statements) revealed that Tempfile.new is
(indirectly) invoking Tempfile.new.
Specifically, at the line:
super(@tmpfile)
"puts" statements immediately before and after that, plus one at the
very top of Tempfile.new, show that it reaches that line, and then goes
back to the top of Tempfile.new, without ever getting past that line,
over and over, until the system eventually gets to "too many open
files".
I reduced my program to a very basic one, just doing Tempfile.new and
nothing else, and didn't get this problem. So it must be some
interaction with something else in my program. Unfortunately, I don't
currently have time to investigate further, and cannot post my code as
is. But I figured I should let somebody know that there is definitely
some sort of infinite loop, under some condition, associated with that
line.
Incidentally, this was originally in 1.8.4; I upgraded to 1.8.6, and had
the same problem.
--
Posted via http://www.ruby-forum.com/.
|
|
0
|
|
|
|
Reply
|
d809fvy5rtsqx4z (1)
|
5/1/2007 6:09:43 PM |
|
Hi,
In message "Re: infinite loop in Tempfile.new"
on Wed, 2 May 2007 03:09:43 +0900, Boop Boop <d809fvy5rtsqx4z@temporaryinbox.com> writes:
|Investigation (via "puts" statements) revealed that Tempfile.new is
|(indirectly) invoking Tempfile.new.
|
|Specifically, at the line:
|
| super(@tmpfile)
|
|"puts" statements immediately before and after that, plus one at the
|very top of Tempfile.new, show that it reaches that line, and then goes
|back to the top of Tempfile.new, without ever getting past that line,
|over and over, until the system eventually gets to "too many open
|files".
|
|I reduced my program to a very basic one, just doing Tempfile.new and
|nothing else, and didn't get this problem. So it must be some
|interaction with something else in my program. Unfortunately, I don't
|currently have time to investigate further, and cannot post my code as
|is. But I figured I should let somebody know that there is definitely
|some sort of infinite loop, under some condition, associated with that
|line.
Thank you for the report, but it's difficult to fix the problem
without error reproducing code. Does anyone meet similar problem with
Tempfile?
matz.
|
|
0
|
|
|
|
Reply
|
matz (1855)
|
5/1/2007 11:31:07 PM
|
|
|
1 Replies
43 Views
(page loaded in 0.101 seconds)
Similiar Articles: Infinite Loop in Code -- Logic Error - comp.lang.rubyWhen you dup an array, you get a new array, but the same objects inside it. ... execution - comp.soft-sys.matlab In the third call of a function there is infinite loop ... Using fileveent with a Tk GUI : "out of stack space (infinite loop ...Which is a good reason to start calling them by their new name [chan event]s. ... Issue 3835: tkinter goes into an infinite loop (pydoc.gui ..... goes into an infinite ... Stop running program without exiting current GUI - comp.soft-sys ...Sometimes I need stop the program and re-run a new one during the old program ... num1+num2 count=count+1 end when I click 'Run' button, it go infinite loop ... Windows error message: Not enough storage is available - comp.soft ...I have a brand new PC with 4GB of physical memory and an HDD with 57GB free on it. ... I tried Edit - Copy Figure and Matlab has entered an infinite loop, displaying the ... duplicating record with children - comp.databases.filemaker ...First, I duplicate the parent record, and store the ID of the new record in a ... means you'd be duplicating already duplicated records and you'd end in an infinite loop. Questions about HP-UX 11i process and thread priorities - comp.sys ...Thread #0 is in an infinite usleep() loop. A using pstat_getlwps() snapshot gives the ... Application hangs - comp.sys.hp.hpux... on a socket and forks off a new ... writing robust software? - comp.lang.c++.moderatedC++Ox provides the new range-based for statement as in: std::vector<T> v ... > - infinite loop/recursion This one's hard to detect and avoid, because the requirements ... VHDL Design for running sorter - comp.arch.fpgaThe new array that I get is to be sorted again and he 24th > position number is ... There are also threads (fibers) running in infinite loops ... simple loop that pops events ... What is wrong with pthread_kill on Redhat Linux ??? - comp.unix ...... include <errno.h> void* do_loop(void* data) { long int i; int j; int me = *((int*)data); while (1) // infinite loop ... It's a weakness in the new NPTL ... NASM - Official Recursive Macro Support! - comp.lang.asm.x86 ...New NASM Directives: * %rmacro: Recursive Macro, can be called arbitrarily deep (really high limit [2^20] set to catch infinite loops.) * %irmacro: Same as above, except ... InfiniteLooper - Loop YouTube VideosInfiniteLooper - The easiest way to loop full or partial YouTube videos. Infinite loop - Wikipedia, the free encyclopediaAn infinite loop (also known as an endless loop or unproductive loop) is a sequence of ... since there was no need for the hardware to continue operating, until a new ... 7/25/2012 10:51:20 AM
|