darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.51k stars 349 forks source link

Max. recursion depth with nested structures exceeded (take 2) #694

Closed MichaelDBA closed 2 years ago

MichaelDBA commented 2 years ago

I have the same problem as a closed one (#683) that was not resolved because he did not have the log file anymore. So I am restarting it here with my log file that generates the same error. I would like to try to solve it without providing the log file, but if we can't I might be able to do it after excessive editing, yuk.

distro: Red Hat Enterprise Linux release 8.4 (Ootpa) pgbadger version: 11.6 perl version: 5.26.3

I have a specific log file that generates the errors, size=13,686,519, about 13MB.
pgbadger badone -j 2 -p '%t:%r:%u@%d:[%p]:' -o ./pg.html Max. recursion depth with nested structures exceeded at /usr/lib64/perl5/vendor_perl/Storable.pm line 328, at /usr/bin/pgbadger line 15214.

can not load incompatible binary data, binary file is from version < 4.0. LOG: Ok, generating html report...

If I split it into 2 files, I do not get the error. split -l 100000 badone -->xaa -->xab pgbadger x* -j 2 -p '%t:%r:%u@%d:[%p]:' -o ./pg.html [========================>] Parsed 13686519 bytes of 13686519 (100.00%), queries: 18642, events: 0 LOG: Ok, generating html report...

I saw in the closed issue (#683), that you asked him to run this command: perl -E 'use Storable qw(dclone); say "version=",$Storable::VERSION; say "limit=",$Storable::recursion_limit; my @tt; for (1..1_000_000) { my $t = [[[]]]; push @tt, $t } dclone @tt' version=3.11 limit=14277 Not a reference at -e line 1.

Please help.

darold commented 2 years ago

How about the following command?

pgbadger badone -j 2 -p '%t:%r:%u@%d:[%p]:' -o ./pg.bin && pgbadger ./pg.bin -o ./pg.html

Does it reports the same error?

MichaelDBA commented 2 years ago

Hi Darold, yes it produces the same error: pgbadger badone.log -j 2 -p '%t:%r:%u@%d:[%p]:' -o ./pg.bin && pgbadger ./pg.bin -o ./pg.html Max. recursion depth with nested structures exceeded at /usr/lib64/perl5/vendor_perl/Storable.pm line 328, at /usr/local/bin/pgbadger line 15214.

can not load incompatible binary data, binary file is from version < 4.0. LOG: Ok, generating binary report... [========================>] Parsed 765 bytes of 765 (100.00%), queries: 0, events: 0 LOG: Ok, generating html report...

MichaelDBA commented 2 years ago

If necessary, I can send you the badone.log file to your personal email. It's about 500K gzipped and 13MB unzipped.

darold commented 2 years ago

Yes please, it could help.

MichaelDBA commented 2 years ago

What is your email address?

MichaelDBA commented 2 years ago

Sent it to ya! Good luck.

darold commented 2 years ago

I can not reproduce the issue with you log and your command. My Storable version is 3.15 and yours is 3.11, can you upgrade Storable and give an other try? You can get latest version using: wget https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/Storable-3.25.tar.gz and as usual with Perl: perl Makefile.PL && make && sudo make install

MichaelDBA commented 2 years ago

That worked! Perhaps you can document this step in a notable place or is it documented somewhere already?

Perl is a complicated thang, Storable?