ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: llazon on October 07, 2024, 05:30:24 PM

Title: 100% CPU with large XMP field
Post by: llazon on October 07, 2024, 05:30:24 PM
We came across a set of images that have large XMP data fields.  We see exiftool hang at 100% cpu on this image.  It doesn't timeout or throw errors, just hangs there.  I can recreate this with ExifTool 12.97 on MacOS and Linux.
 
Phil, can I send this image to you privately?
Title: Re: 100% CPU with large XMP field
Post by: Phil Harvey on October 07, 2024, 08:30:54 PM
Sure:  philharvey66 at gmail.com

- Phil
Title: Re: 100% CPU with large XMP field
Post by: llazon on October 07, 2024, 08:52:08 PM
Thanks.  Sent.  It appears to be struggling with a huge chunk of data, starting with:

GImage:Data="/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBw...
Title: Re: 100% CPU with large XMP field
Post by: Phil Harvey on October 07, 2024, 09:53:24 PM
I got the file, thanks.

The XMP ImageData is corrupted somehow, but I will patch ExifTool so it doesn't hang on this file.  It appears to be a Perl bug, but I have a work-around.  Version 12.98 will have this patch.

- Phil
Title: Re: 100% CPU with large XMP field
Post by: FrankB on October 08, 2024, 05:03:44 AM
Quote from: llazon on October 07, 2024, 08:52:08 PMGImage:Data="/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAUDBAQEAwUEBAQFBQUGBw...

Not only is it huge, it also contains invalid XML characters. Like '<'. Making it invalid XML.
To me it looks like the string is not escaped properly for XML usage.

Edit: I'm only checking the effect on ExifToolGui!
Title: Re: 100% CPU with large XMP field
Post by: Phil Harvey on October 08, 2024, 08:30:11 AM
As I said, the data is corrupted.  It is base-64 encoded, so should only contain letters, numbers, +, / and = characters.

- Phil
Title: Re: 100% CPU with large XMP field
Post by: llazon on October 08, 2024, 10:28:38 AM
Awesome, thank you.  I'll keep an eye out for 12.89.  I did find other XMP Data fields like this in other Samsung Galaxy Note 2 photos so I expect there are a few of these floating around in the wild!