Greyhole icon indicating copy to clipboard operation
Greyhole copied to clipboard

PHP Fatal error: escapeshellarg()

Open Sparticuz opened this issue 5 years ago • 8 comments

PHP Fatal error: escapeshellarg(): Argument exceeds the allowed length of 2097152 bytes in /usr/bin/greyhole on line 1060

I received this error after reducing num_copies on my shares to 1, then running a fsck.

Sparticuz avatar Nov 09 '18 15:11 Sparticuz

In what context did the error appear ? In the logs ? On the command line ?

gboudreau avatar Nov 09 '18 15:11 gboudreau

I was running greyhole with --daemon at the time, so it appeared both on the command line after greyhole crashed, and in the logs.

Sparticuz avatar Nov 09 '18 15:11 Sparticuz

My guess is it's trying to delete alot of duplicated files and overflowing escapeshellarg()

Sparticuz avatar Nov 09 '18 15:11 Sparticuz

Which greyhole version?

gboudreau avatar Nov 09 '18 17:11 gboudreau

0.10.17

On Fri, Nov 9, 2018, 12:20 PM Guillaume Boudreau <[email protected] wrote:

Which greyhole version?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gboudreau/Greyhole/issues/200#issuecomment-437430905, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJ4eay0LZQQzebjOWwf9LgQtjMocGs6ks5utblNgaJpZM4YWx0N .

Sparticuz avatar Nov 09 '18 17:11 Sparticuz

It is using escapeshellarg() in order to prepare the third argument that will be sent to a log hook. So that means you have hooks defined, and the data Greyhole is trying to send to your hook script is too large. My guess is that it's the fsck hook. So maybe just disable that hook temporarily, and check the fsck result by sending it by email, or checking the file it writes in /usr/share/greyhole/fsck_files.log.

gboudreau avatar Nov 09 '18 17:11 gboudreau

Of note: fsck_files.log is only created if the option to send an email is enabled, or if a fsck hook is configured. So since you have a fsck hook configured, you should already have this file in /usr/share/greyhole/.

gboudreau avatar Nov 09 '18 17:11 gboudreau

The hook is a hook into Slack, so it very well might be 'too large'. I don't see a fsck_files.log. Let me try it again, I'm running --fsck -e

Sparticuz avatar Nov 12 '18 14:11 Sparticuz