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 

eZ debug

Timing: Jan 17 2025 21:01:53
Script start
Timing: Jan 17 2025 21:01:53
Module start 'content'
Timing: Jan 17 2025 21:01:54
Module end 'content'
Timing: Jan 17 2025 21:01:54
Script end

Main resources:

Total runtime1.1477 sec
Peak memory usage4,096.0000 KB
Database Queries237

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 596.1797180.8203
Module start 'content' 0.00641.0571 777.0000940.1953
Module end 'content' 1.06350.0841 1,717.1953357.5391
Script end 1.1476  2,074.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3193210.0002
Check MTime0.00140.1222210.0001
Mysql Total
Database connection0.00070.058710.0007
Mysqli_queries1.046591.18232370.0044
Looping result0.00180.15342350.0000
Template Total1.114997.120.5574
Template load0.00170.150220.0009
Template processing1.113196.992220.5566
Template load and register function0.00010.007010.0001
states
state_id_array0.00100.085310.0010
state_identifier_array0.00100.089920.0005
Override
Cache load0.00170.1440900.0000
Sytem overhead
Fetch class attribute can translate value0.00090.079080.0001
Fetch class attribute name0.00090.0762190.0000
XML
Image XML parsing0.00380.331580.0005
class_abstraction
Instantiating content class attribute0.00000.0025250.0000
General
dbfile0.00540.4695610.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
12content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
13content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
23content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 64
 Number of unique templates used: 10

Time used to render debug report: 0.0002 secs