Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep theĀ Forum RulesĀ in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For exampleĀ “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post willĀ not bring you to the same post, in Dutch, as there is no translation for that post!



Pi-Baker 2.2.3 - Ba...
 
Share:
Notifications
Clear all

[Solved] Pi-Baker 2.2.3 - Backup an bigger drive Crash

15 Posts
3 Users
0 Reactions
3,473 Views
(@massaguana)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  

I have a problem with Pi-Baker v2.2.3

If I want to make a backup of a 256GB M2 SSD (USB adapter) the process simply aborts... Pi-Baker reports "Successful". But this is not possible because of the file size.
Sometimes it stops after 10 seconds and sometimes after 1 minute, the file size changes permanently.

If I use dd directly like this it works without problems

Ā 

cu

Massaguana


   
ReplyQuote
(@massaguana)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  

Here are Information about Pi-Baker, i cant find the copy button:


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

Hi Massaguana,

thanks for using the forum - I very much appreciate itĀ  👍Ā 

FYI: Right clicking the version info reveals the option to copy the info.
At the time that seemed like a good way to keep the interface clean, but I can see now that this is maybe not the best way haha.
(added to the "To Do" list)

The current version I'm running is:

Ā  Ā ApplePi-Baker version: 2.2.5 (Build 21)
Ā  Ā (Helper Tool version 1.8.2_debug)

Ā  Ā Operating System version:
Ā  Ā macOS
Ā  Ā Version 10.15.5 (Build 19F101)
Ā  Ā x86-64 (64 bit application)

Granted this is a beta version, but you may want to give that a try.

Unfortunately, your description doesn't tell me much (and I totally understand you do not have more details).
Can you copy the entire log? (right click the log to reveal the copy option - this may not give us useful info)

If you run the beta version, you can also see much more info in the "Console" log (Applications -> Utilities -> Console, set the filter to APPLEPIBAKER).
You can copy all the lines either in a message here, or in a text file and attach the text file.

Hopefully we can get more info (or this involved a bug that has been resolved in the beta).


   
ReplyQuote
(@massaguana)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  

Hello Hans,

Ā 

here are the result testing you beta:

ApplePi-Baker version: 2.2.5 (Build 21)
(Helper Tool version 1.8.2_debug)

Ā 

Operating System version:
macOS
Version 10.14.6 (Build 18G5033)
x86-64 (64 bit application)

What i test today is to restore an Complete SSD (Ubuntu installed) from an 16GB Drive to an new 256GB Drive... What works is to create an Backup from the small Drive... but the Restore process stops, looks like it's hanging... CPU 100%

That's what i see in logs: just an picture because Software is not responding:

Ā 

In console i see that:

Ā 

