[Amarok] b18a028: Use shared memory for collection
Jeff Mitchell
mitchell at kde.org
Wed Nov 10 13:58:56 CET 2010
On 11/07/2010 01:07 PM, Ralf Engels wrote:
> The whole dicussion is based on the assumption that shared memory is
> unsafe.
Not entirely, it's based on the assumption (based on copious previous
evidence) that the scanner process *will* crash and thus whatever is
being used to communicate with it should be hardened against that.
> I really can't see this.
> As a test I crashed the scanner several times with a division by zero
> just to verify that restarting works.
> No problem here.
That's good to know.
> Also writing files during the scanning turned out to be slowing down the
> scanning a lot.
> The whole slow down that was reported by people (4 times) was just
> caused by the QSettings.
Sure, but QSettings isn't what was being used before...
> Please prove me wrong.
> Using the scanner to scan /usr/share never crashed it (so taglib seems
> to be stable)
This means nothing. TagLib is going to skip skip those files because it
can't read them.
There are plentiful examples of TagLib crashing on actual media files
that either expose bugs in TagLib, usually by being corrupt in some way.
Just a month or so ago I was pointed to someone's file that was corrupt
because the majority (or all) of it had been overwritten with zeros due
to some problem. It crashed TagLib.
> and the shared memory should be safe from taglib even if
> it's going mad as the memory address is completely different from the
> other used segments.
That's fine. As both Max and I pointed out, the concern is whether a
crashing collection scanner (which happens) will cause, via the shared
memory, a crash of Amarok. As you've tested this and found it not to be
the case, then I don't think there is a problem, unless Max disagrees.
--Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20101110/d7605419/attachment.sig
More information about the Amarok-devel
mailing list