]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/recentchangesdiff_crashes_on_commits_which_remove_a_lot_of_files.mdwn
remove some links to gitweb
[ikiwiki.git] / doc / bugs / recentchangesdiff_crashes_on_commits_which_remove_a_lot_of_files.mdwn
1 [[plugins/recentchangesdiff]] causes rendering to segfault if a commit removes a lot of contents. I removed close to 400 files, total size of about 950Kb in a single commit and now `ikiwiki` segfaults on refresh and rebuild:
2
3     [...]
4     rendering recentchanges.mdwn
5     [1]    5541 segmentation fault  ikiwiki --verbose --setup ikiwiki.setup --refresh
6
7 If I disable the plugin, the segfault does not happen, but I have to remove `wc/recentchanges/*` or else it will crash just as well.
8
9 This is reproducible, but I cannot provide the source code.
10
11 > Can you provide a sanitised version of the source code? I've tried
12 > ikiwiki on some files that are just large, and cannot reproduce any
13 > problems, so it must be something in the specific file. (A perl bug is
14 > also clearly involved here.) --[[Joey]]
15
16 The tarball is at http://scratch.madduck.net/__tmp__recentchanges-segfault.tgz - unpack it in `/tmp` and `chdir()` to /tmp/cdt.taF18912, then run
17
18     ikiwiki --setup ikiwiki.setup
19     # segfaults
20     git checkout HEAD^
21     ikiwiki --setup ikiwiki.setup
22     # segfaults
23     rm -rf wc/recentchanges
24     ikiwiki --setup ikiwiki.setup
25     # works
26
27 > I can reproduce it fine with that, thanks, and it's really looking like a
28 > pure perl bug, that is triggered by markdown. Here's a simpler test case:
29
30         joey@kodama:/tmp>markdown < f
31         zsh: segmentation fault  markdown < f
32
33 > Where f is a 6.3 mb file that I
34 > extracted from ikiwiki's rendering pipeline.
35
36 > It seems to be crashing at markdown line 345, which is a big nasty
37 > `s///` statement.
38
39 > The good news: markdown version 1.0.2~b8-2 does not trigger this perl bug.
40 > I only see it with 1.0.1. (Bad news: Newer versions of markdown are
41 > slooooooow, especially on such large files.)
42
43 > I'm calling this [[done]] since I've filed [[!debbug 470676]] on perl, and
44 > also have modified recentchangesdiff to only show the first 200 lines of
45 > diff, which should be enough without bloating the recentchanges into
46 > perl-crashing territory. --[[Joey]]