Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-11345

Error when submitting edit: deadlock detected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • Edit system
    • None

      Initially reported by chaban. Issue created by yvanzo from https://sentry.metabrainz.org/metabrainz/musicbrainz-server/issues/92185/?referrer=jira_plugin

      None: Failed query:
      	'SELECT pg_advisory_xact_lock(?, id)   FROM unnest(?::integer[]) AS id'
      	(22 ARRAY(0x96aab70))
      40P01 DBD::Pg::st execute failed: ERROR:  deadlock detected
      DETAIL:  Process 29235 waits for ExclusiveLock on advisory lock [16806,22,34,2]; blocked by process 29276.
      Process 29276 waits for ExclusiveLock on advisory lock [16806,22,0,2]; blocked by process 29235.
      HINT:  See server log for query details. [for Statement "SELECT pg_advisory_xact_lock(?, id)   FROM unnest(?::integer[]) AS id" with ParamValues: 1='22', 2='{"48","49","37","0","1","38","2","3","27","4","5","15","35","16","6","7","8","19","34","9","10","11","12","13","14"}']
      
      	Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x1b757980)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 123
      	Try::Tiny::try(CODE(0x1b75ff88), Try::Tiny::Catch=REF(0x1b7970a8)) called at lib/Sql.pm line 117
      	Sql::do(Sql=HASH(0x1b734098), "SELECT pg_advisory_xact_lock(?, id)   FROM unnest(?::integer["..., 22, ARRAY(0x96aab70)) called at lib/MusicBrainz/Server/Data/Role/EntityCache.pm line 152
      	MusicBrainz::Server::Data::Role::EntityCache::_delete_from_cache(MusicBrainz::Server::Data::Recording=HASH(0x13537ec8), 28789848, 28789849, 28784337, 28789850, 28789851, 28784338, 28789852, 28789853, ...) called at lib/MusicBrainz/Server/Data/Track.pm line 170
      	MusicBrainz::Server::Data::Track::_insert_hook_after(MusicBrainz::Server::Data::Track=HASH(0x13832250), ARRAY(0x9b97e58), HASH(0x1b754d90)) called at lib/MusicBrainz/Server/Data/CoreEntity.pm line 102
      	MusicBrainz::Server::Data::CoreEntity::insert(MusicBrainz::Server::Data::Track=HASH(0x13832250), HASH(0x1abb3d90), HASH(0x1b7721b8), HASH(0x1b79dc40), HASH(0x1b779750), HASH(0x1b746ac0), HASH(0x1b74bbc8), HASH(0x1b7972b8), HASH(0x1b73edc0), ...) called at lib/MusicBrainz/Server/Data/Medium.pm line 127
      	MusicBrainz::Server::Data::Medium::insert(MusicBrainz::Server::Data::Medium=HASH(0x13457620), HASH(0x1b790b40)) called at lib/MusicBrainz/Server/Edit/Generic/Create.pm line 48
      	MusicBrainz::Server::Edit::Generic::Create::insert(MusicBrainz::Server::Edit::Medium::Create=HASH(0x1b775dc0)) called at lib/MusicBrainz/Server/Data/Edit.pm line 551
      	MusicBrainz::Server::Data::Edit::create(MusicBrainz::Server::Data::Edit=HASH(0x12428180), "tracklist", ARRAY(0x1b726720), "release", MusicBrainz::Server::Entity::Release=HASH(0x1b195f98), "position", 1, "format_id", 12, ...) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 568
      	MusicBrainz::Server::Controller::WS::js::Edit::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93
      	Try::Tiny::try(CODE(0x1b768be8), Try::Tiny::Catch=REF(0x1aadac70)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 586
      	MusicBrainz::Server::Controller::WS::js::Edit::create_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x142c9e18), MusicBrainz::Server=HASH(0x1b6dc918), HASH(0x1b78b390)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 643
      	MusicBrainz::Server::Controller::WS::js::Edit::__ANON__() called at lib/Sql.pm line 322
      	Sql::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93
      	Try::Tiny::try(CODE(0x1b7ace78), Try::Tiny::Catch=REF(0x1b2fbfd8)) called at lib/Sql.pm line 335
      	Sql::_auto_transaction(CODE(0x1b192e38), Sql=HASH(0x1b734098)) called at lib/Sql.pm line 340
      	Sql::_run_in_transaction_one(CODE(0x1b192e38), Sql=HASH(0x1b734098)) called at lib/Sql.pm line 355
      	Sql::run_in_transaction(CODE(0x1b192e38), Sql=HASH(0x1b734098)) called at lib/MusicBrainz/Server/Model/MB.pm line 19
      	MusicBrainz::Server::Model::MB::with_transaction(MusicBrainz::Server::Model::MB=HASH(0x11c4c058), CODE(0x1b192e38)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 654
      	MusicBrainz::Server::Controller::WS::js::Edit::submit_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x142c9e18), MusicBrainz::Serv
        File "MB.pm", line 19, in MusicBrainz::Server::Model::MB::with_transaction
          Sql::run_in_transaction($code, $self->context->sql);
        File "Edit.pm", line 654, in MusicBrainz::Server::Controller::WS::js::Edit::submit_edits
          });
        File "Edit.pm", line 618, in Catalyst::dispatch
          $self->submit_edits($c, $c->forward('/ws/js/get_json_request_body'));
        File "Server.pm", line 385, in MusicBrainz::Server::__ANON__
          $c->$orig(@args)
        File "Server.pm", line 352, in MusicBrainz::Server::with_translations
          $code->();
      ...
      (3 additional frame(s) were not displayed)
      

      Resubmitting editing form worked though, see https://musicbrainz.org/edit/76653094

            bitmap Michael Wiencek
            chaban chaban
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package