{"thread":{"id":"49436","subject":"Null pointer dereference in rerere.c","startedAt":"2018-09-27T08:21:01Z","lastAt":"2018-10-01T07:21:23Z","messageCount":4,"participants":["Ruud van Asseldonk","Duy Nguyen","Thomas Gummerer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"359038","messageId":"CAAqqbi=5Dc2yisSG5r71NGvwS7bfQh_aRpxiTbtFm-XHDqjYUw@mail.gmail.com","threadId":"49436","inReplyTo":null,"subject":"Null pointer dereference in rerere.c","fromName":"Ruud van Asseldonk","fromEmail":"ruud@channable.com","sentAt":"2018-09-27T08:20:42Z","receivedAt":"2018-09-27T08:21:01Z","isPatch":false,"sender":{"key":"ruud@channable.com","avatar":null},"body":"Hi,\n\nI just ran into a segmentation fault during a rebase with rerere\nenabled. Inspecting the core dump with gdb shows:\n\n(gdb) bt\n#0  0x000055d673375ce0 in do_rerere_one_path (update=0x7fff03c37f30,\nrr_item=0x55d6746d0b30) at rerere.c:755\n#1  do_plain_rerere (fd=3, rr=0x7fff03c37ef0) at rerere.c:853\n#2  rerere (flags=flags@entry=0) at rerere.c:918\n#3  0x000055d673246b01 in am_resolve (state=0x7fff03c38120) at builtin/am.c:1901\n#4  cmd_am (argc=<optimised out>, argv=<optimised out>,\nprefix=<optimised out>) at builtin/am.c:2394\n#5  0x000055d67323f975 in run_builtin (argv=<optimised out>,\nargc=<optimised out>, p=<optimised out>) at git.c:346\n#6  handle_builtin (argc=<optimised out>, argv=<optimised out>) at git.c:554\n#7  0x000055d6732405e5 in run_argv (argv=0x7fff03c394a0,\nargcp=0x7fff03c394ac) at git.c:606\n#8  cmd_main (argc=<optimised out>, argv=<optimised out>) at git.c:683\n#9  0x000055d67323f64a in main (argc=4, argv=0x7fff03c396f8) at common-main.c:43\n(gdb) info locals\npath = 0x55d6746d08e0 \"<file path redacted>\"\nid = 0x55d6746d01e0\nrr_dir = 0x55d6746ccb80\nvariant = <optimised out>\npath = <optimised out>\nid = <optimised out>\nrr_dir = <optimised out>\nvariant = <optimised out>\nboth = <optimised out>\nvid = <optimised out>\npath = <optimised out>\n(gdb) print id\n$1 = (struct rerere_id *) 0x55d6746d01e0\n(gdb) print id->collection\n$2 = (struct rerere_dir *) 0x55d6746ccb80\n(gdb) print id->collection->status\n$3 = (unsigned char *) 0x0\n\nThis is using Git 2.17.1 from the 1:2.17.1-1ubuntu0.1 Ubuntu package.\nLooking at the diff between v2.17.1 and master for rerere.c it looks\nlike the part of the rerere.c where the null pointer dereference\nhappens has not been touched, so the issue might still be there.\nUnfortunately I was unable to reproduce the bug; after removing\n.git/MERGE_RR.lock and restarting the rebase, it completed fine.\n\nPlease let me know if there is anything I can do to help diagnose the\nproblem, or whether I should report the bug to Ubuntu instead.\n\nKind regards,\n\nRuud van Asseldonk\n"},{"id":"359070","messageId":"CACsJy8Ck+2EpRD7aDKH1wmNprbnZi7Y3XVAp6vv1=TeJNnT5Xw@mail.gmail.com","threadId":"49436","inReplyTo":"CAAqqbi=5Dc2yisSG5r71NGvwS7bfQh_aRpxiTbtFm-XHDqjYUw@mail.gmail.com","subject":"Re: Null pointer dereference in rerere.c","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-09-27T16:57:50Z","receivedAt":"2018-09-27T16:58:19Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, Sep 27, 2018 at 10:24 AM Ruud van Asseldonk <ruud@channable.com> wrote:\n> Please let me know if there is anything I can do to help diagnose the\n> problem.\n\nNothing yet but please keep the core dump. We might be able to dig\nsome more out of it to confirm if we find something suspicious.\n-- \nDuy\n"},{"id":"359115","messageId":"20180927204017.GB2253@hank.intra.tgummerer.com","threadId":"49436","inReplyTo":"CAAqqbi=5Dc2yisSG5r71NGvwS7bfQh_aRpxiTbtFm-XHDqjYUw@mail.gmail.com","subject":"Re: Null pointer dereference in rerere.c","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2018-09-27T20:40:17Z","receivedAt":"2018-09-27T20:40:21Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"On 09/27, Ruud van Asseldonk wrote:\n> Hi,\n> \n> I just ran into a segmentation fault during a rebase with rerere\n> enabled. Inspecting the core dump with gdb shows:\n\nThanks for reporting this bug\n\n> (gdb) bt\n> #0  0x000055d673375ce0 in do_rerere_one_path (update=0x7fff03c37f30,\n> rr_item=0x55d6746d0b30) at rerere.c:755\n> #1  do_plain_rerere (fd=3, rr=0x7fff03c37ef0) at rerere.c:853\n> #2  rerere (flags=flags@entry=0) at rerere.c:918\n> #3  0x000055d673246b01 in am_resolve (state=0x7fff03c38120) at builtin/am.c:1901\n> #4  cmd_am (argc=<optimised out>, argv=<optimised out>,\n> prefix=<optimised out>) at builtin/am.c:2394\n> #5  0x000055d67323f975 in run_builtin (argv=<optimised out>,\n> argc=<optimised out>, p=<optimised out>) at git.c:346\n> #6  handle_builtin (argc=<optimised out>, argv=<optimised out>) at git.c:554\n> #7  0x000055d6732405e5 in run_argv (argv=0x7fff03c394a0,\n> argcp=0x7fff03c394ac) at git.c:606\n> #8  cmd_main (argc=<optimised out>, argv=<optimised out>) at git.c:683\n> #9  0x000055d67323f64a in main (argc=4, argv=0x7fff03c396f8) at common-main.c:43\n> (gdb) info locals\n> path = 0x55d6746d08e0 \"<file path redacted>\"\n> id = 0x55d6746d01e0\n> rr_dir = 0x55d6746ccb80\n> variant = <optimised out>\n> path = <optimised out>\n> id = <optimised out>\n> rr_dir = <optimised out>\n> variant = <optimised out>\n> both = <optimised out>\n> vid = <optimised out>\n> path = <optimised out>\n> (gdb) print id\n> $1 = (struct rerere_id *) 0x55d6746d01e0\n> (gdb) print id->collection\n> $2 = (struct rerere_dir *) 0x55d6746ccb80\n> (gdb) print id->collection->status\n> $3 = (unsigned char *) 0x0\n> \n> This is using Git 2.17.1 from the 1:2.17.1-1ubuntu0.1 Ubuntu package.\n> Looking at the diff between v2.17.1 and master for rerere.c it looks\n> like the part of the rerere.c where the null pointer dereference\n> happens has not been touched, so the issue might still be there.\n> Unfortunately I was unable to reproduce the bug; after removing\n> .git/MERGE_RR.lock and restarting the rebase, it completed fine.\n\nI do believe this bug may actually be fixed in master, by 93406a282f\n(\"rerere: fix crash with files rerere can't handle\", 2018-08-05).  Do\nyou by any chance remember if you committed a file that contained\nconflict markers during the rebase at some point?\n\nThe problem I found at the time looked the same as your backtrace\nabove in any case.\n\nWould have been nice if you were able to reproduce it, just to make\nsure it's not something else we're seeing here.\n\n> Please let me know if there is anything I can do to help diagnose the\n> problem, or whether I should report the bug to Ubuntu instead.\n> \n> Kind regards,\n> \n> Ruud van Asseldonk\n"},{"id":"359350","messageId":"CAAqqbikodPjFBN3eVqNai7MuYCEYPAKC=-8qXopXLwJHhmENLw@mail.gmail.com","threadId":"49436","inReplyTo":"20180927204017.GB2253@hank.intra.tgummerer.com","subject":"Re: Null pointer dereference in rerere.c","fromName":"Ruud van Asseldonk","fromEmail":"ruud@channable.com","sentAt":"2018-10-01T07:21:05Z","receivedAt":"2018-10-01T07:21:23Z","isPatch":false,"sender":{"key":"ruud@channable.com","avatar":null},"body":"> I do believe this bug may actually be fixed in master, by 93406a282f\n> (\"rerere: fix crash with files rerere can't handle\", 2018-08-05).  Do\n> you by any chance remember if you committed a file that contained\n> conflict markers during the rebase at some point?\n\nI might have, but I am not 100% sure.\n\n> The problem I found at the time looked the same as your backtrace\n> above in any case.\n\nThanks for checking. I will keep the core dump and report back if it\never happens again.\n"}]}