Re: BUG #18334: Segfault when running a query with parallel workers - Mailing list pgsql-bugs
From | Marcin Barczyński |
---|---|
Subject | Re: BUG #18334: Segfault when running a query with parallel workers |
Date | |
Msg-id | CAP3o3PfAvUiza=1U4VKsRGSVeM4aGEKDqVo3yyn4sFb4L6MOgQ@mail.gmail.com Whole thread Raw |
In response to | Re: BUG #18334: Segfault when running a query with parallel workers (Marcin Barczyński <mba.ogolny@gmail.com>) |
List | pgsql-bugs |
Hello! Is there anything I can do to help? On Wed, May 29, 2024 at 3:32 PM Marcin Barczyński <mba.ogolny@gmail.com> wrote: > > Hello! > > If it would make things easier, I can share the core dump. > > On Fri, May 24, 2024 at 10:26 AM Marcin Barczyński <mba.ogolny@gmail.com> wrote: > > > > Thank you for looking into this. > > > > On Fri, May 24, 2024 at 3:33 AM Thomas Munro <thomas.munro@gmail.com> wrote: > > > What does segment_map->segment->mapped_size show? > > > > (gdb) print *(segment_map->segment) > > $3 = {node = {prev = 0x56134ee11fa8, next = 0x56134dfa2258}, resowner > > = 0x56134df98a98, handle = 2051931009, control_slot = 30, impl_private > > = 0x0, mapped_address = 0x7f309faf4000, > > mapped_size = 806887424, on_detach = {head = {next = 0x0}}} > > > > > The actual dsa_pointer has been optimised out but > > > should be visible from frame #1 as batch->chunks. > > > > (gdb) frame 1 > > (gdb) print *batch > > $4 = {buckets = 0, batch_barrier = {mutex = 0 '\000', phase = 0, > > participants = 0, arrived = 0, elected = 0, static_party = false, > > condition_variable = {mutex = 0 '\000', wakeup = {head = 0, > > tail = 0}}}, chunks = 0, size = 0, estimated_size = 0, ntuples > > = 0, old_ntuples = 0, space_exhausted = false} > > > > > What CPU architecture is this? > > > > x64, AMD EPYC 9374F > > > > > ... but if I'm missing something there, it might be a clue visible > > > from gdb if area->control->freed_segment_counter (the one in shared > > > memory) and area->freed_segment_counter (the one in this backend) have > > > different values, if your core captured the segments. > > > > (gdb) p *area->control > > $1 = {segment_header = {magic = 0, usable_pages = 0, size = 0, prev = > > 0, next = 0, bin = 0, freed = false}, handle = 0, segment_handles = {0 > > <repeats 1024 times>}, segment_bins = { > > 0 <repeats 16 times>}, pools = {{lock = {tranche = 0, state = > > {value = 0}, waiters = {head = 0, tail = 0}}, spans = {0, 0, 0, 0}} > > <repeats 38 times>}, total_segment_size = 0, > > max_total_segment_size = 0, high_segment_index = 0, refcnt = 0, > > pinned = false, freed_segment_counter = 0, lwlock_tranche_id = 0, lock > > = {tranche = 0, state = {value = 0}, waiters = {head = 0, > > tail = 0}}} > > > > (gdb) p *area > > $2 = {control = 0x7f321dfa4500, mapping_pinned = false, segment_maps = > > {{segment = 0x0, mapped_address = 0x7f321dfa4500 "", header = > > 0x7f321dfa4500, fpm = 0x7f321dfa5d20, > > pagemap = 0x7f321dfa6168}, {segment = 0x56134dfa1ec8, > > mapped_address = 0x7f3216cd8000 "", header = 0x7f3216cd8000, fpm = > > 0x7f3216cd8038, pagemap = 0x7f3216cd8480}, { > > segment = 0x56134dfa1f18, mapped_address = 0x7f31f6bd7000 "", > > header = 0x7f31f6bd7000, fpm = 0x7f31f6bd7038, pagemap = > > 0x7f31f6bd7480}, {segment = 0x56134dfa2078, > > mapped_address = 0x7f30d60a6000 "", header = 0x7f30d60a6000, fpm > > = 0x7f30d60a6038, pagemap = 0x7f30d60a6480}, {segment = > > 0x56134dfa2118, mapped_address = 0x7f30d58a6000 "", > > header = 0x7f30d58a6000, fpm = 0x7f30d58a6038, pagemap = > > 0x7f30d58a6480}, {segment = 0x56134dfa20c8, mapped_address = > > 0x7f30d5ca6000 "", header = 0x7f30d5ca6000, fpm = 0x7f30d5ca6038, > > pagemap = 0x7f30d5ca6480}, {segment = 0x56134dfa2168, > > mapped_address = 0x7f30d50a6000 "", header = 0x7f30d50a6000, fpm = > > 0x7f30d50a6038, pagemap = 0x7f30d50a6480}, { > > segment = 0x56134dfa21b8, mapped_address = 0x7f30d449e000 "", > > header = 0x7f30d449e000, fpm = 0x7f30d449e038, pagemap = > > 0x7f30d449e480}, {segment = 0x56134dfa2208, > > mapped_address = 0x7f30d2c90000 "", header = 0x7f30d2c90000, fpm > > = 0x7f30d2c90038, pagemap = 0x7f30d2c90480}, {segment = > > 0x56134dfa2258, mapped_address = 0x7f30cfc76000 "", > > header = 0x7f30cfc76000, fpm = 0x7f30cfc76038, pagemap = > > 0x7f30cfc76480}, {segment = 0x56134ee12048, mapped_address = > > 0x7f307599e000 "", header = 0x7f307599e000, fpm = 0x7f307599e038, > > pagemap = 0x7f307599e480}, {segment = 0x56134ee11ff8, > > mapped_address = 0x7f307b9d0000 "", header = 0x7f307b9d0000, fpm = > > 0x7f307b9d0038, pagemap = 0x7f307b9d0480}, { > > segment = 0x56134ee11fa8, mapped_address = 0x7f3087a32000 "", > > header = 0x7f3087a32000, fpm = 0x7f3087a32038, pagemap = > > 0x7f3087a32480}, {segment = 0x56134dfa2dd8, > > mapped_address = 0x7f309faf4000 "", header = 0x7f309faf4000, fpm > > = 0x7f309faf4038, pagemap = 0x7f309faf4480}, {segment = > > 0x56134dfa1fb8, mapped_address = 0x7f30d62d3000 "", > > header = 0x7f30d62d3000, fpm = 0x7f30d62d3038, pagemap = > > 0x7f30d62d3480}, {segment = 0x56134dfa1f68, mapped_address = > > 0x7f31365d5000 "", header = 0x7f31365d5000, fpm = 0x7f31365d5038, > > pagemap = 0x7f31365d5480}, {segment = 0x56134ee12098, > > mapped_address = 0x7f306599e000 "", header = 0x7f306599e000, fpm = > > 0x7f306599e038, pagemap = 0x7f306599e480}, { > > segment = 0x56134ee120e8, mapped_address = 0x7f305599e000 "", > > header = 0x7f305599e000, fpm = 0x7f305599e038, pagemap = > > 0x7f305599e480}, {segment = 0x56134ee12138, > > mapped_address = 0x7f303599e000 "", header = 0x7f303599e000, fpm > > = 0x7f303599e038, pagemap = 0x7f303599e480}, {segment = > > 0x56134ee12188, mapped_address = 0x7f301599e000 "", > > header = 0x7f301599e000, fpm = 0x7f301599e038, pagemap = > > 0x7f301599e480}, {segment = 0x56134ee121d8, mapped_address = > > 0x7f2fd599e000 "", header = 0x7f2fd599e000, fpm = 0x7f2fd599e038, > > pagemap = 0x7f2fd599e480}, {segment = 0x56134ee12228, > > mapped_address = 0x7f2f9599e000 "", header = 0x7f2f9599e000, fpm = > > 0x7f2f9599e038, pagemap = 0x7f2f9599e480}, { > > segment = 0x56134ee12278, mapped_address = 0x7f2f1599e000 "", > > header = 0x7f2f1599e000, fpm = 0x7f2f1599e038, pagemap = > > 0x7f2f1599e480}, {segment = 0x56134ee122c8, > > mapped_address = 0x7f2e9599e000 "", header = 0x7f2e9599e000, fpm > > = 0x7f2e9599e038, pagemap = 0x7f2e9599e480}, {segment = 0x0, > > mapped_address = 0x0, header = 0x0, fpm = 0x0, > > pagemap = 0x0} <repeats 1000 times>}, high_segment_index = 23, > > freed_segment_counter = 0} > > > > > > I hope this sheds some light on the issue. > > > > Best regards, > > Marcin Barczyński
pgsql-bugs by date: