Yap crashes when consulting large databases with a certain content

View: New views
7 Messages — Rating Filter:   Alert me  

Yap crashes when consulting large databases with a certain content

by Simon Strobl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I would like to use large databases with Yap. Yet, Yap seems to have problems with databases of a certain format and size. I tried to consult a database of the following format:

ngram(3, 878603, 'Alle Rechte vorbehalten').
ngram(3, 700225, 'Süddeutsche Zeitung GmbH').
ngram(3, 688132, 'Eine Dienstleistung der').
ngram(3, 687959, 'DIZ München GmbH').
ngram(3, 687652, 'der DIZ München').
ngram(3, 687639, 'Dienstleistung der DIZ').
ngram(3, 687635, 'München Eine Dienstleistung').
ngram(3, 501763, 'in der Regel').
ngram(3, 456680, 'avoid browser bug').
ngram(3, 377626, 'in den letzten').

This works for 5000 ngram-clauses. With 6500 ngram-clauses, Yap-5-1.3 crashes, saying

 % consulting tmp.pl...
% ERROR WITHIN ERROR: tried to access illegal address 0x89747!!!!

Yap-6 crashes with this message:


% Restoring file /usr/local/lib/Yap/startup.yss
YAP version Yap-6.0.0
   ?- consult(tmp).
 % consulting tmp.pl...
     ERROR!!  (tmp.pl:4852).
%
%
% YAP OOOPS: tried to access illegal address 0x230!!!!.
%
%
2812KB of Code Space (0x2000000--0x22bf130)
%
% PC: $messages:print_message_line/3 at clause 4
%   Continuation: prolog:print_message_lines/3 at clause 4
%    1025KB of Global Stack (0x233c000--0x243c698)
%    1KB of Local Stack (0x24cb900--0x24cc000)
%    0KB of Trail (0x24cc008--0x24cc068)
%    Performed 0 garbage collections
% All Active Calls and
%         Goals With Alternatives Open  (Global In Use--Local In Use)
%
%  prolog:print_message_lines/3 at clause 4
%  prolog:print_message_lines/3 at clause 4
%  prolog:print_message/2 at clause 3
%  prolog:$LoopError/2 at clause 2
%  prolog:$loop/2 at clause 1
%  prolog:$do_lf/9 at clause 1
%  prolog:$lf/14 at clause 7
%  prolog:$load_files/3 at clause 1
%  prolog:$do_yes_no/2 at clause 2
%  prolog:$yes_no/2 at clause 1
%  prolog:$command/4 at clause 2
%  prolog:$enter_top_level/0 at clause 6
%         prolog:$catch/3 (1024KB--0KB)
%  prolog:$system_catch/4 at clause 1
%  meta-call

   Exiting ....

Is this due to bugs or do I have to use certain parameters for Yap to be able to load my file?

Simon

Re: Yap crashes when consulting large databases with a certain content

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Simon

The sizes you're giving look pretty small, can you please give me an
example file?

Thanks!

Vitor

On Fri, May 29, 2009 at 8:15 AM, Simon Strobl <Simon.Strobl@...> wrote:

>
> Hello,
>
> I would like to use large databases with Yap. Yet, Yap seems to have
> problems with databases of a certain format and size. I tried to consult a
> database of the following format:
>
> ngram(3, 878603, 'Alle Rechte vorbehalten').
> ngram(3, 700225, 'Süddeutsche Zeitung GmbH').
> ngram(3, 688132, 'Eine Dienstleistung der').
> ngram(3, 687959, 'DIZ München GmbH').
> ngram(3, 687652, 'der DIZ München').
> ngram(3, 687639, 'Dienstleistung der DIZ').
> ngram(3, 687635, 'München Eine Dienstleistung').
> ngram(3, 501763, 'in der Regel').
> ngram(3, 456680, 'avoid browser bug').
> ngram(3, 377626, 'in den letzten').
>
> This works for 5000 ngram-clauses. With 6500 ngram-clauses, Yap-5-1.3
> crashes, saying
>
>  % consulting tmp.pl...
> % ERROR WITHIN ERROR: tried to access illegal address 0x89747!!!!
>
> Yap-6 crashes with this message:
>
>
> % Restoring file /usr/local/lib/Yap/startup.yss
> YAP version Yap-6.0.0
>   ?- consult(tmp).
>  % consulting tmp.pl...
>     ERROR!!  (tmp.pl:4852).
> %
> %
> % YAP OOOPS: tried to access illegal address 0x230!!!!.
> %
> %
> 2812KB of Code Space (0x2000000--0x22bf130)
> %
> % PC: $messages:print_message_line/3 at clause 4
> %   Continuation: prolog:print_message_lines/3 at clause 4
> %    1025KB of Global Stack (0x233c000--0x243c698)
> %    1KB of Local Stack (0x24cb900--0x24cc000)
> %    0KB of Trail (0x24cc008--0x24cc068)
> %    Performed 0 garbage collections
> % All Active Calls and
> %         Goals With Alternatives Open  (Global In Use--Local In Use)
> %
> %  prolog:print_message_lines/3 at clause 4
> %  prolog:print_message_lines/3 at clause 4
> %  prolog:print_message/2 at clause 3
> %  prolog:$LoopError/2 at clause 2
> %  prolog:$loop/2 at clause 1
> %  prolog:$do_lf/9 at clause 1
> %  prolog:$lf/14 at clause 7
> %  prolog:$load_files/3 at clause 1
> %  prolog:$do_yes_no/2 at clause 2
> %  prolog:$yes_no/2 at clause 1
> %  prolog:$command/4 at clause 2
> %  prolog:$enter_top_level/0 at clause 6
> %         prolog:$catch/3 (1024KB--0KB)
> %  prolog:$system_catch/4 at clause 1
> %  meta-call
>
>   Exiting ....
>
> Is this due to bugs or do I have to use certain parameters for Yap to be
> able to load my file?
>
> Simon
>
> --
> View this message in context: http://www.nabble.com/Yap-crashes-when-consulting-large-databases-with-a-certain-content-tp23779813p23779813.html
> Sent from the Yap Prolog mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: Yap crashes when consulting large databases with a certain content

