Re: [NTG-context] [luatex] Itemize without page break

2012-03-21 Thread Kip Warner
On Tue, 2012-03-20 at 22:41 +0100, luigi scarso wrote:
> > As I said earlier, I get a segmentation fault if I leave it to run, but
> > I always have to kill it before it takes down the entire operating
> > system with it (apparently this is normal). I don't get the TeX capacity
> > exceeded error message, as you saw from my earlier console output.
> Ok, this is not normal and I suspect that it's linux 64bit issue --
> can be bug of luatex then.
> Can anyone confirm that on  linux 64bit the following
> \starttext
> 
> \startitemize[before=\startlinecorrection,after=\stoplinecorrection][]
> \item foo
> \stopitemize
> \stoptext
> gives a segmentation fault ?

What's probably happening is eventually the system runs out of memory,
the swap gets depleted as well, and as a last act of desperation, the
kernel finally denies an allocation request to luatex which is pretty
rare. The latter probably then dereferences the null pointer and then it
blows.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread luigi scarso
On Tue, Mar 20, 2012 at 10:24 PM, Kip Warner  wrote:
> On Tue, 2012-03-20 at 21:39 +0100, luigi scarso wrote:
>> When  TeX says
>> ! TeX capacity exceeded, sorry [token memory size=<...>]
>> it is its graceful way to exit from  an irreversible situation.
>> It can be caused by luatex or ConTeXt mkiv
>> but it's *not* a segmentation fault, as you said early:
>> >Actually highly probably, since the seg fault is raised in luatex and
>> >not context. Even if context is feeding it malformed input, luatex
>> >should not ever crash.
>> Only luatex can do a segmentation fault -- of course due a tex macro
>> /lua function possibly called  from ConTeXt.
>> What happen for me (linux ubuntu 10lts 32bit)  and Hans (windows (7
>> professional 64bit ?) )  is a "TeX capacity exceeded," , not a seg.
>> fault, and sometime happen if one calls a macro in a wrong way.
>> So, do you have a segmentation fault or a TeX capacity exceeded on you
>> linux 64bit box ?
>
> As I said earlier, I get a segmentation fault if I leave it to run, but
> I always have to kill it before it takes down the entire operating
> system with it (apparently this is normal). I don't get the TeX capacity
> exceeded error message, as you saw from my earlier console output.
Ok, this is not normal and I suspect that it's linux 64bit issue --
can be bug of luatex then.
Can anyone confirm that on  linux 64bit the following
\starttext

\startitemize[before=\startlinecorrection,after=\stoplinecorrection][]
\item foo
\stopitemize
\stoptext
gives a segmentation fault ?
-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Kip Warner
On Tue, 2012-03-20 at 21:44 +0100, Hans Hagen wrote:
> sure, but mu experience is that browsers of email clients are way more 
> demanding than tex when it comes to memory usage

I've never had either take down the entire operating system. There is a
different from intended memory usage and unintended anyways. In this
case, we are talking about the latter.

> for tex it depends how much memory is permitted (there are some maxima 
> that can be set in configuration files) ... i must say that I never run 
> out of memory, although with doing extreme torture tests with many fonts 
> one can come pretty close

Well, you saw what happened with my sample minimal.

Anyways, if this is normal behaviour, that's fine, I just wanted to
bring it to the list's attention. That's all.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Kip Warner
On Tue, 2012-03-20 at 21:39 +0100, luigi scarso wrote:
> When  TeX says
> ! TeX capacity exceeded, sorry [token memory size=<...>]
> it is its graceful way to exit from  an irreversible situation.
> It can be caused by luatex or ConTeXt mkiv
> but it's *not* a segmentation fault, as you said early:
> >Actually highly probably, since the seg fault is raised in luatex and
> >not context. Even if context is feeding it malformed input, luatex
> >should not ever crash.
> Only luatex can do a segmentation fault -- of course due a tex macro
> /lua function possibly called  from ConTeXt.
> What happen for me (linux ubuntu 10lts 32bit)  and Hans (windows (7
> professional 64bit ?) )  is a "TeX capacity exceeded," , not a seg.
> fault, and sometime happen if one calls a macro in a wrong way.
> So, do you have a segmentation fault or a TeX capacity exceeded on you
> linux 64bit box ?

As I said earlier, I get a segmentation fault if I leave it to run, but
I always have to kill it before it takes down the entire operating
system with it (apparently this is normal). I don't get the TeX capacity
exceeded error message, as you saw from my earlier console output.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Hans Hagen

On 20-3-2012 20:59, Kip Warner wrote:

On Tue, 2012-03-20 at 20:26 +0100, Hans Hagen wrote:

well you can try what happens if you run stock lua:

