#772 Moderate cpu usage while idle, file access problems

None
works-for-me
nobody
cpu (1)
1
2013-11-17
2013-07-24
Jason
No

I'm using TexStudio 2.3 on Xubuntu 13.04. TexStudio was installed from the Ubuntu repository.

If I open a file in TexStudio and then leave the program idle for several minutes TexStudio uses approx. 9% cpu (from command top). That's not too big of an issue especially since this is a quad-core machine. If I close TexStudio I typically have to also kill the process otherwise it continues to eat up cpu cycles and hangs up the shutdown sequence.

What is more concerning is that I am having trouble accessing files while running other programs. If TexStudio is open file access time is extremely slow. If I kill TexStudio everything goes back to normal.

I'm a huge fan of this editor but these problems are making use more difficult. I'm not sure if the issue is with my configuration or with TexStudio. Any help would be greatly appreciated.

Discussion

  • you could use the latest version of txs , available on the website (http://texstudio.sourceforge.net/)
    If the problem still persists, we can take a look into details.

     
  • is this resolved ?

     
  • Jason
    Jason
    2013-08-01

    Sorry for the late response. After installing TeXstudio 2.6.2 (SVN 4110) from the website (http://texstudio.sourceforge.net/) the problem is still there.

     
  • can you provide a sample file which causes your problem ?

     
  • Jason
    Jason
    2013-08-06

    While trying to create a minimal tex file that recreates this problem, I discovered that it only occurs if I am using pgfplots. I've attached two tex files that recreate this problem.

    Thanks,
    Jason

     
    Attachments
  • Jason
    Jason
    2013-09-05

    Jan,

    Do these files reproduce the problem?

    Thanks,
    Jason

     
  • i don't see the problem here (with 2.5.2 or newer)

     
  • Jason
    Jason
    2013-09-05

    Maybe it's just something strange with my machine/setup. Anyway, thanks for looking into this.

    -Jason

     
  • You could try to call it with

    strace ./texstudio 2>&1 | grep  "open"
    

    to see the files it is accessing.

    Perhaps, the LatexStyleParser gets confused by your pgfplot version.

     
  • Jason
    Jason
    2013-10-14

    Running the command:

    strace /usr/bin/texstudio 2>&1 | grep "open"
    

    There is a lot of output related to start up and all looks normal. Once I build a .tex file that uses pgfplots the following is continuously output:

    QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 996QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 776QFSFileEngine::open: No file name specified
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 301QFSFileEngine::open: No file name specified
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 980QFSFileEngine::open: No file name specified
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 359QFSFileEngine::open: No file name specified
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 576QFSFileEngine::open: No file name specified
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 997QFSFileEngine::open: No file name specified
    

    A quick google search on this seems to indicate texstudio is trying to open a file with no name. Do you have any ideas on what could be causing this?

    Thanks,
    Jason

     
  • Strange.

    Perhaps it is better to see everything.

    I.e. call just strace /usr/bin/texstudio

     
  • Jason
    Jason
    2013-10-14

    I'm not really sure which part of the output is important but here are the 100 lines preceeding the previous output:

    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\351\7\273\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1V\7\0\0\0\0\0\0\0\0q\2\243\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\350\7\274\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1W\7\0\0\0\0\0\0\0\0p\2\244\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(8, 0x24b02c4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 3) = 0 (Timeout)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(8, 0x24b02c4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 0) = 0 (Timeout)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(8, 0x24b02c4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 189) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\6\0W\7#V\34\0\375\2\0\0\217\0\300\3\0\0\0\0\352\7\271\2r\2\241\2\0\0\1\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\352\7\271\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1X\7\0\0\0\0\0\0\0\0r\2\241\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\351\7\273\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1Y\7\0\0\0\0\0\0\0\0q\2\243\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(8, 0x24b02c4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 185) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\6\0Y\0073V\34\0\375\2\0\0\217\0\300\3\0\0\0\0\353\7\270\2s\2\240\2\0\0\1\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\353\7\270\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1Z\7\0\0\0\0\0\0\0\0s\2\240\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\352\7\271\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1[\7\0\0\0\0\0\0\0\0r\2\241\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(8, 0x24b02c4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 170) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\6\0[\7;V\34\0\375\2\0\0\217\0\300\3\0\0\0\0\353\7\267\2s\2\237\2\0\0\1\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\353\7\267\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1\\\7\0\0\0\0\0\0\0\0s\2\237\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\353\7\270\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1]\7\0\0\0\0\0\0\0\0s\2\240\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(8, 0x24b02c4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 162) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\6\0]\7KV\34\0\375\2\0\0\217\0\300\3\0\0\0\0\354\7\267\2t\2\237\2\0\0\1\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\354\7\267\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1^\7\0\0\0\0\0\0\0\0t\2\237\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=6, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=6, revents=POLLOUT}])
    writev(6, [{"(\3\4\0\375\2\0\0\217\0\300\3\353\7\267\2", 16}, {NULL, 0}, {"", 0}], 3) = 16
    poll([{fd=6, events=POLLIN}], 1, 4294967295) = 1 ([{fd=6, revents=POLLIN}])
    recvfrom(6, "\1\1_\7\0\0\0\0\0\0\0\0s\2\237\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(6, 0x2449464, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    recvfrom(8, 0x24b02c4, 4096, 0, 0, 0)   = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=3, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}, {fd=13, events=POLLIN}, {fd=6, events=POLLIN}, {fd=15, events=POLLIN}, {fd=12, events=POLLIN}], 7, 146QFSFileEngine::open: No file name specified
    QFSFileEngine::open: No file name specified
    ) = 0 (Timeout)
    

    There are several lines indicating EAGAIN (Resource temporarily unavailable).

    Thanks,
    Jason

     
  • I think you should post the entire output.

    (now it says fd=6 in the snippet, which is the 6th opened file, but which file that actually is, is somewhere earlier)

     
  • Jason
    Jason
    2013-10-14

    I've attached the entire log file. Note that this is not the same file as for the previous output.

     
    Attachments
  • It looks fine, fd 6 is just the connection to the X-server

    socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC, 0) = 6
    connect(6, {sa_family=AF_FILE, path=@"/tmp/.X11-unix/X0"}, 20) = 0
    
     
  • The log file also says it tried to open

    /home/jason/.config/texstudio/completion/asmsymb.cwl
    /home/jason/.config/texstudio/completion/epstopdf.cwl
    /home/jason/.config/texstudio/completion/graphics.cwl
    /home/jason/.config/texstudio/completion/pgfplots.cwl

    and could not find them.

    Perhaps if you create empty files there (or files with the commands you use of each package), it will be faster

     
  • Jason
    Jason
    2013-10-17

    This was my problem. After I touched those files the problem disappeared. For some reason the folder

    /home/jason/.config/texstudio
    

    was owned by root. After changing ownership to my user account everything works perfectly.

    Thank you for your help!
    Jason

     
    • status: open --> works-for-me
    • Group: -->