Comments (11)
Interesting. Apparently the error is in the code that converts server time to your local timezone.
What channel were you browsing when bccc crashed, and in which timezone do you live?
from bccc.
09:36:49 [zbrown] ~/Desktop/bccc/bccc/bccc$ date +%z
-0400
09:36:53 [zbrown] ~/Desktop/bccc/bccc/bccc$
The bccc UI was only active for a couple of seconds, and since I've
never used it before, I'm not sure what channel it was set to browse.
If there's a default channel, I was probably browsing that.
On Wed, May 30, 2012 at 9:10 AM, Thomas Jost
[email protected]
wrote:
Interesting. Apparently the error is in the code that converts server time to your local timezone.
What channel were you browsing when bccc crashed, and in which timezone do you live?
Reply to this email directly or view it on GitHub:
#9 (comment)
Zack Brown
from bccc.
The default is to browse your personal channel. If you tell me your
channel JID I'll be able to do some tests and try to fix this problem.
from bccc.
jid = [email protected]
from bccc.
Your channel is private. Could you please accept my request to subscribe to it?
from bccc.
I have done so.
from bccc.
Hmm, I can't reproduce this issue, I can display your channel without any trouble. So I'll need some help :)
Could you please:
- enable logging in your config file
- replace the
LocalTimezone._isdst()
method inbccc/ui/util.py
(lines 47--53) with http://pastebin.com/sujEKYpc - make bccc crash again
- post the end of the log, especially the line with "OverflowError".
(The best would be to set the log level to "debug", remove your password from the log and mail it to me at [email protected])
from bccc.
OK. Logging was already enabled at the "warning" level, so I left it as it was.
I replaced the _isdst with the code from the link you included.
I rebuilt and reinstalled bccc
I ran bccc. It lasted a few seconds longer this time, then crashed with the following message:
"Fatal Python error. Cannot recover from stack overflow. Aborted (core dumped)"
I looked in ~/.bccc.log and found it was empty.
I changed the logging level to 'debug' and ran bccc again. I got the same error at crashtime.
This time when I looked in ~/.bccc.log I got a metric ton of output, but none of it included "OverflowError" anywhere.
Here are the last several lines of the log file:
2012-05-31 06:00:34,330 sleekxmpp.xmlstream.xmlstream:DEBUG RECV:
2012-05-31 06:00:34,332 sleekxmpp.xmlstream.xmlstream:DEBUG SEND:
2012-05-31 06:00:34,572 sleekxmpp.xmlstream.xmlstream:DEBUG RECV:
2012-05-31 06:00:34,573 sleekxmpp.plugins.xep_0030.disco:DEBUG Received disco items result frombuddycloud.org to [email protected]/901f8766-d844-4a90-87e9-97581ae694cf.
2012-05-31 06:00:34,574 sleekxmpp.plugins.xep_0030.disco:DEBUG Received disco info result fromchannels.buddycloud.org to [email protected]/901f8766-d844-4a90-87e9-97581ae694cf.
2012-05-31 06:00:34,584 sleekxmpp.plugins.xep_0030.disco:DEBUG Received disco info result fromtopics.buddycloud.org to [email protected]/901f8766-d844-4a90-87e9-97581ae694cf.
2012-05-31 06:00:34,585 sleekxmpp.plugins.xep_0030.disco:DEBUG Received disco info result fromanon.buddycloud.org to [email protected]/901f8766-d844-4a90-87e9-97581ae694cf.
2012-05-31 06:00:34,586 sleekxmpp.plugins.xep_0030.disco:DEBUG Received disco info result fromsearch.buddycloud.org to [email protected]/901f8766-d844-4a90-87e9-97581ae694cf.
2012-05-31 06:00:34,587 sleekxmpp.plugins.xep_0030.disco:DEBUG Received disco info result fromoembed.buddycloud.org to [email protected]/901f8766-d844-4a90-87e9-97581ae694cf.
from bccc.
Wow, a stack overflow in the CPython interpreter caused by pure Python code -- I don't think I had managed to do that yet.
I think the problem in the patch I sent you is that calling str(dt)
triggers a call to _isdst()
, which raises an exception that causes a call to str(dt)
, etc., infinite recursion, and boom stack overflow :D
Here's a new version of _isdst
without the call to str(dt)
: http://pastebin.com/Pi8Ft9nk
Could you please tell me if this one "works" (i.e. OverflowError, not stack overflow in Python interpreter), and if it does, could you please mail me the full log? (gzip it if it's too big...)
from bccc.
OK, I used your new version of _isdst, and got this output from a run:
10:45:34 [zbrown] ~/Desktop/bccc/bccc$ bccc
Traceback (most recent call last):
File "/usr/local/bin/bccc", line 5, in
pkg_resources.run_script('bccc==0.0.1', 'bccc')
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 499, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1236, in run_script
exec(compile(open(script_filename).read(), script_filename, 'exec'), namespace, namespace)
File "/usr/local/lib/python3.2/dist-packages/bccc-0.0.1-py3.2.egg/EGG-INFO/scripts/bccc", line 70, in
ui.run()
File "/usr/local/lib/python3.2/dist-packages/bccc-0.0.1-py3.2.egg/bccc/ui/ui.py", line 101, in run
self.loop.run()
File "/usr/local/lib/python3.2/dist-packages/urwid-1.0.1-py3.2-linux-i686.egg/urwid/main_loop.py", line 274, in run
self.screen.run_wrapper(self._run)
File "/usr/local/lib/python3.2/dist-packages/urwid-1.0.1-py3.2-linux-i686.egg/urwid/raw_display.py", line 237, in run_wrapper
return fn()
File "/usr/local/lib/python3.2/dist-packages/urwid-1.0.1-py3.2-linux-i686.egg/urwid/main_loop.py", line 307, in _run
self.event_loop.run()
File "/usr/local/lib/python3.2/dist-packages/urwid-1.0.1-py3.2-linux-i686.egg/urwid/main_loop.py", line 682, in run
self._loop()
File "/usr/local/lib/python3.2/dist-packages/urwid-1.0.1-py3.2-linux-i686.egg/urwid/main_loop.py", line 720, in _loop
self._watch_filesfd
File "/usr/local/lib/python3.2/dist-packages/urwid-1.0.1-py3.2-linux-i686.egg/urwid/main_loop.py", line 187, in cb
rval = callback(data)
File "/usr/local/lib/python3.2/dist-packages/bccc-0.0.1-py3.2.egg/bccc/ui/ui.py", line 135, in _handle_callback
func(_args, *_kwargs)
File "/usr/local/lib/python3.2/dist-packages/bccc-0.0.1-py3.2.egg/bccc/ui/sidebar.py", line 76, in pubsub_posts_callback
if atom_pub > self.most_recent_activity:
File "/usr/local/lib/python3.2/dist-packages/bccc-0.0.1-py3.2.egg/bccc/ui/util.py", line 33, in utcoffset
if self._isdst(dt):
File "/usr/local/lib/python3.2/dist-packages/bccc-0.0.1-py3.2.egg/bccc/ui/util.py", line 52, in _isdst
stamp = time.mktime(tt)
OverflowError: mktime argument out of range
10:45:45 [zbrown] ~/Desktop/bccc/bccc$
This time the debugging output in the log file did include an overflow line:
2012-05-31 10:46:48,400 root:ERROR OverflowError: (1900, 1, 1, 0, 0, 0, 0, 0, 0) -- -1 day, 20:00:00 -- -1 day, 19:00:00
I've sent the full log file to you via email.
from bccc.
Ok, I've been able to reproduce this bug. It's i686-specific (I had to set up a 32bit chroot): on x86_64, time.mktime()
returns negative timestamps when its arg has a year < 1970, but on i686 it raises OverflowError instead.
I'll push a workaround later; a cleaner fix would probably require adding a new dependency (pytz), which I would like to avoid.
from bccc.
Related Issues (17)
- Instructions don't work on Ubuntu 11.04 HOT 2
- Basic follow/unfollow
- Handle private channels
- ssh into a bccc instance HOT 1
- readability issues. HOT 3
- Crash when changing status
- Crash when replying to a channel post. HOT 3
- No indication of bad password
- My channel isn't on top
- launch fails on Ubuntu 11.04
- Mistake in Debian installation instructions HOT 1
- On debian, after following the instruction, following fail occurs HOT 8
- Non-Unicode locales are not supported
- Maybe log in status should be displayed HOT 4
- When posting a new message to a channel, the view does not "scroll up" HOT 2
- When opening channel of [email protected] -> client crashed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bccc.