view · edit · sidebar · attach · print · history

20120228-check-accessor-Package-Registration-check-parallel-runs-oddb_org

<< Masa.20120229-check-data-float-error-fix-updating-atc_code-email-testenvironment-check-job-mail-oddb_org | Index | Masa.20120227-check-accessor-class-ActiveAgent-AtcClass-Sequence-fix-ATCOverview-error-oddb_org >>


  1. Fix error oddb.org
  2. Check accessor class oddb.org
  3. Fix analysis description oddb.org
  4. Reproduce Persist segmentation fault
  5. Parallel oddbd (test locally)

Commits
  1. Check accessor classes of ODDB::Package (oddb.org)
  2. Check accessor classes of ODDB::Registration (oddb.org)

Fix error oddb.org

Error

error in SBSM::Session#to_html: /de/gcc/limitation_analysis/group/2225/position/no-text805608557274727137
NoMethodError
undefined method `pointer' for #<Array:0x0000001b1a5048>
/home/masa/ywesee/oddb.org/src/view/analysis/limitationtext.rb:35:in `limitation_text_title'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.5/lib/htmlgrid/composite.rb:67:in `create'
/usr/local/lib/ruby/gems/1.9.1/gems/htmlgrid-1.0.5/lib/htmlgrid/composite.rb:281:in `compose_component'

Note

  • After rebooting, this error is gone.

Check accessor class oddb.org

Package

  • bin/oddb
 masa@masa ~/ywesee/oddb.org $ ruby -I . -rcheck_class bin/oddbd
masa@masa ~/ywesee/oddb.org $ bin/admin
ch.oddb> check_package_accessor_class

Result

Commit

Registration

  • bin/admin
 ch.oddb> check_registration_accessor_class

Result

Commit

Fix analysis description oddb.org

bin/admin

ch.oddb> analysis_group('2225').position('00').descriptions.update_values({'de' => 'Neoplasien, hereditär'})
-> {"de"=>"Neoplasien, hereditär", "fr"=>"\\textbf{Néoplasies héréditaires}"}
ch.oddb> analysis_group('2225').position('00').descriptions.update_values({'fr' => 'Néoplasies héréditaires'})
-> {"de"=>"Neoplasien, hereditär", "fr"=>"Néoplasies héréditaires"}
ch.oddb> analysis_group('2225').position('00').odba_store
-> Neoplasien, hereditär

Reproduce Persist segmentation fault

Error

Note

  • /usr/local/lib/ruby/gems/1.9.1/gems/odba-1.0.8/lib/odba/persistable.rb:411
    def odba_stubize(obj, opts={}) # :nodoc:
      return false if(frozen?)
      id = obj.odba_id
      odba_potentials.each { |name|
        var = instance_variable_get(name)
        # must not be synchronized because of the following if
        # statement (if an object has already been replaced by
        # a stub, it will have the correct id and it
        # will be ignored) 
        case var
        when Stub   # L.411
          # no need to make a new stub
        when Persistable
 ...

Experiment

  • bin/admin
 ODBA::Stub = 'hoge'
  • Console log
 (eval):1: warning: already initialized constant Stub

Result

  • Access failed, but segmentation fault does not happen

/var/log/apache/error_log

Note

  • It is difficult to reproduce segmentation fault

suspend

Parallel oddbd (test locally)

Concept

  • If the main oddbd threads go over 30 then create a new oddb process
  • And new request should be sent to the new process until the main oddbd threads get down under 30.

Check Milestones

  • First, run two process using same database
  • Second, switch sending a request
  • Next, create and kill a new process from the main process

Experiment

  • test.rb
pid = spawn('/home/masa/work/oddb.org/bin/oddbd; echo "oddb end"')
p "spawn_pid = #{pid}"
sleep 30
Process.kill('KILL', pid)
child = Process.detach(pid)
p "child = #{child}"
p "end"

Note

Patch

Note

  • After 20 threads, a new process starts
  • After 30 threads, a request is sent to the second server
  • But session object is not shared. Sometimes an user has to log-in two times
view · edit · sidebar · attach · print · history
Page last modified on February 29, 2012, at 06:45 AM