local t = { }
while true do
  t[#t+1] = "just a bogus string: " .. (#t+1)
end

at some point your system will run out of (virtual) memory or lua will
run out of whatever its limits are


Of course. And the same could be done in C, C++, or really any language
that supports dynamic memory allocation. We just hope that programs that
are built from them won't do that.


sure, but mu experience is that browsers of email clients are way more 
demanding than tex when it comes to memory usage


for tex it depends how much memory is permitted (there are some maxima 
that can be set in configuration files) ... i must say that I never run 
out of memory, although with doing extreme torture tests with many fonts 
one can come pretty close


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread luigi scarso
On Tue, Mar 20, 2012 at 8:59 PM, Kip Warner  wrote:
> On Tue, 2012-03-20 at 20:26 +0100, Hans Hagen wrote:
>> well you can try what happens if you run stock lua:
>>
>> local t = { }
>> while true do
>>      t[#t+1] = "just a bogus string: " .. (#t+1)
>> end
>>
>> at some point your system will run out of (virtual) memory or lua will
>> run out of whatever its limits are
>
> Of course. And the same could be done in C, C++, or really any language
> that supports dynamic memory allocation. We just hope that programs that
> are built from them won't do that.
When  TeX says
! TeX capacity exceeded, sorry [token memory size=<...>]
it is its graceful way to exit from  an irreversible situation.
It can be caused by luatex or ConTeXt mkiv
but it's *not* a segmentation fault, as you said early:
>Actually highly probably, since the seg fault is raised in luatex and
>not context. Even if context is feeding it malformed input, luatex
>should not ever crash.
Only luatex can do a segmentation fault -- of course due a tex macro
/lua function possibly called  from ConTeXt.
What happen for me (linux ubuntu 10lts 32bit)  and Hans (windows (7
professional 64bit ?) )  is a "TeX capacity exceeded," , not a seg.
fault, and sometime happen if one calls a macro in a wrong way.
So, do you have a segmentation fault or a TeX capacity exceeded on you
linux 64bit box ?

-- 
luigi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Kip Warner
On Tue, 2012-03-20 at 20:26 +0100, Hans Hagen wrote:
> well you can try what happens if you run stock lua:
> 
> local t = { }
> while true do
>  t[#t+1] = "just a bogus string: " .. (#t+1)
> end
> 
> at some point your system will run out of (virtual) memory or lua will 
> run out of whatever its limits are

Of course. And the same could be done in C, C++, or really any language
that supports dynamic memory allocation. We just hope that programs that
are built from them won't do that.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Hans Hagen

On 20-3-2012 19:59, Kip Warner wrote:

On Tue, 2012-03-20 at 16:57 +0200, Khaled Hosny wrote:

Older TeX engines had hard memory limit, so in case of such
"syntactical" errors the engine would consume all its allocated memory
and die (with a misleading error message), LuaTeX dynamically allocates
memory (for good reasons) so it won't stop before consuming all your
available memory, its the responsibility of an operating system to
prevent such a faulty application from taking the whole system down.


I'd be very interested in seeing the operating system memory manager's
algorithm that could do such a remarkable thing.


well you can try what happens if you run stock lua:

local t = { }
while true do
t[#t+1] = "just a bogus string: " .. (#t+1)
end

at some point your system will run out of (virtual) memory or lua will 
run out of whatever its limits are


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Kip Warner
On Tue, 2012-03-20 at 16:57 +0200, Khaled Hosny wrote:
> Older TeX engines had hard memory limit, so in case of such
> "syntactical" errors the engine would consume all its allocated memory
> and die (with a misleading error message), LuaTeX dynamically allocates
> memory (for good reasons) so it won't stop before consuming all your
> available memory, its the responsibility of an operating system to
> prevent such a faulty application from taking the whole system down.

I'd be very interested in seeing the operating system memory manager's
algorithm that could do such a remarkable thing.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Khaled Hosny
On Tue, Mar 20, 2012 at 08:21:35AM +0100, Patrick Gundlach wrote:
> 
> Am 20.03.2012 um 06:49 schrieb Kip Warner:
> 
> > On Tue, 2012-03-20 at 06:46 +0100, Wolfgang Schuster wrote:
> >> TeX has it’s problem with certain errors, accept it.
> > 
> > It is not a problem with the program raising an error, it was how it
> > went about doing it. It should not have to take down the entire
> > operating system to indicate to the user that there was a non-intuitive
> > syntactical error in typesetting.
> 
> 
> I also agree that a segfault is not an acceptable behavior of a
> program, regardless of the input (unless you are doing low level
> stuff). But it is not clear if this is a problem on the ConTeXt side
> or the LuaTeX side.

It did not segfault, it just consumed all available memory :) A sane
operating system wouldn't allow any program to do this (mine is not
sane, I know, but luatex is hardly the only program that does this to
me).

Regards,
 Khaled
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Khaled Hosny
On Mon, Mar 19, 2012 at 10:49:48PM -0700, Kip Warner wrote:
> On Tue, 2012-03-20 at 06:46 +0100, Wolfgang Schuster wrote:
> > TeX has it’s problem with certain errors, accept it.
> 
> It is not a problem with the program raising an error, it was how it
> went about doing it. It should not have to take down the entire
> operating system to indicate to the user that there was a non-intuitive
> syntactical error in typesetting.

Older TeX engines had hard memory limit, so in case of such
"syntactical" errors the engine would consume all its allocated memory
and die (with a misleading error message), LuaTeX dynamically allocates
memory (for good reasons) so it won't stop before consuming all your
available memory, its the responsibility of an operating system to
prevent such a faulty application from taking the whole system down.

Regards,
 Khaled
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] [luatex] Itemize without page break

2012-03-20 Thread Patrick Gundlach

Am 20.03.2012 um 06:49 schrieb Kip Warner:

> On Tue, 2012-03-20 at 06:46 +0100, Wolfgang Schuster wrote:
>> TeX has it’s problem with certain errors, accept it.
> 
> It is not a problem with the program raising an error, it was how it
> went about doing it. It should not have to take down the entire
> operating system to indicate to the user that there was a non-intuitive
> syntactical error in typesetting.


I also agree that a segfault is not an acceptable behavior of a program, 
regardless of the input (unless you are doing low level stuff). But it is not 
clear if this is a problem on the ConTeXt side or the LuaTeX side.

Patrick

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___