r23 / MyOOS

MyOOS [Shop system] Repository
https://www.oos-shop.de
28 stars 22 forks source link

MSD: Deep recursion on subroutine #22

Open boindil opened 3 years ago

boindil commented 3 years ago

Moin, im Perl-Script kommt es zu Endlosschleifen, wenn die Logdateien nicht geschrieben werden können.

MySQLDumper - Perl CronDump [Version 1.24.4] started successfully (using perl v5.30.0)

[Wed Apr 7 18:30:12 2021] crondump.pl: Deep recursion on subroutine "main::PrintOut" at httpdocs/msd_cron/crondump.pl line 709.

[Wed Apr 7 18:30:12 2021] crondump.pl: Deep recursion on subroutine "main::err_trap" at httpdocs/msd_cron/crondump.pl line 770.

r23 commented 3 years ago

Here in the test environment, the backup with Perl works perfectly. If you are looking for support, describe your environment in a comprehensible way. And for reasons of politeness, use the English language.

grafik

boindil commented 3 years ago

Hi @r23, I was using german, since this is an application with even a german documentation linked in this readme, however english is also fine ofc.

Yes, the dumper is working on my end now, too. The problem was a chroot environment with absolute - inaccessable - paths in chroot. Since I wasnt getting any useful error messages, I had to debug the code which was somewhat annoying.

This should not happen. If the log file is not accessable for any reason, this should not result in endless loops that are being detected by perl. Instead it should be resolved by print outs with appropriate error messages. The error messages in these lines were not printed out, as you can see.

I later noticed, that the autodelete method has a similar problem too, it seems that it cant handle relative paths. Note that I am in chroot.

Working:

path/to/log/file /path/to/log/file /path/to/work/folder

Not Working:

path/to/work/folder

The logging methods are able to use paths relative to the current directory, whilst the autodelete is not. Thats irritating to say the least.