Bug 258763 - dtrace: "/usr/lib/dtrace/ipfw.d", line 1: cannot find type: struct ip_fw_args*: Conflicting type is already defined
Summary: dtrace: "/usr/lib/dtrace/ipfw.d", line 1: cannot find type: struct ip_fw_args...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Mark Johnston
URL:
Keywords:
: 254483 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-28 15:03 UTC by Li-Wen Hsu
Modified: 2022-03-08 09:49 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Li-Wen Hsu freebsd_committer freebsd_triage 2021-09-28 15:03:12 UTC
In this build https://ci.freebsd.org/job/FreeBSD-main-amd64-test/19327/
(likely after base 63b3c1c77036814c85d36fe7a48c704db7c6fc9c )

# dtrace -n 'syscall:::entry { @[execname, probefunc] = count(); }' -c "echo hello"
dtrace: invalid probe specifier syscall:::entry { @[execname, probefunc] = count(); }: "/usr/lib/dtrace/ipfw.d", line 1: cannot find type: struct ip_fw_args*: Conflicting type is already defined
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-09-28 18:07:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=819961c5808b053c626648e202dec42a19ebe7a6

commit 819961c5808b053c626648e202dec42a19ebe7a6
Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2021-09-28 18:02:27 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-09-28 18:02:27 +0000

    Temporarily skip sys.geom.class.multipath.failloop.failloop in CI

    This test case uses `dtrace -c` but it has some issues at the moment

    While here, add a checker for dtrace executes successfully or not to provide
    a more informative error message.

    PR:             258763
    Sponsored by:   The FreeBSD Foundation

 tests/sys/geom/class/multipath/failloop.sh | 7 +++++++
 1 file changed, 7 insertions(+)
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-09-28 18:19:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c8470cb1b3d20680cb79e42698175d4f38caa9fb

commit c8470cb1b3d20680cb79e42698175d4f38caa9fb
Author:     David Vachulka <archdvx@dxsolutions.org>
AuthorDate: 2021-09-28 18:12:59 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-09-28 18:17:24 +0000

    irc/dxirc: Update to 1.40.0

    Change maintainer email

    PR:             258763

 irc/dxirc/Makefile                        |  6 ++---
 irc/dxirc/distinfo                        |  6 ++---
 irc/dxirc/files/patch-CMakeLists.txt      |  8 +++----
 irc/dxirc/files/patch-data_CMakeLists.txt | 12 +++++-----
 irc/dxirc/files/patch-fox_CMakeLists.txt  | 27 ++++++++++++++++-----
 irc/dxirc/files/patch-qt_CMakeLists.txt   | 39 ++++++++++++++++++++-----------
 irc/dxirc/pkg-plist                       |  9 +++++++
 7 files changed, 71 insertions(+), 36 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-10-04 16:29:31 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=105fd928b0b5b35ab529e5f6914788dc49582901

commit 105fd928b0b5b35ab529e5f6914788dc49582901
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-10-04 16:28:22 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-10-04 16:28:22 +0000

    libctf: Improve check for duplicate SOU definitions in ctf_add_type()

    When copying a struct or union from one CTF container to another,
    ctf_add_type() checks whether it matches an existing type in the
    destination container.  It does so by looking for a type with the same
    name and kind as the new type, and if one exists, it iterates over all
    members of the source type and checks whether a member with matching
    name and offset exists in the matched destination type.  This can
    produce false positives, for example because member types are not
    compared, but this is not expected to arise in practice.  If the match
    fails, ctf_add_type() returns an error.

    The procedure used for member comparison breaks down in the face of
    anonymous struct and union members.  ctf_member_iter() visits each
    member in the source definition and looks up the corresponding member in
    the desination definition by name using ctf_member_info(), but this
    function will descend into anonymous members and thus fail to match.
    Fix the problem by introducing a custom comparison routine which does
    not assume member names are unique.  This should also be faster for
    types with many members; in the previous scheme, membcmp() would perform
    a linear scan of the desination type's members to perform a lookup by
    name.  The new routine steps through the members of both types in a
    single loop.

    PR:             258763
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation

 cddl/contrib/opensolaris/common/ctf/ctf_create.c | 100 +++++++++++++++++------
 1 file changed, 73 insertions(+), 27 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-10-04 16:29:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=69f7649b7148f9e1e331da8f4a9748c55a2b6ce3

commit 69f7649b7148f9e1e331da8f4a9748c55a2b6ce3
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-10-04 16:24:29 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-10-04 16:28:27 +0000

    gmultipath tests: Re-enable the failloop test in CI

    PR:             258763
    MFC after:      2 weeks
    Sponsored by:   The FreeBSD Foundation

 tests/sys/geom/class/multipath/failloop.sh | 4 ----
 1 file changed, 4 deletions(-)
Comment 5 Mark Johnston freebsd_committer freebsd_triage 2021-10-05 01:11:43 UTC
*** Bug 254483 has been marked as a duplicate of this bug. ***
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-10-18 13:10:31 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=feb3289f497719267ae2fb95d38d6352dbac784e

commit feb3289f497719267ae2fb95d38d6352dbac784e
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-10-04 16:28:22 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-10-18 13:09:02 +0000

    libctf: Improve check for duplicate SOU definitions in ctf_add_type()

    When copying a struct or union from one CTF container to another,
    ctf_add_type() checks whether it matches an existing type in the
    destination container.  It does so by looking for a type with the same
    name and kind as the new type, and if one exists, it iterates over all
    members of the source type and checks whether a member with matching
    name and offset exists in the matched destination type.  This can
    produce false positives, for example because member types are not
    compared, but this is not expected to arise in practice.  If the match
    fails, ctf_add_type() returns an error.

    The procedure used for member comparison breaks down in the face of
    anonymous struct and union members.  ctf_member_iter() visits each
    member in the source definition and looks up the corresponding member in
    the desination definition by name using ctf_member_info(), but this
    function will descend into anonymous members and thus fail to match.
    Fix the problem by introducing a custom comparison routine which does
    not assume member names are unique.  This should also be faster for
    types with many members; in the previous scheme, membcmp() would perform
    a linear scan of the desination type's members to perform a lookup by
    name.  The new routine steps through the members of both types in a
    single loop.

    PR:             258763
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 105fd928b0b5b35ab529e5f6914788dc49582901)

 cddl/contrib/opensolaris/common/ctf/ctf_create.c | 100 +++++++++++++++++------
 1 file changed, 73 insertions(+), 27 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2021-10-24 21:30:37 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=39545ce06ca8088aecc68b92c028b78bcae888a2

commit 39545ce06ca8088aecc68b92c028b78bcae888a2
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-10-04 16:28:22 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-10-24 21:29:36 +0000

    libctf: Improve check for duplicate SOU definitions in ctf_add_type()

    When copying a struct or union from one CTF container to another,
    ctf_add_type() checks whether it matches an existing type in the
    destination container.  It does so by looking for a type with the same
    name and kind as the new type, and if one exists, it iterates over all
    members of the source type and checks whether a member with matching
    name and offset exists in the matched destination type.  This can
    produce false positives, for example because member types are not
    compared, but this is not expected to arise in practice.  If the match
    fails, ctf_add_type() returns an error.

    The procedure used for member comparison breaks down in the face of
    anonymous struct and union members.  ctf_member_iter() visits each
    member in the source definition and looks up the corresponding member in
    the desination definition by name using ctf_member_info(), but this
    function will descend into anonymous members and thus fail to match.
    Fix the problem by introducing a custom comparison routine which does
    not assume member names are unique.  This should also be faster for
    types with many members; in the previous scheme, membcmp() would perform
    a linear scan of the desination type's members to perform a lookup by
    name.  The new routine steps through the members of both types in a
    single loop.

    PR:             258763
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 105fd928b0b5b35ab529e5f6914788dc49582901)

 cddl/contrib/opensolaris/common/ctf/ctf_create.c | 100 +++++++++++++++++------
 1 file changed, 73 insertions(+), 27 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-11-22 16:35:04 UTC
A commit in branch releng/12.3 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=68396709e73a4cd392ffc06fde6bfa44d79118a7

commit 68396709e73a4cd392ffc06fde6bfa44d79118a7
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-10-04 16:28:22 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-11-22 16:32:18 +0000

    libctf: Improve check for duplicate SOU definitions in ctf_add_type()

    When copying a struct or union from one CTF container to another,
    ctf_add_type() checks whether it matches an existing type in the
    destination container.  It does so by looking for a type with the same
    name and kind as the new type, and if one exists, it iterates over all
    members of the source type and checks whether a member with matching
    name and offset exists in the matched destination type.  This can
    produce false positives, for example because member types are not
    compared, but this is not expected to arise in practice.  If the match
    fails, ctf_add_type() returns an error.

    The procedure used for member comparison breaks down in the face of
    anonymous struct and union members.  ctf_member_iter() visits each
    member in the source definition and looks up the corresponding member in
    the desination definition by name using ctf_member_info(), but this
    function will descend into anonymous members and thus fail to match.
    Fix the problem by introducing a custom comparison routine which does
    not assume member names are unique.  This should also be faster for
    types with many members; in the previous scheme, membcmp() would perform
    a linear scan of the desination type's members to perform a lookup by
    name.  The new routine steps through the members of both types in a
    single loop.

    Approved by:    re (gjb)
    PR:             258763
    Sponsored by:   The FreeBSD Foundation

    (cherry picked from commit 105fd928b0b5b35ab529e5f6914788dc49582901)
    (cherry picked from commit 39545ce06ca8088aecc68b92c028b78bcae888a2)

 cddl/contrib/opensolaris/common/ctf/ctf_create.c | 100 +++++++++++++++++------
 1 file changed, 73 insertions(+), 27 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-02-23 22:28:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=d33158471afb6156886642cf2a06f79f40cd2461

commit d33158471afb6156886642cf2a06f79f40cd2461
Author:     Li-Wen Hsu <lwhsu@FreeBSD.org>
AuthorDate: 2022-02-23 22:28:24 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2022-02-23 22:28:24 +0000

    Temporarily skip sys.geom.class.multipath.failloop.failloop in CI

    This test case uses `dtrace -c` but it has some issues at the moment so
    disable it until dtrace fixed.

    From markj:

    This is the CTF type ID limit which has come up quite a few times
    lately.  It'll be fixed with the introduction of CTFv3.

    PR:             258763
    Sponsored by:   The FreeBSD Foundation

 tests/sys/geom/class/multipath/failloop.sh | 4 ++++
 1 file changed, 4 insertions(+)
Comment 10 Li-Wen Hsu freebsd_committer freebsd_triage 2022-02-23 22:29:02 UTC
This is happening again.
Comment 11 Mark Johnston freebsd_committer freebsd_triage 2022-02-23 22:33:02 UTC
(In reply to Li-Wen Hsu from comment #10)
For what it's worth, the last time it was due to a code bug in libctf.  Same manifestation of a problem, different root cause.
Comment 12 Li-Wen Hsu freebsd_committer freebsd_triage 2022-03-08 09:49:09 UTC
Close this one since the two issues have been fixed. Open bug262412 for another issue with dtrace and ipfw.