Opened 3 years ago

Closed 21 months ago

Last modified 21 months ago

#17225 closed bug (fixed)

Tracker crashes generating thumbnails

Reported by: bbjimmy Owned by: jscipione
Priority: high Milestone: R1/beta4
Component: Applications/Tracker Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

hrev55358

After opening my photos directory Tracker crashed.

Attachments (2)

Tracker-940-debug-28-08-2021-20-18-27.report (87.8 KB ) - added by bbjimmy 3 years ago.
Debug report
Tracker-207165-debug-29-08-2021-01-45-34.report (48.9 KB ) - added by smallstepforman 3 years ago.
Debug log

Download all attachments as: .zip

Change History (14)

by bbjimmy, 3 years ago

Debug report

comment:1 by smallstepforman, 3 years ago

I have similar issue, but only when opening directory from non BeFS (eg. from read only NTFS partition). Also, tracker seems to stutter while generating thumbnails on NTFS partition. On BeFS it's OK.

Attaching crash report.

Frame memory:

[0x7ffee70fea80] ........a..YY... c0 ea 0f e7 fe 7f 00 00 61 14 f5 59 59 01 00 00 [0x7ffee70fea90] P....... ....... 50 f0 0f e7 fe 7f 00 00 20 00 00 00 00 00 00 00 [0x7ffee70feaa0] ............... 20 eb 0f e7 fe 7f 00 00 e2 11 0c bf fe 00 00 00

0x7ffee70feb30 0xfebf0c11dd BBitmapStream::WriteAt(long, void const*, unsigned long) + 0x8d 0x7ffee70feb60 0x1595a048e6e BPositionIO::Write(void const*, unsigned long) + 0x2e 0x7ffee70fec00 0x1247e19d7f1 PNGTranslator::translate_from_png_to_bits(BPositionIO*, BPositionIO*) + 0x2d1 0x7ffee70fec60 0x1247e19f7ac BaseTranslator::BitsTranslate(BPositionIO*, translator_info const*, BMessage*, unsigned int, BPositionIO*) + 0x9c 0x7ffee70feee0 0xfebf0c62b7 BTranslatorRoster::Translate(BPositionIO*, translator_info const*, BMessage*, BPositionIO*, unsigned int, unsigned int, char const*) + 0xc7 0x7ffee70ff2c0 0x1592059edab BPrivate::get_thumbnail(void*) + 0x1ab 0x7ffee70ff2e0 0x135246da6a7 thread_entry + 0x17 00000000 0x7f1e8a782260 commpage_thread_exit + 0

by smallstepforman, 3 years ago

Debug log

comment:2 by waddlesplash, 3 years ago

On a potentially related note, I suggested on IRC and there seemed to be some agreement that using just 2 threads (one for large images and one for small images), either per-window or more likely in total, for thumbnail generation instead of 1 thread per file probably makes much more sense, as in the current model it is more than possible to run up hundreds of threads processing large images and run out of address space.

The bugs here look like JPEG translator issues, though, whether or not memory usage is a factor.

comment:3 by pulkomandy, 3 years ago

Is it running a thread per file? My und rstanding of the code and past discussions was that it would be a thread per open directory, which is what would make more sense to me.

comment:4 by pulkomandy, 3 years ago

Owner: changed from nobody to jscipione
Status: newassigned

comment:5 by AGMS, 3 years ago

Do we have a device flag for "slow random IO" to distinguish between spinning metal hard drives and Flash memory devices? And an easy way to find it when given a directory file handle. Then it could be one thread for slow devices, #Cores threads for fast random IO devices.

Or more sensibly, a Tracker global threads limit. Have two worker thread pools, one for slow devices (has one worker) and one pool for fast devices (has #Cores workers).

comment:6 by bbjimmy, 3 years ago

I think it is the number of threads not the jpeg translator. After several crashes, it stopped crashing but there were the same number of files missing (blank) thumbnails as the crashes. later I removed two attributes from one of the files:

Media:Thumbnail

Media:Thumbnail:CreationTime

After re-opening the directory in Tracker, the appropriate thumbnail was created.

comment:7 by jscipione, 3 years ago

I've verified that it is not a bug in the jpeg translator, but thread issues. A bug is preventing thumbnails from finishing being generated and so more and more threads build up until Tracker runs into a limit and crashes. When you remove the attributes and restart the process it gets past the bug and completes. I have to figure out what is holding up the thumbnails.

comment:8 by danboid, 2 years ago

Tracker isn't crashing when generating thumbnails for me but I do have this issue:

https://dev.haiku-os.org/ticket/17619

comment:9 by waddlesplash, 2 years ago

Please check if hrev56079 improves this any.

comment:10 by jscipione, 21 months ago

I think this can be safely closed as fixed in hrev56079 unless bbjimmy reports back.

comment:11 by waddlesplash, 21 months ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: assignedclosed

Probably.

comment:12 by bbjimmy, 21 months ago

Confirmed. I can no longer re-produce the crash!

Note: See TracTickets for help on using tickets.