Skip Menu |
 

This queue is for tickets about the Mac-Glue CPAN distribution.

Report information
The Basics
Id: 26138
Status: open
Priority: 0/
Queue: Mac-Glue

People
Owner: Nobody in particular
Requestors: jelte [...] liebrand.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Found the line of code causing the problem
Date: Fri, 6 Apr 2007 17:51:39 +0100
To: Chris_Nandor via RT <bug-Mac-Glue [...] rt.cpan.org>
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 757b
Hiya I found the line of code that causes the problem. When I use $eyeTV- Show quoted text
>Channels, that effectively (as you probably better know than me),
creates an event to be sent to EyeTV. Once the event is created, the _send_event is called, which in turn calls IsRunning. And inside that baby is where things go wrong. That one gets the address, successfully, and then tries to go through % Process.... that variable is the one that is mad. If I try to dump that variable in the debugger, it just hangs and gobbles up the memory. I can place a print just before the call to for my $psn (keys %Process) { but not after... ie %Process is seemingly random memory or something weird... I'll dig some more, but at least now I know where to look... /J
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Fri, 6 Apr 2007 11:13:13 -0700
To: bug-Mac-Glue [...] rt.cpan.org
From: Chris Nandor <cnandor [...] cpan.org>
Download (untitled) / with headers
text/plain 294b
Can you provide your Mac architecture, along with version #s for Mac::Apps::Launch, Mac::Carbon, Mac::AppleEvents::Simple, and Mac::Glue? Thanks, -- Chris Nandor pudge@pobox.com http://pudge.net/ Open Source Technology Group pudge@ostg.com http://ostg.com/
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Fri, 6 Apr 2007 19:45:48 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 1.5k
Hiya, Thanks for your quick response! I'll collect all that info in a second, just running a test now. It seems I can reproduce the problem with this: #!/usr/bin/perl -w use Mac::Processes; while ( ($psn, $psi) = each(%Process) ) { print "$psn\t", $psi->processName, " ", $psi->processNumber, "\n" if $psi; } Interesting things to note: * If I dont put the "if $psi" at the end of that print statement, then after printing a handful of processes, it will spit out "Can't call method "processName" on an undefined value. * If i do have that "if $psi" at the ened, then it will loop for a LONG time (still going, thats the test i'm running now). * because I use a while loop here, it doesn't actually run out of memory, since it deletes the memory on every loop. Whereas a for loop keeps the memory until the end of the loop, which is why the IsRunning sub routine is causing my script to run out of memory. I will let this test run for a while and see what it comes back with. But my guess is that it thinks there are 5983459385935583 (whatever) number of processes, which are not defined.... /J On 6 Apr 2007, at 19:16, Chris_Nandor via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > Can you provide your Mac architecture, along with version #s for > Mac::Apps::Launch, Mac::Carbon, Mac::AppleEvents::Simple, and > Mac::Glue? > > Thanks, > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Fri, 6 Apr 2007 20:23:34 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 426b
Hi there, Ok, my test is still going, leading me to believe that it's got itself in an eternal loop. Which is a bit bizarre for a while loop from a hash, but there ya go. Attached is my system architecture. As for the versions, here they are: Mac::Apps::Launch version 1.92 Mac::Carbon version 0.77 Mac::AppleEvents::Simple version 1.18 Mac::Glue version version 1.27 And for good measure: Mac::Processes version 1.05
Download SysArch.spx
application/octet-stream 664.1k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 448b
/Cheers, Jelte On 6 Apr 2007, at 19:16, Chris_Nandor via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > Can you provide your Mac architecture, along with version #s for > Mac::Apps::Launch, Mac::Carbon, Mac::AppleEvents::Simple, and > Mac::Glue? > > Thanks, > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Fri, 6 Apr 2007 14:10:19 -0700
To: bug-Mac-Glue [...] rt.cpan.org
From: Chris Nandor <pudge [...] pobox.com>
Download (untitled) / with headers
text/plain 989b
At 14:45 -0400 2007.04.06, Jelte Liebrand via RT wrote: Show quoted text
>I'll collect all that info in a second, just running a test now. It >seems I can reproduce the problem with this: >#!/usr/bin/perl -w > >use Mac::Processes; > >while ( ($psn, $psi) = each(%Process) ) { > print "$psn\t", > $psi->processName, " ", > $psi->processNumber, "\n" if $psi; >} > >Interesting things to note: >* If I dont put the "if $psi" at the end of that print statement, >then after printing a handful of processes, it will spit out "Can't >call method "processName" on an undefined value. >* If i do have that "if $psi" at the ened, then it will loop for a >LONG time (still going, thats the test i'm running now).
Will it print anything if you have if $psi? How about adding: print "$psn??\n" if !$psi; See if *that's* defined. -- Chris Nandor pudge@pobox.com http://pudge.net/ Open Source Technology Group pudge@ostg.com http://ostg.com/
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Sat, 7 Apr 2007 00:06:23 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 1.3k
It will only print about 20 processes and then hangs. INdeed I also tried to print $psn, which does print... it prints over over the same number (3204055042 in this case). /J On 6 Apr 2007, at 23:11, pudge@pobox.com via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > At 14:45 -0400 2007.04.06, Jelte Liebrand via RT wrote:
>> I'll collect all that info in a second, just running a test now. It >> seems I can reproduce the problem with this: >> #!/usr/bin/perl -w >> >> use Mac::Processes; >> >> while ( ($psn, $psi) = each(%Process) ) { >> print "$psn\t", >> $psi->processName, " ", >> $psi->processNumber, "\n" if $psi; >> } >> >> Interesting things to note: >> * If I dont put the "if $psi" at the end of that print statement, >> then after printing a handful of processes, it will spit out "Can't >> call method "processName" on an undefined value. >> * If i do have that "if $psi" at the ened, then it will loop for a >> LONG time (still going, thats the test i'm running now).
> > Will it print anything if you have if $psi? > > How about adding: > > print "$psn??\n" if !$psi; > > See if *that's* defined. > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Fri, 6 Apr 2007 16:38:48 -0700
To: bug-Mac-Glue [...] rt.cpan.org
From: Chris Nandor <cnandor [...] cpan.org>
Download (untitled) / with headers
text/plain 608b
At 19:06 -0400 2007.04.06, Jelte Liebrand via RT wrote: Show quoted text
>It will only print about 20 processes and then hangs. INdeed I also >tried to print $psn, which does print... it prints over over the same >number (3204055042 in this case).
Weird. I cannot duplicate this problem. I wish I could, because I would likely be able to fix it if I could duplicate it. That code you gave me, does it run as you? Under root? Any other special conditions that are present? -- Chris Nandor pudge@pobox.com http://pudge.net/ Open Source Technology Group pudge@ostg.com http://ostg.com/
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Sat, 7 Apr 2007 11:03:15 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 633b
Hiya, Yeah it is very weird. I guess I have some process running which just screws up the Mac::Processes concept of what is running.... could it be something silly like it getting confused about some number value? intel vs powerpc or something? Here's a zip with some other info. The script itself runs just as me, not as root. So I've also done a ps aux and captured that output. Perhaps you can see something running that could explain things? I know if I reboot it goes away, but that's why I dont want to reboot, cuz then I can't debug it :-) Let me know if there is anything else that you'd like me to check
Download macprocessprob.zip
application/zip 3.6k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 780b
/Cheers, Jelte On 7 Apr 2007, at 00:39, Chris_Nandor via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > At 19:06 -0400 2007.04.06, Jelte Liebrand via RT wrote:
>> It will only print about 20 processes and then hangs. INdeed I also >> tried to print $psn, which does print... it prints over over the same >> number (3204055042 in this case).
> > Weird. > > I cannot duplicate this problem. I wish I could, because I would > likely be > able to fix it if I could duplicate it. > > That code you gave me, does it run as you? Under root? Any other > special > conditions that are present? > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Sat, 7 Apr 2007 11:13:48 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Oh btw, I've been trying to debug this Mac::Processes to put some prints in there to see if I can find something. But I'm a little lost at how it's supposed to work.... the processes.pm is a rather small perl module with as good as nothing in it... where is the meat of this stuff?? /J On 7 Apr 2007, at 00:39, Chris_Nandor via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > At 19:06 -0400 2007.04.06, Jelte Liebrand via RT wrote:
>> It will only print about 20 processes and then hangs. INdeed I also >> tried to print $psn, which does print... it prints over over the same >> number (3204055042 in this case).
> > Weird. > > I cannot duplicate this problem. I wish I could, because I would > likely be > able to fix it if I could duplicate it. > > That code you gave me, does it run as you? Under root? Any other > special > conditions that are present? > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Sat, 7 Apr 2007 11:20:31 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 1023b
Yet another mail ;-) I also checked the output of what I just sent you. The PSN that repeats over and over seems to be that of the activity montior app. So I've killed it and ran it again. Now it repeats 321585122, which isn't in my psaux list :-( /J On 7 Apr 2007, at 00:39, Chris_Nandor via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > At 19:06 -0400 2007.04.06, Jelte Liebrand via RT wrote:
>> It will only print about 20 processes and then hangs. INdeed I also >> tried to print $psn, which does print... it prints over over the same >> number (3204055042 in this case).
> > Weird. > > I cannot duplicate this problem. I wish I could, because I would > likely be > able to fix it if I could duplicate it. > > That code you gave me, does it run as you? Under root? Any other > special > conditions that are present? > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Mon, 9 Apr 2007 09:35:18 -0700
To: bug-Mac-Glue [...] rt.cpan.org
From: Chris Nandor <cnandor [...] cpan.org>
Download (untitled) / with headers
text/plain 576b
Please try: #!/usr/bin/perl -w use Mac::Errors '$MacError'; use Mac::Processes; my $psn = 0; while ( 1 ) { my @results; $psn = Mac::Processes::GetNextProcess($psn); push @results, $psn, $MacError; if (! defined $psn) { print "$MacError\n"; last; } my $psi = Mac::Processes::GetProcessInformation($psn); push @results, $psi->processName, $MacError if $psi; print "@results\n"; } -- Chris Nandor pudge@pobox.com http://pudge.net/ Open Source Technology Group pudge@ostg.com http://ostg.com/
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Tue, 10 Apr 2007 23:08:33 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 2.1k
Hi there, OK, some more interesting things to note: 1- when my machine gets in this funny state, all I have to do is re- login and it is ok again (ie i dont need a full reboot) 2- I tested my own script from cron (like it runs daily at 03:00am), but then running it during the day numerous times and nothing bad happens 3- then I put my script back to run at 03:00am and that ran fine this morning as well, BUT: now my machine is in the "odd state" again. Which leads me to believe this is something completely different. Ie something else is running daily (after 03:00am) which puts my mac mini in this state. I am thinking perhaps it is iBackup, a bit of software i recently installed... I will turn it off tonight and see if tomorrow my machine is screwed again. Now that it is in this state, I've run your script, and this is the result: 262145 kHIDSuccess loginwindow kHIDSuccess 524289 kHIDSuccess Dock kHIDSuccess 786433 kHIDSuccess SystemUIServer kHIDSuccess 917505 kHIDSuccess Finder kHIDSuccess 1048577 kHIDSuccess iTunesHelper kHIDSuccess 1179649 kHIDSuccess DropCopy kHIDSuccess 1310721 kHIDSuccess droplet kHIDSuccess 1441793 kHIDSuccess iBackup kHIDSuccess 1572865 kHIDSuccess UniversalAccess kHIDSuccess 1703937 kHIDSuccess EyeTV Helper kHIDSuccess 1835009 kHIDSuccess Quicksilver kHIDSuccess 1966081 kHIDSuccess miraRCD kHIDSuccess 2097153 kHIDSuccess miraUSBDriver kHIDSuccess 65142785 kHIDSuccess System Events kHIDSuccess 206962689 kHIDSuccess EyeTV kHIDSuccess 3885105153 kHIDSuccess 3885105153 kHIDSuccess 3885105153 kHIDSuccess 3885105153 kHIDSuccess 3885105153 kHIDSuccess 3885105153 kHIDSuccess <this latter one repeats over and over and over> /Cheers, Jelte On 9 Apr 2007, at 17:35, Chris_Nandor via RT wrote: Show quoted text
> > #!/usr/bin/perl -w > > use Mac::Errors '$MacError'; > use Mac::Processes; > > my $psn = 0; > while ( 1 ) { > my @results; > $psn = Mac::Processes::GetNextProcess($psn); > push @results, $psn, $MacError; > if (! defined $psn) { > print "$MacError\n"; > last; > } > my $psi = Mac::Processes::GetProcessInformation($psn); > push @results, $psi->processName, $MacError if $psi; > print "@results\n"; > } >
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Tue, 10 Apr 2007 15:23:28 -0700
To: bug-Mac-Glue [...] rt.cpan.org
From: Chris Nandor <cnandor [...] cpan.org>
Download (untitled) / with headers
text/plain 733b
Another test script, added one line. It will tell you the PID of the PSN, if it exists, so you can try to identify the process. #!/usr/bin/perl -w use Mac::Errors '$MacError'; use Mac::Processes; my $psn = 0; while ( 1 ) { my @results; $psn = Mac::Processes::GetNextProcess($psn); push @results, $psn, $MacError; if (! defined $psn) { print "$MacError\n"; last; } push @results, GetProcessPID($psn); my $psi = Mac::Processes::GetProcessInformation($psn); push @results, $psi->processName, $MacError if $psi; print "@results\n"; } -- Chris Nandor pudge@pobox.com http://pudge.net/ Open Source Technology Group pudge@ostg.com http://ostg.com/
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Thu, 12 Apr 2007 10:56:14 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 1.1k
Well it wasn't the backup software, the problem still occurs. The extra line didn't do much either, it just results in: Use of uninitialized value in join or string at ..... So it's not finding anything about this "ghost" process.... this is getting frustrating :-( Next thing I'll do is write a little routine that will "spot" the problem. I'll put that on a cron job every 5 min, and then at least I know at what time during the day my machine gets itself in this state, and hopefully pin point if there is something bizarre happening at that time. I dont have anything else in cron though, so I'm not sure if Apple itself has some daily scheduler... we'll see /J On 10 Apr 2007, at 23:23, Chris_Nandor via RT wrote: Show quoted text
> > use Mac::Errors '$MacError'; > use Mac::Processes; > > my $psn = 0; > while ( 1 ) { > my @results; > $psn = Mac::Processes::GetNextProcess($psn); > push @results, $psn, $MacError; > if (! defined $psn) { > print "$MacError\n"; > last; > } > push @results, GetProcessPID($psn); > my $psi = Mac::Processes::GetProcessInformation($psn); > push @results, $psi->processName, $MacError if $psi; > print "@results\n"; > }
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Wed, 18 Apr 2007 14:36:39 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Download (untitled) / with headers
text/plain 1.7k
Hiya, Well I've tried loads of things now, and I can't seem to work this one out... :-( Looks like my mini goes in to this weird mode at random times during the day, but at least about once a day. There isn't any particular process that is running that i can kill that resolves it, and comparing the list of processes before and after it gets in this state doesn't shed any light on matters either. The only last guess I have is that it happens xx hours after I login... which would explain why it's not always breaking at the same time during the day. Do you have any pointers as to where I can start poking around to see what it actually does under the covers? I've used the perl debugger, but since the things is tied to something deep down in Mac, I can't seem to work out where and why it screws up... If you have any thoughts as to where i could poke, that would be great /Cheers, Jelte On 10 Apr 2007, at 23:23, Chris_Nandor via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > Another test script, added one line. It will tell you the PID of > the PSN, > if it exists, so you can try to identify the process. > > #!/usr/bin/perl -w > > use Mac::Errors '$MacError'; > use Mac::Processes; > > my $psn = 0; > while ( 1 ) { > my @results; > $psn = Mac::Processes::GetNextProcess($psn); > push @results, $psn, $MacError; > if (! defined $psn) { > print "$MacError\n"; > last; > } > push @results, GetProcessPID($psn); > my $psi = Mac::Processes::GetProcessInformation($psn); > push @results, $psi->processName, $MacError if $psi; > print "@results\n"; > } > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >
Subject: Re: [rt.cpan.org #26138] Found the line of code causing the problem
Date: Wed, 18 Apr 2007 20:18:55 +0100
To: bug-Mac-Glue [...] rt.cpan.org
From: Jelte Liebrand <jelte [...] liebrand.co.uk>
Hmmm I found this... perhaps this is related: http://lists.apple.com/archives/carbon-development/2001/Jul/ msg01063.html /J On 10 Apr 2007, at 23:23, Chris_Nandor via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26138 > > > Another test script, added one line. It will tell you the PID of > the PSN, > if it exists, so you can try to identify the process. > > #!/usr/bin/perl -w > > use Mac::Errors '$MacError'; > use Mac::Processes; > > my $psn = 0; > while ( 1 ) { > my @results; > $psn = Mac::Processes::GetNextProcess($psn); > push @results, $psn, $MacError; > if (! defined $psn) { > print "$MacError\n"; > last; > } > push @results, GetProcessPID($psn); > my $psi = Mac::Processes::GetProcessInformation($psn); > push @results, $psi->processName, $MacError if $psi; > print "@results\n"; > } > > -- > Chris Nandor pudge@pobox.com http://pudge.net/ > Open Source Technology Group pudge@ostg.com http://ostg.com/ >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.