Access to mythbackend hangs v33

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Access to mythbackend hangs v33

Post by white_haired_uncle »

mythbackend version: fixes/33 [v33.1+fixes.202303020919.c273ed0f9a~ubuntu22.04.1]

mythfrontend version: fixes/33 [v33.1-5-g7f288be61b]

Trying to reconfigure mythmusic (more on that later). Myth does NOT have write access to the storage group (nor should it). When I try to do a scan, I get a lot of errors, and then I lose access to port 6543 on the backend completely. Tried to restart the frontend, but now it won't start as it can't connect to the backend. Tried to connect via mythweb on another machine, which fails.

Code: Select all

Mar 22 00:35:32 wolverine mythfrontend: mythfrontend[5564]: E FileCopy remotefile.cpp:228 (openSocket) RemoteFile::openSocket(file data socket): Failed to open socket, error was filetransfer_unable_to_create_subdirectory
Mar 22 00:35:32 wolverine mythfrontend: mythfrontend[5564]: E FileCopy remotefile.cpp:623 (CopyFile) RemoteFile::CopyFile: Failed to open file (myth://Music@mythbackend/Jimmy Buffett/Songs You Know By Heart/00-why dont we get drunk.mp3) for writing.
Mar 22 00:36:04 wolverine mythfrontend: mythfrontend[5564]: E MythSocketThread(-1) mythsocket.cpp:811 (ReadStringListReal) MythSocket(7f316c057630:80): ReadStringList: Error, timed out after 30000 ms.
Mar 22 00:36:04 wolverine mythfrontend: mythfrontend[5564]: E FileCopy mythsocket.cpp:355 (SendReceiveStringList) MythSocket(7f316c057630:-1): No response.
Mar 22 00:36:04 wolverine mythfrontend: mythfrontend[5564]: E FileCopy remotefile.cpp:190 (openSocket) RemoteFile::openSocket(file data socket): Did not get proper response from mythbackend:6543
Mar 22 00:36:04 wolverine mythfrontend: mythfrontend[5564]: E FileCopy remotefile.cpp:228 (openSocket) RemoteFile::openSocket(file data socket): Failed to open socket, error was invalid response

Code: Select all

Mar 22 00:35:32 mythbackend mythbackend: mythbackend[1116]: I ProcessRequest mainserver.cpp:1814 (HandleAnnounce) MainServer: MainServer::ANN Playback
Mar 22 00:35:32 mythbackend mythbackend: mythbackend[1116]: I ProcessRequest mainserver.cpp:1816 (HandleAnnounce) MainServer: adding: wolverine(55d650a69c20) as a client (events: 0)
Mar 22 00:35:32 mythbackend mythbackend: mythbackend[1116]: E ProcessRequest mainserver.cpp:2045 (HandleAnnounce) MainServer: FileTransfer filename '/mythdata/mythmusic//Jimmy Buffett/Songs You Know By Heart/00-why dont we get drunk.mp3' is in a subdirectory which does not exist, and can not be created.
Mar 22 00:35:32 mythbackend mythbackend: mythbackend[1116]: I MythSocketThread(96) mainserver.cpp:7952 (connectionClosed) Control sock(55d650a59650) disconnected
Mar 22 00:35:32 mythbackend mythbackend: mythbackend[1116]: I MythSocketThread(69) mainserver.cpp:7899 (connectionClosed) Playback sock(55d650a69c20) 'wolverine' disconnected
I looked at the backend, and there were 58 entries in netstat for 6543, most of them in CLOSE_WAIT. IIRC, there is no timeout for CLOSE_WAIT, but I let it go for 15 minutes or so to see if it started to clear up, which it didn't. Restarted backend, and all is well (I assume mythmusic still won't work, I didn't try it, but at least I can connect to the backend again).

I know I'm doing something "bad" with mythmusic. And 58 connections sure seems like a very small number to hang an application (maybe the OS thinks it's some sort of DDoS or something?). But from what I can remember, a buildup of sockets in CLOSE_WAIT is usually an application error.
User avatar
kmdewaal
Developer
Posts: 641
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Access to mythbackend hangs v33

Post by kmdewaal »

Can this be the same as issue #686, see https://github.com/MythTV/mythtv/issues/686.
white_haired_uncle
Senior
Posts: 244
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: Access to mythbackend hangs v33

Post by white_haired_uncle »

It doesn't sound very similar to me. I don't have issues with playback, because I can't play anything.

I'm pretty sure my mythmusic issue is just because I'm old and stubborn and don't want myth messing with my music collection, but that's a whole different issue IMO. My concern here is it looks like when mythbackend can't write to (at least) the Music storage group, it leaves sockets unclosed, eventually leading to mythbackend becoming inaccessible, which IMO shouldn't be possible no matter how wrong my mythmusic setup is.
Post Reply