Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#9363 closed Bug Report (Fixed)

Startup command causes deadlock of Scheduler schedLock mutex

Reported by: Andy@… Owned by: gigem
Priority: minor Milestone: 0.24.1
Component: MythTV - Scheduling Version: 0.24
Severity: high Keywords:
Cc: Ticket locked: no

Description

I have a startupCommand script that reads the mythweb status web page to get some information.
The thread running mythweb attempts to grab the schedLock mutex in Scheduler::getAllPending, this is already being held by the thread running RunScheduler?() where the startup command is called.

The solution may be to release the schedLock mutex while calling myth_system(startupCommand)

Also this has happened when calling the shutdown script as well. I have got around the problem by removing the mythweb reads in the scripts.

Attachments (0)

Change History (5)

comment:1 Changed 3 years ago by gigem

  • Status changed from new to assigned

comment:2 Changed 3 years ago by beirdo

The proposed mutex playing in myth_system is not acceptable as it would potentially adversely affect FAR too much of the system. My suggestion would be just to not do that, but we'll see if gigem has a better idea there.

comment:3 Changed 3 years ago by gigem

There won't be any mutex playing within myth_system. The mutex unlocking and locking goes around the call to myth_system. I don't see a problem with this as long as the code handles the unlikely case that another thread acquired the mutex and changed something while myth_system was running. I already have a patch to do this for the startup command. I still need to look at the shutdown command.

comment:4 Changed 3 years ago by gigem

  • Milestone changed from unknown to 0.24.1
  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed in SHA: 966ad7d9.

comment:5 Changed 3 years ago by beirdo

My apologies, I misread.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.