Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"Could not setup Mach task special port 9: (os/kern) no access"

As you can see from the past of Terminal messages below, I am getting this message every minute on the minute. What does this mean and should I be concerned about it?

Thanks in advance.

7/15/08 2:03:00 PM com.apple.launchd[1] (0x10bca0.cron[13894]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:04:00 PM com.apple.launchd[1] (0x10bca0.cron[13923]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:05:00 PM com.apple.launchd[1] (0x10bca0.cron[13950]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:06:00 PM com.apple.launchd[1] (0x10bca0.cron[13977]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:07:00 PM com.apple.launchd[1] (0x10bca0.cron[14005]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:08:00 PM com.apple.launchd[1] (0x10bca0.cron[14038]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:09:00 PM com.apple.launchd[1] (0x10bca0.cron[14067]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:10:00 PM com.apple.launchd[1] (0x10bca0.cron[14094]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:11:00 PM com.apple.launchd[1] (0x10bca0.cron[14121]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:12:00 PM com.apple.launchd[1] (0x10bca0.cron[14148]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:13:00 PM com.apple.launchd[1] (0x10bca0.cron[14176]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:14:00 PM com.apple.launchd[1] (0x10bca0.cron[14203]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:15:00 PM com.apple.launchd[1] (0x10bca0.cron[14230]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:16:00 PM com.apple.launchd[1] (0x10bca0.cron[14258]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:17:00 PM com.apple.launchd[1] (0x10bca0.cron[14285]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:18:00 PM com.apple.launchd[1] (0x10bca0.cron[14312]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:19:00 PM com.apple.launchd[1] (0x10bca0.cron[14339]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:20:00 PM com.apple.launchd[1] (0x10bca0.cron[14370]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:21:00 PM com.apple.launchd[1] (0x10bca0.cron[14397]) Could not setup Mach task special port 9: (os/kern) no access
7/15/08 2:22:00 PM com.apple.launchd[1] (0x10bca0.cron[14425]) Could not setup Mach task special port 9: (os/kern) no access

G4 MDD

Posted on Jul 15, 2008 12:24 PM

Reply
Question marked as Best reply

Posted on Jul 16, 2008 6:26 AM

This is a troyan! See that page to verify and remove it!

http://www.ehow.com/how2128387remove-osxrspluga-trojan-horse-mac.html
28 replies

Aug 20, 2008 1:27 PM in response to llee

Check if the backup script has anything that looks like it is setting the path, or trying to determine where commands live. My Applescript book says you can put "log" stmts in that will go to an event log, so you can find out where it is dying.

To see if it's a PATH issue, run a fresh 'sh', enter:
PATH="/usr/bin:/bin"; export PATH
osascript /Users/me/Library/Scripts/backup/backupscript.scpt

See if that gets an error. Remember to exit the extra shell afterwards.

To see if the backup script execution, for whatever unexpected reasons, seems to need a tty, create a shell script called 'bleep.sh', chmod it 755, edit it to start with '#!/bin/sh' then run the backup script (shorten the backup script for this testing, possibly).

Check that the bleep.sh script executes okay from the command line. Then edit another new script called 'try.sh'. Same shebang, then have:

SHELL="bleep.sh"; export SHELL
script /tmp/debug

Now see if you can execute try.sh from the command line. If that works, run it from cron and show the /tmp/debug file.

Aug 21, 2008 8:16 AM in response to Eric Blair

Check if the backup script has anything that looks like it is setting the path, or trying to determine where commands live. My Applescript book says you can put "log" stmts in that will go to an event log, so you can find out where it is dying.


It doesn't. I already know. I can create a single line Applescript beginning with "mount volume", and although I can execute it with osascript, the osascript invocation fails if and only if run as a scheduled cron job.

To see if it's a PATH issue, run a fresh 'sh', enter:
PATH="/usr/bin:/bin"; export PATH
osascript /Users/me/Library/Scripts/backup/backupscript.scpt

See if that gets an error. Remember to exit the extra shell afterwards.


Runs flawlessly. No error.

To see if the backup script execution, for whatever unexpected reasons, seems to need a tty, >create a shell script called 'bleep.sh', chmod it 755, edit it to start with '#!/bin/sh' then run the >backup script (shorten the backup script for this testing, possibly).

Check that the bleep.sh script executes okay from the command line.


Runs flawlessly. No error.

Then edit another new script >called 'try.sh'. Same shebang, then have:

SHELL="bleep.sh"; export SHELL
script /tmp/debug

Now see if you can execute try.sh from the command line. If that works, run it from cron and show the /tmp/debug file.


Now the error is again present (presumably because of being initiated by the scheduled job). The /tmp/debug file contains:

"Script started on Thu Aug 21 09:52:00 2008
/Users/me/Library/Scripts/backup/backupscript.scpt: execution error: An error of type -6600 has occurred. (-6600)

Script done on Thu Aug 21 09:52:00 2008"

It appears that something wrong happens when a scheduled cron job calls osascript to execute a "mount volume" Applescript command.

Next I will try creating an Applescript applet and executing that directly from the cron job without invoking osascript.

But let me again point out that the "Mach task special port 9" log entry appears for any cron job launched according to schedule. The script that fails with the execution error is just one of several scripts, the rest of which are successful and generate no execution errors, which generate that log entry.

Aug 21, 2008 11:40 AM in response to llee

The mount command generally needs root privileges to function, because it mounts raw block devices owned by root. e.g.

brw-r----- 1 root operator 14, 0 Aug 19 20:58 /dev/disk0
brw-r----- 1 root operator 14, 2 Aug 19 20:58 /dev/disk0s1
brw-r----- 1 root operator 14, 3 Aug 19 20:58 /dev/disk0s3
brw-r----- 1 root operator 14, 1 Aug 19 20:58 /dev/disk1
brw-r----- 1 root operator 14, 4 Aug 19 20:58 /dev/disk1s1
brw-r----- 1 root operator 14, 5 Aug 19 20:58 /dev/disk1s3

Can you run (via an Applescript script) the mount command interactively? (you've said yes)
Are you running it as root via cron? (In /etc/crontab you must say user 'root.')

If you run it interactively and you aren't root, it fails, right?
Show the 'ls -l' for the volume involved, after it is mounted.
Then show the output of the unprivileged 'mount' command with no arguments.

I think we're getting closer to figuring it out.

Aug 21, 2008 12:13 PM in response to Eric Blair

Can you run (via an Applescript script) the mount command interactively? (you've said yes)

Are you running it as root via cron? (In /etc/crontab you must say user 'root.')

No.

If you run it interactively and you aren't root, it fails, right?


No. I am only prompted for user name and password for the network share. I can run the script from the Applescript menu in a Leopard default admin account (user 501). I'll wait until you address the unexpected answers before providing more info.

Aug 21, 2008 12:25 PM in response to llee

I'd like you to try running it as root from /etc/crontab. Edit it using 'crontab -e'.

Is it a network mount? Is it something setup in automount?

One article I read involved the problem of being able to mount a disk and unmount it after boot, but not be able to subsequently until another reboot. Could you test running it from cron first immediately after a reboot?

I'd also like the rest of the questions answered.

Thanks.

Aug 21, 2008 1:30 PM in response to quantamos

Just to clarify something I discovered. Fixing the path variable did not eliminate the error:
Could not setup Mach task special port 9: (os/kern) no access

Parts of the script were fixed by adding the path variables /sbin & /usr/sbin, but the error listed above was a result of my attempt to put the `screencapture` command in a crontab.

Just in case that point is relevant to the rest of your discussions.

Aug 21, 2008 3:56 PM in response to llee

Are you issuing a 'mount' command within a 'tell application "Finder"?'

If so, it's possible that it needs to execute within your login window's mach task hierarchy.

Create this shell script and run from cron as your 501 username:

#!/bin/sh

PID=`ps -afxww | grep -v grep | grep loginwindow|awk '{ print $2 }'`

launchctl bsexec $PID osascript ...backupscript.scpt

Aug 22, 2008 10:59 AM in response to Eric Blair

The original question:
What you can tell from getting the msg is that a scheduled job did kick off at that time.
As you can see from the past of Terminal messages below, I am getting this message every > minute on the minute. What does this mean and should I be concerned about it?


The answer is: 'The msg about "special port 9" is itself apparently a bug.'

It does not affect cron execution.

Whomever marks these things as answered should go ahead and do so.

Everyone remarking on this has said their cron still functions fine.

I get a msg every minute too.

"Could not setup Mach task special port 9: (os/kern) no access"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.