Terminal slow to launch (Continued from Classic forum)

Wilsonium

Registered
Because I'm not worthy and/or I'm an idiot... I started this thread in the MAC CLASSIC SYSTEM & SOFTWARE forum...

My problem is this... My terminal app is taking a long time to load... painfully long. I've tried all sorts of things from updating my prebinding to stopping all non-critical processes... However, it still takes 3 minutes to load on average. Even when logged on as root, it takes a long while. I'd appreciate any feedback or suggestions.

Cheers
Don
 
For anyone who hasn't looked at the other thread (if Wilsonium hasn't deleted it) take a gander. There's other stuff goin' on.
 
Howdy...

Again, thanks for all the feedback. Disk usage is at around 50%, very few fonts and I'm on a G4 TiPB with 512 MB RAM. I've not installed anything that's not for OS X (no compiled unix apps). I've done everything that's been suggested and the only problem has been a crash during an update_prebinding (bus error). I'm slowly coming out of my denial and accepting the fact that there's a deeper problem and will need to wipe and reinstall. Thanks for all your assistance.

Cheers
Don
 
The update_prebinding error looked to me like it was indicative of a more major problem, as I mentioned in the other thread. Sorry I didn't grab the information from that thread to repost here.

testuser, have you ever heard of update_prebinding crashing with a bus error?
 
So what did happen to the original thread?

Anyway, about that update_prebinding bus error, if memory serves, it looked like strlen() was passed a null pointer; the problem is, all the calls prior to strlen() had no debug info (as update_prebinding has been stripped of them), so figuring out what called strlen() would be quite difficult.
 
Sorry about deleting the other thread...

After I reset the pram I decided to sudo update_prebinding -root / again and the error reported by the console is below.... it doesn't actually crash the terminal but exits the sudo command with a bus error, also included below if it helps. Keep in mind that the only complex thing installed on my system is WebObjects but was installed only recently and long after the terminal decided to take it's time. Just a note though... after the first update_prebinding my system over all seemed to perk up just a bit but not much. Terminal was the only app that I noticed taking a long time to launch.

From the console...
**********
Date/Time: 2002-05-24 23:20:59 -0700
OS Version: 10.1.4 (Build 5Q125)

Command: update_prebinding
PID: 407

Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0:
#0 0x70000a50 in strlen
#1 0x00017ff4 in 0x17ff4
#2 0x000196a8 in 0x196a8
#3 0x0001258c in 0x1258c
#4 0x000057f4 in 0x57f4
#5 0x00007414 in 0x7414
#6 0x00003050 in 0x3050
#7 0x00002e90 in 0x2e90


PPC Thread State:
srr0: 0x70000a50 srr1: 0x0000f030 vrsave: 0x00000000
xer: 0x00000020 lr: 0x00017ff4 ctr: 0x70000a40 mq: 0x00000000
r0: 0x00017ff4 r1: 0xbffff990 r2: 0xbffff100 r3: 0x00000000
r4: 0x00000020 r5: 0x736f7572 r6: 0x6365732f r7: 0x47657374
r8: 0x616c7454 r9: 0x00000000 r10: 0x00000000 r11: 0x000273e4
r12: 0x70000a40 r13: 0x00000000 r14: 0x00000036 r15: 0x00061c90
r16: 0x00000001 r17: 0x80160fa8 r18: 0x000619d8 r19: 0x00001b07
r20: 0x00000000 r21: 0x0000001c r22: 0x70004234 r23: 0x700042c8
r24: 0x7016b0dc r25: 0x006bac3c r26: 0x8081ab5c r27: 0xc0d89c00
r28: 0x00000000 r29: 0xbfffef00 r30: 0x0d9ac800 r31: 0x00000001

Last lines from terminal...

/usr/bin/update_prebinding: object: /usr/bin/mkservdb malformed object (unknown load command 9)
previous message occurred when prebinding /usr/bin/mkservdb
/usr/bin/update_prebinding: for architecture ppc object: /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool malformed object (unknown load command 54)
Bus error
 
These are interesting:
Originally posted by Wilsonium
...
/usr/bin/update_prebinding: object: /usr/bin/mkservdb malformed object (unknown load command 9)
previous message occurred when prebinding /usr/bin/mkservdb
/usr/bin/update_prebinding: for architecture ppc object: /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool malformed object (unknown load command 54)
Bus error

What do you get from
Code:
file /usr/bin/mkservdb
ls -l /usr/bin/mkservdb
file /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool
ls -l /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool

Also, when doing the update_prebinding, is there any more useful information when adding the -verbose flag?
 
Out of curiosity, I ran those commands on my system, blb, and got the message:
"/Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool: can't stat `/Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool' (No such file or directory)."

What is the file supposed to be? I didn't install the Security Package from 10-19-01, since I got this system in March of this year. Shouldn't that package already be installed by Apple?
 
I believe if your machine has a new enough initial install (like 10.1.1 or newer), that update should be rolled into it.
 
BLB

Here's what I got... can you make any sense of it? Now it's been a long while since I owned black hardware and I've forgotten most of my unix stuff but this looks fine. Yes?

Cheers
Don


