From zond at troja.ath.cx Sun Sep 7 06:13:10 2008 From: zond at troja.ath.cx (Gruad Lloigor) Date: Sun, 7 Sep 2008 12:13:10 +0200 Subject: [Ruburple-development] Ruburple::Protocol::Connection::close Betrays me.. In-Reply-To: References: Message-ID: <27acba740809070313j7e45ba89q610e5e80b85ce6b@mail.gmail.com> Hey Lian! Thanks for the praise :) Unfortunately I don't have much time for ruburple nowadays, so instead of hacking it myself I try to provide help and support for those who want to. This is mostly since I don't use it myself anymore. Which also leads to me not having experienced the problem you describe, even if I would have - had I used ruburple... Therefore I will simply forward this mail to the list, hoping that someone on it has experienced and/or fixed it already, or has the time to fix it :) Otherwise the only recourse for you is to try and hack it yourself - I can recommend the mailing list archives, where I have explained the rather circumspect functioning of ruburple a couple times. Also, I am more than happy to help explain, comment or suggest solutions with you :D regards, //Martin On Sun, Sep 7, 2008 at 8:21 AM, hypedriven at gmail.com wrote: > hey martin, > > first of all, thank your for ruburple. i really like handling giant C > projects in ruby code, so ruburple is a perfect fit for messaging projects > that need all those protocols as gateways.. please keep on improving that > gem, great work! > > ruby: 1.8.6 > os: osx, freebsd7 > libpurple: 2.4.3, 2.5.0 > > ## in short: > connection.close just hangs the process. does not return, even with a > timeout in ruby.. > > irb(main):008:0> c.client.connection > => # > > irb(main):009:0> c.client.connection.close > (05:21:22) account: Disconnecting account 0x283eed00 > (05:21:22) connection: Disconnecting connection 0x29a13780 > (05:21:22) connection: Deactivating keepalive. > (05:21:22) jabber: Sending (ssl): > (05:21:22) jabber: XML parser error for JabberStream 0x286d7260: Domain 1, > code 5, level 3: Extra content at the end of the document > > ^C > ^C > (05:23:07) connection: Destroying connection 0x29a13780 > (05:23:07) util: Writing file accounts.xml to directory /home/laleh/.purple > (05:23:07) util: Writing file /home/laleh/.purple/accounts.xml > Illegal instruction (core dumped) > > the attachment contains both, xmpp and icq, irb logs > > did you also notice problem and have a solution, or maybe a hint for me? :) > > > ## in detail > i started to use ruburple in a little projekt a while ago now. before that i > just run your test and played in irb. > > ruburple seams to work well in all case a ran into. only used the basic > classes like protocoll and account and events like new messages and > presences. and again, all went well. i keept on adding features to my code > and was looking forward to deploy the app to a couple of friends for a beta > test. > while writing specs and more specs, i came to only one untested part, i > missed that at some point the user might want to disconnect his connection.. > well, i found the connecion.close or connection.enabled = false methods, > implemented and thought its good to go but no matter what i do, closing a > connection allways hangs my process. very strange and bad because its the > only thing that keeps my code from running stable. > > first an ssl issue came to mind because i run default configured ejabberd > for testing, so i tried with icq and same error (no error, .close just hangs > the process). i have no clue about libpurple.o, but did try to edit your > c-wrapper code to return a Qnil instead of null on the set_enabled method > but no sucess. also tried the ruby timeout to return it back to ruby and > handle it but i feels like libpurple hangs and does not return the call. > > > > mfg, > ju lian > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ruburple_irb_logs.txt URL: From zond at troja.ath.cx Sun Sep 7 06:16:25 2008 From: zond at troja.ath.cx (Gruad Lloigor) Date: Sun, 7 Sep 2008 12:16:25 +0200 Subject: [Ruburple-development] Update: Ruburple::Protocol::Connection::close Betrays me.. In-Reply-To: References: Message-ID: <27acba740809070316q1891c4f6m144c55b4a776d6d2@mail.gmail.com> Ah, then I know what causes it - the threading in ruburple is complex :/ In the mailing list archives I explain a similar problem, I don't remember exactly what it was - but I think it was a subscription that caused a deadlock due to the threading... I think I even suggested solutions, perhaps one of them works in this case as well :) If you don't get it from those mails, ask me again and I will try to clear it up! regards, //Martin On Sun, Sep 7, 2008 at 10:10 AM, wrote: > well, figured it out myself. > > i just commented out my "Ruburple.subscribe(:signed_off){ ... }" lines and > now it works. great. :) but how to subscribe to the signed_off event? right > now it doesnt matter.. but maybe for some of us to come.. any hints on how > to scale a app with ruburple/libpurple? what max connections per user on a > host? > > will sleep well tonight, that f*** close method killing my programm messed > around 3 days with me. stupid me. > > > anyhow, thanks for helping me out > > > > Anfang der weitergeleiteten E-Mail: > >> Von: "hypedriven at gmail.com" >> Datum: 7. September 2008 08:21:17 MESZ >> An: zond at troja.ath.cx >> Betreff: Ruburple::Protocol::Connection::close Betrays me.. >> >> hey martin, >> >> first of all, thank your for ruburple. i really like handling giant C >> projects in ruby code, so ruburple is a perfect fit for messaging projects >> that need all those protocols as gateways.. please keep on improving that >> gem, great work! >> >> ruby: 1.8.6 >> os: osx, freebsd7 >> libpurple: 2.4.3, 2.5.0 >> >> ## in short: >> connection.close just hangs the process. does not return, even with a >> timeout in ruby.. >> >> irb(main):008:0> c.client.connection >> => # >> >> irb(main):009:0> c.client.connection.close >> (05:21:22) account: Disconnecting account 0x283eed00 >> (05:21:22) connection: Disconnecting connection 0x29a13780 >> (05:21:22) connection: Deactivating keepalive. >> (05:21:22) jabber: Sending (ssl): >> (05:21:22) jabber: XML parser error for JabberStream 0x286d7260: Domain 1, >> code 5, level 3: Extra content at the end of the document >> >> ^C >> ^C >> (05:23:07) connection: Destroying connection 0x29a13780 >> (05:23:07) util: Writing file accounts.xml to directory >> /home/laleh/.purple >> (05:23:07) util: Writing file /home/laleh/.purple/accounts.xml >> Illegal instruction (core dumped) >> >> the attachment contains both, xmpp and icq, irb logs >> >> did you also notice problem and have a solution, or maybe a hint for me? >> :) >> >> >> ## in detail >> i started to use ruburple in a little projekt a while ago now. before that >> i just run your test and played in irb. >> >> ruburple seams to work well in all case a ran into. only used the basic >> classes like protocoll and account and events like new messages and >> presences. and again, all went well. i keept on adding features to my code >> and was looking forward to deploy the app to a couple of friends for a beta >> test. >> while writing specs and more specs, i came to only one untested part, i >> missed that at some point the user might want to disconnect his connection.. >> well, i found the connecion.close or connection.enabled = false methods, >> implemented and thought its good to go but no matter what i do, closing a >> connection allways hangs my process. very strange and bad because its the >> only thing that keeps my code from running stable. >> >> first an ssl issue came to mind because i run default configured ejabberd >> for testing, so i tried with icq and same error (no error, .close just hangs >> the process). i have no clue about libpurple.o, but did try to edit your >> c-wrapper code to return a Qnil instead of null on the set_enabled method >> but no sucess. also tried the ruby timeout to return it back to ruby and >> handle it but i feels like libpurple hangs and does not return the call. >> >> >> >> mfg, >> ju lian >> >> > > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ruburple_irb_logs.txt URL: