"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mikhail <mp39590@gmail.com>
Subject:
gotd crash while requesting non-existent commit id
To:
gameoftrees@openbsd.org
Date:
Fri, 4 Nov 2022 15:37:12 +0300

Download raw body.

Thread
While doing some kind of "manual stress testing" with gotd it crashed
for me. Crashes are repeatable.

Steps to reproduce:

./gotd -d -vv -f /etc/gotd.conf  

gotd.conf:

unix_socket "/home/gotdev/gotd.sock"
unix_group gotsh
user got

repository "src" {
        path "/var/git/src.git/"
}

from neighboring tmux

ssh gotdev@localhost git-upload-pack '/src.git'
S: [...]
C (manual send): 0054want 74730d410fcb6603ace96f1dc55ea6196122532d multi_ack side-band-64k ofs-delta

the commit id is non-existent one.

------------------------------------------------------------------------

Logs for my session:

idea:~/bin# ./gotd -d -vv -f /etc/gotd.conf       
socket: /home/gotdev/gotd.sock
user: got
secondary group: gotsh
adding repository src
proc repo_read /var/git/src.git is on fd 4
adding repository src
proc repo_write /var/git/src.git is on fd 5
gotd_accept: new client uid 1004 connected on fd 7
list-refs request from uid 1004
uid 1004: expecting capabilities
receiving capabilities from uid 1004
expecting 2 capabilities from uid 1004
uid 1004: capability side-band-64k
uid 1004: capability ofs-delta
uid 1004: expecting want-lines
received want-line from uid 1004
client wants 74730d410fcb6603ace96f1dc55ea6196122532d
repo_read /var/git/src.git: want-line: object
74730d410fcb6603ace96f1dc55ea6196122532d not found
uid 1004: object 74730d410fcb6603ace96f1dc55ea6196122532d not found
uid 1004: object 74730d410fcb6603ace96f1dc55ea6196122532d not found
uid 1004: disconnecting
repo_read /var/git/src.git: shutting down
repo_write /var/git/src.git: shutting down
Segmentation fault 


idea:/tmp$ ssh gotdev@localhost git-upload-pack '/src.git'  foundidea:/tmp$ 
0080921be97db90d3e909f1f032b78b6faf6bd04e8f1 HEAD agent=got/0.79-current ofs-delta side-band-64k symref=HEAD:refs/heads/master
00760116a5e794a8f7750dedef8b120ea23ba113cba8 refs/got/backup/histedit/master/7d52e6967a0736cd94a213445798c1dea1792e84
0075c58b1ec365540fd46ddd224ca1ea5223fcf008dc refs/got/backup/rebase/ideapad/0116a5e794a8f7750dedef8b120ea23ba113cba8
0069921be97db90d3e909f1f032b78b6faf6bd04e8f1 refs/got/worktree/base-73c0fc6d-b3fd-4549-a68c-9105b314acbf
00400116a5e794a8f7750dedef8b120ea23ba113cba8 refs/heads/ideapad
003f921be97db90d3e909f1f032b78b6faf6bd04e8f1 refs/heads/master
0048921be97db90d3e909f1f032b78b6faf6bd04e8f1 refs/remotes/origin/master
00000054want 74730d410fcb6603ace96f1dc55ea6196122532d multi_ack side-band-64k ofs-delta
0041ERR object 74730d410fcb6603ace96f1dc55ea6196122532d not foundidea:/tmp$ 


backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0000027dada626d7 in gotd_dispatch (fd=4, event=2, arg=0x28073682510) at /home/misha/work/got/gotd/gotd.c:1920
/home/misha/work/got/gotd/gotd.c:1920:47566:beg:0x27dada626d7
1920                            log_warnx("uid %d: %s", client->euid, err->msg);
(gdb) bt
#0  0x0000027dada626d7 in gotd_dispatch (fd=4, event=2, arg=0x28073682510) at /home/misha/work/got/gotd/gotd.c:1920
#1  0x000002808ec4f0df in event_process_active (base=0x280952c3400) at /usr/src/lib/libevent/event.c:333
#2  event_base_loop (base=0x280952c3400, flags=<optimized out>) at /usr/src/lib/libevent/event.c:483
#3  0x0000027dada6123c in main (argc=0, argv=0x7f7ffffd19a0) at /home/misha/work/got/gotd/gotd.c:2258