[localhost:~] dwilson% file /usr/bin/mkservdb
/usr/bin/mkservdb: Mach-O executable ppc
[localhost:~] dwilson% ls -l /usr/bin/mkservdb
-rwxr-xr-x 1 root wheel 9136 Apr 3 23:35 /usr/bin/mkservdb
[localhost:~] dwilson% file /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool
/Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool: Mach-O fat file with 2 architectures
/Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool (for architecture ppc): Mach-O executable ppc
/Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool (for architecture i386): Mach-O executable i386
[localhost:~] dwilson% ls -l /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool
-rwxr-xr-x 1 root staff 50276 Nov 24 2001 /Library/Receipts/SecurityUpdate10-19-01.pkg/Contents/Resources/GestaltTool
[localhost:~] dwilson%
 
Okay...

My Terminal has always been slow to launch. It takes anywhere from 11 to 40 bounces to launch, even from the early beta days.

Now, I did a fresh install of 10.2 and terminal launches in ONE bounce, yes kids, ONE bounce. :)

So, it will be interesting to note that when the release of 10.2 comes out in late Sept, if I do a normal upgrade to my 10.1.5, if it loads as fast.

Admin
 
By "fresh install" do you mean fdisking the drive (or initializing or whatever it's called over here in the Mac world) and installing, or just installing over the top of your current system?
 
I have two drives. My OS 9 "partition" and my 10.1.4 partition. Basically, I installed 10.2 on my "0S 9" partition and it works beautifully. So, no I didn't reformat the drive, but at the same time, no pervious 10.x OS was on that partition either.
 
Originally posted by Wilsonium
BLB

Here's what I got... can you make any sense of it? Now it's been a long while since I owned black hardware and I've forgotten most of my unix stuff but this looks fine. Yes?

Cheers
Don
...
That's what I'd expect from them. Whatever update_prebinding doesn't like, it's more subtle...one thing to try is to run
Code:
otool -l /usr/bin/mkservdb
which will spit out quite a few lines; the interesting ones start at Load command 9 (where update_prebinding choked). That part on mine looks like
Code:
Load command 9
     cmd LC_TWOLEVEL_HINTS
 cmdsize 16
  offset 8524
  nhints 8
 
OK... Did that... Looks like we might be getting closer to the problem... here's what I got...

Load command 9
cmd ?(22) Unknown load command
cmdsize 16
0000214c 00000008
Load command 10
cmd LC_UNIXTHREAD
cmdsize 176
flavor PPC_THREAD_STATE
count PPC_THREAD_STATE_COUNT
r0 0x00000000 r1 0x00000000 r2 0x00000000 r3 0x00000000 r4 0x00000000
r5 0x00000000 r6 0x00000000 r7 0x00000000 r8 0x00000000 r9 0x00000000
r10 0x00000000 r11 0x00000000 r12 0x00000000 r13 0x00000000 r14 0x00000000
r15 0x00000000 r16 0x00000000 r17 0x00000000 r18 0x00000000 r19 0x00000000
r20 0x00000000 r21 0x00000000 r22 0x00000000 r23 0x00000000 r24 0x00000000
r25 0x00000000 r26 0x00000000 r27 0x00000000 r28 0x00000000 r29 0x00000000
r30 0x00000000 r31 0x00000000 cr 0x00000000 xer 0x00000000 lr 0x00000000
ctr 0x00000000 mq 0x00000000 pad 0x00000000 srr0 0x00001b7csrr1 0x00000000

But... since I'm now out of my range of unix skills I don't what to do next. Suggestions?

Thanks
Don
 
Well, a cmd of 22 is LC_TWOLEVEL_HINTS but your otool doesn't know that. My guess is you installed the devtools back in the 10.0 days, but haven't upgraded it. This would explain otool's problem with it.

The really big question is, why doesn't update_prebinding understand it? What's this show
Code:
ls -l /usr/bin/update_prebinding
Should be around 180828 (it was last updated in 10.1.3, as far as I can tell).
 
blb

here's what I got...

[localhost:~] dwilson% ls -l /usr/bin/update_prebinding
-r-xr-xr-x 1 root wheel 168044 Apr 26 2001 /usr/bin/update_prebinding
[localhost:~] dwilson%

D-
 
You could try using your Apple Hardware Test Disc, in case it spots a hardware fault.

OS X is very fussy when it comes to hardware. If you have a part that is slightly out of tolerance the installer will generally spit the dummy, it may even kernel panic. This is actually a very good test for a computer with strange problems. You could try removing some memory and reinstalling X again and see what happens.
 
Originally posted by Wilsonium
blb

here's what I got...

[localhost:~] dwilson% ls -l /usr/bin/update_prebinding
-r-xr-xr-x 1 root wheel 168044 Apr 26 2001 /usr/bin/update_prebinding
[localhost:~] dwilson%

D-

Okay, that's easy; it appears to me you installed the 10.0 devtools after you updated to 10.1.3 or installed 10.1.3. 10.1's update_prebinding is 180780 in size, 10.1.3's update changes it to 180828. 10.0.x and the devtools for 10.0 all list the same size you're reporting. Have a look
Code:
lsbom /Library/Receipts/MinimalSystem.bom |grep update_prebinding
lsbom /Library/Receipts/MacOSXUpdate10.1.3.pkg/Contents/Resources/MacOSXUpdate10.1.3.bom|grep update_prebinding
One of those should work and say 180xxx for 10.1.x.

Doing the same against the devtools .bom file (I don't remember where it is for 10.0) should show your size.
 
Back
Top