by Simon Strobl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Vitor,

thanks for fixing the bug. My program works now.

But there seems to be a problem with Unicode now.

write('äöü\n') yields

\344\366\374

(t doesn't seem to have to do with my system. Swi writes the atom correctly.

Simon.

Re: Yap crashes when consulting large databases with a certain content

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Simon

Yes, you were correct, I fixed it on the sources,

Cheers

Vitor

On Wed, Jun 3, 2009 at 3:01 AM, Simon Strobl <Simon.Strobl@...> wrote:

>
> Hello Vitor,
>
> thanks for fixing the bug. My program works now.
>
> But there seems to be a problem with Unicode now.
>
> write('äöü\n') yields
>
> \344\366\374
>
> (t doesn't seem to have to do with my system. Swi writes the atom correctly.
>
> Simon.
>
> --
> View this message in context: http://www.nabble.com/Yap-crashes-when-consulting-large-databases-with-a-certain-content-tp23779813p23847148.html
> Sent from the Yap Prolog mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: Yap crashes when consulting large databases with a certain content

by Simon Strobl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Yes, you were correct, I fixed it on the sources,

Thanks. Unfortunately, I don't seem to be able to compile the new version.

make crashes with

gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I./H -I./OPTYap -I./BEAM -I./packages/MYDDAS -I./include  ./library/yap2swi/yap2swi.c  -o yap2swi.o
./library/yap2swi/yap2swi.c:944: warning: no previous prototype for ‘OsError’
./library/yap2swi/yap2swi.c: In function ‘PL_eval_expression_to_int_64_ex’:
./library/yap2swi/yap2swi.c:2222: error: invalid storage class for function ‘SWI_ctime’
./library/yap2swi/yap2swi.c:2221: warning: no previous prototype for ‘SWI_ctime’
./library/yap2swi/yap2swi.c:2246: error: static declaration of ‘Yap_swi_install’ follows non-static declaration
./library/yap2swi/yap2swi.c:2243: error: previous declaration of ‘Yap_swi_install’ was here
./library/yap2swi/yap2swi.c:2249: error: expected declaration or statement at end of input
make: *** [yap2swi.o] Error 1

Cheers,

Simon


Re: Yap crashes when consulting large databases with a certain content

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It should be fixed now, it was a patch yesterday but the bug would
only be noticed by 64 bit implementations and people without GMP. I
was using a 32 bit machine.

Cheers

Vitor

On Thu, Jun 4, 2009 at 3:19 AM, Simon Strobl <Simon.Strobl@...> wrote:

>
>> Yes, you were correct, I fixed it on the sources,
>
> Thanks. Unfortunately, I don't seem to be able to compile the new version.
>
> make crashes with
>
> gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes
> -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1
> -DHAVE_CONFIG_H -I. -I./H -I./OPTYap -I./BEAM -I./packages/MYDDAS
> -I./include  ./library/yap2swi/yap2swi.c  -o yap2swi.o
> ./library/yap2swi/yap2swi.c:944: warning: no previous prototype for
> ‘OsError’
> ./library/yap2swi/yap2swi.c: In function ‘PL_eval_expression_to_int_64_ex’:
> ./library/yap2swi/yap2swi.c:2222: error: invalid storage class for function
> ‘SWI_ctime’
> ./library/yap2swi/yap2swi.c:2221: warning: no previous prototype for
> ‘SWI_ctime’
> ./library/yap2swi/yap2swi.c:2246: error: static declaration of
> ‘Yap_swi_install’ follows non-static declaration
> ./library/yap2swi/yap2swi.c:2243: error: previous declaration of
> ‘Yap_swi_install’ was here
> ./library/yap2swi/yap2swi.c:2249: error: expected declaration or statement
> at end of input
> make: *** [yap2swi.o] Error 1
>
> Cheers,
>
> Simon
>
>
> --
> View this message in context: http://www.nabble.com/Yap-crashes-when-consulting-large-databases-with-a-certain-content-tp23779813p23865699.html
> Sent from the Yap Prolog mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: Yap crashes when consulting large databases with a certain content

by Simon Strobl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Now everything works fine.

Thanks a lot.

Simon.