standard 13:26:17.266920 +0200 loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] | previouslyRunningApps: (
{
BackgroundState = 0;
BundleID = "com.tweaking4all.applepibaker";
Hide = 0;
Path = "/Applications/ApplePiBaker.app";
},
{
BackgroundState = 2;
BundleID = "com.apple.finder";
Hide = 0;
Path = "/System/Library/CoreServices/Finder.app";
},
{
BackgroundState = 2;
BundleID = whatsapp;
Hide = 1;
Path = "/Applications/WhatsApp.app";
},
{
BackgroundState = 2;
BundleID = "com.google.chrome";
Hide = 0;
Path = "/Applications/Google Chrome.app";
},
{
BackgroundState = 2;
BundleID = "com.apple.mail";
Hide = 1;
Path = "/Applications/Mail.app";
},
{
BackgroundState = 2;
BundleID = "com.spotify.client";
Hide = 0;
Path = "/Applications/Spotify.app";
}
)
standard 13:26:17.274276 +0200 loginwindow -[PersistentAppsSupport saveLogoutPersistentState:finalSnapshot:] | Contents:(
{
BackgroundState = 0;
BundleID = "com.apple.console";
Hide = 0;
Path = "/Applications/Utilities/Console.app";
},
{
BackgroundState = 2;
BundleID = "com.tweaking4all.applepibaker";
Hide = 0;
Path = "/Applications/ApplePiBaker.app";
},
{
BackgroundState = 2;
BundleID = "com.apple.finder";
Hide = 0;
Path = "/System/Library/CoreServices/Finder.app";
},
{
BackgroundState = 2;
BundleID = whatsapp;
Hide = 1;
Path = "/Applications/WhatsApp.app";
},
{
BackgroundState = 2;
BundleID = "com.google.chrome";
Hide = 0;
Path = "/Applications/Google Chrome.app";
},
{
BackgroundState = 2;
BundleID = "com.apple.mail";
Hide = 1;
Path = "/Applications/Mail.app";
},
{
BackgroundState = 2;
BundleID = "com.spotify.client";
Hide = 0;
Path = "/Applications/Spotify.app";
}
)
standard 13:27:32.959502 +0200 symptomsd Received CPU usage trigger:
ApplePiBaker[2614] () used 90.00s of CPU over 98.44 seconds (averaging 91%), violating a CPU usage limit of 90.00s over 180 seconds.
standard 13:27:32.959413 +0200 kernel process ApplePiBaker[2614] thread 161441 caught burning CPU! It used more than 50% CPU over 180 seconds (actual recent usage: 91% over ~98 seconds). Thread lifetime cpu usage 90.027003s, (89.644654 user, 0.382349 sys) ledger balance: 90001130740 mabs credit: 90002611981 mabs debit: 1481241 mabs limit: 90000000000 mabs period: 180000000000 ns last refill: 98437684076 ns.
standard 13:30:08.960995 +0200 ApplePiBaker 27366555: RECEIVED OUT-OF-SEQUENCE NOTIFICATION: 364 vs 635, 513, <private>

Ā 

I see nothing helpful in this logs...


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

Hi Massaguana,

Thanks for the excellent info! 👍Ā 

  1. I see you're using a directory named "-={ Temp }=-".
    This should not be a problem (as APB seems to detect the file just fine), but I'd recommend avoiding special characters in file or directory names ("-", "=", "{", and "}"). Again: this most likely is not the cause of the issue you're running into.
  2. I'd try extracting the IMG from your TBZ file, and restore the extracted IMG instead - just for testing so we can exclude any compression issues.
  3. I'd also test restoring without the resize option enabled - I know this will give you a 16Gb result, but this would help pinpointing where the culprit may be.
  4. You're restoring a 16Gb card to a 256Gb card using the resize function.
    Keep in mind that this will effectively create a 256Gb file on your Mac, and it will need at least an additional 16Gb as it first needs to decompress the backup. In comparison: "dd" would just bluntly write 16Gb to the disk, where as APB (if resizing works correctly) needs to write about 256Gb to the SD card.
  5. What are the specs of your Mac?
    APB is burning through CPU power like crazy - which could be a bug/problem in APB of course, but could also be related to the specs of your Mac (in which case I'd have to modify something in APB to prevent this from happening).
  6. The "BackgroundState" comments in Console basically saves the state of an application in macOS - this is not related to APB.
    Did you see any other messages before this one?
    Note: set the filter in Console to "APPLEPIBAKER", so it limits the messages to APB as much as it can.
    You should see several messages originating from APB's helper tool (it's the debug version).
  7. Do you have any other applications running in the background, like Antivirus tools, disk cleaners, etc that may look at disk access?

Ā 

I know, lots of questions 😉Ā 


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

p.s. in the console you should see messages like this:

