Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash if large amount of files added #6

Closed
bitboxer opened this issue Mar 29, 2010 · 13 comments
Closed

Crash if large amount of files added #6

bitboxer opened this issue Mar 29, 2010 · 13 comments

Comments

@bitboxer
Copy link

If several hundred files are pushed, the mail gets too big and the emailer crashes

/usr/local/lib/ruby/1.8/net/protocol.rb:301:in `slice!': Stack overflow in regexp matcher: /\A.*(?:\n|\r\n|\r(?!\z))/n (RegexpError)
from /usr/local/lib/ruby/1.8/net/protocol.rb:301:in `each_crlf_line'
from /usr/local/lib/ruby/1.8/net/protocol.rb:312:in `buffer_filling'
from /usr/local/lib/ruby/1.8/net/protocol.rb:310:in `step'
from /usr/local/lib/ruby/1.8/net/protocol.rb:310:in `buffer_filling'
from /usr/local/lib/ruby/1.8/net/protocol.rb:300:in `each_crlf_line'
from /usr/local/lib/ruby/1.8/net/protocol.rb:245:in `write_message_0'
from /usr/local/lib/ruby/1.8/net/protocol.rb:344:in `__send__'
from /usr/local/lib/ruby/1.8/net/protocol.rb:344:in `write'
from /usr/local/lib/ruby/1.8/net/protocol.rb:355:in `puts'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/emailer.rb:50:in `perform_delivery_smtp'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/emailer.rb:49:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/emailer.rb:49:in `perform_delivery_smtp'
from /usr/local/lib/ruby/1.8/net/protocol.rb:274:in `call'
from /usr/local/lib/ruby/1.8/net/protocol.rb:274:in `write_message_by_block'
from /usr/local/lib/ruby/1.8/net/protocol.rb:289:in `using_each_crlf_line'
from /usr/local/lib/ruby/1.8/net/protocol.rb:272:in `write_message_by_block'
from /usr/local/lib/ruby/1.8/net/protocol.rb:168:in `writing'
from /usr/local/lib/ruby/1.8/net/protocol.rb:271:in `write_message_by_block'
from /usr/local/lib/ruby/1.8/net/smtp.rb:880:in `data'
from /usr/local/lib/ruby/1.8/net/smtp.rb:921:in `critical'
from /usr/local/lib/ruby/1.8/net/smtp.rb:875:in `data'
from /usr/local/lib/ruby/1.8/net/smtp.rb:709:in `open_message_stream'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/emailer.rb:48:in `perform_delivery_smtp'
from /usr/local/lib/ruby/1.8/net/smtp.rb:526:in `start'
from /usr/local/lib/ruby/1.8/net/smtp.rb:463:in `start'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/emailer.rb:43:in `perform_delivery_smtp'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/emailer.rb:97:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/commit_hook.rb:55:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/diff_to_html.rb:277:in `each_with_index'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/commit_hook.rb:51:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/commit_hook.rb:51:in `each_with_index'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/../lib/commit_hook.rb:51:in `run'
from /usr/local/lib/ruby/gems/1.8/gems/git-commit-notifier-0.5.0/bin/git-commit-notifier:11
from /usr/local/bin/git-commit-notifier:19:in `load'
from /usr/local/bin/git-commit-notifier:19
@bitboxer
Copy link
Author

But don't worry, the commit is okay, it's just the mailer that crashes :)

@bitboxer
Copy link
Author

The main problem here is that I don't know what to do about this? Split the mail in several sub mails?

@mixonic
Copy link

mixonic commented Jun 22, 2010

Hey bitboxer,

How large does the email need to be for this to happen? This is pretty lame. I guess over a certain size we could make the body into an attachment.

@bitboxer
Copy link
Author

I don't know. I have seen this after adding aprox. 100 Files to a repo. The push takes ages and after 15 minute it fails with this error.

@akzhan
Copy link
Member

akzhan commented Aug 3, 2010

try to use lines_per_diff option that applicable to unreleased version (master branch on GitHub).

@akzhan
Copy link
Member

akzhan commented Aug 3, 2010

Of course sendmail method is preferrable in case of very large commit diffs.

@bitboxer
Copy link
Author

bitboxer commented Aug 4, 2010

I would prefer that the system would only show the files that where changed (max 1000) and link to gitweb if it's configured.

@krunkosaurus
Copy link

Did we find a solution for this?

@akzhan
Copy link
Member

akzhan commented May 3, 2011

I have no time until 7 May, so cannot provide the fix immediately.

@krunkosaurus
Copy link

Thanks akzhan!

@akzhan
Copy link
Member

akzhan commented Aug 17, 2011

too_many_files option added in my fork. Still need testing.

@bitboxer
Copy link
Author

I pulled it now. @krunkosaurus , can you check if this is okay for you?

@akzhan
Copy link
Member

akzhan commented Sep 3, 2011

Released as 0.10.0

@akzhan akzhan closed this as completed Sep 3, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants