Share

Mini vMac

Tracker: Bugs

5 mini vmac causing ppc leopard syslogd explosion - ID: 1824351
Last Update: Comment added ( prattp )

Hi

Since upgrading to leopard, I've noticed that mini vmac sends approximately
(on my ppc 1.66Ghz 15" PBG4, 1.5Gb ram) 118 messages a second to the system
log saying:

Nov 1 22:11:12 Bebop [0x0-0x310310].com.gryphel.minivmac[19238]: The
process has forked and you cannot use this CoreFoundation functionality
safely. You MUST exec().
Nov 1 22:11:12 Bebop [0x0-0x310310].com.gryphel.minivmac[19238]: Break on
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALI
TY___YOU_MUST_EXEC__() to debug.

Both 2.8.2 and 3.0.3 do this, and I have tried compiling up a debug version
of both codebases in xocde. If I set a breakpoint as suggest it stops as
soon as the mini-vmac window is shown (still black before the first draw to
it). Three threads are running with back-traces as follows:

Main thread-1 (which hit the break point):


0
__THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALI
TY___YOU_MUST_EXEC__ (asm)
1 RunLoopRunSpecific (asm)
2 RunCurrentEventLoopInMode (asm)
3 ReceiveNextEventCommon (asm)
4 RunApplicationEventLoop (asm)
5 main

Two other threads are running in OS assembler:

Thread 2 is at:

mach_msg_trap
mach_msg
CFRunLoopRunSpecific
HALRunLoop::OwnThread
CAPThread::Entry
_pthread_start

Thread 3 is at:

_pthread_cond_wait
CAGuard::WaitFor
HP_IOThread::WorkLoop
HP_IOThread::ThreadEntry
CAPThread::Entry
_pthread_start

If I let it run, it floods the debugger console (or the system console if
running outside the debugger) with that message. Eventually, syslogd starts
chewing all the cpu trying to keep up with with flood.

Any thoughts as to what might be causing this? From speaking to other
people, it doesn't seem to happen on intel based 10.5 installations, but I
don't know anyone else with a ppc mac and 10.5 to check with.



Nobody/Anonymous ( nobody ) - 2007-11-01 22:48

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2007-11-09 06:38
Sender: prattpProject Admin


The 3.0.4 beta is released, and is reported to fix the problem.


Date: 2007-11-07 07:44
Sender: prattpProject Admin


>One quick note is that from asking others, it shows up on Intel boxes
>too if you tell mac os to run mini-vmac inside Rosetta's PPC
>environment - so you should be able to reproduce it that way.

Thanks for this further information. Since this meant I
should be able to see the problem on my machine I went out
and bought Leopard.

The problem turned out to be in the PowerPC assembly
language code after all. It is my mistake, not Apple's
fault, and it's suprising it ever worked.

I'll make a 3.0.4 beta shortly.



Date: 2007-11-03 18:19
Sender: prattpProject Admin


Looking on google, it seems other people have been seeing
the same error message in other programs. But I don't see
any pattern, except that it happens in 10.5, and it's all
very recent, so there isn't any clear explanation yet.

It seems likely to have to do with what I found on
this Leopard release notes page:
"http://developer.apple.com/releasenotes/CoreFoundation/CoreFoundation.html"
under the section "CoreFoundation and fork()", about
stricter warning messages.

It is certainly odd, as Mini vMac never calls fork directly
itself. It also doesn't use threads or exceptions. It
is a very plain C program. Except for a bit of PowerPC
assembly code. You could try out the "No Assembly" option
of the build system:
("http://minivmac.sourceforge.net/doc3.0.0/options.html#option_no_asm").
Mistakes in assembly could cause arbitrarily obscure and
nasty problems. But it doesn't seem especially likely.

The way a program such as Mini vMac works on OS X (as it
sounds like you may be familiar with) is that the program
starts by doing various initializations including installing
event handlers, and then gives control back to the system,
saying it is ready to start handling events.

So it looks like Mini vMac got through the initializations
fine, and is in the bowels of the system's event loop event
processing when the problem happens. Which would make
debugging difficult. One approach could be to start
removing initializations one by one and see when the
problem goes away. This will be time consuming, and made
more difficult because I don't have a PowerPC machine that
can run leopard.

Most likely, Mini vMac is doing something it shouldn't that
hasn't mattered before. Or it might not being doing
something it should. Or it could just be that Apple broke
something that is rarely used, but needed by Mini vMac.
That all doesn't narrow it down much.

It would be interesting to know if by "upgrading to leopard"
you mean an upgrade install or a clean install (i.e. could
it be related to other third party software, such
as the issues with APE).

But that wouldn't seem to change what I have do next -
attempt to get access to Leopard on a PowerPC machine and
see if I can see the same problem.



Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2007-11-09 06:38 prattp
resolution_id None 2007-11-09 06:38 prattp
close_date - 2007-11-09 06:38 prattp