38117 14:12:59.735045+0200 com.tweaking4all.ApplePiBakerHelper APPLEPIBAKER HELPER: (RE)STARTED at 14:12:59, UID=0 ,EUID=0 ,PID=38117
38117 14:12:59.735573+0200 com.tweaking4all.ApplePiBakerHelper APPLEPIBAKER HELPER: Lib info libarchive 3.3.3 zlib/1.2.11 liblzma/5.2.4 bz2lib/1.0.6
38117 14:12:59.735925+0200 com.tweaking4all.ApplePiBakerHelper APPLEPIBAKER HELPER: SUCCESS CFMessagePortCreateLocal
38117 14:12:59.736031+0200 com.tweaking4all.ApplePiBakerHelper APPLEPIBAKER HELPER: SUCCESS CFMessagePortCreateRunLoopSource
38117 14:12:59.736129+0200 com.tweaking4all.ApplePiBakerHelper APPLEPIBAKER HELPER: Executing CFRunLoopAddSource
38117 14:12:59.736315+0200 com.tweaking4all.ApplePiBakerHelper APPLEPIBAKER HELPER: Received Message = GETVERSION
38117 14:12:59.736411+0200 com.tweaking4all.ApplePiBakerHelper APPLEPIBAKER HELPER: CMD - GET VERSION
38108 14:12:59.736552+0200 ApplePiBaker APPLEPIBAKER APP: Reply received: 1.8.2_debug
38108 14:12:59.736635+0200 ApplePiBaker APPLEPIBAKER APP: Found Correct HelperTool version (1.8.2_debug)
38108 14:12:59.951134+0200 ApplePiBaker APPLEPIBAKER APP: Diskchanged - Disk: /dev/, Context:
233 14:12:59.964545+0200 hidd Connection added: IOHIDEventSystemConnection uuid:37DA22D0-50DA-4E29-AF3D-B6AFB49DE345 pid:38108 process:ApplePiBaker type:Passive entitlements:0x0 caller:HIServices: ___GetIOHIDEventSystemClient_block_invoke + 26 attributes:(null) state:0x0 events:0 mask:0x0
38108 14:13:00.000814+0200 ApplePiBaker APPLEPIBAKER APP: Diskchanged - Disk: /dev/, Context:
38108 14:13:00.039462+0200 ApplePiBaker APPLEPIBAKER APP: Diskchanged - Disk: /dev/disk0, Context:
38108 14:13:00.081756+0200 ApplePiBaker APPLEPIBAKER APP: Diskchanged - Disk: /dev/disk0s1, Context:

If this is a lot of text (you can select the lines, press COMMAND+C, and paste it in a text editor), then please consider attaching it as a file.


   
ReplyQuote
(@massaguana)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  
  1. What are the specs of your Mac? APB is burning through CPU power like crazy - which could be a bug/problem in APB of course, but could also be related to the specs of your Mac (in which case I'd have to modify something in APB to prevent this from happening).

I use an Apple Mac mini 2018, 6-Core, 32 GB RAM, 1TB SSD. And i don“t use disk Cleaners or Antivirus tools
Ā 
Ā 
Is it normal that Pi-Baker needs the admin password every 2 starts to install something?
Ā 

Ā 

Ā 
First Test: Creating IMG Backup from 256GB Drive without "resize" or "Full Archive Seek" without special characters. 380GB free space
Ā 
Result: don“t work. Backup are done after 3 seconds. Pi-Baker say "Backup Complete", the file are 2,45 GB big
Ā 
17:17:47 Initialization Info
17:17:47 - ApplePi-Baker 2.2.5 (Build 21)
17:17:47 - macOS Version 10.14.6 (Build 18G5033) x86-64 (64 bit application)
17:17:47 - libarchive 3.3.3, by Tim Kientzle
17:17:47 - liblzma 5.2.4, by Mike Kezner et al.
17:17:47 - zlib 1.2.11, by Greg Roelofs && Mark Adler
17:17:47 - bz2lib 1.0.6, by Julian Seward
17:17:47 Found Correct HelperTool version (1.8.2_debug)
17:17:48 Disk Appeared - /dev/disk2
17:17:48 Disk Appeared - /dev/disk4
17:17:48 Disk Appeared - /dev/disk3
17:17:48 Disk Appeared - /dev/
17:17:48 Disk Appeared - /dev/disk0
17:17:48 Disk Appeared - /dev/disk1
17:17:54 Full Disk Access Test (1): SUCCESS
17:17:54 Drive added to list: /dev/disk2 (256 GB ASMT 2115)
17:17:56 Backup -- START BACKUP
17:18:49 Backup Started - Making Disk to File Backup
17:18:49 Source - Disk: /dev/disk2 (256 GB ASMT 2115) (256,060,514,304 bytes)
17:18:49 Destination - File: /Users/massaguana/backup.img
17:18:50 Backup started
17:18:58 Finished - Completed in 8 seconds, average speed 289.4 MB/sec
17:18:58 Backup - Backup Completed in 8 seconds
17:18:58 Backup -- END BACKUP
Ā 
Ā 
Here is the stuff out of console:
Ā 

Ā 


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

Sounds like your Mac is more than capable to do the job. 👍Ā 
Disk space is fine as well. 👍Ā 

APB should ask this only once, maybe twice. But most certainly not every 2 starts (assuming you keep using the same version of course).
The password is only needed to install the helper tool. Once installed (and not updated), this should be done and dealt with.
A little odd that your Mac keeps asking for it 🤔Ā  ...

There is obviously no way the backup was completed in 8 seconds. Naturally we all wish our Mac's to be that fast 😉 .

When looking at the output ... makes me wonder why it cuts of at 2.5 Gb ...Ā 

NOTE

While writing this reply I have been digging into the code some more and found that the number of sectors may have been too big for the datatype I have used.
I'm testing a version with a much larger data type right now, and I'll post a test version when I'm comfortable with the result.
I do not have a 256Gb SD card and backing up an external 1 Tb disk would take up too much space on my harddisk (which is only 1 Tb as well).
So I'll do a test with 64Gb, I hope you do not mind testing it with your 256Gb card once I post it (I'll post a comment here when it is ready).


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

