20150114

1. 영어 기사 읽기
1) Antibiotics in Blood Can Make Malaria Mosquitoes Mightier, Scientific American
– But when mosquitoes snack on blood laced with antibiotics, the same can happen to their microbiome. (snack on – 가벼운 식사를 하다, lace – 가미하다)
– Meaning they may be more likely to host and then spread the disease-causing protozoan. (protozoan – 원생동물)
– TB and HIV prevalence in malaria-endemic countries is huge. (endemic – 풍토의)
2) China scraps cap on rare earth exports, CNN
– The move could increase global access to coveted materials that are used in a wide range of high tech devices. (coveted- 탐내는)
– Australia’s Lynas Corporation and America’s Molycorp (MCP) are two companies that have tried to ramp up production of rare earth materials to loosen China’s stronghold on the market. (ramp up – 늘리다)


2. MARSS 실험
드디어 간단한 checkpoint 생성을 완료함. 실험하는 중.


3. MARSS 디버깅
Original MARSS 코드가 Ubuntu 13, 14를 지원하지 않아 원인을 확인하는 중.
Ubuntu 14에서 tonto를 실행해보았다.
디버깅하면 다음과 같이 에러가 발생한다. physreg->data에 대한 assertion 실패로 인한 것.

qemu-system-x86_64: ptlsim/build/core/ooo-core/ooo-pipe.cpp:2109: int ooo::ReorderBufferEntry::commit(): Assertion `physreg->data' failed.

Program received signal SIGABRT, Aborted.

Call stack을 확인함. ./ptlsim/core/ooo-core/ooo-pipe.cpp의 2109번 줄에서 에러 발생.

(gdb) bt
#0  0x00007ffff4c91bb9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff4c94fc8 in __GI_abort () at abort.c:89
#2  0x00007ffff4c8aa76 in __assert_fail_base (fmt=0x7ffff4ddc2b0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
    assertion=assertion@entry=0x8f1ea2 "physreg->data",
    file=file@entry=0x8f1850 "ptlsim/build/core/ooo-core/ooo-pipe.cpp", line=line@entry=2109,
    function=function@entry=0x8f30a0 <ooo::ReorderBufferEntry::commit()::__PRETTY_FUNCTION__> "int ooo::ReorderBufferEntry::commit()") at assert.c:92
#3  0x00007ffff4c8ab22 in __GI___assert_fail (assertion=0x8f1ea2 "physreg->data",
    file=0x8f1850 "ptlsim/build/core/ooo-core/ooo-pipe.cpp", line=2109,
    function=0x8f30a0 <ooo::ReorderBufferEntry::commit()::__PRETTY_FUNCTION__> "int ooo::ReorderBufferEntry::commit()") at assert.c:101
#4  0x000000000062bf3d in ooo::ReorderBufferEntry::commit (this=0x2de7930)
    at ptlsim/build/core/ooo-core/ooo-pipe.cpp:2109
#5  0x000000000062a5ea in ooo::ThreadContext::commit (this=0x2de0020)
    at ptlsim/build/core/ooo-core/ooo-pipe.cpp:1614
#6  0x0000000000633188 in ooo::OooCore::runcycle (this=0x2dcaa00, none=0x0)
    at ptlsim/build/core/ooo-core/ooo.cpp:649
#7  0x0000000000643af9 in superstl::TFunctor1<ooo::OooCore>::operator() (this=0x2ddff40, arg=0x0)
    at ptlsim/lib/superstl.h:3950
#8  0x00000000006b307a in superstl::Signal::emit (this=0x2ddc3e0, arg=0x0)
    at ptlsim/build/lib/superstl.cpp:1431
#9  0x0000000000729d5f in BaseMachine::run (this=0x142bf40 <coremodel>, config=...)
    at ptlsim/build/sim/machine.cpp:265
#10 0x000000000073e3bb in ptl_simulate () at ptlsim/build/sim/ptlsim.cpp:1365
#11 0x00000000005c6fd3 in sim_cpu_exec () at qemu/cpu-exec.c:310
#12 0x0000000000424e3f in main_loop () at qemu/vl.c:1450
#13 0x0000000000428c04 in main (argc=15, argv=0x7fffffffe5c8, envp=0x7fffffffe648) at qemu/vl.c:3189

assert(physreg->data)에서 에러가 발생한다.

    if likely (uop.eom) {
        if unlikely (uop.rd == REG_rip) {
            assert(isbranch(uop.opcode));

            if(logable(10))
                ptl_logfile << "destination is REG_rip : ", physreg->data, endl, flush;

            if(uop.riptaken != physreg->data) {
                if(logable(6)) {
                    ptl_logfile << "branch misprediction: assumed-rip: ",
                                uop.riptaken, " actual-rip: ", physreg->data,
                                endl;
                }
                /* Annul the remaining ROB entries and fetch new code */
                thread.annul_fetchq();
                annul_after();
                thread.reset_fetch_unit(physreg->data);
                thread.thread_stats.issue.result.branch_mispredict++;
            }
            assert(physreg->data);
            ctx.eip = physreg->data;
        } else {
            assert(!isbranch(uop.opcode));
            ctx.eip += uop.bytes;        }
    }

debug=2 옵션을 주어 log를 확인해보니, 최종적으로 rip를 0으로 만드는 바람에 에러가 발생하는 것으로 보인다.

[vcpu 0] thread 0: WARNING: At cycle 8412318, 5974052 user commits: 0 cycles;
Per-Cycle-Signal : ooo_0_0-run-cycle
OooCore::run():thread-commit
Committing ROB entry: rob 62  uuid         11871539 rip 0x7fff91cf8cde ready-to-commit          SOM     @ all  add          r150 selfrip       = r75@fp                        r0@int                        r0@int                         destreg_value:00007fff91cf8cde destflags: 0000 flagmask: 0000
ROB Commit RIP check...
ROB Commit RIP check Done...
ROB Commit Done...
Committing ROB entry: rob 63  uuid         11871540 rip 0x7fff91cf8cde ready-to-commit                  @ all  add          r169 nextrip       = r75@fp                        r0@int                        r0@int                         destreg_value:00007fff91cf8ce1 destflags: 0000 flagmask: 0000
ROB Commit RIP check...
ROB Commit RIP check Done...
ROB Commit Done...
Committing ROB entry: rob 64  uuid         11871541 rip 0x7fff91cf8cde ready-to-commit                  @ all  collcc       r91  tr0          = r32@int                       r32@int                       r32@int                        destreg_value:0000000000000004 destflags: 0004 flagmask: 0007ROB Commit RIP check...
ROB Commit RIP check Done...
ROB Commit Done...
Committing ROB entry: rob 65  uuid         11871542 rip 0x7fff91cf8cde ready-to-commit              EOM @ all  brp          r9   rip          = r0@int                        r0@int                        r0@int                         destreg_value:0000000000000000 destflags: 8000 flagmask: 0000
ROB Commit RIP check...
ROB Commit RIP check Done...destination is REG_rip : 0

결국엔 invalid opcode 에러를 발생시키며 종료한다.

Invalid opcode at 0x7fffe6bfecde: split_invalid_basic_blocks 0, first_insn_in_bb? 0
Advertisements
Tagged with: , , , , , , , , , ,
Posted in 1) Memo
One comment on “20150114
  1. […] MARSS 디버깅 2015/01/14에 rip를 0으로 만들면서 비정상적으로 종료한다고 판단함. 하지만 그 주변 […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

누적 방문자 수
  • 103,571 hits
%d bloggers like this: