Bug 277274 - Recursive symlink hell in Ark
Summary: Recursive symlink hell in Ark
Status: RESOLVED WORKSFORME
Alias: None
Product: ark
Classification: Applications
Component: plugins (show other bugs)
Version: 2.16
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Ragnar Thomsen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 09:06 UTC by rnet723
Modified: 2021-03-21 17:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rnet723 2011-07-07 09:06:04 UTC
Version:           2.16 (using KDE 4.6.4) 
OS:                Linux

When you try to create a ZIP archive from directory, containing recursive symlinks, your machine runs out of memory.
Following symlinks by default is really bad behavior

Reproducible: Didn't try

Steps to Reproduce:
Create recursive directory structure using symlinks, then try to create a ZIP archive of it using Ark (not sure for other types of archive)
Enjoy you machine runs out of memory :)

Actual Results:  
In few minutes your machine will run out of memory, if you won't be fast enough  to kill zip process.

Expected Results:  
Ark should not follow symlinks by default. This should be an option.
Comment 1 rnet723 2011-07-07 09:12:23 UTC
Oh, I've forget to check form: yes, it is reproducible every time.
Comment 2 nn.dm55 2012-10-27 18:01:01 UTC
Still reproducible with commit be0f481efff6d27394d11c85f40c3730dd4bc94f.
Comment 3 Elvis Angelaccio 2015-10-21 14:38:48 UTC
Hi, sorry for the delay.
I'm not sure about how to create a "recursive directory structure" using symlinks. Can you be a little more specific? Otherwise I don't know how to reproduce the issue.
Comment 4 rnet723 2015-10-21 16:46:14 UTC
(In reply to Elvis Angelaccio from comment #3)
> Hi, sorry for the delay.
> I'm not sure about how to create a "recursive directory structure" using
> symlinks. Can you be a little more specific? Otherwise I don't know how to
> reproduce the issue.

It's like you have a directory "A" that contains "B" , which is a symlink to "A", something like that. But that was log time ago, can't reproduce it now.
Comment 5 Elvis Angelaccio 2015-10-21 16:49:48 UTC
(In reply to network723 from comment #4)
> (In reply to Elvis Angelaccio from comment #3)
> > Hi, sorry for the delay.
> > I'm not sure about how to create a "recursive directory structure" using
> > symlinks. Can you be a little more specific? Otherwise I don't know how to
> > reproduce the issue.
> 
> It's like you have a directory "A" that contains "B" , which is a symlink to
> "A", something like that. But that was log time ago, can't reproduce it now.
Thanks for replying.
So you have tried to reproduce it now and you couldn't?
If yes, I'll close this bug.
Comment 6 rnet723 2015-10-21 17:13:56 UTC
(In reply to Elvis Angelaccio from comment #5)
> (In reply to network723 from comment #4)
> > (In reply to Elvis Angelaccio from comment #3)
> > > Hi, sorry for the delay.
> > > I'm not sure about how to create a "recursive directory structure" using
> > > symlinks. Can you be a little more specific? Otherwise I don't know how to
> > > reproduce the issue.
> > 
> > It's like you have a directory "A" that contains "B" , which is a symlink to
> > "A", something like that. But that was log time ago, can't reproduce it now.
> Thanks for replying.
> So you have tried to reproduce it now and you couldn't?
> If yes, I'll close this bug.

Wait, I actually managed to reproduce it again!
I created folder "123", and a folder "234" inside of it. Then i put symlinks to "123" and "234" inside of "234" and a symlink to istelf into "123". Now, when I try to add "123" to a ZIP archive with a right-click menu in dolphin, it would start zip in backround that would take all ram if given enough time, but never finishes.
Comment 7 Elvis Angelaccio 2015-10-22 12:39:04 UTC
(In reply to network723 from comment #6)
> (In reply to Elvis Angelaccio from comment #5)
> > (In reply to network723 from comment #4)
> > > (In reply to Elvis Angelaccio from comment #3)
> > > > Hi, sorry for the delay.
> > > > I'm not sure about how to create a "recursive directory structure" using
> > > > symlinks. Can you be a little more specific? Otherwise I don't know how to
> > > > reproduce the issue.
> > > 
> > > It's like you have a directory "A" that contains "B" , which is a symlink to
> > > "A", something like that. But that was log time ago, can't reproduce it now.
> > Thanks for replying.
> > So you have tried to reproduce it now and you couldn't?
> > If yes, I'll close this bug.
> 
> Wait, I actually managed to reproduce it again!
> I created folder "123", and a folder "234" inside of it. Then i put symlinks
> to "123" and "234" inside of "234" and a symlink to istelf into "123". Now,
> when I try to add "123" to a ZIP archive with a right-click menu in dolphin,
> it would start zip in backround that would take all ram if given enough
> time, but never finishes.

Confirming. Thanks for reporting and investigating.
Comment 8 Justin Zobel 2021-03-12 22:30:49 UTC
I believe this is now resolved. I've just tested with the supplied instructions and the symlinks are not followed by default.

Can you please test and confirm if this is now resolved, thank you.

I've set this bug to NEEDSINFO. When you reply, please change the bug back to REPORTED so we know it's ready for investigation or RESOLVED/WORKSFORME if the issue is now resolved.
Comment 9 rnet723 2021-03-13 07:06:34 UTC
(In reply to Justin Zobel from comment #8)
> I believe this is now resolved. I've just tested with the supplied
> instructions and the symlinks are not followed by default.

I confirm, it no longer runs out of memory with Ark 20.04.2 / KF 5.71 / Qt 5.12.7
Comment 10 Elvis Angelaccio 2021-03-21 17:53:35 UTC
Note that this bug probably depends on the backend. These days we use libzip by default, while at the time we were probably using info-zip as default.

So the bug might still not be fixed.