-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Quit (from long-running sessions) #162
Comments
I'm seeing the same issue. Here is a full log with curl "http://localhost:6060/debug/pprof/goroutine?debug=1" pprof/goroutine?debug=1"```console $ curl "http://localhost:6060/debug/pprof/goroutine?debug=1" goroutine profile: total 21 3 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a2227b51 0x55c2a2228305 0x55c2a2341bf6 0x55c2a234c625 0x55c2a221a641 # 0x55c2a2227b50 io.(*pipe).read+0xb0 io/pipe.go:57 # 0x55c2a2228304 io.(*PipeReader).Read+0x24 io/pipe.go:136 # 0x55c2a2341bf5 bufio.(*Scanner).Scan+0x875 bufio/scan.go:214 # 0x55c2a234c624 github.com/sirupsen/logrus.(*Entry).writerScanner+0xa4 github.com/sirupsen/[email protected]/writer.go:592 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a277237a 0x55c2a26a55a2 0x55c2a221a641 0x55c2a2772379 github.com/gcla/termshark/v2/widgets/filter.New.func7+0x159 github.com/gcla/termshark/v2/widgets/filter/filter.go:3300x55c2a26a55a1 github.com/gcla/termshark/v2.TrackedGo.func1+0xc1 github.com/gcla/termshark/v2/utils.go:5592 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a277257d 0x55c2a26a55a2 0x55c2a221a641 0x55c2a277257c github.com/gcla/termshark/v2/widgets/filter.New.func6+0xfc github.com/gcla/termshark/v2/widgets/filter/filter.go:3000x55c2a26a55a1 github.com/gcla/termshark/v2.TrackedGo.func1+0xc1 github.com/gcla/termshark/v2/utils.go:5591 @ 0x55c2a21ba5b4 0x55c2a2216a6f 0x55c2a23044f9 0x55c2a221a641 0x55c2a2216a6e os/signal.signal_recv+0x2e runtime/sigqueue.go:1520x55c2a23044f8 os/signal.loop+0x18 os/signal/signal_unix.go:231 @ 0x55c2a21ddf76 0x55c2a22144e5 0x55c2a2361c15 0x55c2a2361a2d 0x55c2a235e9ab 0x55c2a28a6d45 0x55c2a28a78de 0x55c2a25e238f 0x55c2a25e3d29 0x55c2a25e578c 0x55c2a25e0e67 0x55c2a221a641 0x55c2a22144e4 runtime/pprof.runtime_goroutineProfileWithLabels+0x24 runtime/mprof.go:8460x55c2a2361c14 runtime/pprof.writeRuntimeProfile+0xb4 runtime/pprof/pprof.go:7230x55c2a2361a2c runtime/pprof.writeGoroutine+0x4c runtime/pprof/pprof.go:6830x55c2a235e9aa runtime/pprof.(*Profile).WriteTo+0x14a runtime/pprof/pprof.go:3300x55c2a28a6d44 net/http/pprof.handler.ServeHTTP+0x4a4 net/http/pprof/pprof.go:2530x55c2a28a78dd net/http/pprof.Index+0x13d net/http/pprof/pprof.go:3710x55c2a25e238e net/http.HandlerFunc.ServeHTTP+0x2e net/http/server.go:21090x55c2a25e3d28 net/http.(*ServeMux).ServeHTTP+0x148 net/http/server.go:24870x55c2a25e578b net/http.serverHandler.ServeHTTP+0x30b net/http/server.go:29470x55c2a25e0e66 net/http.(*conn).serve+0x606 net/http/server.go:19911 @ 0x55c2a21e8a76 0x55c2a21b501b 0x55c2a21b4b18 0x55c2a22b7bca 0x55c2a26b7289 0x55c2a26c862f 0x55c2a26a55a2 0x55c2a221a641 0x55c2a22b7bc9 os/exec.(*Cmd).Wait+0x1c9 os/exec/exec.go:6080x55c2a26b7288 github.com/gcla/termshark/v2/pkg/pcap.(*Command).Wait+0x28 github.com/gcla/termshark/v2/pkg/pcap/cmds.go:620x55c2a26c862e github.com/gcla/termshark/v2/pkg/pcap.(*InterfaceLoader).loadIfacesSync.func2+0x2e github.com/gcla/termshark/v2/pkg/pcap/loader.go:20990x55c2a26a55a1 github.com/gcla/termshark/v2.TrackedGo.func1+0xc1 github.com/gcla/termshark/v2/utils.go:5591 @ 0x55c2a21e8a76 0x55c2a21e1537 0x55c2a22149a9 0x55c2a2283f32 0x55c2a228529a 0x55c2a2285288 0x55c2a2290a1e 0x55c2a2290a16 0x55c2a233a005 0x55c2a2338d6e 0x55c2a221a641 0x55c2a22149a8 internal/poll.runtime_pollWait+0x88 runtime/netpoll.go:3050x55c2a2283f31 internal/poll.(*pollDesc).wait+0x31 internal/poll/fd_poll_runtime.go:840x55c2a2285299 internal/poll.(*pollDesc).waitRead+0x259 internal/poll/fd_poll_runtime.go:890x55c2a2285287 internal/poll.(*FD).Read+0x247 internal/poll/fd_unix.go:1670x55c2a2290a1d os.(*File).read+0x5d os/file_posix.go:310x55c2a2290a15 os.(*File).Read+0x55 os/file.go:1180x55c2a233a004 github.com/gdamore/tcell/v2.(*devTty).Read+0x24 github.com/gdamore/tcell/[email protected]/tty_unix.go:470x55c2a2338d6d github.com/gdamore/tcell/v2.(*tScreen).inputLoop+0xcd github.com/gdamore/tcell/[email protected]/tscreen.go:16331 @ 0x55c2a21e8a76 0x55c2a21e1537 0x55c2a22149a9 0x55c2a2283f32 0x55c2a22891b4 0x55c2a22891a1 0x55c2a23e76b5 0x55c2a23fd4c8 0x55c2a23fc69d 0x55c2a25e5ce5 0x55c2a25e591d 0x55c2a28a8ec5 0x55c2a28a8e95 0x55c2a221a641 0x55c2a22149a8 internal/poll.runtime_pollWait+0x88 runtime/netpoll.go:3050x55c2a2283f31 internal/poll.(*pollDesc).wait+0x31 internal/poll/fd_poll_runtime.go:840x55c2a22891b3 internal/poll.(*pollDesc).waitRead+0x233 internal/poll/fd_poll_runtime.go:890x55c2a22891a0 internal/poll.(*FD).Accept+0x220 internal/poll/fd_unix.go:6140x55c2a23e76b4 net.(*netFD).accept+0x34 net/fd_unix.go:1720x55c2a23fd4c7 net.(*TCPListener).accept+0x27 net/tcpsock_posix.go:1420x55c2a23fc69c net.(*TCPListener).Accept+0x3c net/tcpsock.go:2880x55c2a25e5ce4 net/http.(*Server).Serve+0x384 net/http/server.go:30700x55c2a25e591c net/http.(*Server).ListenAndServe+0x7c net/http/server.go:29990x55c2a28a8ec4 net/http.ListenAndServe+0x44 net/http/server.go:32550x55c2a28a8e94 main.cmain.func2+0x14 github.com/gcla/termshark/v2/cmd/termshark/termshark.go:5581 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a2227f52 0x55c2a2228425 0x55c2a2227586 0x55c2a2226544 0x55c2a22b6bda 0x55c2a22b6bc6 0x55c2a22b7985 0x55c2a221a641 0x55c2a2227f51 io.(*pipe).write+0x211 io/pipe.go:860x55c2a2228424 io.(*PipeWriter).Write+0x24 io/pipe.go:1650x55c2a2227585 io.(*multiWriter).Write+0x85 io/multi.go:850x55c2a2226543 io.copyBuffer+0x203 io/io.go:4290x55c2a22b6bd9 io.Copy+0x39 io/io.go:3860x55c2a22b6bc5 os/exec.(*Cmd).writerDescriptor.func1+0x25 os/exec/exec.go:4070x55c2a22b7984 os/exec.(*Cmd).Start.func1+0x24 os/exec/exec.go:5441 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a2336aaa 0x55c2a23739b9 0x55c2a221a641 0x55c2a2336aa9 github.com/gdamore/tcell/v2.(*tScreen).PollEvent+0x69 github.com/gdamore/tcell/[email protected]/tscreen.go:10520x55c2a23739b8 github.com/gcla/gowid.(*App).StartTCellEvents.func1+0x78 github.com/gcla/[email protected]/app.go:5801 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a23387cc 0x55c2a221a641 0x55c2a23387cb github.com/gdamore/tcell/v2.(*tScreen).mainLoop+0x16b github.com/gdamore/tcell/[email protected]/tscreen.go:15721 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a233a59f 0x55c2a221a641 0x55c2a233a59e github.com/gdamore/tcell/v2.(*devTty).Start.func1+0xbe github.com/gdamore/tcell/[email protected]/tty_unix.go:921 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a26c7fdb 0x55c2a26a55a2 0x55c2a221a641 0x55c2a26c7fda github.com/gcla/termshark/v2/pkg/pcap.(*InterfaceLoader).loadIfacesSync.func3+0x21a github.com/gcla/termshark/v2/pkg/pcap/loader.go:21400x55c2a26a55a1 github.com/gcla/termshark/v2.TrackedGo.func1+0xc1 github.com/gcla/termshark/v2/utils.go:5591 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a26e601c 0x55c2a26a55a2 0x55c2a221a641 0x55c2a26e601b github.com/gcla/termshark/v2/pkg/confwatcher.New.func1+0x11b github.com/gcla/termshark/v2/pkg/confwatcher/confwatcher.go:490x55c2a26a55a1 github.com/gcla/termshark/v2.TrackedGo.func1+0xc1 github.com/gcla/termshark/v2/utils.go:5591 @ 0x55c2a21e8a76 0x55c2a21f8bbc 0x55c2a28add5a 0x55c2a28a8b3a 0x55c2a21e86b3 0x55c2a221a641 0x55c2a28add59 main.cmain+0x4bd9 github.com/gcla/termshark/v2/cmd/termshark/termshark.go:11560x55c2a28a8b39 main.main+0xf9 github.com/gcla/termshark/v2/cmd/termshark/termshark.go:700x55c2a21e86b2 runtime.main+0x212 runtime/proc.go:2501 @ 0x55c2a226bb67 0x55c2a2269ac5 0x55c2a22852c5 0x55c2a22852ad 0x55c2a2285065 0x55c2a23e55a9 0x55c2a23f4765 0x55c2a25dabff 0x55c2a221a641 0x55c2a226bb66 syscall.Syscall+0x26 syscall/syscall_linux.go:680x55c2a2269ac4 syscall.read+0x44 syscall/zsyscall_linux_amd64.go:6960x55c2a22852c4 syscall.Read+0x284 syscall/syscall_unix.go:1830x55c2a22852ac internal/poll.ignoringEINTRIO+0x26c internal/poll/fd_unix.go:7940x55c2a2285064 internal/poll.(*FD).Read+0x24 internal/poll/fd_unix.go:1630x55c2a23e55a8 net.(*netFD).Read+0x28 net/fd_posix.go:550x55c2a23f4764 net.(*conn).Read+0x44 net/net.go:1830x55c2a25dabfe net/http.(*connReader).backgroundRead+0x3e net/http/server.go:6781 @ 0x55c2a226bbf6 0x55c2a2303658 0x55c2a26b331d 0x55c2a26b25f5 0x55c2a221a641 0x55c2a226bbf5 syscall.Syscall6+0x35 syscall/syscall_linux.go:900x55c2a2303657 golang.org/x/sys/unix.EpollWait+0x57 golang.org/x/[email protected]/unix/zsyscall_linux_amd64.go:560x55c2a26b331c gopkg.in/fsnotify/fsnotify%2ev1.(*fdPoller).wait+0x7c gopkg.in/fsnotify/[email protected]/inotify_poller.go:860x55c2a26b25f4 gopkg.in/fsnotify/fsnotify%2ev1.(*Watcher).readEvents+0x274 gopkg.in/fsnotify/[email protected]/inotify.go:192
|
Problem
This may be related to to issue #121 which was thought to be fixed.
Debian 12 Bookworm, amd64,
termshark 2.4.0
Current Behavior
I've recently been leaving
termshark
running for many hours and on 2 separate hosts had situations where despite going through the UI Quit workflow, and either:q!
, Quit > Keep, or Quit > Delete, and the UI simply continuing as if the command hasn't been issued.The log seems to indicate that the background processes are being killed though:
This session had to be
KILL
ed.Expected Behavior
For short-duration sessions quit does work - I don't have a handle on what period is required to trigger this as yet but safe to say it is likely 6 hours+.
Steps to Reproduce
Leave running for long periods.
Context
Please provide the complete output of these commands:
I've attached
gdb
to it but as yet not got anything useful; if you could suggest some locations for breakpoints I can then single-step from there when it is likely to fail. I've tried that with a well-behaved short-duration session starting fromui/ui.go:479
so am reasonably familiar with a 'good' quit flow.The text was updated successfully, but these errors were encountered: