Bug 2823 - 6.5b1 crash bug, any version, on startup
: 6.5b1 crash bug, any version, on startup
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 6.5b1
: Macintosh MacOS X 10.4
: P2 critical (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-15 07:21 UTC by James Lynch III
Modified: 2008-09-15 14:39 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Lynch III 2006-01-15 07:21:16 UTC
log excerpt:

2006-01-14 16:18:49.4550 SlimServer Graphics init...
2006-01-14 16:18:53.0286 Old SLIMP3 Protocol init...
usage:   (port,iaddr) = sockaddr_in(sin_sv) at /Library/PreferencePanes/SlimServer.prefPane/Contents/server/Slim/Utils/Network.pm line 163
2006-01-14 16:18:53.0665 Got to the END.
2006-01-14 16:18:53.0669 Got sigint.
2006-01-14 16:18:53.0670 SlimServer cleaning up.
Comment 1 Fred 2006-01-21 06:15:49 UTC
Is this on an Intel mac?
Comment 2 James Lynch III 2006-01-21 06:46:30 UTC
No, primarily a 500mhz cube with 1.5 gig RAM. Duplicated on 1.67 gig Powerbook with 2 gig RAM.
Comment 3 James Lynch III 2006-01-21 06:47:12 UTC
Same OS, Perl versions on both
Comment 4 Fred 2006-01-21 19:56:05 UTC
Perl version? (perl -v)

Got 10.4 running on a Cube? 

Sounds very strange, works fine here with 10.4 and Perl 5.8.6, but this is G5..
Comment 5 James Lynch III 2006-01-21 20:20:39 UTC
5.86... not a Perl version issue...

Comment 6 KDF 2006-01-21 23:21:53 UTC
but, perhaps an IO::Socket version issue?
that is the module that provides the sockaddr_in function
Comment 7 James Lynch III 2006-01-28 05:24:48 UTC
(In reply to comment #6)
> but, perhaps an IO::Socket version issue?
> that is the module that provides the sockaddr_in function
> 

If it is, then its an issue with the version in the installer... I'm not using subversion... any other ideas?
Comment 8 James Lynch III 2006-01-28 05:32:02 UTC
can't replicate in latest version (01-28) as it doesn't get to the SlimP3 protocol... chokes on: "Can't locate object method "_new" via package "GD::Image" at /Library/PreferencePanes/SlimServer.prefPane/Contents/server/CPAN/GD/Image.pm line 83."
Comment 9 Blackketter Dean 2006-01-28 08:02:42 UTC
I'm seeing this on my G4 Powerbook still today.
Comment 10 John Scudder 2006-01-28 11:16:47 UTC
FWIW, I'm hitting this too, with the 1/24/06 build.  This is on an old PMG4 (450 MHz uniprocessor) running 10.4.4 with all latest Apple patches (current as of noon today).  I haven't monkeyed with the Perl install or libs in any way, it's just plain vanilla whatever Apple supplies (perl -v says 5.8.6, IO::Socket is 1.28, IO::Socket::INET is 1.27).
Comment 11 Dan Sully 2006-01-28 11:20:35 UTC
I just checked in a fix for this - please give it a try. Change 5913.
Comment 12 John Scudder 2006-01-28 11:52:37 UTC
I just patched in change 5913 to my 1/24/06 build by hand.  No joy -- slimserver still barfs in the same way.
Comment 13 Dan Sully 2006-01-28 12:09:13 UTC
Can you do a print "ip: [$ip] port: [$port]\n";  in that function?
Comment 14 John Scudder 2006-01-28 13:45:39 UTC
ip: [192.168.43.2] port: [3483]
Comment 15 Dan Sully 2006-01-28 13:48:02 UTC
And what's the output from:

inet_aton(192.168.43.2)

and sockaddr_in($port, (inet_aton($ip))

if run from a test script? You'll need to "use Socket"
Comment 16 John Scudder 2006-01-28 14:27:05 UTC
In answer to your question:

--
use Socket;
$myaddr = "192.168.43.2";
$myport = 1234;

$ip = inet_aton($myaddr);
print "ip is ", inet_ntoa($ip), "\n";
$sin = sockaddr_in($myport, $ip);
print "sin is $sin\n";
--

gives this output:

--
ip is 192.168.43.2
sin is ???+
--

Which is pretty much as expected.  HOWEVER, in refreshing my Perl memory I was browsing the Perl socket documentation which gave me a little hint.  The documentation says in part

--
sockaddr_in SOCKADDR_IN
In a list context, unpacks its SOCKADDR_IN argument and returns an array consisting of (PORT, ADDRESS). In a scalar context, packs its (PORT, ADDRESS) arguments as a SOCKADDR_IN and returns it. If this is confusing, use pack_sockaddr_in() and unpack_sockaddr_in() explicitly.
--

On a hunch, I replaced the return with a pack_sockaddr_in() to force the scalar context, so now I have

--
return pack_sockaddr_in($port, inet_aton($ip));
--

And lo and behold, it appears to be working!  This does indeed seem consistent with the error that's in the bug description -- the function seems to think it's being called in a list context and wants to see a SOCKADDR_IN as its argument.  I don't know why it thinks it's being called in a list context, but there you have it.  

It might be interesting to know if everyone seeing this bug has multiple active network interfaces on their computer.  I do.  One of the other people talks about a Powerbook, and they often have two interfaces (Ethernet and Airport).
Comment 17 Fred 2006-02-06 16:18:20 UTC
It's called by

sayHello($udpsock, ipaddress2paddr($clientid));

in the SliMP3 protocol handler, and this is it.

Seems to me the above calls for list context, so ipaddress2paddr as well, and I guess the socket call likewise. Can we replace the call by the proposed value and close this? (annoying red line in my bug list :-))
Comment 18 James Lynch III 2006-02-11 17:16:31 UTC
just want to confirm that this error persists in last nights build.
Comment 19 James Lynch III 2006-02-28 09:04:19 UTC
Any use trying a newer build?
Comment 20 James Lynch III 2006-03-12 17:23:33 UTC
just caught this thread:

http://forums.slimdevices.com/showthread.php?t=21969

Someone blissing out over 6.5b1 on an IntelMac...

Has there been a change that has closed this bug?
Comment 21 Dan Sully 2006-04-18 15:15:41 UTC
Fixed in change 6965.

Sorry for the delay.