Project

General

Profile

Actions

Bug #1998

closed

xmera Omnia - Collection #2227: RM related bugs

A NoMethodError occurred in issues#create

Added by liaham about 1 year ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Affected Version:
Compatible Redmine Version:

Description

The error occurs in several scenarios:

  • creating a sub issue (see below)
  • deleting any issue
A NoMethodError occurred in issues#create:

  undefined method `with_advisory_lock!' for Issue:Class
  lib/redmine/nested_set/issue_nested_set.rb:185:in `lock_nested_set'

Relative URL:

/projects/infrastruktur/issues

Used parameters:

{"utf8"=>"✓", "authenticity_token"=>"<token>", "form_update_triggered_by"=>"", "back_url"=>"/issues/334", "issue"=>{"is_private"=>"0", "project_id"=>"5", "tracker_id"=>"2", "subject"=>"test", "description"=>"", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "fixed_version_id"=>"", "parent_issue_id"=>"334", "start_date"=>"", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "watcher_user_ids"=>[""]}, "was_default_status"=>"1", "dmsf_attachments"=>{"1"=>{"filename"=>"xss.pdf", "description"=>"", "token"=>"<token>"}}, "commit"=>"Anlegen", "controller"=>"issues", "action"=>"create", "project_id"=>"infrastruktur"}

Database: 10.5.23-MariaDB-0+deb11u1 - Debian 11


Related issues 1 (1 open0 closed)

Copied to Redmine - Bug #2269: A NoMethodError occurred in issues#createNewliaham

Actions
Actions #1

Updated by liaham about 1 year ago

  • Target version changed from unplanned to 4.2.2
Actions #2

Updated by liaham about 1 year ago

  • Target version changed from 4.2.2 to 4.3.0
  • Parent task deleted (#1934)
Actions #3

Updated by liaham about 1 year ago

  • Status changed from New to In Progress
  • Assignee set to liaham

The error is not reproducible in our development environment.

Actions #4

Updated by liaham about 1 year ago

  • Parent task set to #2012
Actions #5

Updated by liaham about 1 year ago

  • Project changed from xmera Omnia to Redmine
  • Category deleted (30)
  • Target version deleted (4.3.0)
Actions #6

Updated by liaham about 1 year ago

Happens also when deleting issues:

F, [2024-02-18T10:42:44.627639 #690690] FATAL -- : [f27f5560-801f-4926-aab2-58a782178db9]   
[f27f5560-801f-4926-aab2-58a782178db9] NoMethodError (undefined method `with_advisory_lock!' for Issue:Class):
[f27f5560-801f-4926-aab2-58a782178db9]   
[f27f5560-801f-4926-aab2-58a782178db9] lib/redmine/nested_set/issue_nested_set.rb:185:in `lock_nested_set'
[f27f5560-801f-4926-aab2-58a782178db9] lib/redmine/nested_set/issue_nested_set.rb:139:in `destroy_children'
[f27f5560-801f-4926-aab2-58a782178db9] app/models/issue.rb:251:in `destroy'
[f27f5560-801f-4926-aab2-58a782178db9] app/controllers/issues_controller.rb:463:in `block in destroy'
[f27f5560-801f-4926-aab2-58a782178db9] app/controllers/issues_controller.rb:461:in `each'
[f27f5560-801f-4926-aab2-58a782178db9] app/controllers/issues_controller.rb:461:in `destroy'
Actions #7

Updated by liaham about 1 year ago

The problem seem to occur especially with Mariadb. See this conversation.

Actions #8

Updated by liaham about 1 year ago

Seemed to be possible with MariaDB 11.1.1: https://mariadb.com/kb/en/set-transaction/#isolation-level.

Actions #9

Updated by liaham about 1 year ago

For mariadb version 10 the variable transaction_isolation crashes the application.

Variable tx_isolation does not crash the application but leads to the same error as reported.

Actions #10

Updated by liaham about 1 year ago

  • Description updated (diff)
Actions #11

Updated by liaham about 1 year ago

  • Description updated (diff)
Actions #12

Updated by liaham about 1 year ago

Solution:

# config/additional_environment.rb

require 'with_advisory_lock' if Gem::Specification.find_all_by_name('with_advisory_lock').any?
Actions #13

Updated by liaham about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100
Actions #14

Updated by liaham 9 months ago

  • Parent task changed from #2012 to #2227
Actions #15

Updated by liaham 8 months ago

  • Category set to 36
Actions #16

Updated by liaham 8 months ago

  • Copied to Bug #2269: A NoMethodError occurred in issues#create added
Actions #17

Updated by liaham 8 months ago

  • Target version set to 5.1.3
Actions

Also available in: Atom PDF