Disk I/O error after PC sleep [#21538]

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Disk I/O error after PC sleep [#21538]

Re: Disk I/O error after PC sleep [#21538]

by cjnaz » Wed Apr 09, 2025 4:40 pm

OK, fails on further testing.

I put the notebook to sleep before lunch, and then waking after lunch MM is stuck in the same error pop-up loop.
Note that the network drive (mapped to Z:) is available to my file manager and other apps on the notebook, but MM is still stuck. The error popup reemerges after 20 seconds, or just a few seconds after hitting OK button.

Database file Z:\media...\MM5.DB cannot be accessed.
Error: disk I/O error

After hitting OK on the above pop-up and then hitting the X (close) button on MM window, after a few seconds an Application Error pop-up:

Application throw an exception. Not all close query events are finished!! (C:\Sources\MediaMonkey2024_2\HTML5Monkey\BaseApp.pas. line 7801
Would you like to restart MediaMonkey in Safe mode?

I selected Restart (not in Safe mode)

It seems that MM can't recover some in-process DB operations even after the DB file is again accessible. No way to make DB operations pause for 20 seconds after wake from sleep?

Re: Disk I/O error after PC sleep [#21538]

by Peke » Wed Apr 09, 2025 3:33 am

Hi,
Thank you for confirming.
cjnaz wrote: Tue Apr 08, 2025 9:09 pm On 2024.2.0.3150 after wake no IO error messages. Tested twice after 30+ minutes asleep. (I understand the timing issue that Peke brings up.)
That aspect was fixed in 3150+ eg. MM do not throw I/O error immediately but retries several times to give time to mapped/UNC drive wake up.

Re: Disk I/O error after PC sleep [#21538]

by cjnaz » Tue Apr 08, 2025 9:09 pm

On 2024.0.0.3082 after wake I got one IO error message which I dismissed and then the current song started playing.
On 2024.1.0.3113 after wake gives me repeated disk I/O errors, as reported, requiring the process to be killed.
On 2024.2.0.3150 after wake no IO error messages. Tested twice after 30+ minutes asleep. (I understand the timing issue that Peke brings up.)

My vote is that a single on-wake error message pop-up to be dismissed is quite fine, as long as MM functions normally afterward.

Thank you,
cjn

Re: Disk I/O error after PC sleep [#21538]

by Peke » Tue Apr 08, 2025 6:58 pm

cjnaz wrote: Mon Apr 07, 2025 9:28 pm Peke, I have a gigabit link between the computers. I don't see any performance issues with 8722 .mp3s in the library.
Problem may recur on remapping network paths on back from sleep as there is an delay in which Windows remap/regain access to network path. It is hit and miss case if MM in that time tries to access DB.

Let us know if problem recur.

Re: Disk I/O error after PC sleep [#21538]

by cjnaz » Mon Apr 07, 2025 9:28 pm

I checked out builds 3082 and 3113 (the current Standard Version on your Download page for Gold upgrade) with simply putting the notebook to sleep and waking it up again. No DB errors. I'll let it sleep for 30 minutes when I get a chance. So currently I can't reproduce the problem and thus can't test if its fixed. I'll get back to you.

Peke, I have a gigabit link between the computers. I don't see any performance issues with 8722 .mp3s in the library.

Re: Disk I/O error after PC sleep [#21538]

by rusty » Fri Mar 21, 2025 5:22 pm

fyi, this is fixed in build 2024.2.0.3150 which is now available at:

viewtopic.php?f=6&t=86639&sd=d

Can you confirm that it resolves the problem for you?

Thanks!

-Rusty

Re: Disk I/O error after PC sleep [#21538]

by Peke » Tue Mar 11, 2025 7:20 pm

cjnaz wrote: Tue Mar 11, 2025 5:04 pm Thanks. I'll track the bug report.
I've been in software development for decades. There's no value in being a jerk.
Exactly, we are lucky to have users to keep us on toes ;)

Happy Monkeying!

I wonder what bandwidth you have and do you observe slowdown when using DB from LAN/WLAN against Local hdd? for me it is big difference on 200k library.

Re: Disk I/O error after PC sleep [#21538]

by cjnaz » Tue Mar 11, 2025 5:04 pm

Thanks. I'll track the bug report.
I've been in software development for decades. There's no value in being a jerk.

regards,
cjn

Re: Disk I/O error after PC sleep

by Peke » Tue Mar 11, 2025 3:55 pm

Hi,
That I agree with you. I was just explaining "visually" why it happens. There is real space to improve and you just give an idea how.

Want to thank you for patience, talk, especially constructive talk always bring better results and improvements.

Will update this topic as soon as I create bug report.

EDIT: Added as https://www.ventismedia.com/mantis/view.php?id=21538

Re: Disk I/O error after PC sleep

by cjnaz » Mon Mar 10, 2025 1:07 am

Thank you for your reply. Sorry, I don't follow your example.
"Please List me #$@%$&%&#@* all ^$@#*#^$ test @#*&@^#$** and delete %$#@!^&%# all @&^%*$#@*&^#$@*&^ files from ^&%$#@&#^%$@&^ RHEL9 Host"
I think you're suggesting that after a sleep MM cannot determine if it has a correct connection to the the .DB file, and therefore it could blissfully do damage. Clearly, based on the endless loop of error messages, MM can determine that it has not successfully reconnected the .DB file. To the best of my (user) knowledge, MM is not doing anything when the machine goes to sleep. It would be reasonable to terminate any in-process operations when recovering from sleep, and tell the user that operations were aborted.

I'm saying that MM should be able to correctly reconnect to the .DB file, just as easily as when the application is started. Currently, I have to kill MM via the task manager and then it will start just fine. I deal with no other application that cannot recover from sleep wake-up or a network loss/recovery on Windows or Linux. That's a bug.

At a minimum, it should show the error and give options for terminate or restart, if it cannot successfully recover from sleep.

regards,
cjn

Re: Disk I/O error after PC sleep

by Peke » Fri Mar 07, 2025 2:40 pm

Hi,
Not sure I understand your point.

eg. if MM tries to: "Please List me #$@%$&%&#@* all ^$@#*#^$ test @#*&@^#$** and delete %$#@!^&%# all @&^%*$#@*&^#$@*&^ files from ^&%$#@&#^%$@&^ RHEL9 Host" I really wonder what you would expect MM to do, because if it removes garbage and execute it is very possible that it would delete all files on "RHEL9 Host". So I would rather throw Error than execute/continue command. Especially if I retry 100 times.

Re: Disk I/O error after PC sleep

by cjnaz » Thu Mar 06, 2025 10:32 pm

Nonsense.

Any application that can't gracefully recover from a network outage (after the network is back) has a critical bug (perhaps a design bug). Critical bugs must be high on the list for fixing.

I've used MM for about 10 years on 3 Windows boxes. This same problem has been there all along. On my current machine (Win11 notebook), I get stuck in a forever loop of "Database file ... cannot be accessed. Error: disk I/O error." Dismiss the message and it comes right back. I have to kill the app/process via the task manager, and then its happy with restarting.

In my case the MM5.DB is on a always on file share on my network (samba share from a RHLE9 host).

Inconceivable!

Re: Disk I/O error after PC sleep

by Peke » Wed Aug 05, 2020 8:45 am

Hi,
Unfortunately if Local copy works something breaks MMW connection to DB, I meant that MMW tries 100 Times to retry to restore connection and access to DB before throw error.

MMW needs to have constant access to DB as some users have DB sized multiple GB and loading that to memory is not an option due the performance issues.

WiFi connection is unstable on many hardware (which I found out once I bought ASUS RT-AX92U duo Air Mesh set and Switched to WiFi 6(AX) band) which due the cycling of channels and devices can cut connection and takes 1-2s restore it.

Something makes things cutting connection for you.

Re: Disk I/O error after PC sleep

by Aff » Sun Jul 19, 2020 9:55 am

Hi

When the DB is in the Portable folder on the local drive, it works without errors.

What do you mean by "MM tried 100 to access MM.DB"?

When the DB is on the NAS, I get the errors even when the NAS HD wasn't sleeping.

Re: Disk I/O error after PC sleep

by Peke » Sat Jul 18, 2020 9:57 pm

Hi,
Hmmm. lets make small test?

Can you copy \\nas\Music\!MediaMonkeyDB!\MM.DB to Portable subfolder -> remove custom location and try to replicate. I tried to replicate and only way I can get I/O error is when NAS HDD was a sleep and it takes 5s to spinup and remount shared folder. That behavior is normal as MM tried 100 to access MM.DB.

Top