prashant-r / Scalaris

DHT Chord Transaction
Apache License 2.0
0 stars 0 forks source link

rm_tman handles node removing incorrect #47

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Checkout latest SVN version
2. Configure Scalaris to use BUILTIN mode
3. Configure (./configure)
4. Make (make)
5. run: bin/boot.sh -i
6. run: bin/cs_local.sh -i
7. Crash node1

What is the expected output? What do you see instead?
The boot node should detect the crash by letting rm_tman remove the dead node 
from the 
nodelist.

Instead, the boot node throws and caught exception:

[error] Error: exception {{badmatch,'boot@simpknot.hq.kred'},
    [{cs_send,get,2},
     {node,equals,2},
     {nodelist,'-remove/3-fun-0-',2},
     {nodelist,remove_helper,4},
     {nodelist,remove,3},
     {rm_tman,on,2},
     {gen_component,loop,4},
     {gen_component,start,4}]} during handling of {crash,
         <7023.104.0>} in module rm_tman in ({208084359732034138345123403104879821015,
                  {[{node,
                     <7023.104.0>,
                     115765969459960797133720129218737678305,
                     0}],
                   {node,
                    <0.103.0>,
                    208084359732034138345123403104879821015,
                    0},
                   [{node,
                     <7023.104.0>,
                     115765969459960797133720129218737678305,
                     0}]},
                  20,
                  max_interval,
                  {trigger_dynamic,
                   {#Fun<trigger.0.132236546>,
                    #Fun<trigger.1.15969337>,
                    #Fun<trigger.2.96065014>,
                    trigger,
                    #Ref<0.0.0.2131>}},
                  [],
                  false})

What version of the product are you using? On what operating system?
Latest SVN.

Please provide any additional information below.
When I track this issue down to cs_send:get/2 I get this comparison throwing 
the exception:

get(Name, Pid = _Node) ->
    A = node(Name),
    A = node(Pid), % we assume that you only call get with local pids
    Name.

node(Name) = 'node1@simpknot.hq.kred'
node(Pid) = 'boot@simpknot.hq.kred'

Original issue reported on code.google.com by Uwe.Daue...@gmail.com on 28 May 2010 at 9:15

GoogleCodeExporter commented 8 years ago
the error is in node:equals when the first parameter is a pid but does not 
belong to
the node's process -> then cs_send:make_global won't work.
I'll fix this asap.

Original comment by nico.kru...@googlemail.com on 28 May 2010 at 10:03

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
thanks for the report - fixed as of r817

Original comment by nico.kru...@googlemail.com on 28 May 2010 at 3:50

GoogleCodeExporter commented 8 years ago
Thanks, the issue is resolved!

Original comment by Uwe.Daue...@gmail.com on 28 May 2010 at 7:07