plamoni / SiriProxy

A (tampering) proxy server for Apple's Siri
GNU General Public License v3.0
2.12k stars 343 forks source link

zlib(finalizer): the stream was freed prematurely. #385

Closed jer78 closed 11 years ago

jer78 commented 11 years ago

I had siriproxy up and running on my Mac last year and decided I wanted to give it a try again but on a Ubuntu 12.10 box. However this time I cannot successfully get it working because when I try through my iPad 3 or iPhone 4S, the server stops running with the following error: zlib(finalizer): the stream was freed prematurely.

I searched the tickets and found Plamoni indentifying it as a dnsmasq issue because when I ping guzzoni.apple.com it doesn't actually go out to Apple's servers, the DNS resolves to 192.168.1.35 (my ubuntu box)

My question is, how should I get the dnsmasq to resolve to apple's servers. I followed the instructions by placing the line address=/guzzoni.apple.com/192.168.1.35 in the dnsmasq.conf file at the right spot.

There seems to be a few people with this problem and no answer out there. Please help

jocamero commented 11 years ago

I'm having the same issue. Does anyone have any suggestions for us? I tried the fix in #56 with no success. There doesn't appear to be a /etc/resolve.conf file on my Ubuntu 12.10 system. Thanks in advance!

Hmm, I do appear to have a shortcut to /etc/resolv.conf (no 'e')

This seems to have worked for me: http://askubuntu.com/questions/201603/how-do-i-edit-my-resolv-conf-file

Deanmv commented 11 years ago

Not used it on Ubuntu myself but it sounds a bit like the error that is talked about under:

"Using Siri causes a whole bunch of the following messages, followed by SiriProxy crashing!"

On the repo page

lilmrjacob commented 11 years ago

yep i have the same problem (i think) dns loops! its (i think) because of ubuntu 12.10 and maybe 12.04. i found this ( http://sokratisg.net/2012/03/31/ubuntu-precise-12-04-get-rid-of-nms-dnsmasq-and-setup-your-own/ ) im a noob so i cant help i dont know ANYTHING. ps /etc/resolv.conf writes its self back every reboot. maybe we can just forward guzzoni from ubuntu 12.10 and not need dnsmasq (i dont know). im just stuck in a loop when i use my ipad3 then crash so the three pigs setup is all good its just the dns loop i have (I THINK). thanks and im sorry for being a noob / all the babble an not able to help more.

elvisimprsntr commented 11 years ago

this will help eliminate the circular redirect. http://www.youtube.com/watch?v=gsZFXgFWOvA

latest siriproxy doesn't require dnsmasq. remove using apt-get purge dnsmasq

dwery commented 11 years ago

I'm getting the same zlib(finalizer): the stream was freed prematurely. message, but not using dnsmaq.

I think it's related to this:

/usr/lib/ruby/1.9.1/resolv.rb:710:in `initialize': Too many open files - socket(2) - udp (Errno::EMFILE)
    from /usr/lib/ruby/1.9.1/resolv.rb:710:in `new'
    from /usr/lib/ruby/1.9.1/resolv.rb:710:in `block in initialize'
    from /usr/lib/ruby/1.9.1/resolv.rb:701:in `each'
    from /usr/lib/ruby/1.9.1/resolv.rb:701:in `initialize'
    from /usr/lib/ruby/1.9.1/resolv.rb:539:in `new'
    from /usr/lib/ruby/1.9.1/resolv.rb:539:in `make_udp_requester'
    from /usr/lib/ruby/1.9.1/resolv.rb:495:in `each_resource'
    from /usr/lib/ruby/1.9.1/resolv.rb:485:in `getresources'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy/connection/iphone.rb:26:in `block in resolve_guzzoni'
    from /usr/lib/ruby/1.9.1/resolv.rb:302:in `open'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy/connection/iphone.rb:25:in `resolve_guzzoni'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy/connection/iphone.rb:38:in `ssl_handshake_completed'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run_machine'
    from /var/lib/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in `run'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy.rb:17:in `initialize'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy/command_line.rb:106:in `new'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy/command_line.rb:106:in `start_server'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy/command_line.rb:90:in `run_server'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/lib/siriproxy/command_line.rb:39:in `initialize'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/bin/siriproxy:6:in `new'
    from /var/lib/gems/1.9.1/gems/siriproxy-0.5.3/bin/siriproxy:6:in `<top (required)>'
    from /usr/local/bin/siriproxy:23:in `load'
    from /usr/local/bin/siriproxy:23:in `<main>'
zlib(finalizer): the stream was freed prematurely.
zlib(finalizer): the stream was freed prematurely.
zlib(finalizer): the stream was freed prematurely.
....

I also get this one:

139729900488352:error:02001018:system library:fopen:Too many open files:bss_file.c:398:fopen('/root/.siriproxy/server.passless.key','r')

so it seems siriproxy is not closing the files/sockets correctly, reaching the maximum number of allowed fds.

elvisimprsntr commented 11 years ago
  1. what device are you using?
  2. is it jailbroken?
  3. how did you install ruby and siriproxy (root, user)?
  4. how did you configure you device to point to siriproxy?
  5. what command did you use to launch siriproxy?
elvisimprsntr commented 11 years ago

try using the tips starting at 1:00 http://www.youtube.com/watch?v=vFSP4iYQPsM

dwery commented 11 years ago

iPhone 4S, no, root, iptables, siriproxy server

connection via iptables works nicely, I've tested it independently with telnet and netcat. I had to use iptables because I can't mess with the DNSs on the local network.

elvisimprsntr commented 11 years ago

@dwery I think you are on your own trying to get siriproxy working using IPTABLES method and it sounds like you are using siriproxy on an internal corporate network which ethically I cannot provide you any advice.

dwery commented 11 years ago

I'm fully authorized, don't worry ;) I'll see if I can do split-dns or some other dns trick and check if the behaviour changes.

elvisimprsntr commented 11 years ago

closed due to inactivity