[php-maint] Bug#827370: Bug#827370: php5-common: mail clutter from sessionclean cronjob
Daniel Reichelt
debian at nachtgeist.net
Wed Jun 15 16:02:59 UTC 2016
(forwarding this to the bug list for referece)
On 06/15/2016 04:23 PM, Ondřej Surý wrote:
> Hi Daniel,
>
> could you please apply this patch:
>
> $ git diff
> diff --git a/debian/sessionclean b/debian/sessionclean
> index 237b033..816528a 100644
> --- a/debian/sessionclean
> +++ b/debian/sessionclean
> @@ -22,7 +22,7 @@ while IFS=: read -r conf_dir proc_name; do
> done
> # first find all open session files and touch them (hope it's not
> massive amount of files)
> for pid in $(pidof $proc_names); do
> - find "/proc/$pid/fd" -ignore_readdir_race -lname
> "$save_path/sess_\*" -exec touch -c {} \;
> + if [ -d "/proc/$pid/fd" ]; then find "/proc/$pid/fd"
> -ignore_readdir_race -lname "$save_path/sess_\*" -exec touch -c {} \;;
> fi
> done
> } ) | sort -rn -t: -k2,2 | sort -u -t: -k 1,1 | while IFS=: read -r
> save_path gc_maxlifetime; do
> # find all files older then maxlifetime and delete them
>
> This won't eliminate all the race conditions (as the PID might shutdown
> between test -d and find run), but it should eliminate most of them.
>
> Most probably you haven't seen this messages as the sessionclean script
> was not touching any of those files at all, see #799155. So while it's
> not regression per se, because the sessionclean script was broken
> before.
>
> Cheers,
>
More information about the pkg-php-maint
mailing list