Benches macOS

15

Terminal's "Process Completed" message and /usr/bin/login

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

After I forced my mac to shutdown several times, Terminal.app always stops when it's launched, showing a message "Process Competed." I figured out that the problem related to
/usr/bin/login, so I changed in preference panel start-up shells from /usr/bin/login to /bin/bash, and Terminal works fine.

However, I don't want to leave the problem with
/usr/bin/login, which is why I post this topic. The creation date of
login (Oct 27) suggests that it has not been changed since the installation of Leopard. So I think the problem is in configuration files or processes passed from
/usr/bin/login. Does anybody know the cause of the problem and how to fix it?

For further information,

1. The problem affects all user accounts of my mac.

2. When I run /usr/bin/login, with and without "-l" option, it returns "Segmentation fault."

3. I used Disk Utility to resolve potential problems with permission and the boot disk in vein.

Thank you in advance.

15 replies

Sign in or join Beachball Help to reply.

  1. 0

    Camelot

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The problem isn't with
    login itself.

    It sounds like you have either your terminal preferences or some shell startup script that is forcing the logout. It's too easy to create a Terminal.app setup where it runs a command on startup and effectively blocks you from getting a working shell.

    The first place to look would be ~/Library/Preferences/com.apple.Terminal.plist - since Terminal's preferences are pretty easy to reset you might as well just trash this file (when Terminal.app is not running), then relaunch.

    If that doesn't fix it then one of your startup scripts is causing the problem, but most cases are caused by Terminal's preferences.

  2. 0

    Jun T.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    2. When I run /usr/bin/login, with and without "-l" option, it returns "Segmentation fault."

    You may check log files in

    ~/Library/Logs/CrashReporter/

    to get some info about what is causing the seg fault. Also try

    login -f
    yourloginname /bin/zsh

    This will bypass the authentication, and try to start zsh instead of bash.

    Can you login to the Mac from other Macs (or PCs etc.) via ssh?

  3. 0

    eelgrass

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi, nothing relevant was left under CrashReporter directory.

    Following your next suggestion, I tried

    $login -f your
    loginname /bin/zsh

    which reproduced the same result. (Segmentation fault.)

    BTW, when I tried to check the log using Console.app, I found that every click on any of the listed logs in the left column made Console.app crash! I suspect this is connected to the same cause.

    Below is the log left under CrashReporter directory.

    ---

    Process: Console [4027]

    Path: /Applications/Utilities/Console.app/Contents/MacOS/Console

    Identifier: com.apple.Console

    Version: 10.5.6 (137)

    Build Info: ConsoleX-1370000~1

    Code Type: X86 (Native)

    Parent Process: launchd [132]

    Date/Time: 2009-04-06 21:09:07.665 -0400

    OS Version: Mac OS X 10.5.6 (9G55)

    Report Version: 6

    Exception Type: EXC
    BADACCESS (SIGSEGV)

    Exception Codes: KERN
    INVALIDADDRESS at 0x000000000ffd2000

    Crashed Thread: 0

    Thread 0 Crashed:

    0 libSystem.B.dylib 0x95ec0a80
    asl_get64 + 6

    1 libSystem.B.dylib 0x95ec0d39 asl
    file_fetch_helper64 + 35

    2 libSystem.B.dylib 0x95ec1d47 asl
    file_fetchpos + 190

    3 libSystem.B.dylib 0x95ec24ac asl
    file_matchnext + 149

    4 libSystem.B.dylib 0x95ec3684 asl
    file_list_matchtimeout + 314

    5 libSystem.B.dylib 0x95ec0087 asl
    store_matchtimeout + 294

    6 libSystem.B.dylib 0x95ec00e8 asl
    storematch + 74

    7 com.apple.Console 0x0000c2a1 0x1000 + 45729

    8 com.apple.Console 0x0000bf2b 0x1000 + 44843

    9 com.apple.Console 0x0000bc0b 0x1000 + 44043

    10 com.apple.Foundation 0x9509222e __NSFireDelayedPerform + 382

    11 com.apple.CoreFoundation 0x96889b25 CFRunLoopRunSpecific + 4469

    12 com.apple.CoreFoundation 0x96889cd8 CFRunLoopRunInMode + 88

    13 com.apple.HIToolbox 0x900902c0 RunCurrentEventLoopInMode + 283

    14 com.apple.HIToolbox 0x900900d9 ReceiveNextEventCommon + 374

    15 com.apple.HIToolbox 0x9008ff4d BlockUntilNextEventMatchingListInMode + 106

    16 com.apple.AppKit 0x9537fd7d _DPSNextEvent + 657

    17 com.apple.AppKit 0x9537f630 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128

    18 com.apple.AppKit 0x9537866b -[NSApplication run] + 795

    19 com.apple.AppKit 0x953458a4 NSApplicationMain + 574

    20 com.apple.Console 0x00002b42 0x1000 + 6978

    Thread 1:

    0 libSystem.B.dylib 0x95e03906 kevent + 10

    1 com.apple.Foundation 0x9505d7ed -[NSThread main] + 45

    2 com.apple.Foundation 0x9505d394
    _NSThread__main_ + 308

    3 libSystem.B.dylib 0x95e04095
    pthreadstart + 321

    4 libSystem.B.dylib 0x95e03f52 thread_start + 34

    Thread 2:

    0 libSystem.B.dylib 0x95df6eda read$UNIX2003 + 10

    1 com.apple.Foundation 0x950d8dfc _backgroundActivity + 412

    2 libSystem.B.dylib 0x95e04095
    pthreadstart + 321

    3 libSystem.B.dylib 0x95e03f52 thread_start + 34

    Thread 3:

    0 libSystem.B.dylib 0x95dda3ae
    _semwaitsignal + 10

    1 libSystem.B.dylib 0x95e04d0d pthread
    condwait$UNIX2003 + 73

    2 libGLProgrammability.dylib 0x91ccdb32 glvmDoWork + 162

    3 libSystem.B.dylib 0x95e04095
    pthreadstart + 321

    4 libSystem.B.dylib 0x95e03f52 thread_start + 34

    Thread 4:

    0 libSystem.B.dylib 0x95dda3ae
    _semwaitsignal + 10

    1 libSystem.B.dylib 0x95e04d0d pthread
    condwait$UNIX2003 + 73

    2 com.apple.QuartzCore 0x92bf1ab9 fe
    fragmentthread + 54

    3 libSystem.B.dylib 0x95e04095
    pthreadstart + 321

    4 libSystem.B.dylib 0x95e03f52 thread_start + 34

    Thread 0 crashed with X86 Thread State (32-bit):

    eax: 0x0ffd2000 ebx: 0x95ec0d27 ecx: 0x00000000 edx: 0xbfffe9c8

    edi: 0x00000000 esi: 0xbfffe9c8 ebp: 0xbfffe7c8 esp: 0xbfffe7a0

    ss: 0x0000001f efl: 0x00010286 eip: 0x95ec0a80 cs: 0x00000017

    ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037

    cr2: 0x0ffd2000

    Binary Images:

    - snip -

  4. 0

    eelgrass

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi, thanks for your time.

    Actually, I have discarded the plist. The result was the same.

    Also, the problem is not at a user level, because the same thing happens with other users.

  5. 0

    Jun T.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    BTW, when I tried to check the log using Console.app, I found that every click on any of the listed logs in the left column made Console.app crash!

    That's
    very bad. If I were you, I would backup all the data and re-install Leopard.

    If you don't want to re-insatll the OS, then...

    Thread 0 Crashed:

    0 libSystem.B.dylib 0x95ec0a80
    asl_get64 + 6

    I guess your libSystem is not broken, because if it is broken then most of apps won't work normally. Just in case, please compare yours with the following (time stamp may depend on the time zone; mine is JST+9):


    $ ls -l /usr/lib/libSystem.B.dylib
    -r-xr-xr-x 1 root wheel 7895440 Nov 25 10:31 /usr/lib/libSystem.B.dylib
    $ md5 /usr/lib/libSystem.B.dylib
    MD5 (/usr/lib/libSystem.B.dylib) = 9b408f1d151f8a790900ea6cc69b293f

    If libSystem is not broken, then the crash log
    may indicate that something is wrong with asl (Apple System Log).

    First of all, look into /var/log/system.log (and other log files) by using commands like "less" (or your favorite pager). Are there anything suggesting errors?

    Does syslog command work? Try, for example,


    $ syslog
    $ syslog -C
    $ syslog -d /var/log/asl (10.5.6 only, I guess)

    See 'man syslog' for more info.

    Apple System Log uses ordinary log files (such as /var/log/system.log) and binary databese. There is a possibility that the database is broken.

    If you are using 10.5.5 (or older), then the asl database is /var/log/asl.db. What is the size and time stamp of this file?

    If you are using 10.5.6 then the asl databases are in /var/log/asl/. Mine looks like:


    $ cd /var/log/asl; ls -lt
    total 2416
    -rw-r--r-- 1 root wheel 192981 Apr 7 19:17 LongTTL.asl
    -rw-r--r-- 1 root wheel 57030 Apr 7 19:17 2009.04.07.asl
    -rw-r--r-- 1 root wheel 8 Apr 7 19:17 StoreData
    -rw------- 1 my_name wheel 62942 Apr 7 19:10 2009.04.07.U501.asl
    -rw------- 1 my_name wheel 426529 Apr 6 23:46 2009.04.06.U501.asl
    -rw-r--r-- 1 root wheel 252442 Apr 6 23:45 2009.04.06.asl
    -rw-r--r-- 1 root wheel 119893 Apr 5 23:57 2009.04.05.asl
    -rw------- 1 my_name wheel 103567 Apr 5 23:54 2009.04.05.U501.asl

    In 10.5.6, these files are rotated by aslmanager command. See 'man aslmanager', and

    /System/Library/LaunchDaemons/com.apple.aslmanager.plist

    syslogd itself is also controlled by launchd by the file

    /System/Library/LaunchDaemons/com.apple.launchd.plist

    If you think your asl databases are broken, then you may try (at your own risk!)

    removing them (or moving them into other place):


    Stop syslogd:
    $ sudo launchctl stop com.apple.syslogd
    $ cd /var/log
    (re)move the database file(s):
    if 10.5.5 or older
    $ mv asl.db asl.db.broken
    or if 10.5.6
    $ mkdir asl.broken
    $ mv asl/* asl.broken/
    and then restart syslogd:
    $ sudo launchctl start com.apple.syslogd

    Try finding more info about asl by searching in Apple Discussion or Google (or other search engines you like).

  6. 0

    cy_pher

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thanks! I'm relatively new to the Mac world and your post was a great help.

    I ran into similar problems, and the advice about moving aside the asl databases worked like charm.

    Do you happen to know why corruption to these databases would cause such this specific failure? (Also, I'm guessing that the glitch happened during a hard reset I was forced to perform earlier in the day -- does that sound right?)

  7. 0

    eelgrass

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi Jun T,

    Thanks for your helpful support - the last thing about asl databases was truly helpful! In fact, I had purchased a backup drive and was considering a fresh install after I checked two things that you mentioned: 1. /usr/lib/libSystem.B.dylib was OK; 2. I couldn't find anything useful in /var/log/system.log.

    But then, after I moved asl databases, all the problem I posted were solved!

    1. Terminal.app worked fine with /usr/bin/login as default shell.

    2. No segmentation fault with $/usr/bin/login from the command line.

    3. Console.app worked fine.

    It is very likely that one or a few of the asl databases were damaged when I forced shutdown. My Core Duo Macbook Pro overheats these days with a normal use, presumably, for a wear in thermal paste. The video chip is always the first victim and makes entire GUI -only GUI- freeze. That's why I forced shutdown.

    Thank you very much again. I can postpone fresh installation of OS X until I get Snow Leopard.

    Message was edited by: eelgrass

  8. 0

    Jun T.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Do you happen to know why corruption to these databases would cause such this specific failure?

    I believe this is a bug in the asl library. If the database is broken, the library should issue an error message and create a new database (instead of core dump). You can send a bug report via

    [MacOS X Feedback|http://www.apple.com/feedback/macosx.html]

    or

    [Bug Reporter|https://bugreport.apple.com>

    The latter reqires you to register at ADC (it is free).

    I'm guessing that the glitch happened during a hard reset I was forced to perform earlier in the day -- does that sound right?

    Yes. The OP (ealgrass) was also forced to hard reset.

  9. 0

    jrperser

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I was having the same problem with terminal after a power hit. Dropped into single user mode and moved the asl databases as you suggested. Now terminal and console work.

    Great suggestion. Thanks.

  10. 0

    eelgrass

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I sent a bug report to Apple.

  11. 0

    Markelios

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Hi,

    I was the same problem into my mac os X Leopard Server.

    I fixed it by repairing disk permissions with Disk Utility. Thats all!!

    Bye

  12. 0

    haydenkerr

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Awesome.

    that one sorted it.

    Completed a disk Permissions check and then the mv of the ASL logs from the /var/log folder.

    perfect.

    thanks

  13. 0

    eelgrass

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I received a message from Apple Developer Team regarding my bug report. The issue on ASL database has been addressed in Snow Leopard.

  14. 0

    Jun T.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Thank you for letting us know the info.

  15. 0

    BobHarris

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Even better letting use know that filing an Apple Bug report is an effective means of communicating with Apple engineering.