Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Panic When Making USB Data Connection With 5th Gen Video iPod
« previous next »
  • Print
Pages: [1]

Author Topic: Panic When Making USB Data Connection With 5th Gen Video iPod  (Read 369 times)

Offline iPodVT

  • Member
  • *
  • Posts: 105
Panic When Making USB Data Connection With 5th Gen Video iPod
« on: December 20, 2022, 09:04:41 PM »
I have been getting very frequent Panic crashes with one particular 5th Gen Video iPod (MA002LL/A) when I connect it via USB to my MacBook Pro running macOS 10.13.6 - it's been happening about 80% of the time.  This iPod has a standard 30GB HD with zero Reallocs and zero Pending.  It had a very recent dev build on it but just now I updated to today's dev build and it's still happening.  So I tried a bunch of other 5/5.5/7 Gens and here's what happened (including the case described above):

Crashers:
5th Gen (MA002LL/A) with 30GB HD (0 Reallocs, 0 Pending) running dev build from 22/12/20
5th Gen (MA002LL/A) with 30GB HD (0 Reallocs, 0 Pending) running dev build from 22/12/04
5th Gen (MA147LL/A) with 60GB HD (0 Reallocs, 0 Pending) running dev build from 22/12/15
5.5 Gen (MA446LL/A) with 30GB HD (0 Reallocs, 0 Pending) running dev build from 22/11/23
5.5 Gen (MA450LL/A) with 80GB HD (0 Reallocs, 0 Pending) running dev build from 22/11/15

Non Crashers:
5.5 Gen (MA446LL/A) with iFlash-Solo, 128GB microSD running dev build from 22/12/16
5.5 Gen (MA444LL/A) with iFlash-Solo, 128GB microSD running dev build from 22/12/16
7th Gen Classic with 160GB HD running dev build from 22/12/15
7th Gen Classic with 160GB HD running dev build from 22/12/15

This seems to suggest that the crashing condition is limited to 5 and 5.5 Gens with HDs.  Here is the display from one of the crashes:

 *PANIC*
 null ctrl req
pc:0007b324
sp:000e2dc0
    A: 00065d44
bt end

Of course, as soon as I tried one more time to get a Panic screen to transcribe, all of the crashers stopped crashing, until finally the original crasher crashed again, and then some of the others did too.

I hope this is helpful/useful.
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #1 on: December 22, 2022, 11:25:04 AM »
This is probably due to changes I made to the USB stack a while back (over a year now, actually). A bit odd that it's only rearing its head now.

Does this happen only with Mac?
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 105
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #2 on: December 22, 2022, 12:24:22 PM »
Funny - I just realized that I don't think I've ever connected an iPod to Windows while running Rockbox - only while running the Apple firmware in order to reformat the iPod for Windows and/or to install/update Rockbox.  Those are pretty much the only things I do in Windows (and the only reason I have a Windows machine).

In any case, I tried the first mentioned iPod five times with Windows 10 and it never crashed.  Then I tried it five times with a MacBook Air running macOS 10.15.7 Catalina and it never crashed.  Then I tried it several times with my main computer (2012 MacBook Pro running macOS 10.13.6 High Sierra) and it crashed about 50% of the time.

Later today/tonight I can try other iPods with the Windows and Catalina machines, or conduct other tests if you'd like - just let me know.

Thanks.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 105
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #3 on: December 22, 2022, 12:30:05 PM »
I should also mention that I have been experiencing the panic crashes off and on for quite a while - months at least - but they had been too infrequent and unpredictable, and I was too inexperienced with Rockbox to post a meaningful report.  And I typically only connect while running Rockbox (rather than the Apple firmare) if I am just doing very small scale file transfers or checking the content of things like config files.
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #4 on: December 22, 2022, 05:05:33 PM »
Well, one "solution" might be to just remove the check that produces that error message, although I don't really like the idea. The old USB stack didn't have this check, so it's possible the error was happening sometimes under the old USB stack, but didn't cause any issues (or just caused different issues). In case you'd like to try, this build has the error disabled. It's not really a proper fix, but it might allow you to get a connection going.

In the long term the iPod 5g's USB driver will need to be modernized to take advantage of the better control request handling available in the updated USB stack. Right now it's running using a compatibility layer which is intended to mimic the behavior of the old USB stack... it's not very robust.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 105
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #5 on: December 23, 2022, 04:11:17 PM »
Thanks very much for supplying that build for me.  I clean installed it and it never crashed over the course of multiple (at least five) USB connection attempts.

Before I installed it I tried once more to connect with my previous installation to see if it would still crash, and it did.

After the ~five successful USB connection attempts, I rebooted into the Apple firmware, copied my personalized config.cfg, shortcuts.txt, tagnavi_custom.config, and theme files into the new installation, rebooted into Rockbox and tried five more USB connections, and it still didn't crash at all.

One thing I noticed:  after each unmounting of the iPod, when I disconnected the cable I got "Error accessing playlist control file".  I see that from time to time, but with this new installation I'm seeing it every time.  I've often wondered what the significance is of that message.

I should say that I don't mind the relatively small inconvenience of it crashing if that is a better event than not getting an error message and continuing to operate in a potentially unstable/undefined condition, unless there are potential negative consequences to the panic crash such as losing lots of changes that I might have made during the session leading up to the crash.  Usually, if I reboot (via hard reset) immediately after one of these crashes I'm able to successfully make a USB connection if I plug in the iPod immediately after the reboot, or even keep the iPod plugged in when I do the hard reset.  (That was not the case when I initially booted today to begin this testing.)  In any case, I prefer to operate in an environment that you consider to be best and safest.

Question:  Am I mischaracterizing these events by referring to them as crashes?  Are they, instead, intentional terminations?  You referred to them as "error message".

Again, thanks.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 105
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #6 on: December 23, 2022, 05:31:40 PM »
I put some music and a playlist on the iPod and the "Error accessing playlist control file" stopped happening.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 884
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #7 on: December 24, 2022, 12:25:48 AM »
I think if you don't have music playing you will see that message since the playlist control file hasn't been made yet
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #8 on: December 24, 2022, 06:43:49 PM »
Quote from: iPodVT on December 23, 2022, 04:11:17 PM
Question:  Am I mischaracterizing these events by referring to them as crashes?  Are they, instead, intentional terminations?  You referred to them as "error message".

Yeah it's just checking for something that isn't supposed to happen and bailing out intentionally. Crashing the system might be a bit too aggressive though ;)
Logged

Offline Outland

  • Member
  • *
  • Posts: 10
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #9 on: January 17, 2023, 06:59:31 AM »
I've experienced exactly this crash with my 5.5G as well when connecting to my Mac.
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #10 on: January 17, 2023, 08:26:28 AM »
Sorry, that's because I forgot to merge the fix. I'll try to get that done today.
Logged

Offline amachronic

  • Developer
  • Member
  • *
  • Posts: 271
Re: Panic When Making USB Data Connection With 5th Gen Video iPod
« Reply #11 on: January 18, 2023, 03:02:02 PM »
OK, a slightly improved version of the fix is now merged. Download it here.

Let me know if it still has trouble connecting.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Panic When Making USB Data Connection With 5th Gen Video iPod
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.114 seconds with 24 queries.