segfault in cgit

Arun Persaud apersaud at lbl.gov
Sun Aug 21 18:00:00 CEST 2011


Hello

I'm running cgit stable (9900ac022edfcfacee317d19a0f1d4d03b837b43) and
am getting segmentation faults (got them also with earlier versions).

Unfortunately, I have no idea how to figure out what went wrong, but I
do have a core file in case that's interesting to anybody. Below is a
backtrace generated using gdb.

Any idea what went wrong? Let me know if there is anything I should try
in case you need more output.

HTH

Arun

[cgi-bin (master)]$ gdb cgit.cgi core
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Core was generated by `cgit.cgi'.
Program terminated with signal 11, Segmentation fault.
[New process 16715]
#0  0x00000000004139c6 in longest_common_subsequence (
    A=0x731320
"if(a.Hg){a.LVM=a.VIEW;if(a.PLAIN_VIEW==a.VIEW){a.iV(true);}a.W.innerHTML='Press
any key or <a href=\"javascript:org_html_manager.showHelp();\">click
here</a> to proceed.<h2>Keyboard Shortcuts</h2><table"...,
    B=0x70ad70
"if(a.Hg){a.LVM=a.VIEW;if(a.PLAIN_VIEW==a.VIEW){a.iV(true);}a.W.innerHTML='Press
any key or <a href=\"javascript:org_html_manager.showHelp();\">click
here</a> to proceed.<h2>Keyboard Shortcuts</h2><table"...) at ui-ssdiff.c:38
38					L[i][j] = (tmp1 > tmp2 ? tmp1 : tmp2);
(gdb) backtrace
#0  0x00000000004139c6 in longest_common_subsequence (
    A=0x731320
"if(a.Hg){a.LVM=a.VIEW;if(a.PLAIN_VIEW==a.VIEW){a.iV(true);}a.W.innerHTML='Press
any key or <a href=\"javascript:org_html_manager.showHelp();\">click
here</a> to proceed.<h2>Keyboard Shortcuts</h2><table"...,
    B=0x70ad70
"if(a.Hg){a.LVM=a.VIEW;if(a.PLAIN_VIEW==a.VIEW){a.iV(true);}a.W.innerHTML='Press
any key or <a href=\"javascript:org_html_manager.showHelp();\">click
here</a> to proceed.<h2>Keyboard Shortcuts</h2><table"...) at ui-ssdiff.c:38
#1  0x0000000000413f95 in print_ssdiff_line (class=0x478cff "changed",
old_line_no=266,
    old_line=0x731320
"if(a.Hg){a.LVM=a.VIEW;if(a.PLAIN_VIEW==a.VIEW){a.iV(true);}a.W.innerHTML='Press
any key or <a href=\"javascript:org_html_manager.showHelp();\">click
here</a> to proceed.<h2>Keyboard Shortcuts</h2><table"..., new_line_no=267,
    new_line=0x70ad70
"if(a.Hg){a.LVM=a.VIEW;if(a.PLAIN_VIEW==a.VIEW){a.iV(true);}a.W.innerHTML='Press
any key or <a href=\"javascript:org_html_manager.showHelp();\">click
here</a> to proceed.<h2>Keyboard Shortcuts</h2><table"...,
individual_chars=1) at ui-ssdiff.c:201
#2  0x00000000004143d4 in print_deferred_changed_lines () at ui-ssdiff.c:290
#3  0x000000000041450c in cgit_ssdiff_print_deferred_lines () at
ui-ssdiff.c:323
#4  0x00000000004145d2 in cgit_ssdiff_line_cb (
    line=0x7342e0 "
window.scrollTo(0,0);}else{if(a.PLAIN_VIEW==a.LVM){a.pV();}else{if(a.SLIDE_VIEW==a.LVM){a.sV();",
len=97) at ui-ssdiff.c:342
#5  0x000000000040a0e7 in filediff_cb (priv=0x414540, mb=0x74eb772232b0,
nbuf=2) at shared.c:243
#6  0x0000000000473574 in xdl_emit_diffrec (rec=<value optimized out>,
size=<value optimized out>, pre=<value optimized out>,
psize=128554643889616,
    ecb=0x30108b) at xdiff/xutils.c:59
#7  0x000000000047364a in xdl_emit_record (xdf=0x74eb77223420, ri=266,
pre=0x47c924 " ", ecb=0x74eb772235c0) at xdiff/xemit.c:47
#8  0x0000000000473a90 in xdl_emit_diff (xe=0x74eb77223420, xscr=<value
optimized out>, ecb=0x74eb772235c0, xecfg=0x74eb772235d0) at
xdiff/xemit.c:190
#9  0x0000000000471e39 in xdl_diff (mf1=<value optimized out>,
mf2=<value optimized out>, xpp=0x74eb77223600, xecfg=0x74eb772235d0,
ecb=0x74eb772235c0)
    at xdiff/xdiffi.c:558
#10 0x000000000040a312 in cgit_diff_files (old_sha1=0x6ff210
"AM/�,k\236$�̥�u���K\235�\236", new_sha1=0x6dafe0
"���%\22460��.q%�6�*\225�",
    old_size=0x74eb77223670, new_size=0x74eb77223668,
binary=0x74eb77223664, context=0, ignorews=0, fn=0x414540
<cgit_ssdiff_line_cb>) at shared.c:293
---Type <return> to continue, or q <return> to quit---
#11 0x000000000040cf84 in filepair_cb (pair=0x6d9e30) at ui-diff.c:319
#12 0x0000000000409e5c in cgit_diff_tree_cb (q=0x6d05f0,
options=0x74eb77223940, data=0x40cd92) at shared.c:194
#13 0x0000000000426ee6 in diff_flush (options=0x74eb77223940) at diff.c:4052
#14 0x000000000040a48b in cgit_diff_tree (old_sha1=0x6d05b0
"n!\001YCZ�\004\f/F\002�Ӥ��F�?",
    new_sha1=0x6d0590 "\222\036\224\b�\177\220��\2331dT\212B�X9�r",
fn=0x40cd92 <filepair_cb>, prefix=0x6d8060 "code/org-info-js/org-info.js",
    ignorews=0) at shared.c:330
#15 0x000000000040d215 in cgit_print_diff (new_rev=0x6d7f70
"921e9408a47f90e4ad9b3164548a42fa5839d372", old_rev=0x0,
    prefix=0x6d8060 "code/org-info-js/org-info.js") at ui-diff.c:385
#16 0x00000000004070bb in diff_fn (ctx=0x6d02c0) at cmd.c:59
#17 0x00000000004062ab in process_request (cbdata=0x6d02c0) at cgit.c:493
#18 0x0000000000404005 in process_slot (slot=0x74eb77223b70) at cache.c:279
#19 0x0000000000404334 in cache_process (size=1000, path=0x475d94
"/home/arun/cache/cgit",
    key=0x6d8000
"Worg/diff/code/org-info-js/org-info.js?id=921e9408a47f90e4ad9b3164548a42fa5839d372&ss=1",
ttl=-1, fn=0x406157 <process_request>,
    cbdata=0x6d02c0) at cache.c:360
#20 0x0000000000406f74 in main (argc=1, argv=0x74eb77225618) at cgit.c:791
(gdb) q




More information about the CGit mailing list