Project

General

Profile

Bug #28539

Fix renamed function in zilstat MIB

Added by Bill O'Hanlon over 1 year ago. Updated 12 months ago.

Status:
Done
Priority:
No priority
Assignee:
Alexander Motin
Category:
OS
Target version:
Seen in:
Severity:
Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

zilstat is failing because fbt::zil_lwb_write_start:entry no longer exists as an trace point for dtrace.

/usr/local/bin/snmp-agent.py calls zilstat, so the FREENAS-MIB is returning 0 for a handful of variables.


Related issues

Related to FreeNAS - Bug #40768: Revert recent zilstat commit as there is no zil_lwb_write_start() function in FreeNAS 11.1 Done

Associated revisions

Revision 248de883 (diff)
Added by Bill O'Hanlon over 1 year ago

fix(snmp/zilstat) dtrace was triggering off zil_lwv_write_start, which has been removed.

Ticket: #28539

Revision 3bda775e (diff)
Added by Bill O'Hanlon about 1 year ago

fix(snmp/zilstat) dtrace was triggering off zil_lwb_write_start, which has been removed.

Ticket: #28539

History

#1 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Release Council to Alexander Motin

#2 Updated by Alexander Motin over 1 year ago

Are you sure you saw the problem on 11.1-U2, not 11.2 (11-Nightly/11-stable)? Because that function was renamed only recently and that change is not in 11.1-stable branch.

#3 Updated by Bill O'Hanlon over 1 year ago

  • Seen in changed from TrueNAS 11.1-U2 to Unspecified

Actually, I'm not sure.

#4 Updated by Alexander Motin over 1 year ago

  • Assignee changed from Alexander Motin to Benno Rice

Benno, take a look at this please. It may be a trivial function rename in new ZFS code, though the ZIL code logic has changed also, so closer look may be needed.

#5 Updated by Benno Rice over 1 year ago

zil_lwb_write_start was renamed to zil_lwb_write_issue in r324011. I'll do some further digging to see whether the semantics still match or not.

#6 Updated by Benno Rice over 1 year ago

Looking at zilstat my read is that it's trying to measure (possibly among other things) the number of bytes being pushed through the ZIL, which is why it's hooking zil_lwb_write_start. If my read on this is correct I think the right fix is just to hook zil_lwb_write_issue instead.

#7 Updated by Benno Rice over 1 year ago

  • Status changed from Not Started to In Progress

#8 Updated by Bill O'Hanlon over 1 year ago

FWIW, I did that on my system while trying to get past this issue to test another one, and it seemed to work well. So I agree that it seems like a good approach. :-)

#9 Updated by Benno Rice over 1 year ago

Bill, did you want to take this over from here or did you want me to work up the patch for zilstat?

#10 Updated by Bill O'Hanlon over 1 year ago

Sure, I can do that.

#11 Updated by Dru Lavigne over 1 year ago

  • Assignee changed from Benno Rice to Bill O'Hanlon

#12 Updated by Bill O'Hanlon over 1 year ago

  • Status changed from In Progress to Done

#13 Updated by Dru Lavigne over 1 year ago

  • Subject changed from zilstat is broken, which breaks FREENAS-MIB in SNMP to Fix renamed function in zilstat MIB
  • Needs Doc changed from Yes to No

#14 Updated by Dru Lavigne over 1 year ago

  • Target version changed from 11.2-RC2 to 11.2-BETA1
  • Needs Merging changed from Yes to No

#15 Updated by Dru Lavigne about 1 year ago

  • Status changed from Done to Ready for Testing

#16 Updated by Nick Wolff about 1 year ago

  • Status changed from Ready for Testing to Failed Testing

Zilstat is puking. Not sure if it's related to this or new issue

root@fncertified:/var/log # zilstat 
dtrace: invalid probe specifier 
#pragma D option quiet
 inline int OPT_time = 0;
 inline int OPT_txg = 0;
 inline int OPT_pool = 0;
 inline int OPT_mega = 0;
 inline int INTERVAL = 1;
 inline int LINES = -1;
 inline int COUNTER = -1;
 inline int FILTER = 0;
 inline string POOL = "";
 dtrace:::BEGIN
 {
    /* starting values */
    MEGA = 1000000;
    counts = COUNTER;
    secs = INTERVAL;
    interval = INTERVAL;
    interval == 0 ? interval++ : 1;
    line = 0;
    last_event[""] = 0;
    nused=0;
    nused_max_per_sec=0;
    nused_per_sec=0;
    size=0;
    size_max_per_sec=0;
    size_per_sec=0;
    syncops=0;
    size_4k=0;
    size_4k_32k=0;
    size_32k=0;
    OPT_txg ? printf("waiting for txg commit...\n") : 1;
 }

 /*
  * collect info when zil_lwb_write_start fires
  */
fbt::zil_lwb_write_issue:entry
/OPT_pool == 0 || POOL == args[0]->zl_dmu_pool->dp_spa->spa_name/
{
     nused += args[1]->lwb_nused;
     nused_per_sec += args[1]->lwb_nused;
     size += args[1]->lwb_sz;
     size_per_sec += args[1]->lwb_sz;
     syncops++;
     args[1]->lwb_sz <= 4096 ? size_4k++ : 1;
     args[1]->lwb_sz > 4096 && args[1]->lwb_sz < 32768 ? size_4k_32k++ : 1;
     args[1]->lwb_sz >= 32768 ? size_32k++ : 1;
}

/*
 * Timer
 */
