https://bugs.kde.org/show_bug.cgi?id=411081

Dmitry Kazakov <dimul...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/kde/
                   |                            |krita/commit/ac020c6cb41213
                   |                            |d65f40be8aafb960af8259ff1d
             Status|REPORTED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit 2ffdc5b070522bf1df73844ff47f525cb4a9262c by Dmitry Kazakov.
Committed on 20/08/2019 at 16:10.
Pushed by dkazakov into branch 'master'.

Fix ConcurrentMap::migrationInProcess() to handle initialization value (0)
properly

Job coordinator of the table may have three states:

1) jobCoordinator == 0: the table was initialized, but no migration
   has ever been started for this table
2) jobCoordinator > 1: a table migration is in progress right now. The
   caller should join *jobCoordinator to help finishing the migration.
3) jobCoordinator == 1: the table migration has been finished. It means
   that the table doesn't have any values in it anymore.

The patch actually fixes the map to consider case 1 as a situation, when
there is no migration.

M  +1    -1    libs/image/3rdparty/lock_free_map/concurrent_map.h

https://invent.kde.org/kde/krita/commit/2ffdc5b070522bf1df73844ff47f525cb4a9262c

--- Comment #7 from Dmitry Kazakov <dimul...@gmail.com> ---
Git commit ac020c6cb41213d65f40be8aafb960af8259ff1d by Dmitry Kazakov.
Committed on 20/08/2019 at 16:10.
Pushed by dkazakov into branch 'master'.

Fix random crash when swap-file location has not got enough disk space

Lockfree hash table iterators have a requirement of no-concurrent-inserts,
so we must ensure that the swapper and pooler do *not* insert any tiles,
why iteration is in progress. KisTileDataStore::trySwapTileData() is called
exactly from inside of the swapper iteration loop.

If we break this requirement, the insert operation may request a table
migration, and the iterator will continue iterating the old, invalid,
table.

The actual crash happened after line 'item = iter->next()' in
KisTileDataSwapper::pass(), which actually returned value '1', meaning
"Redirect". Address 0x0000000000000029 is a fetch of
KisTileData::m_mementoFlag (offset 0x28) with 'this' set to 0x01 :)

M  +3    -0    libs/image/3rdparty/lock_free_map/concurrent_map.h
M  +1    -4    libs/image/tiles3/kis_tile_data_store.cc

https://invent.kde.org/kde/krita/commit/ac020c6cb41213d65f40be8aafb960af8259ff1d

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to