Project

General

Profile

Bug #13278

CTF assertion failed cmp->cm_tmap[id].cmt_map == suid

Added by Andy Fiddaman 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

See also https://smartos.org/bugview/OS-6457

When processing forward declarations of unions, ctfconvert can lose type information during the dedup phase, resulting in the deduped CTF container mistakenly recording the forward as a struct. Later on, this causes an assertion failure, such as

assertion failed for thread 0xfed41240, thread-id 6: cmp->cm_tmap[id].cmt_map == suid, file /data/omnios-build/omniosorg/bloody/illumos/usr/src/lib/libctf/common/ctf_merge.c, line 510
zsh: IOT instruction (core dumped)  ctfconvert -o l ~/ctf/mandoc

As noted in the SmartOS ticket, mandoc has a forward reference to a union:

./mdoc.h:union  mdoc_data {
./roff.h:union mdoc_data;
./roff.h: union mdoc_data *norm; /* Normalized arguments. */
and the assertion failure occurs when processing the DWARF CU from html.c

An extract from dwarfdump output showing that the type is known to be a union.

                        DW_AT_decl_file             0x0000000f /home/pbulk/build/textproc/mandoc/work/mandoc-1.14.5/roff.h

< 1><0x00001285>    DW_TAG_union_type
                      DW_AT_name                  mdoc_data
                      DW_AT_declaration           yes(1)

                        DW_AT_decl_file             0x0000000a /home/pbulk/build/textproc/mandoc/work/mandoc-1.14.5/mdoc.h
< 1><0x00000f32>    DW_TAG_union_type
                      DW_AT_name                  mdoc_data
                      DW_AT_byte_size             0x00000030

NB: The solutions proposed in the SmartOS ticket were against the previous version of the CTF utilities (pre 6885 CTF Everywhere Part 1) and are no longer applicable.


Related issues

Related to illumos gate - Bug #13247: CTF conversion fails with large filesClosedAndy Fiddaman

Actions
Related to illumos gate - Bug #13323: CTF forward test needs adjusting after 13278ClosedAndy Fiddaman

Actions
#1

Updated by Andy Fiddaman 4 months ago

  • Related to Bug #13247: CTF conversion fails with large files added
#2

Updated by Electric Monk 4 months ago

  • Gerrit CR set to 1036
#3

Updated by Electric Monk 4 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 3dfdac06b0c70e672dbe56a2f38ec05fc0254d07

commit  3dfdac06b0c70e672dbe56a2f38ec05fc0254d07
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2020-11-12T21:15:20.000Z

    13278 CTF assertion failed cmp->cm_tmap[id].cmt_map == suid
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

#4

Updated by Andy Fiddaman 3 months ago

  • Related to Bug #13323: CTF forward test needs adjusting after 13278 added

Also available in: Atom PDF