Skip Menu |

This queue is for tickets about the Log-Report CPAN distribution.

Report information
The Basics
Id: 41943
Status: resolved
Priority: 0/
Queue: Log-Report

People
Owner: Nobody in particular
Requestors: stro [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.20
Fixed in: (no value)



Subject: Recursion in test suite
Hello Mark. When running "make test" for Log-Report 0.20 under MSWin32, it starts to consume all available memory and resources when reaching t/50file.t Last warnings before resource consuming are: t/50file.........1/38 Deep recursion on subroutine "Log::Report::report" at lib/Log/Report.pm line 272. Deep recursion on subroutine "Log::Report::Dispatcher::File::log" at lib/Log/Report.pm line 145. Deep recursion on subroutine "Log::Report::Dispatcher::translate" at lib/Log/Report/Dispatcher/File.pm line 66. Deep recursion on subroutine "Log::Report::Message::toString" at lib/Log/Report/Dispatcher.pm line 166. Deep recursion on subroutine "Log::Report::Translator::POT::translate" at lib/Log/Report/Message.pm line 69. Deep recursion on subroutine "Log::Report::Translator::POT::load" at lib/Log/Report/Translator/POT.pm line 36. Deep recursion on subroutine "Log::Report::Lexicon::Index::find" at lib/Log/Report/Translator/POT.pm line 52. Deep recursion on subroutine "Log::Report::warning" at lib/Log/Report/Lexicon/Index.pm line 92. Then it goes for all the memory and CPU. I didn't have patience to see what happens when it runs over all the virtual memory though, but anyway it doesn't seem to be correct working. Killing a process leads to repeating the same symptoms for the following test cases up to t/pod.t. Let me know, if I can provide more specific details about the problem. -- Serguei Trouchelle
Subject: Re: [rt.cpan.org #41943] Recursion in test suite
Date: Thu, 25 Dec 2008 21:16:41 +0100
To: Serguei Trouchelle via RT <bug-Log-Report [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Serguei Trouchelle via RT (bug-Log-Report@rt.cpan.org) [081225 02:04]: Show quoted text
> Wed Dec 24 21:04:53 2008: Request 41943 was acted upon. > Transaction: Ticket created by STRO > Queue: Log-Report > Subject: Recursion in test suite > > When running "make test" for Log-Report 0.20 under MSWin32, it starts to > consume all available memory and resources when reaching t/50file.t
This usually happens when there is an error within the error routines themselves, which happened before with Windows (because various versions of Windows have different language implementation problems) The error Show quoted text
> Deep recursion on subroutine "Log::Report::warning" at > lib/Log/Report/Lexicon/Index.pm line 92.
warning "illegal locale $locale, when looking for $domain"; is the one causing the problem. I do not know what your $locale is (and for Windows there are various ways how it is determined. I never use Windows, so have no way to reproduce your problem. But you may be able to discover the flaw... I hope you can contribute a fix to Log::Report. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
On Czw. 25 Gru. 2008, 15:19:00, Mark@Overmeer.net wrote: Show quoted text
> > Deep recursion on subroutine "Log::Report::warning" at > > lib/Log/Report/Lexicon/Index.pm line 92.
> > warning "illegal locale $locale, when looking for $domain"; > > is the one causing the problem. I do not know what your $locale is > (and for Windows there are various ways how it is determined.
I don't know what exactly is a reason that $locale is undefined but if you remove this line 92 from lib/Log/Report/Lexicon/Index.pm the module compiles very well.
Subject: Re: [rt.cpan.org #41943] Recursion in test suite
Date: Mon, 19 Jan 2009 21:34:17 +0100
To: Piotr Roszatycki via RT <bug-Log-Report [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Piotr Roszatycki via RT (bug-Log-Report@rt.cpan.org) [090119 20:27]: Show quoted text
> Queue: Log-Report > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=41943 > > > On Czw. 25 Gru. 2008, 15:19:00, Mark@Overmeer.net wrote:
> > > Deep recursion on subroutine "Log::Report::warning" at > > > lib/Log/Report/Lexicon/Index.pm line 92.
> > > > warning "illegal locale $locale, when looking for $domain"; > > > > is the one causing the problem. I do not know what your $locale is > > (and for Windows there are various ways how it is determined.
> > I don't know what exactly is a reason that $locale is undefined but if > you remove this line 92 from lib/Log/Report/Lexicon/Index.pm the module > compiles very well.
Is $locale really undefined or is it set with something else? -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
The recursion is resolved in v021 which I just release, but the problem may still be there: an error because you have weird locale. I hope you can help me resolve that, investigating why your system differs from other people's.
I've added "warn" before "warning" and it said: illegal locale <undef>, when looking for log-report at lib/Log/Report/Lexicon/Index.pm line 92. I've added some other variable dumps and found that codepage_to_iso gets "Ukrainian_Ukraine.1251" as parameter, resulting in undefined value. -- Serguei Trouchelle
Digging further, I've found that it is POSIX::setlocale that returns Ukrainian_Ukraine.1251. When removed "shift" from codepage_to_iso(shift || ms_codepage_id() || ms_locale()) in Log::Report::Win32Locale::iso2locale, I've got correct 1058 and uk_UA (both ms_codepage_id and ms_locale return 1058) and no warning. -- Serguei Trouchelle
Subject: Re: [rt.cpan.org #41943] Recursion in test suite
Date: Sat, 24 Jan 2009 22:26:47 +0100
To: Serguei Trouchelle via RT <bug-Log-Report [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Serguei Trouchelle via RT (bug-Log-Report@rt.cpan.org) [090121 15:55]: Show quoted text
> Queue: Log-Report > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=41943 > > > Digging further, I've found that it is POSIX::setlocale that returns > Ukrainian_Ukraine.1251. > > When removed "shift" from codepage_to_iso(shift || ms_codepage_id() || > ms_locale()) in Log::Report::Win32Locale::iso2locale, I've got correct > 1058 and uk_UA (both ms_codepage_id and ms_locale return 1058) and no > warning.
If I do not look at the locale, then it is not possible to have different languages for different dispatchers (with Log::Report, you can sent the error message in English to syslog and in Chinese to the screen) The switch is made with the locale. I have added understanding for long locale names. Probably, I only found a table with a subset of all names. But yours was in there. Could you test the attached version? I am unable to do any testing, because I cannot install Win32 modules on a non-Windows machine. -- Regards, MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
got resolved in 0.21