Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1257 closed patch (wontfix)

cdrom detection causing 10 second delay in mythplugin_init

Reported by: russelb@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythmusic Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

After installing mythmusic, I noticed that it was taking mythmusic about 10 seconds to intialize. I inserted some time difference calculations throughout the code to track it down and found that it was CDWriterDevice() in globalsettings.cpp.

It is the execution of "cdrecord --scanbus -dev=ATA" that is blocking for me. When executing it from the command line, I see the following output: (Note that /dev/hdb is one of my hard drives)

Warning: Using badly designed ATAPI via /dev/hd* interface. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. Error trying to open /dev/hdb exclusively (Device or resource busy)... retrying in 1 second. cdrecord: Device or resource busy. Cannot open '/dev/hdb'. Cannot open SCSI driver.

Changing "ATA" to "ATAPI" in the arguments to cdrecord, as shown in the patch, gets rid of this problem for me. Furthermore, this change allows my cdrw drive to be detected, while it was not detected before.

I do not have sufficient knowlege about the difference between "-dev=ATA" and "-dev=ATAPI" to know the whole story behind this change. Hopefuly someone with more knowlege in the area can help shed some light on the topic.

I am also available on irc.freenode.net as "drumkilla".

Attachments (1)

cdrecord.patch (891 bytes) - added by russelb@… 14 years ago.

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by russelb@…

Attachment: cdrecord.patch added

comment:1 Changed 14 years ago by Isaac Richards

Resolution: wontfix
Status: newclosed

Breaks detection of my burner.

comment:2 Changed 14 years ago by Isaac Richards

(In [8982]) Add a timeout for waiting for cdrecord --scanbus to return. Consolidate the code more. Add -dev=ATAPI for a third method of trying to get a working device.

Minimizes the delay if cdrecord decides to sit there for 10 seconds picking its nose. Refs #1257.

Note: See TracTickets for help on using tickets.