Skip to content
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

High CPU usage under OpenBSD #24

Closed
ab1jx opened this issue Sep 4, 2016 · 9 comments
Closed

High CPU usage under OpenBSD #24

ab1jx opened this issue Sep 4, 2016 · 9 comments

Comments

@ab1jx
Copy link

ab1jx commented Sep 4, 2016

This was OpenBSD 5.7 (a year old), I don't try to keep up. It compiles, installs, runs, but after 10 - 20 minutes I noticed its windows were blank like they needed to be repainted. Looking at Top I see Pidgin at 95%+ CPU. I tried this several times, maybe once it dumped core. I've used Pidgin a couple years, never saw this before.

I tarred up the files I fetched with git, copied to a Raspberry Pi, and it compiles and runs fine there.

I'm running the Pidgin version that's in OpenBSD 5.7 ports, 2.10.11

@dequis
Copy link
Collaborator

dequis commented Sep 5, 2016

Attach a debugger to the process when this is happening and get a backtrace (gdb, lldb, whatever works in your platform. For gdb it's gdb -p <pid>, followed by "bt" then "c")

@ab1jx
Copy link
Author

ab1jx commented Sep 5, 2016

Do I need to recompile with -g? I just get
#0 0x03390081 in ?? ()
#1 0x0693b0a2 in ?? ()
#2 0x80fdf9c0 in ?? ()
#3 0x00000006 in ?? ()
#4 0x00002b2e in ?? ()
#5 0xcfbd72f0 in ?? ()
#6 0xcfbd7344 in ?? ()
#7 0x8811cd80 in ?? ()
#8 0x0693a1fd in ?? ()
#9 0x28591b3c in ?? ()
#10 0x08590d20 in ?? ()
#11 0x00000006 in ?? ()
#12 0xcfbd7308 in ?? ()
#13 0x08590d4b in ?? ()
#14 0x80fdf9c0 in ?? ()
#15 0x00000006 in ?? ()
#16 0x00002b2e in ?? ()
#17 0x00011d5e in ?? ()
#18 0x00000000 in ?? ()

On 9/4/16, dx [email protected] wrote:

Attach a debugger to the process when this is happening and get a backtrace
(gdb, lldb, whatever works in your platform. For gdb it's gdb -p <pid>,
followed by "bt" then "c")

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#24 (comment)

Credit is the root of all evil. - AB1JX

@dequis
Copy link
Collaborator

dequis commented Sep 5, 2016

Um. Maybe. Also maybe gdb sucking in openbsd. Try lldb. I think the commands are the same.

@ab1jx
Copy link
Author

ab1jx commented Sep 5, 2016

I'll have to find lldb and try to build it from source, it's not in
ports, never heard of it.

Actually, you already have -g in your makefile:
CFLAGS ?= -O2 -g -pipe -Wall

I didn't get it to crash this time but I flipped to a different pane
of my desktop and when I flipped back with the pager the Pidgin window
was blank so I attached gdb to the process. I've only done bt on core
files but it doesn't seem to be seeing the symbols. I also have DDD
installed but that's just a frontend for gdb I think. I haven't used
either much but it seems like nothing's tying it to the source or
object.

On 9/4/16, dx [email protected] wrote:

Um. Maybe. Also maybe gdb sucking in openbsd. Try lldb. I think the commands
are the same.

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#24 (comment)

Credit is the root of all evil. - AB1JX

@dequis
Copy link
Collaborator

dequis commented Sep 5, 2016

Yeah nevermind, lldb doesn't even support openbsd. I just remembered having more luck with it than with gdb in some BSD variant, but clearly it's not this one.

Maybe try replacing -O2 with -O0?

@ab1jx
Copy link
Author

ab1jx commented Sep 5, 2016

OK, this time I ran it as
gdb /path/pidgin too and

#0 0x0ae00081 in poll () at :2
#1 0x08b5c0a2 in poll (fds=0x77c74280, nfds=2, timeout=-1)
at /usr/src/lib/librthread/rthread_cancel.c:352
#2 0x0a271d4b in g_poll () from /usr/local/lib/libglib-2.0.so.4200.0
#3 0x0a263a2e in g_main_context_iterate ()
from /usr/local/lib/libglib-2.0.so.4200.0
#4 0x0a264ba7 in g_main_loop_run () from /usr/local/lib/libglib-2.0.so.4200.0
#5 0x020ace1c in gdbus_shared_thread_func ()
from /usr/local/lib/libgio-2.0.so.4200.0
#6 0x0a28b132 in g_thread_proxy () from /usr/local/lib/libglib-2.0.so.4200.0
#7 0x08b5880e in _rthread_start (v=0x7b54fc00)
at /usr/src/lib/librthread/rthread.c:145
#8 0x0ade5b06 in __tfork_thread ()
at /usr/src/lib/libc/arch/i386/sys/tfork_thread.S:95

On 9/4/16, dx [email protected] wrote:

Yeah nevermind, lldb doesn't even support openbsd. I just remembered having
more luck with it than with gdb in some BSD variant, but clearly it's not
this one.

Maybe try replacing -O2 with -O0?

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#24 (comment)

Credit is the root of all evil. - AB1JX

@ab1jx
Copy link
Author

ab1jx commented Sep 5, 2016

I caused it to happen just by clicking a different pane in the pager
and clicking back. But maybe it was already doing something and was
too busy to repaint. The backtrace doesn't look that useful, like
it's all library stuff.

On 9/4/16, Alan Corey [email protected] wrote:

OK, this time I ran it as
gdb /path/pidgin too and

#0 0x0ae00081 in poll () at :2
#1 0x08b5c0a2 in poll (fds=0x77c74280, nfds=2, timeout=-1)
at /usr/src/lib/librthread/rthread_cancel.c:352
#2 0x0a271d4b in g_poll () from /usr/local/lib/libglib-2.0.so.4200.0
#3 0x0a263a2e in g_main_context_iterate ()
from /usr/local/lib/libglib-2.0.so.4200.0
#4 0x0a264ba7 in g_main_loop_run () from
/usr/local/lib/libglib-2.0.so.4200.0
#5 0x020ace1c in gdbus_shared_thread_func ()
from /usr/local/lib/libgio-2.0.so.4200.0
#6 0x0a28b132 in g_thread_proxy () from
/usr/local/lib/libglib-2.0.so.4200.0
#7 0x08b5880e in _rthread_start (v=0x7b54fc00)
at /usr/src/lib/librthread/rthread.c:145
#8 0x0ade5b06 in __tfork_thread ()
at /usr/src/lib/libc/arch/i386/sys/tfork_thread.S:95

On 9/4/16, dx [email protected] wrote:

Yeah nevermind, lldb doesn't even support openbsd. I just remembered
having
more luck with it than with gdb in some BSD variant, but clearly it's not
this one.

Maybe try replacing -O2 with -O0?

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#24 (comment)

Credit is the root of all evil. - AB1JX

Credit is the root of all evil. - AB1JX

@ab1jx
Copy link
Author

ab1jx commented Sep 6, 2016

Uh-oh, I just caught my Raspberry Pi doing the same thing. Raspbian,
up to date as of 2 days ago.

On 9/4/16, Alan Corey [email protected] wrote:

I caused it to happen just by clicking a different pane in the pager
and clicking back. But maybe it was already doing something and was
too busy to repaint. The backtrace doesn't look that useful, like
it's all library stuff.

On 9/4/16, Alan Corey [email protected] wrote:

OK, this time I ran it as
gdb /path/pidgin too and

#0 0x0ae00081 in poll () at :2
#1 0x08b5c0a2 in poll (fds=0x77c74280, nfds=2, timeout=-1)
at /usr/src/lib/librthread/rthread_cancel.c:352
#2 0x0a271d4b in g_poll () from /usr/local/lib/libglib-2.0.so.4200.0
#3 0x0a263a2e in g_main_context_iterate ()
from /usr/local/lib/libglib-2.0.so.4200.0
#4 0x0a264ba7 in g_main_loop_run () from
/usr/local/lib/libglib-2.0.so.4200.0
#5 0x020ace1c in gdbus_shared_thread_func ()
from /usr/local/lib/libgio-2.0.so.4200.0
#6 0x0a28b132 in g_thread_proxy () from
/usr/local/lib/libglib-2.0.so.4200.0
#7 0x08b5880e in _rthread_start (v=0x7b54fc00)
at /usr/src/lib/librthread/rthread.c:145
#8 0x0ade5b06 in __tfork_thread ()
at /usr/src/lib/libc/arch/i386/sys/tfork_thread.S:95

On 9/4/16, dx [email protected] wrote:

Yeah nevermind, lldb doesn't even support openbsd. I just remembered
having
more luck with it than with gdb in some BSD variant, but clearly it's
not
this one.

Maybe try replacing -O2 with -O0?

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#24 (comment)

Credit is the root of all evil. - AB1JX

Credit is the root of all evil. - AB1JX

Credit is the root of all evil. - AB1JX

@ab1jx
Copy link
Author

ab1jx commented Sep 6, 2016

When I first installed Pidgin and the Yahoo2016 plugin it worked fine.
Then after 24 hours it wasn't showing all the incoming messages. The
old Yahoo would log off the first client when a second one logged on
but for a while with this I was watching on Pidgin and the Android
Yahoo client on a phone. It worked about like Hangouts does that way,
everything showed up on both clients, they saw each other's posts,
etc.

On 9/6/16, Alan Corey [email protected] wrote:

Uh-oh, I just caught my Raspberry Pi doing the same thing. Raspbian,
up to date as of 2 days ago.

On 9/4/16, Alan Corey [email protected] wrote:

I caused it to happen just by clicking a different pane in the pager
and clicking back. But maybe it was already doing something and was
too busy to repaint. The backtrace doesn't look that useful, like
it's all library stuff.

On 9/4/16, Alan Corey [email protected] wrote:

OK, this time I ran it as
gdb /path/pidgin too and

#0 0x0ae00081 in poll () at :2
#1 0x08b5c0a2 in poll (fds=0x77c74280, nfds=2, timeout=-1)
at /usr/src/lib/librthread/rthread_cancel.c:352
#2 0x0a271d4b in g_poll () from /usr/local/lib/libglib-2.0.so.4200.0
#3 0x0a263a2e in g_main_context_iterate ()
from /usr/local/lib/libglib-2.0.so.4200.0
#4 0x0a264ba7 in g_main_loop_run () from
/usr/local/lib/libglib-2.0.so.4200.0
#5 0x020ace1c in gdbus_shared_thread_func ()
from /usr/local/lib/libgio-2.0.so.4200.0
#6 0x0a28b132 in g_thread_proxy () from
/usr/local/lib/libglib-2.0.so.4200.0
#7 0x08b5880e in _rthread_start (v=0x7b54fc00)
at /usr/src/lib/librthread/rthread.c:145
#8 0x0ade5b06 in __tfork_thread ()
at /usr/src/lib/libc/arch/i386/sys/tfork_thread.S:95

On 9/4/16, dx [email protected] wrote:

Yeah nevermind, lldb doesn't even support openbsd. I just remembered
having
more luck with it than with gdb in some BSD variant, but clearly it's
not
this one.

Maybe try replacing -O2 with -O0?

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#24 (comment)

Credit is the root of all evil. - AB1JX

Credit is the root of all evil. - AB1JX

Credit is the root of all evil. - AB1JX

Credit is the root of all evil. - AB1JX

@dequis dequis closed this as completed in 16f914d Sep 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants