~rjarry/aerc#32: 
panic: stack overflow while building threads

To reproduce:

  • open aerc with an IMAP backend
  • switch to a folder with a large number of messages (I also managed to reproduce this with only a few messages)
  • toggle threading
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc020f00380 stack=[0xc020f00000, 0xc040f00000]
fatal error: stack overflow

...
goroutine 1 [running]:
github.com/gatherstars-com/jwz.(*threadContainer).findChild(0xc000a7d740?, 0xc000a7d780?)
	/home/rjarry/go/pkg/mod/github.com/gatherstars-com/jwz@v1.3.0/threadcontainer.go:90 +0x5e fp=0xc020f00390 sp=0xc020f00388 pc=0x8323be
github.com/gatherstars-com/jwz.(*threadContainer).findChild(0x0?, 0x0?)
	/home/rjarry/go/pkg/mod/github.com/gatherstars-com/jwz@v1.3.0/threadcontainer.go:97 +0x39 fp=0xc020f003b0 sp=0xc020f00390 pc=0x832399
github.com/gatherstars-com/jwz.(*threadContainer).findChild(0x0?, 0x0?)
	/home/rjarry/go/pkg/mod/github.com/gatherstars-com/jwz@v1.3.0/threadcontainer.go:97 +0x39 fp=0xc020f003d0 sp=0xc020f003b0 pc=0x832399
github.com/gatherstars-com/jwz.(*threadContainer).findChild(0x0?, 0x0?)
	/home/rjarry/go/pkg/mod/github.com/gatherstars-com/jwz@v1.3.0/threadcontainer.go:97 +0x39 fp=0xc020f003f0 sp=0xc020f003d0 pc=0x832399
github.com/gatherstars-com/jwz.(*threadContainer).findChild(0x0?, 0x0?)
	/home/rjarry/go/pkg/mod/github.com/gatherstars-com/jwz@v1.3.0/threadcontainer.go:97 +0x39 fp=0xc020f00410 sp=0xc020f003f0 pc=0x832399
github.com/gatherstars-com/jwz.(*threadContainer).findChild(0x0?, 0x0?)
...additional frames elided...

Full panic traces: https://paste.sr.ht/~rjarry/c1a1379804f2e81d8693fd2699b5aa18ad2d057f

Status
RESOLVED FIXED
Submitter
~rjarry
Assigned to
Submitted
4 months ago
Updated
4 months ago
Labels
bug ui

~konimarti 4 months ago

ugh. that looks like an infinite loop in the reference headers.. I have never seen this before, so I need to dig into this a little and see if we can clean up the references headers or something. If you can narrow it down to a few messages and maybe send the reference headers that could be helpful.

~rjarry 4 months ago

It took me a while but I found the message that causes this:

https://lists.debian.org/debian-python/2022/03/msg00028.html

Even if I put it alone in a folder, toggling threads triggers a stack overflow.

~rjarry 4 months ago

~konimarti 4 months ago

thanks! I haven't tested it yet, but I'm almost sure that there is a circularity issue (the first and third position are the same in the references header). Fix should be straightforward.

~rjarry REPORTED FIXED 4 months ago

Koni Marti referenced this ticket in commit 93c160a.

Register here or Log in to comment, or comment via email.