[Gems-users] config string parameters are NULL in the tester


Date: Tue, 27 Nov 2007 11:26:06 +0100
From: "Rubén Titos" <rtitos@xxxxxxxxxxx>
Subject: [Gems-users] config string parameters are NULL in the tester
Dear list,

In GEMS 2.0, tester.exec fails when running any protocol that uses a
string parameter (such us MESI_CMP_filter_directory), due to a problem
with the configuration parameters of string type, that are all NULL,
as shown below. However, the bool and int parameters read from
rubyconfig.defaults and tester.defaults still work fine.

/home/users/ruben/gems-2.0/ruby/amd64-linux/generated/MESI_CMP_filter_directory/bin/tester.exec
-p 16 -a 16 -z little.trace -s 1 > tester_output
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid
Program received signal SIGABRT, Aborted.
0x00002ac3dc37b535 in raise () from /lib64/libc.so.6
(gdb) frame 9
#9  0x000000000056c069 in TransactionConflictManager::shouldNackLoad
(this=0xa89d80, addr={m_address = 1024}, remote_timestamp=0,
remote_id=      {type = MachineType_L1Cache, num = 1}) at
log_tm/TransactionConflictManager.C:467
467       string conflict_res_policy(XACT_CONFLICT_RES);
(gdb) print XACT_CONFLICT_RES
$12 = 0x0

I've done some more debugging, and the problem seems to be in
$GEMS_ROOT/ruby/tester/tester_framework.C. When the initvar_t object
is created, it reads the configuration defaults from
rubyconfig.defaults and tester.defaults; however, it doesn't seem to
allocate new memory for the string values, because they "lose" their
values when ruby_initvar is later deleted (line 165 in
tester_initialize).
Commenting out that line gets rid of that problem for the tester,
although it may be more convenient to fix the bug at the source, in
$GEMS_ROOT/common/ioutil/confio.C (I think in applyConfiguration).

Regards,

Rubén

-- 
Ruben Titos
Parallel Computing and Architecture Group (GACOP)
Computer Engineering Dept.
University of Murcia

[← Prev in Thread] Current Thread [Next in Thread→]
  • [Gems-users] config string parameters are NULL in the tester, Rubén Titos <=