Opened 14 years ago

Closed 14 years ago

#6983 closed defect (duplicate)

deadlock on readReadyLock and socket lock

Reported by: Mark Spieth Owned by: danielk
Priority: major Milestone: 0.22
Component: MythTV - General Version: head
Severity: high Keywords:
Cc: Ticket locked: no

Description (last modified by Mark Spieth)

there are 2 problems with customevent

there is a deadlock between socket lock and readReadyLock and can happen on multi core machines. 4 cores or more with mythweb scheduling a program causes it to happen most times. doesnt seem to happen on a 2 core.

There may be a better way to fix this, but the attached solution works.

the 2nd is that customevent tries to send messages on sockets which are not connected (thus there are no listeners).

it gives

    write -> -1 565     BACKEND_MESSAGE[]:[]ASK_RECORDING 1 0 0 0[]:[]Ten
    News[]:[][]:[]A...
    writeStringList: Error, called with unconnected socket

type errors. pointless doing this

see also #6894 for this one.

Attachments (1)

19-backend-rec-event.patch (1.9 KB) - added by Mark Spieth 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by Mark Spieth

Attachment: 19-backend-rec-event.patch added

comment:1 Changed 14 years ago by Mark Spieth

Description: modified (diff)

comment:2 Changed 14 years ago by danielk

Milestone: unknown0.22
Owner: changed from Isaac Richards to danielk
Status: newassigned
Version: unknownhead

Refs #6969.

comment:3 Changed 14 years ago by danielk

Mark, can you provide a backtrace of the process in deadlock + the mythbackend -v socket,network,extra log? If you still have the core around and can't repro now the backtrace is more important.

There is an existing report of mythweb deadlocking the backend, but in that report we were sending data on a dead socket so that was my first concern.

I plan to set up mythweb again next week and investigate, but any info I have before then will be useful.

comment:4 Changed 14 years ago by danielk

Resolution: duplicate
Status: assignedclosed

dup #6969.

Note: See TracTickets for help on using tickets.