[Gluster-devel] Corrupted list in iot_worker

Emmanuel Dreyfus manu at netbsd.org
Sun Jul 19 00:35:49 UTC 2020


Hello

I experienced multiple cases of this crash:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  list_del_init (old=0x24103800)
    at ../../../../libglusterfs/src/glusterfs/list.h:82

warning: Source file is more recent than executable.
82          old->prev->next = old->next;
[Current thread is 1 (process 100)]

(gdb) bt
#0  list_del_init (old=0x24103800)
    at ../../../../libglusterfs/src/glusterfs/list.h:82
#1  __iot_dequeue (conf=conf at entry=0xb5c03338, pri=pri at entry=0xb1c53fb4)
    at io-threads.c:110
#2  0xb59fe379 in iot_worker (data=0xb5c03338) at io-threads.c:222

(gdb) print old
$1 = (struct list_head *) 0x24103800
(gdb) print *old
Cannot access memory at address 0x24103800

Offending code in frame 1:
108             /* Get the first request on that queue. */
109             stub = list_first_entry(&ctx->reqs, call_stub_t, list);
110             list_del_init(&stub->list);

(gdb) print stub
$1 = (call_stub_t *) 0x979fb800
(gdb) print *stub
Cannot access memory at address 0x979fb800
(gdb) print ctx->reqs
Cannot access memory at address 0xa8979ff4
(gdb) print *ctx
Cannot access memory at address 0xa8979ff4

We got ctx a bit earlier:
98              /* Get the first per-client queue for this priority. */
99              ctx = list_first_entry(&conf->clients[i], iot_client_ctx_t, clients);

And the list is obviously bad here:
(gdb) print *conf->clients[3]->next
$11 = {next = 0x144, prev = 0x0}

Known bug?

-- 
Emmanuel Dreyfus
manu at netbsd.org


More information about the Gluster-devel mailing list