profile:::tick-1sec
{
    OPT_txg ? secs++ : secs--;
        nused_per_sec > nused_max_per_sec ? nused_max_per_sec = nused_per_sec : 1;
        nused_per_sec = 0;
        size_per_sec > size_max_per_sec ? size_max_per_sec = size_per_sec : 1;
        size_per_sec = 0;
}

/*
 * Print header
 */
profile:::tick-1sec
/OPT_txg == 0 && line == 0/
{
    /* print optional headers */
    OPT_time   ? printf("%-20s ", "TIME")  : 1;

    /* print header */
        OPT_mega  ? printf("%10s %10s %10s %10s %10s %10s",
                "N-MB", "N-MB/s", "N-Max-Rate",
                "B-MB", "B-MB/s", "B-Max-Rate") :
            printf("%10s %10s %10s %10s %10s %10s",
                "N-Bytes", "N-Bytes/s", "N-Max-Rate",
                "B-Bytes", "B-Bytes/s", "B-Max-Rate");
        printf(" %6s %6s %6s %6s\n",
                "ops", "<=4kB", "4-32kB", ">=32kB");
    line = LINES;
}

 fbt::txg_quiesce:entry
 /OPT_txg == 1 && POOL == args[0]->dp_spa->spa_name && line == 0/
 {
    OPT_time  ? printf("%-20s ", "TIME")  : 1;

        OPT_mega  ? printf("%10s %10s %10s %10s %10s %10s %10s",
                "txg", "N-MB", "N-MB/s", "N-Max-Rate",
                "B-MB", "B-MB/s", "B-Max-Rate") :
            printf("%10s %10s %10s %10s %10s %10s %10s",
                "txg", "N-Bytes", "N-Bytes/s", "N-Max-Rate",
                "B-Bytes", "B-Bytes/s", "B-Max-Rate");
        printf(" %6s %6s %6s %6s\n",
                "ops", "<=4kB", "4-32kB", ">=32kB");
    line = LINES;
}

 /*
  * Print Output
  */
 profile:::tick-1sec
 /OPT_txg == 0 && secs == 0/
 {
    OPT_time  ? printf("%-20Y ", walltimestamp) : 1;
        OPT_mega  ?
            printf("%10d %10d %10d %10d %10d %10d",
                nused/MEGA, nused/(interval*MEGA), nused_max_per_sec/MEGA,
                size/MEGA, size/(interval*MEGA), size_max_per_sec/MEGA) :
            printf("%10d %10d %10d %10d %10d %10d",
                nused, nused/interval, nused_max_per_sec,
                size, size/interval, size_max_per_sec);
        printf(" %6d %6d %6d %6d\n",
                syncops, size_4k, size_4k_32k, size_32k);
        nused = 0;
        nused_per_sec = 0;
        nused_max_per_sec = 0;
        size=0;
        size_max_per_sec=0;
        size_per_sec=0;
        syncops=0;
        size_4k=0;
        size_4k_32k=0;
        size_32k=0;
        secs = INTERVAL;
    counts--;
    line--;
 }

fbt::txg_quiesce:entry
/OPT_txg == 1 && POOL == args[0]->dp_spa->spa_name/
{
        secs <= 0 ? secs=1 : 1;
    OPT_time ? printf("%-20Y ", walltimestamp) : 1;
        OPT_mega ?
            printf("%10d %10d %10d %10d %10d %10d %10d", args[1],
                nused/MEGA, nused/(secs*MEGA), nused_max_per_sec/MEGA,
                size/MEGA, size/(secs*MEGA), size_max_per_sec/MEGA) :
            printf("%10d %10d %10d %10d %10d %10d %10d", args[1],
                nused, nused/secs, nused_max_per_sec,
                size, size/secs, size_max_per_sec);
        printf(" %6d %6d %6d %6d\n",
                syncops, size_4k, size_4k_32k, size_32k);
        nused = 0;
        nused_per_sec = 0;
        nused_max_per_sec = 0;
        size=0;
        size_max_per_sec=0;
        size_per_sec=0;
        syncops=0;
        size_4k=0;
        size_4k_32k=0;
        size_32k=0;
        secs = 0;
    counts--;
    line--;
 }

 /*
  * End of program
  */
 profile:::tick-1sec
 /OPT_txg == 0 && counts == 0/
 {
    exit(0);
 }
 fbt::txg_quiesce:entry
 /OPT_txg == 1 && counts == 0/
 {
    exit(0);
 }
: "/usr/lib/dtrace/ip.d", line 112: failed to copy typedef in6_addr_t source type: Type information is in parent and unavailable
root@fncertified:/var/log # 

#18 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from Bill O'Hanlon to Alexander Motin

#20 Updated by Alexander Motin about 1 year ago

The errors at the end are probably caused by different issue (#34609). It should work (can be tested) on TrueNAS though.

#21 Updated by Dru Lavigne 12 months ago

  • Status changed from Failed Testing to Ready for Testing
  • Priority changed from Regression to No priority

#22 Updated by Nick Wolff 12 months ago

  • Status changed from Ready for Testing to Done

No longer blocked by broken dtrace.

Looks good
test passed

#23 Updated by Dru Lavigne 12 months ago

  • Needs QA changed from Yes to No

#24 Updated by Alexander Motin 11 months ago

  • Related to Bug #40768: Revert recent zilstat commit as there is no zil_lwb_write_start() function in FreeNAS 11.1 added

Also available in: Atom PDF