Forums / Developer / strange problem with multiple "trashed" folders

strange problem with multiple "trashed" folders

Author Message

Marko Žmak

Thursday 16 December 2010 11:03:47 am

I noticed a very strange thing happening on my ezp site...

In the storage/images folder a lot of recursive trashed folders are created, for example:

var/sitename/storage/images/.../37867-25-cro-HR/trashed/trashed/trashed/trashed/trashed/trashed

When I took a look at the content of these folder I notice another strange thing. All files in the folder have the same size and the sum of their sizes doesn't match the disk usage reported for this folder. For example I have 28 files all with 512K size (which total to 14 MB) but disk usage reported for this folder is only 512K.

It seems like all of the 28 files are just hard links to the same file.

This problem is not specific for my site, because I found a similar problem on issues:

http://issues.ez.no/IssueView.php?Id=16823

It's not the very same problem, because my site is not on a clustered ezp installation, but the pattern with repeated "trashed" folders is the same.

Also, the problem doesn't occur for only one object, it happens for many different objects.

So any clue why does this happen?

Is it a bug?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Thursday 16 December 2010 11:12:24 am

Update...

This 28 files are hard links to the same file, and there are total 7009 hard links to this file.

This is definitely not normal...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Thursday 16 December 2010 12:25:52 pm

I think I nailed it, it's a bug:

http://issues.ez.no/IssueView.php?Id=17781&activeItem=1

Can someone confirm it?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Robin Muilwijk

Friday 17 December 2010 12:50:13 am

Note; also reported here http://share.ez.no/forums/install-configuration/removing-item-creates-infinite-loop

Thanks for filing the bug report Marko.

Regards Robin

Board member, eZ Publish Community Project Board - Member of the share.ez.no team - Key values: Openness and Innovation.

LinkedIn: http://nl.linkedin.com/in/robinmuilwijk // Twitter: http://twitter.com/i_robin // Skype: robin.muilwijk

Bertrand Dunogier

Monday 20 December 2010 6:58:47 am

I'm on it.

My god, this part is weird :-)

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Jérôme Vieilledent

Thursday 31 March 2011 9:41:34 am

Hi guys

Just to notify that I'm on this one, taking over Bertrand's work :)

Marko Žmak

Thursday 31 March 2011 11:20:33 am

"

Hi guys

Just to notify that I'm on this one, taking over Bertrand's work :)

"

Will it be fixed in the 4.5 community release?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Jérôme Vieilledent

Friday 01 April 2011 12:55:08 am

Unfortunately not, it's far too late for that :(

Marko Žmak

Friday 01 April 2011 1:20:36 am

"

Unfortunately not, it's far too late for that :(

"

Any chance that we'll also get a sanitizer script that will clean up all redundant "trashed" folders and images?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Felix Woldt

Friday 01 April 2011 7:26:48 am

1. hopefully the bug is fixed very soon

2. a sanitizer script would be nice too have

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter

Jérôme Vieilledent

Friday 01 April 2011 7:43:05 am

The fix should be committed very soon.

About the sanitizer script, I need more information like your current situation (Are your objects still in the trash ?) and the situation you want to get back to.

Please add comments inside the issue :).

Thanks !

Chris Williams

Thursday 21 July 2011 2:26:47 am

A commit has been added to the community as mentioned in the issue.

I have further asked in the "issue" about the sanitiser, or at least the cleaner.

For those who are curious to see if they suffer from this problem.

Jump into your storage for your sites and do the following commands.

# This one lists all images with a trashed folder.
find . -type f -wholename '*trashed*' | wc -l

# This one lists all images with more two or more trashed folders.
find . -type f -wholename '*trashed/trashed*' | wc -l

 

I have asked if it is expected behaviour to have nested trashed folders.

 

Has anyone tried just deleting all folders with "trashed/trashed/"? and then doing a similiar command to the "ezimagefile" table to remove rows with filepath having "trashed/trashed/?

Is this dangerous :)

Patrick Allaert

Thursday 04 August 2011 12:35:41 am

The sanitizer script can be found in:
eZ Publish 4.6: https://github.com/ezsystems/ezpublish/commit/67d2c9ec4b7cf581c261438a0351076a9a0b1db4

Thanks for your patience!

Cheers,
Patrick