Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetchLite sometimes raises null pointer exception inside diff_trees #3

Open
ryanfb opened this issue Jun 20, 2016 · 3 comments
Open

Comments

@ryanfb
Copy link
Member

ryanfb commented Jun 20, 2016

Trying to send a publication to finalizer:

copy_branch_from_repo(approved/2016/06/20/O.Frange,_544, DDbDP_Editorial_Board/M.J.Albarran/O.Frange,_544, /srv/data/papyri.info/sosol/repo/boards/DDbDP Editorial Board.git, /srv/data/papyri.info/sosol/repo/users/james.cowey.git)
SendToFinalizerJob finished (publication_id: 51294 user_id: )
Actor crashed!
Java::JavaLang::NullPointerException:
        java.util.regex.Matcher.getTextLength(java/util/regex/Matcher.java:1234)
        java.util.regex.Matcher.reset(java/util/regex/Matcher.java:308)
        java.util.regex.Matcher.<init>(java/util/regex/Matcher.java:228)
        java.util.regex.Pattern.matcher(java/util/regex/Pattern.java:1088)
        java.util.regex.Pattern.split(java/util/regex/Pattern.java:1197)
        java.util.regex.Pattern.split(java/util/regex/Pattern.java:1259)
        clojure.string$split.invoke(string.clj:222)
        clojure.string$split.invoke(clojure/string.clj:222)
        clojure.string$split_lines.invoke(string.clj:230)
        clojure.string$split_lines.invoke(clojure/string.clj:230)
        gitwrapper.utils$diff_trees.invoke(utils.clj:105)
        gitwrapper.utils$diff_trees.invoke(gitwrapper/utils.clj:105)
        gitwrapper.utils$accumulate_diffs.invoke(utils.clj:114)
        gitwrapper.utils$accumulate_diffs.invoke(gitwrapper/utils.clj:114)
        gitwrapper.utils$accumulate_diffs.invoke(utils.clj:123)
        gitwrapper.utils$accumulate_diffs.invoke(gitwrapper/utils.clj:123)
        gitwrapper.utils$accumulate_diffs.invoke(utils.clj:123)
        gitwrapper.utils$accumulate_diffs.invoke(gitwrapper/utils.clj:123)
        gitwrapper.utils$accumulate_diffs.invoke(utils.clj:123)
        gitwrapper.utils$accumulate_diffs.invoke(gitwrapper/utils.clj:123)
        gitwrapper.utils$get_diffs.invoke(utils.clj:130)
        gitwrapper.utils$get_diffs.invoke(gitwrapper/utils.clj:130)
        gitwrapper.utils$_fetchLite$fn__57.invoke(utils.clj:209)
        gitwrapper.utils$_fetchLite$fn__57.invoke(gitwrapper/utils.clj:209)
        gitwrapper.utils$_fetchLite.invoke(utils.clj:207)
        gitwrapper.utils$_fetchLite.invoke(gitwrapper/utils.clj:207)
        java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:606)
        RUBY.copy_branch_from_repo(/srv/data/papyri.info/sosol/editor/app/models/repository.rb:219)
        RUBY.copy_to_owner(/srv/data/papyri.info/sosol/editor/app/models/publication.rb:1343)
        RUBY.send_to_finalizer(/srv/data/papyri.info/sosol/editor/app/models/publication.rb:800)
        RUBY.perform(/srv/data/papyri.info/sosol/editor/app/jobs/send_to_finalizer_job.rb:14)
        RUBY.yield_with_lock(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/with_advisory_lock-3.0.0/lib/with_advisory_lock/base.rb:77)
        RUBY.yield_with_lock_and_timeout(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/with_advisory_lock-3.0.0/lib/with_advisory_lock/base.rb:65)
        RUBY.with_advisory_lock_if_needed(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/with_advisory_lock-3.0.0/lib/with_advisory_lock/base.rb:48)
        RUBY.with_advisory_lock_result(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/with_advisory_lock-3.0.0/lib/with_advisory_lock/concern.rb:16)
        RUBY.with_advisory_lock(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/with_advisory_lock-3.0.0/lib/with_advisory_lock/concern.rb:10)
        RUBY.with_advisory_lock(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/with_advisory_lock-3.0.0/lib/with_advisory_lock/concern.rb:6)
        RUBY.perform(/srv/data/papyri.info/sosol/editor/app/jobs/send_to_finalizer_job.rb:12)
        RUBY.with_lock(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/activerecord-3.2.18/lib/active_record/locking/pessimistic.rb:72)
        RUBY.transaction(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/database_statements.rb:192)
        RUBY.transaction(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/activerecord-3.2.18/lib/active_record/transactions.rb:208)
        RUBY.transaction(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/activerecord-3.2.18/lib/active_record/transactions.rb:250)
        RUBY.with_lock(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/activerecord-3.2.18/lib/active_record/locking/pessimistic.rb:70)
        RUBY.perform(/srv/data/papyri.info/sosol/editor/app/jobs/send_to_finalizer_job.rb:11)
        RUBY.with_connection(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:129)
        RUBY.perform(/srv/data/papyri.info/sosol/editor/app/jobs/send_to_finalizer_job.rb:9)
        org.jruby.RubyKernel.public_send(org/jruby/RubyKernel.java:1945)
        RUBY.dispatch(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/celluloid-0.17.3/lib/celluloid/calls.rb:28)
        RUBY.dispatch(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/celluloid-0.17.3/lib/celluloid/call/sync.rb:16)
        RUBY.dispatch(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/celluloid-0.17.3/lib/celluloid/cell.rb:50)
        RUBY.task(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/celluloid-0.17.3/lib/celluloid/cell.rb:76)
        RUBY.task(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/celluloid-0.17.3/lib/celluloid/actor.rb:339)
        RUBY.initialize(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/celluloid-0.17.3/lib/celluloid/task.rb:44)
        RUBY.create(/home/rfb11/.rbenv/versions/jruby-1.7.12/lib/ruby/gems/shared/gems/celluloid-0.17.3/lib/celluloid/task/fibered.rb:14)
        java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1145)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:615)
        java.lang.Thread.run(java/lang/Thread.java:745)

However, manually copying the branch with Git (inside finalizer's repo) works:
sudo -u tomcat git fetch boards/DDbDP_Editorial_Board approved/2016/06/20/O.Frange,_544:DDbDP_Editorial_Board/M.J.Albarran/O.Frange,_544

@ryanfb
Copy link
Member Author

ryanfb commented Jun 20, 2016

I've re-deployed so that the editor and console are both at a known commit of sosol/sosol@f475dd9. Hopefully that fixes it?

@hcayless
Copy link
Contributor

This would happen if accumulate_diffs were called with a null 'newsha' or 'basesha' value. Obviously I didn't expect that to happen, but clearly it does. Will have to spend some time reacquainting myself with the code to figure out why...

@ryanfb
Copy link
Member Author

ryanfb commented Jun 20, 2016

It might have only happened as a side effect of e.g. the checkout (and thus the Rails console I was using) potentially being at c51db70 instead of 1c68eee? I haven't run into it again since pulling/re-deploying a known commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants