I tried again to launch sagenb server (7.6) again avoiding the ulimit 
restrictions, and it seems ulimit is not responsible for it. After some 
hours the server does not respond, syslog register tons of these messages:

Apr 19 12:41:47 sage-mtm saged.mtm[15141]: 2017-04-19T12:41:47+0200 
[twisted.protocols.tls.TLSMemoryBIOFactory] Could not accept new connection 
(EMFILE) 
Apr 19 12:41:47 sage-mtm saged.mtm[15141]: message repeated 12402 times: [ 
2017-04-19T12:41:47+0200 [twisted.protocols.tls.TLSMemoryBIOFactory] Could 
not accept new con

And after the failure in the command line one gets this:
sage: 1+1 
2 
--------------------------------------------------------------------------- 
TypeError                                 Traceback (most recent call last) 
<ipython-input-4-4cc2ceee564b> in <module>() 
----> 1 Integer(1)+Integer(1) 

/usr/local/sage-7.6/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc
 
in __call__(self, result) 
   244             self.start_displayhook() 
   245             self.write_output_prompt() 
--> 246             format_dict, md_dict = self.compute_format_data(result) 
   247             self.update_user_ns(result) 
   248             self.fill_exec_result(result) 

/usr/local/sage-7.6/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc
 
in compute_format_data(self, result) 
   148 
   149         """ 
--> 150         return self.shell.display_formatter.format(result) 
   151 
   152     # This can be set to True by the write_output_prompt method in a 
subclass 

/usr/local/sage-7.6/local/lib/python2.7/site-packages/sage/repl/display/formatter.pyc
 
in format(self, obj, include, exclude) 
   158         # First, use Sage rich output if there is any 
   159         PLAIN_TEXT = u'text/plain' 
--> 160         sage_format, sage_metadata = self.dm.displayhook(obj) 
   161         assert PLAIN_TEXT in sage_format, 'plain text is always 
present' 
   162         if sage_format.keys() != [PLAIN_TEXT]: 

TypeError: 'NoneType' object is not iterable

I checked that before the upgrade of IPython everything works OK. Thanks, 
Enrique.



El lunes, 27 de marzo de 2017, 15:51:29 (UTC+2), Enrique Artal escribió:
>
> As expected, no change in 7.6. I thought about creating a ticket but 
> besides the fact that the upgrade of ipython seems to be responsible I have 
> no idea how.
>
> El miércoles, 15 de febrero de 2017, 14:26:35 (UTC+1), Enrique Artal 
> escribió:
>>
>> The following may be related, I encountered it doing some administration 
>> in our notebooks (sagenb). The following happens in both Sage 7.4 and 7.5 
>> (it executes the orders but the warning may suggest some issue in the 
>> relationship of sagenb and ipython). No warning in 7.3
>>
>>
>> sage: import sys 
>> sage: 1+1 
>> 2 
>> sage: import sagenb.notebook.notebook 
>> sage: 1+1 
>> 2 
>> --------------------------------------------------------------------------- 
>>
>> TypeError                                 Traceback (most recent call 
>> last) 
>> <ipython-input-4-4cc2ceee564b> in <module>() 
>> ----> 1 Integer(1)+Integer(1) 
>>
>> /usr/local/sage-7.4/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc
>>  
>> in __call__(self, result) 
>>     244             self.start_displayhook() 
>>     245             self.write_output_prompt() 
>> --> 246             format_dict, md_dict = 
>> self.compute_format_data(result) 
>>     247             self.update_user_ns(result) 
>>     248             self.fill_exec_result(result) 
>>
>> /usr/local/sage-7.4/local/lib/python2.7/site-packages/IPython/core/displayhook.pyc
>>  
>> in compute_format_data(self, result) 
>>     148 
>>     149         """ 
>> --> 150         return self.shell.display_formatter.format(result) 
>>     151 
>>     152     # This can be set to True by the write_output_prompt method 
>> in a subclass 
>>
>> /usr/local/sage-7.4/local/lib/python2.7/site-packages/sage/repl/display/formatter.pyc
>>  
>> in format(self, obj, include, exclude) 
>>     158         # First, use Sage rich output if there is any 
>>     159         PLAIN_TEXT = u'text/plain' 
>> --> 160         sage_format, sage_metadata = self.dm.displayhook(obj) 
>>     161         assert PLAIN_TEXT in sage_format, 'plain text is always 
>> present' 
>>     162         if sage_format.keys() != [PLAIN_TEXT]: 
>>
>> TypeError: 'NoneType' object is not iterable 
>>
>> El miércoles, 8 de febrero de 2017, 8:28:27 (UTC+1), Enrique Artal 
>> escribió:
>>>
>>> I start a new thread in this list as a continuation of "How to limit 
>>> heavy computations" in sage-support. I try to summarize the problem. In my 
>>> University, we have two servers to run math labs; it is done in several 
>>> instances of sagenb using server_pool to enhance (at least a little bit) 
>>> security. The sagenb instances are launched with ulimit options but it 
>>> seems they have no effect.
>>> In the first term of this academic year, we had several issues affecting 
>>> the use of this server. Some students started long loops or heavy 
>>> computations that stop the server (basically their computations blocked one 
>>> instance and the error messages of the nginx processes grew so much that 
>>> filled the hard disk). After restarting the machines, the problems came 
>>> back again; at this point, when we detected such a process it was 
>>> immediately stopped, but for some reason its instance of sagenb became 
>>> unusable, causing problems to other students, since it needed restarting 
>>> (and someone to do it). It was possible (not easy, thanks to Jori 
>>> Mäntysalo) to identify the actual owner of the process, since stopping the 
>>> computation by himself caused less harm.
>>>
>>> Using ulimit in the OS, namely with the restrictions hard  "as   
>>> 6000000" and "hard   cpu   10", it worked. If a computation was too heavy, 
>>> the process stopped with some error message, but the instance was usable by 
>>> any other user of the sagenb instance (including the person with the long 
>>> computation). This was true for Sage 7.3, but no more in Sage 7.4 (and 7.5) 
>>> where the process was stopped by the instance became unusable in few 
>>> minutes.
>>>
>>> Dima Pasechnik proposed to git-bisect and with the help of Miguel Marco, 
>>> I think I found the patch causing this behavior. I started checking with 
>>> 7.4 beta and rc and I saw that beta0 had the issue. Looking at the history 
>>> of changes, it worked after 
>>> 2b3eb14 Trac #20621: Simpler code and better error messages in Sequence()
>>> and it didn't work after
>>> 9831d4b Trac #21006: Upgrade to IPython 5.0
>>>
>>> Is there any chance to look into this change in order to localize and 
>>> solve the problem?
>>>
>>> Regards, Enrique.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to