Just uploaded v2.2.5 build 22 ... you can download the beta directly from here.


   
ReplyQuote
(@massaguana)
Active Member
Joined: 5 years ago
Posts: 5
Topic starter  
APB should ask this only once, maybe twice. But most certainly not every 2 starts (assuming you keep using the same version of course).

The password is only needed to install the helper tool. Once installed (and not updated), this should be done and dealt with.
A little odd that your Mac keeps asking for it 🤔Ā  ...

I think is point that APB ask for the Password comes after the App Freez.. maybe it take to much time to restart the helper bevor i Start APB again

Ā 

i can test your Beta v2 next week when im back home


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

Hmm, that is weird: it should ask for your password when it want to initialize the Helper tool (which effectively installs the helper tool in launchd).

Take your time testing the new version and let me know if it made a difference. I'd be happy if we can find the culprit and fix it 😉Ā 

Have a good weekend!


   
ReplyQuote
(@metalldrache)
New Member
Joined: 4 years ago
Posts: 1
 

Hello @Hans,
I love your Tool ApplePiBakery. Best tool for Raspberry Pi images.
I had problems with Version 2.2.3 after I upgraded to macOS Big Sur. I was not able to allow the helper to access the full filesystem. The Helper was not showing in the Security dialog of Big Sure.
After I startet your Beta 2.2.5 with the new Helper, the problem has gone. I Just wanted to inform you.

Cheers

Metalldrache


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

Thanks Metalldrache!

Good to hear you like ApplePiBaker!
And thank for giving feedback on the beta. 👍 😊Ā 


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 

Apple has caused quite a few problems with the "privileged helper tools" approach.
Applications are no longer allowed to execute certain tasks - for example clearing a disk, reading a disk byte by byte, etc.
Back in the day (and still the case with Windows and Linux) you application could do that directly.

In macOS however, and I think this changes around 10.15, this is no longer allowed.
The developer will need to create a helper tool, with which the main application needs to communicate, so that the helper tool can execute these tasks instead of the main application.

I can see this to be potentially more secure, but it is also quite a pain to deal with as a developer.
(if you're interested: this is what I needed to figure out for Lazarus Pascal, since it is nowhere documenten)

With each macOS update, this mechanism potentially breaks (in macOS) or behaves differently - especially macOS beta and RC's are terrible.
Now with the new Apple Silicon, this adds an additional layer of complexity for macOS (Rosetta), a point where things can go sideways again.

These issues are quite often (for the developer) very difficult to debug ...Ā 
All input/feedback is very much appreciated though, since it can prove helpful in finding out whatever may be causing this.

Oh well ... again: send me feedback if you have any! It is very much appreciated! 😉Ā 


   
ReplyQuote
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2859
 
Posted by: @taareni9

Is it normal that Pi-Baker needs the admin password every 2 starts to install something

Definitely not normal ... this means that for some reason it tries to reinstall the helper tool.
If you haven't done so, try uninstalling ApplePi-Baker, reboot your Mac, and reinstall the latest beta.

Note: what version of ApplePi-Baker and what version of MacOS are you running?


   
ReplyQuote
Share: