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

fish use too many CPU resources #1347

Closed
ghost opened this issue Mar 19, 2014 · 13 comments
Closed

fish use too many CPU resources #1347

ghost opened this issue Mar 19, 2014 · 13 comments
Labels
bug Something that's not working as intended question
Milestone

Comments

@ghost
Copy link

ghost commented Mar 19, 2014

We have a server to compile android rom,and have 5 user to use it,but we use top command find the fish use most of the CPU resources.
2014-03-19 13 38 28

What's wrong with it?

@zanchey
Copy link
Member

zanchey commented Mar 19, 2014

To have no errors
Would be life without meaning
No struggle, no joy

-- NetPositive

If you have installed a package with fish debugging symbols, you could attach a debugger such as gdb (gdb -p 2275) and run thread apply all bt full, posting the output for us to see.

If not, you could attach strace (strace -p 2275) and post part of the output for us to see.

This would perhaps help determine if this is the same as #311, #472, #1103, or #1346.

@siteshwar
Copy link
Contributor

Does it happen only when you are running certain command ?

@ghost
Copy link
Author

ghost commented Mar 20, 2014

I'm not sure, the server use to compile android rom, so we will use mang commands.when fish use most of CPU, we found compile the rom is so slow,after reboot it will be very fast.

@siteshwar
Copy link
Contributor

@zhuzhai Please send us the logs requested by @zanchey.

@ghost
Copy link
Author

ghost commented Mar 21, 2014

We are using Ubuntu12.04, and I have installed fish-dbg package, but when run "gdb -p 2275", it says "Attaching to process 2275 ptrace: No such process.", What should I do?

@zanchey
Copy link
Member

zanchey commented Mar 21, 2014

Possibly that process has exited. Run top again, find the PID (first column) of a fish process that is being run by your user, then use gdb -p 1234 where 1234 is the PID of your fish process.

Also, if you are using Ubuntu 12.04, please send us the output of fish --version.

@ghost
Copy link
Author

ghost commented Mar 21, 2014

the output is :
Reading symbols from /usr/local/bin/fish...done.
Reading symbols from /lib/x86_64-linux-gnu/libtinfo.so.5...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libtinfo.so.5.9...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libtinfo.so.5
Reading symbols from /lib/x86_64-linux-gnu/libpthread.so.0...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.15.so...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
done.
Loaded symbols for /lib/x86_64-linux-gnu/libpthread.so.0
Reading symbols from /usr/lib/x86_64-linux-gnu/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Reading symbols from /lib/x86_64-linux-gnu/libc.so.6...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.15.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.15.so...done.
done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib/x86_64-linux-gnu/libm.so.6...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.15.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libm.so.6
Reading symbols from /lib/x86_64-linux-gnu/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/x86_64-linux-gnu/libgcc_s.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_compat.so.2...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libnss_compat-2.15.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_compat.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnsl.so.1...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libnsl-2.15.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnsl.so.1
Reading symbols from /lib/x86_64-linux-gnu/libnss_nis.so.2...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libnss_nis-2.15.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_nis.so.2
Reading symbols from /lib/x86_64-linux-gnu/libnss_files.so.2...Reading symbols from /usr/lib/debug/lib/x86_64-linux-gnu/libnss_files-2.15.so...done.
done.
Loaded symbols for /lib/x86_64-linux-gnu/libnss_files.so.2

warning: no loadable sections found in added symbol-file system-supplied DSO at 0x7fff11ffe000
__GI___vswprintf_chk (s=0x7fff11e79cd0 L"", maxlen=256, flags=1, slen=, format=0x4dc9e0 L"%ls%ls", args=0x7fff11e7a0d0) at vswprintf_chk.c:74
74 vswprintf_chk.c: No such file or directory.

and fish --version output is
fish, version 1.23.1-1989-g74135c0-dirty

@ghost
Copy link
Author

ghost commented Mar 21, 2014

Thread 1 (Thread 0x7fe793793740 (LWP 20094)):
#0  wcsndup (in=0x264ef1c L" Could not return shell to foreground", c=0) at fallback.cpp:929
No locals.
#1  0x0000000000499cfc in write_screen (msg=..., buff=...) at common.cpp:886
        token = <optimized out>
        overflow = 0
        tok_width = <optimized out>
        start = 0x264ef1c L" Could not return shell to foreground"
        pos = 0x264ef1c L" Could not return shell to foreground"
        line_width = 0
        screen_width = 197
#2  0x000000000049a00f in debug_shared (msg=...) at common.cpp:683
        sb = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x264ef08 L"fish: Could not return shell to foreground"}}
        sb2 = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x264b148 L"fish:", ' ' <repeats 192 times>, "\n"}}
#3  0x000000000049a39d in debug (level=<optimized out>, msg=0x2646328 L"Could not return shell to foreground") at common.cpp:696
        errno_old = 25
        va = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fff11e7a3d0, reg_save_area = 0x7fff11e7a300}}
        local_msg = {static npos = <optimized out>, 
          _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, 
            _M_p = 0x2643948 L"Could not return shell to foreground"}}
and then run thread apply all bt full output is 
#4  0x000000000046fcd8 in terminal_return_from_job (j=0x263dce0) at proc.cpp:1027
No locals.
#5  job_continue (j=0x263dce0, cont=<optimized out>) at proc.cpp:1235
        __FUNCTION__ = "job_continue"
#6  0x000000000044e25d in exec_job (parser=..., j=<optimized out>) at exec.cpp:1567
        pid = 20152
        __PRETTY_FUNCTION__ = "void exec_job(parser_t&, job_t*)"
        pipe_current_write = <optimized out>
        chldset = {__val = {65536, 0 <repeats 15 times>}}
        exec_error = <optimized out>
        needs_keepalive = <optimized out>
        __FUNCTION__ = "exec_job"
        pipe_current_read = <optimized out>
        pipe_next_read = <optimized out>
        keepalive = {argv_array = {array = 0x0}, argv0_narrow = {str = 0x0},

@ridiculousfish
Copy link
Member

This is on fish 1.x, which is many years old now. Give it a try on fish 2.1!

@KamilaBorowska
Copy link
Contributor

@ridiculousfish: It's actually not. 1.23.1-1989-g74135c0-dirty is modified 74135c0. This means the tags weren't updated, but it's actually 2.1.0-next.

@ridiculousfish
Copy link
Member

Nuts!

@ridiculousfish ridiculousfish added the bug Something that's not working as intended label Oct 12, 2014
@ridiculousfish ridiculousfish added this to the fish-tank milestone Oct 12, 2014
@zanchey
Copy link
Member

zanchey commented Aug 25, 2015

I'm pretty sure this has disappeared with 2.2.0, as we used to see a lot of these processes on our shell server but they have all gone with the new version. Could you speak up if you still have the problem?

@faho
Copy link
Member

faho commented Aug 25, 2015

Until then, I'd consider this fixed along with the other issues like it.

@faho faho closed this as completed Aug 25, 2015
@zanchey zanchey modified the milestones: fish 2.2.0, fish-tank Aug 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that's not working as intended question
Projects
None yet
Development

No branches or pull requests

5 participants