Cache simulator error when using multi-threaded applications

28 views
Skip to first unread message

Mateusz Kalinowski

unread,
Jun 16, 2021, 8:22:15 AM6/16/21
to DynamoRIO Users
Hello all community members!

I am writing with one question. I try to use cache_simulator_t directly in my client code (I am feeding memory references to the process_memref function). My client works perfectly fine with single-threaded applications. I receive one error when testing multi-threaded ones:

dynamorio/clients/drcachesim/simulator/caching_device.cpp:142: virtual void caching_device_t::request(const memref_t&): Assertion `tag != TAG_INVALID && tag == cache_block->tag_' failed.

Are cache_simulator_t and process_memref supposed to be thread safe? This error happens randomly and it looks like a concurrent access issue. Is there anything I might have missed?

Thank you!
Mateusz


Derek Bruening

unread,
Jun 16, 2021, 4:15:47 PM6/16/21
to dynamor...@googlegroups.com
The cache simulator does not support concurrent processing.  You can tell because its parallel_shard_supported() function returns false, and it does not have a parallel_shard_memref() function (see https://dynamorio.org/sec_drcachesim_newtool.html).  The cache simulator runs serially, fed a timestamp-ordered interleaved stream of accesses from the traced threads by the serial iterator.

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/2f588442-3450-4fb1-b8a1-074440797053n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages