bugGNU TeXmacs - Bugs: bug #34253, Too many open files error

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #34253: Too many open files error

Submitted by:  Joris van der Hoeven <vdhoeven>
Submitted on:  Thu 08 Sep 2011 06:36:39 PM UTC  
 
Category: MacOS portPriority: 9 - Immediate
Item Group: ErrorStatus: Works For Me
Privacy: PublicAssigned to: Joris van der Hoeven <vdhoeven>
Originator Name: Open/Closed: Closed
Release: Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

(Jump to the original submission Jump to the original submission)

Fri 29 Nov 2013 10:53:58 PM UTC, comment #12:

It seems that 4096 is sufficient for the moment, so I will close this bug. Please reopen if it reappears.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Mon 03 Dec 2012 11:43:36 AM UTC, comment #11:

A hacky fix has been included in r5909.
It simply increases the limit of open files from 256 to 4096.
Please test and report any abnormal behaviour to us.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Sat 10 Mar 2012 10:01:18 AM UTC, comment #10:

In any case this bug is not peculiar to the Qt port so I change the class.

Massimiliano Gubinelli <mgubi>
Project Administrator
Sat 10 Mar 2012 10:00:09 AM UTC, comment #9:

So I would see it as a particular instance of a more general problem: how to guarantee that files are always saved. We can try hard to achieve this which would get around this particular problem and also make TeXmacs more robust.

We can hold a pool of file handles at boot and when we cannot open a new file (to save our work) we inform the user that something is weird and suggest him to terminate the program and in the meanwhile we get one of the handles in our pool to perform the backup copy or terminate the requested operation.

What do you think?

Massimiliano Gubinelli <mgubi>
Project Administrator
Sat 10 Mar 2012 08:53:11 AM UTC, comment #8:

I did not encounter the bug for a while, but I also did not
wrote many laptop presentations recently (it was on my laptop
that the problem occurred, maybe because of the SSD hard drive).
I would not assume that this problem has simply evaporated.
It was a very serious bug, which made me lose several hours
of work (the last time this happened with TeXmacs was more
than ten years ago).

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Sat 10 Mar 2012 12:55:03 AM UTC, comment #7:

Joris, what is the status of this bug. You still can trigger the anomalous number of open files. As far as I remember one possible cause was a buggy release of freetype.

Massimiliano Gubinelli <mgubi>
Project Administrator
Fri 16 Sep 2011 09:31:35 AM UTC, comment #6:

Test

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Fri 16 Sep 2011 09:17:40 AM UTC, comment #5:

Could it be that every open file is counted twice (one time for read and one time for write)?

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Fri 16 Sep 2011 09:14:01 AM UTC, comment #4:

I still don't understand. With a lot of pain (it is hard to provoke the error on purpose), I managed to get into the situation where files don't save anymore and did 'lsof' on my process.
It turned out that there are only 124 open files, whereas the limit (as given by launchctl) should be 256. What is going wrong?

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Fri 09 Sep 2011 03:40:09 PM UTC, comment #3:

apparently the limit is a software one. look at the manpages for the following commands

getrlimit

launchctl limit

on my system the soft file limit is 256. at that level the system send a signal to the process. so maybe it is enough to ignore the signal. or maybe you want a more gentle approach.

Massimiliano Gubinelli <mgubi>
Project Administrator
Fri 09 Sep 2011 03:33:57 PM UTC, comment #2:

Thanks for the info. It seems that the FreeType 2 library somehow keeps all font files open as long as a font is "active". So I probably will have to somehow limit the number of open font files. Do you have an idea on how many files may be opened at the same time?

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.
Fri 09 Sep 2011 01:38:58 PM UTC, comment #1:

You may want to check which files remain opened. On MacOSX you can see this via 'Activity Monitor.app' or via the unix command lsof. Please attach any related report so that I can track down the probable cause.

Massimiliano Gubinelli <mgubi>
Project Administrator
Thu 08 Sep 2011 06:36:39 PM UTC, original submission:

I am not sure whether this very annoying bug is related to the Qt port. When working for some hours with TeXmacs, it often happens that it suddenly becomes impossible to save documents because there are too many open files. I suspect that, somewhere in the code, we open files without closing them appropriately. I did not have this problem in older versions of TeXmacs, so the problem may either be due to the Qt port or some changes by David Michel.

Joris van der Hoeven <vdhoeven>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mgubi (Posted a comment)
  • -unavailable- added by vdhoeven (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 29 Nov 2013 10:53:58 PM UTCvdhoevenCategoryFile Manager=>MacOS port
      StatusReady For Test=>Works For Me
      Open/ClosedOpen=>Closed
    Mon 03 Dec 2012 11:43:36 AM UTCvdhoevenStatusConfirmed=>Ready For Test
      Assigned tomgubi=>vdhoeven
    Sat 10 Mar 2012 10:01:18 AM UTCmgubiCategoryQt port=>File Manager
    Thu 08 Sep 2011 06:36:50 PM UTCvdhoevenPriority5 - Normal=>9 - Immediate

    Back to the top


    Powered by Savane 3.1-cleanup1