Skip to content

htop, run strace (key s) -> assert fails / segfaults #459

@fasterit

Description

@fasterit

htop HEAD at a076488 (current at time of submission)

htop: RichString.c:78: RichString_setAttrn: Assertion `(0) <= (this->chlen - 1)' failed.

=== snip ===

Error information:
------------------
A signal 6 (Aborted) was received.

Backtrace information:
----------------------
The following function calls were active when the issue was detected:
---
./htop(CRT_handleSIGSEGV+0xc1)[0x559224385881]
/lib/x86_64-linux-gnu/libc.so.6(+0x37840)[0x7efe816d5840]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b)[0x7efe816d57bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121)[0x7efe816c0535]
/lib/x86_64-linux-gnu/libc.so.6(+0x2240f)[0x7efe816c040f]
/lib/x86_64-linux-gnu/libc.so.6(+0x30102)[0x7efe816ce102]
./htop(+0x1e9a3)[0x5592243909a3]
./htop(+0x1eba2)[0x559224390ba2]
./htop(Panel_draw+0x74a)[0x55922438d2fa]
./htop(InfoScreen_drawTitled+0x15a)[0x559224388a0a]
./htop(InfoScreen_run+0x2c)[0x559224388b8c]
./htop(+0xf608)[0x559224381608]
./htop(+0x176ee)[0x5592243896ee]
./htop(ScreenManager_run+0x279)[0x5592243915b9]
./htop(main+0x604)[0x559224380ff4]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7efe816c209b]
./htop(_start+0x2a)[0x55922438128a]

=== snip ===

bt full:

#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
        set = {__val = {0, 94086165386816, 115, 139631558485111, 485258788864, 94086165386816, 94086165386816, 94086165386816, 
            94086165386816, 94086165386905, 94086165386916, 94086165386816, 94086165386916, 0, 0, 0}}
        pid = <optimized out>
        tid = <optimized out>
        ret = <optimized out>
#1  0x00007efe816c0535 in __GI_abort () at abort.c:79
        save_stage = 1
        act = {__sigaction_handler = {sa_handler = 0x559224775640, sa_sigaction = 0x559224775640}, sa_mask = {__val = {0, 
              139631559810112, 139631559544448, 0, 0, 0, 21474836480, 140723640962392, 140723640962240, 139631559600816, 
              139631559585504, 0, 6264804562994096640, 139631559570362, 0, 139631559585504}}, sa_flags = 607790880, 
          sa_restorer = 0x5592243a272d}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007efe816c040f in __assert_fail_base (fmt=0x7efe81822ee0 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=0x5592243a272d "(0) <= (this->chlen - 1)", file=0x5592243a2720 "RichString.c", line=78, function=<optimized out>)
    at assert.c:92
        str = 0x559224775640 ""
        total = 4096
#3  0x00007efe816ce102 in __GI___assert_fail (assertion=assertion@entry=0x5592243a272d "(0) <= (this->chlen - 1)", 
    file=file@entry=0x5592243a2720 "RichString.c", line=line@entry=78, 
    function=function@entry=0x5592243a2750 <__PRETTY_FUNCTION__.6879> "RichString_setAttrn") at assert.c:101
No locals.
#4  0x00005592243909a3 in RichString_setAttrn (finish=<optimized out>, start=0, attrs=14848, this=0x559224754220)
    at RichString.c:76
        ch = <optimized out>
        __PRETTY_FUNCTION__ = "RichString_setAttrn"
        i = <optimized out>
#5  0x0000559224390ba2 in RichString_setAttrn (finish=<optimized out>, start=0, attrs=14848, this=0x559224754220)
    at RichString.c:81
        ch = <optimized out>
        ch = <optimized out>
        __PRETTY_FUNCTION__ = "RichString_setAttrn"
        i = <optimized out>
#6  RichString_setAttr (this=this@entry=0x559224754220, attrs=attrs@entry=14848) at RichString.c:151
No locals.
#7  0x000055922438d2fa in Panel_draw (this=0x5592247541d0, force_redraw=force_redraw@entry=true, focus=focus@entry=true, 
    highlightSelected=highlightSelected@entry=true, hideFunctionBar=hideFunctionBar@entry=false) at Panel.c:230
        __PRETTY_FUNCTION__ = "Panel_draw"
        size = 0
        scrollH = 0
        y = 1
        x = 0
        h = 54
        header_attr = 14848
        headerLen = <optimized out>
        first = <optimized out>
        upTo = <optimized out>
        selectionColor = <optimized out>
#8  0x0000559224388a0a in InfoScreen_drawTitled (this=0x55922478cb00, fmt=<optimized out>) at InfoScreen.c:59
        ap = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7ffcc6a1dd40, reg_save_area = 0x7ffcc6a1dc70}}
        title = <error reading variable title (value requires 3332475728 bytes, which is more than max-value-size)>
        len = <optimized out>
#9  0x0000559224388b8c in InfoScreen_run (this=this@entry=0x55922478cb00) at InfoScreen.c:87
        panel = 0x5592247541d0
#10 0x0000559224381608 in actionStrace (st=<optimized out>) at Action.c:404
        p = <optimized out>
        ts = 0x55922478cb00
        ok = <optimized out>
#11 0x00005592243896ee in MainPanel_eventHandler (super=0x559224750390, ch=115) at MainPanel.c:99
        this = 0x559224750390
        result = IGNORED
        reaction = HTOP_OK
#12 0x00005592243915b9 in ScreenManager_run (this=0x55922469d830, lastFocus=0x0, lastKey=0x0) at ScreenManager.c:225
        prevCh = <optimized out>
        result = IGNORED
        focus = 0
        panelFocus = 0x559224750390
        oldTime = 16102300273.982941
        ch = <optimized out>
        closeTimeout = 0
        timedOut = true
        redraw = true
        force_redraw = false
        rescan = <optimized out>
        sortTimeout = <optimized out>
#13 0x0000559224380ff4 in main (argc=<optimized out>, argv=<optimized out>) at htop.c:338
        lc_ctype = <optimized out>
        flags = {pidMatchList = 0x0, commFilter = 0x0, userId = <optimized out>, sortKey = 0, delay = -1, useColors = true, 
          enableMouse = true, treeView = false, allowUnicode = <optimized out>, highlightChanges = <optimized out>, 
          highlightDelaySecs = <optimized out>}
        ut = 0x55922469d880
        pl = 0x559224694370
        settings = 0x559224694860
        header = 0x5592246ab060
        panel = <optimized out>
        state = {settings = 0x559224694860, ut = 0x55922469d880, pl = 0x559224694370, panel = 0x559224750390, 
          header = 0x5592246ab060, pauseProcessUpdate = false, hideProcessSelection = false}
        scr = 0x55922469d830

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions