Relationship Graph

Relationship Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0002372SOGoBackend Generalpublic2013-10-15 08:44
Reporterthomasg Assigned Tojraby 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.0.6 
Fixed in Version2.1.0 
Summary0002372: /etc/cron.daily/sogo exited with return code 1 with Ubuntu package
Description

Getting the error "/etc/cron.daily/sogo exited with return code 1" from cron once a day.

Anthony Milan posted a fix in 2009 http://permalink.gmane.org/gmane.comp.cms.opengroupware.sogo/3842

Seems that there is a "/" missing in the line SOGOSPOOL=/var/spool/sogo/

TagsNo tags attached.

Relationships

has duplicate 0002450 closedfrancis /etc/cron.daily/sogo exits non-zero if /var/spool/sogo is non-empty 

Activities

heupink

heupink

2013-07-23 03:38

reporter   ~0005765

I see the error too. (debian 7, x64)

However: adding the missing trailing "/" doesn't solve it here. It does correct the issue on your server?

thomasg

thomasg

2013-07-30 14:45

reporter   ~0005776

Yes getting still the error. The fix didn't correct the error.

Christian Mack

Christian Mack

2013-07-31 05:00

developer   ~0005779

What do you get, when you start this script as root on the command line?

heupink

heupink

2013-07-31 05:09

reporter   ~0005780

root@mail:/etc/cron.daily# ./sogo
root@mail:/etc/cron.daily#

Christian Mack

Christian Mack

2013-07-31 07:13

developer   ~0005781

Could you change the find command, to not drop error messages?
You can achive that by removing the "2> /dev/null" part temporarily.

heupink

heupink

2013-07-31 07:46

reporter   ~0005782

root@mail:/etc/cron.daily# ./sogo
/usr/bin/find: /var/spool/sogo/user1': No such file or directory /usr/bin/find:/var/spool/sogo/user2': No such file or directory
/usr/bin/find: /var/spool/sogo/user3': No such file or directory /usr/bin/find:/var/spool/sogo/user4': No such file or directory
/usr/bin/find: `/var/spool/sogo/user5': No such file or directory
root@mail:/etc/cron.daily#

and then interestingly, running it again:
root@mail:/etc/cron.daily# ./sogo
root@mail:/etc/cron.daily#

Christian Mack

Christian Mack

2013-07-31 09:22

developer   ~0005783

So the source of this error code is indeed the find command.

Looks like a race condition to me.
Find encounters an directory and, while testing if it is empty or while trying to remove it, this directory vanishes on its own.

I have seen such things on remote file systems.
Is your /var/spool/sogo on an nfs or cifs share?

Or are there any other scripts removing these directories?

heupink

heupink

2013-07-31 10:31

reporter   ~0005784

Nope: they're on a normal, local xfs filesystem, and nothing else (as far as I know) is accessing them.

It seems to me it gives the error message, but it succeeds to actually removes the file. (I created an empty test directory, and it disappeared, even though the error message came up)

thomasg

thomasg

2013-07-31 11:36

reporter   ~0005785

Sorry for the late response.

I can confirm the things heupink wrote.

The folder is on a normal ext4 and also nothing else is accessing them.

masoodmx

masoodmx

2013-08-30 08:08

reporter   ~0005934

I have the same problem.

Could anyone find a solution for that?

I wonder why the issue string is incomplete?!

jraby

jraby

2013-08-30 11:58

viewer   ~0005935

For reference, the current command:
find "$SOGOSPOOL" -mindepth 1 -type d -empty -exec /bin/rmdir {} \; 2> /dev/null

It is broken since find will try to openat() the directory once rmdir returns, yielding the error message that you see.

To fix it, we need to tell find to delete the directory on its own:
find "$SOGOSPOOL" -mindepth 1 -type d -empty -delete

And that cron job scares me, it should check for the owner before deleting anything:
find "$SOGOSPOOL" -mindepth 1 -type d -user sogo -empty -delete

Does this work for you guys?

Christian Mack

Christian Mack

2013-09-03 04:40

developer   ~0005936

Works for me on CentOS 5.

heupink

heupink

2013-09-03 05:21

reporter   ~0005937

Worked here too, on debian 7 x64. Thanks!

jraby

jraby

2013-09-03 10:05

viewer   ~0005938

Shoudl be fixed now: https://github.com/inverse-inc/sogo/commit/dceead3997d00db403e0803f33ba14b9cc061095

Issue History

Date Modified Username Field Change
2013-07-20 01:45 thomasg New Issue
2013-07-23 03:38 heupink Note Added: 0005765
2013-07-30 14:45 thomasg Note Added: 0005776
2013-07-31 05:00 Christian Mack Note Added: 0005779
2013-07-31 05:09 heupink Note Added: 0005780
2013-07-31 07:13 Christian Mack Note Added: 0005781
2013-07-31 07:46 heupink Note Added: 0005782
2013-07-31 09:22 Christian Mack Note Added: 0005783
2013-07-31 10:31 heupink Note Added: 0005784
2013-07-31 11:36 thomasg Note Added: 0005785
2013-08-30 08:08 masoodmx Note Added: 0005934
2013-08-30 11:58 jraby Note Added: 0005935
2013-09-03 04:40 Christian Mack Note Added: 0005936
2013-09-03 05:21 heupink Note Added: 0005937
2013-09-03 10:05 jraby Note Added: 0005938
2013-09-03 10:05 jraby Assigned To => jraby
2013-09-03 10:05 jraby Status new => resolved
2013-09-03 10:05 jraby Resolution open => fixed
2013-10-15 08:43 francis Fixed in Version => 2.1.0
2013-10-15 08:44 francis Relationship added has duplicate 0002450