gedit uses %100 CPU when opening a file in /var/lib/dpkg/info/

Bug #276094 reported by Daniel Hollocher on 2008-09-29
62
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gedit
Fix Released
Medium
gedit (Ubuntu)
Low
Ubuntu Desktop Bugs
Intrepid
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gedit

I don't know why, or if any other folder is affected. But, I tried to open a few files in /var/lib/dpkg/info/ and they all caused the cpu burn.

A condition for this to happen is that gedit must be closed prior to opening the file. If gedit is already open, it doesn't happen.

Example command: gedit /var/lib/dpkg/info/adduser.list

The problem happens if you try to open the file through nautilus too. And with gksu. The only time it doesn't happen is if gedit is already open.

Related branches

Sebastien Bacher (seb128) wrote :

confirmed on intrepid, it goes through all the files in the directory, that's an upstream issue and should be opened on bugzilla.gnome.org too

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Confirmed

I can confirm it under Intrepid fully updated.

Then everytime that I run gedit from terminal, it consumed 100% of cpu until I have opened an old txt file that I had in my desktop. I can still reproduce this behaviour

Changed in gedit:
assignee: desktop-bugs → nobody
assignee: nobody → desktop-bugs
Daniel Hollocher (chogydan) wrote :

I can confirm the additional breakage that Pablo is describing. I will file an upstream bug report.

Changed in gedit:
status: Confirmed → Triaged
Changed in gedit:
status: Unknown → Confirmed
Vish (vish) wrote :

i can also confirm... it happens for any file which opens gedit the first time...

Changed in gedit:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Confirmed
Sebastien Bacher (seb128) wrote :
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gedit:
status: Confirmed → Fix Committed
Hew (hew) wrote :

Verification done. Reproduced the constant cpu usage with 2.24.0-0ubuntu1, and verified it was gone with 2.24.1-0ubuntu1. Checked some basic gedit functionality as well and everything seems ok.

Vish (vish) wrote :

NO... still the CPU bump exists for me, if i may say it time for the gedit to start takes even longer now, with this new[2.24.1-0ubuntu1] version check the attached screenshot of both the version and the duration of the CPU hogging...

problem not yet solved

Daniel Hollocher (chogydan) wrote :

just for reference, I've tested with the old gedit. I get about 177 seconds load time on my computer. I ran it twice. I'll test the loading speed of the new package, as soon as it hits the repos.

Daniel Hollocher (chogydan) wrote :

well, It just hit the repos as I wrote that message. I confirm that the patch works as intended. 177 second cpu burn is now a 10 second cpu burn. I also opened up the filebrowser pane, and it seemed to be working. I then went to /var/lib/dpkg/info, and the same 10 second burn took place, but it worked fine. I came the the same conclusion as Hew. I will also report upstream.

mac_v , the proposed solution only attempts to improve the situation (more aggressive solutions have been postponed till jaunty). For my computer, the situation is improved to the point that I don't care, but I also recognize that this still could be a problem for others with slower computers. You should still get a cpu bump, but it should be allot shorter in duration. Hopefully, you can provide more details as to how things got worse for you, because this looks working to me.

Sebastien Bacher (seb128) wrote :

you might have an issue different of the one described there

Vish (vish) wrote :

danielhollocher> i have a 1.66GHz DUO core, which i dont think is a slow CPU...

when i used ubuntu 8.04 the gedit used to open in 4-6 secs... almost instantaneoulsy

now since i'v upgraded to 8.10 it takes 35-40 secs... before the gedit update it was around 30 secs... so this update has increased the opening time...

Sebastien bacher> i filed this bug >>> https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/292486 <<< but it was u how marked it as duplicate of this bug... so shall i continue my bug , could u remove the duplicate tag for my bug?

because this update has worsened my gedit...

Martin Pitt (pitti) wrote :

I tested it as well, and with 2.24.0 and 2.24.1 it behaves exactly the same way: gedit opens the file in a matter of seconds, but after that it constantly uses 50 to 70% CPU.

Changed in gedit:
status: Fix Committed → Confirmed
Daniel Hollocher (chogydan) wrote :

Martin Pitt and mac_v, because of the nature of the bug that I originally reported, I'm curious which folder you are testing gedit on. This bug ended up being about the file browser plugin, and the negative behaviour was wholly dependent on what folder the file resided in. This patch aims to address that issue.

Also, can you guys try disabling the filebrowser plugin, to see if that resolves the issue? For this bug, that should resolve the issue completely in both 2.24.0 and 2.24.1

Vish (vish) wrote :

danielhollocher> actually i filed a separate bug> https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/292486

but sebastien bacher marked my bug as a duplicate of this... so i continued here...

BUT WOW... ur suggestion of disabling the file browser plugin , worked... now i have no wait times... ,
but in 8.04 i was able to use gedit without disabling any plugins... is disabling the file browser plugin a workaround or is that supposed to be the gedit setting?

Daniel Hollocher (chogydan) wrote :

well, the original bug was in the filebrowser plugin.... So, disabling it is the workaround, but it is also an indicator if you have the same bug. Anyway, I don't know.

Martin Pitt (pitti) wrote :

Ah, I can confirm that the filebrowser now takes *much* less CPU; having /var/lib/dpkg/info in the filebrowser is bearable with the update now, whereas it completely blocked gedit in intrepid final.

Thus re-marking as verified.

I originally tested this with "gedit /var/lib/dpkg/info/adduser.list", as given in the original description. But the CPU usage while gedit is running is a different problem then.

Changed in gedit:
status: Triaged → Fix Committed
status: Confirmed → Fix Committed

I had the problem even after updating with the new pre-released one as
suggested, yet disabling the filebrowser plugin solved it.

Regards,
Kevin

danielhollocher wrote:
> Martin Pitt and mac_v, because of the nature of the bug that I
> originally reported, I'm curious which folder you are testing gedit on.
> This bug ended up being about the file browser plugin, and the negative
> behaviour was wholly dependent on what folder the file resided in. This
> patch aims to address that issue.
>
> Also, can you guys try disabling the filebrowser plugin, to see if that
> resolves the issue? For this bug, that should resolve the issue
> completely in both 2.24.0 and 2.24.1
>
>

Martin Pitt (pitti) wrote :

intrepid-proposed package copied to jaunty.

Changed in gedit:
status: Fix Committed → Fix Released
Martin Pitt (pitti) wrote :

Copied to intrepid-updates.

Changed in gedit:
status: Fix Committed → Fix Released
Changed in gedit:
assignee: desktop-bugs → nikhilkumarverma1122
assignee: desktop-bugs → nikhilkumarverma1122
Hew (hew) on 2008-11-14
Changed in gedit:
assignee: nikhilkumarverma1122 → desktop-bugs
assignee: nikhilkumarverma1122 → desktop-bugs
riban (brian-riban) wrote :

I just had a very similar problem. gedit was consuming 100% CPU usage every time I started it. I tried removing the config file with no improvement. I then found this bug report and investigated the side pane file browser. This was pointing at a point in the dvb source tree. When I changed this to point elsewhere, the cpu usage reduced to 10% or less. I did not try a reboot before finding the work-around described here.

I am using Ubuntu 9.10. Kernel 2.6.31-17-generic. gedit 2.28.0 on a Samsung NC10 netbook (Intel Atom N270) with 1GB RAM.

Changed in gedit:
importance: Unknown → Medium
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.