upgrade failed when fontconfig cache dirs are newer than system date

Bug #104553 reported by Luca Gambetti
294
Affects Status Importance Assigned to Milestone
OpenOffice
Invalid
Undecided
Unassigned
fontconfig (Debian)
Fix Released
Unknown
fontconfig (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

After installation of a Kubuntu 7.04 beta on my Vaio laptop PCG-FX702 I launched sudo apt-get upgrade and sudo apt-get update. Update failed with following messages;
Configuring ttf-opensymbol (2.2.0-1ubuntu2) ...
Updating fontconfig cache...
/usr/share/fonts: failed to write cache
/usr/share/fonts/X11: failed to write cache
/usr/share/fonts/X11/100dpi: failed to write cache
/usr/share/fonts/X11/75dpi: failed to write cache
/usr/share/fonts/X11/Type1: failed to write cache
/usr/share/fonts/X11/encodings: failed to write cache
/usr/share/fonts/X11/encodings/large: failed to write cache
/usr/share/fonts/X11/misc: failed to write cache
/usr/share/fonts/X11/util: failed to write cache
/usr/share/fonts/truetype: failed to write cache
/usr/share/fonts/truetype/arphic: failed to write cache
/usr/share/fonts/truetype/baekmuk: failed to write cache
/usr/share/fonts/truetype/freefont: failed to write cache
/usr/share/fonts/truetype/kochi: failed to write cache
/usr/share/fonts/truetype/ttf-arabeyes: failed to write cache
/usr/share/fonts/truetype/ttf-bengali-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-bitstream-vera: failed to write cache
/usr/share/fonts/truetype/ttf-dejavu: failed to write cache
/usr/share/fonts/truetype/ttf-devanagari-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-gentium: failed to write cache
/usr/share/fonts/truetype/ttf-gujarati-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-kannada-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-lao: failed to write cache
/usr/share/fonts/truetype/ttf-malayalam-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-mgopen: failed to write cache
/usr/share/fonts/truetype/ttf-oriya-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-punjabi-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-tamil-fonts: failed to write cache
/usr/share/fonts/truetype/ttf-telugu-fonts: failed to write cache
/usr/share/fonts/type1: failed to write cache
/usr/share/fonts/type1/gsfonts: failed to write cache
/usr/share/X11/fonts: failed to write cache
/usr/share/X11/fonts/100dpi: failed to write cache
/usr/share/X11/fonts/75dpi: failed to write cache
/usr/share/X11/fonts/Type1: failed to write cache
/usr/share/X11/fonts/encodings: failed to write cache
/usr/share/X11/fonts/encodings/large: failed to write cache
/usr/share/X11/fonts/misc: failed to write cache
/usr/share/X11/fonts/util: failed to write cache
/usr/local/share/fonts: failed to write cache
/var/lib/defoma/fontconfig.d: failed to write cache
/var/lib/defoma/fontconfig.d/A: failed to write cache
/var/lib/defoma/fontconfig.d/B: failed to write cache
/var/lib/defoma/fontconfig.d/C: failed to write cache
/var/lib/defoma/fontconfig.d/D: failed to write cache
/var/lib/defoma/fontconfig.d/E: failed to write cache
/var/lib/defoma/fontconfig.d/F: failed to write cache
/var/lib/defoma/fontconfig.d/H: failed to write cache
/var/lib/defoma/fontconfig.d/J: failed to write cache
/var/lib/defoma/fontconfig.d/K: failed to write cache
/var/lib/defoma/fontconfig.d/M: failed to write cache
/var/lib/defoma/fontconfig.d/O: failed to write cache
/var/lib/defoma/fontconfig.d/R: failed to write cache
/var/lib/defoma/fontconfig.d/S: failed to write cache
/var/lib/defoma/fontconfig.d/U: failed to write cache
/var/lib/defoma/fontconfig.d/V: failed to write cache
/var/lib/defoma/fontconfig.d/a: failed to write cache
/var/lib/defoma/fontconfig.d/j: failed to write cache
/var/lib/defoma/fontconfig.d/m: failed to write cache
/var/lib/defoma/fontconfig.d/u: failed to write cache
dpkg: error processing ttf-opensymbol (--configure):

This bug can be caused by Bug #134074

Revision history for this message
Reed Lipman (rmlipman) wrote :

Thank you for your bug report. Can you run the following commands and report what happens?

sudo apt-get update
sudo apt-get dist-upgrade

There may be some unresolved dependency. When you run apt-get upgrade, apt simply upgrades all your packages to the newest version. Running a dist-upgrade might install some package that will fix this.

Revision history for this message
Luca Gambetti (lucagambetti) wrote : Re: [Bug 104553] Re: upgrade of a fresh installed Feisty failed

Hi Reed, thank you for the prompt answer. Re-reading my e-mail I saw a typo;
here what I tried in order;

- installed from Kubuntu Feisty Beta alternate CD
- clicked on the upgrade icon
- obtained the error on ttf-opensymbol
- rebooted, the system didn't start anymore
- reinstalled from the same CD
- opened a terminal
- sudo apt-get update
- sudo apt-get upgrade
- obtained the error on ttf-opensymbol
- sudo apt-get dist-upgrade
- obtained the error on ttf-opensymbol I sent you
- rebooted, the system didn't start anymore

Please note that in both cases the system was freshly installed, so I didn't
expect any unresolved dependencies...

Luca

On Sunday 08 April 2007 23:22:11 Reed Lipman wrote:
> Thank you for your bug report. Can you run the following commands and
> report what happens?
>
> sudo apt-get update
> sudo apt-get dist-upgrade
>
> There may be some unresolved dependency. When you run apt-get upgrade,
> apt simply upgrades all your packages to the newest version. Running a
> dist-upgrade might install some package that will fix this.
>
> ** Changed in: Ubuntu
> Assignee: (unassigned) => Reed Lipman
> Status: Unconfirmed => Needs Info

Revision history for this message
Reed Lipman (rmlipman) wrote : Re: upgrade of a fresh installed Feisty failed

Thank you for the additional information. Everything should be working right, but maybe iso you downloaded might be corrupt. Do the md5 sums match up? If you don't know how to do this, you can find more information at https://help.ubuntu.com/community/HowToMD5SUM

Revision history for this message
Reed Lipman (rmlipman) wrote :

Upon looking on the forums, I found a fix outlined in http://ubuntuforums.org/showpost.php?p=2401087&postcount=4 . Download the attached file and run the following in the terminal:

sudo cat cache_fail_folder_list.txt | sudo xargs touch

As this is not a bug, this report will be closed.

Revision history for this message
gurgeous (amd-gurge) wrote :

I am seeing this as well using the feisty torrent I just downloaded and install. Upgrade fails on ttf-opensymbol with the errors described above.

Revision history for this message
Reed Lipman (rmlipman) wrote :

As the bug has already been closed, please reference my previous post for a fix.

Revision history for this message
Michael Vogt (mvo) wrote :

Reopening, this is a bug that should be adressed as it may break upgrades.

Revision history for this message
Michael Vogt (mvo) wrote :

I can reproduce it here with:
1. set the date to the future
2. install fontconfig and ttf-opensymbol
3. run ntpdate pool.ntp.org
4. reinstall ttf-opensymbol
-> failure

Interestingly this does not happen with the edgy fontconfig.

Revision history for this message
Michael Vogt (mvo) wrote :

Setting to "medium", I was not able to trigger it during a edgy->feisty upgrade.

Changed in fontconfig:
importance: High → Medium
Revision history for this message
Julius Bloch (jbloch) wrote :

Hi Reed,
your fix didn't fix the problem on my fresh installed feisty.
I have still the attechd error log if I run fc-cache -s -f -v

Revision history for this message
Julius Bloch (jbloch) wrote :

Hi all,
after fix i don't have the startup problems with gtk apps as reported here https://bugs.launchpad.net/ubuntu/+bug/94048/comments/40 but still the errors in /var/log/fontconfig.log
But it didn't block the upgrades.

Changed in fontconfig:
status: Unknown → Fix Released
Revision history for this message
mvoncken (mvoncken) wrote :

I had the same problem after installing xubuntu, it was already complaining during installation.
The fix from reed worked partially,but there were some directories missing in cache_fail_folder_list.txt

I attached the file that worked for me.

Revision history for this message
MK (mk1970g) wrote :

I also have this problem, I installed Ubuntu 7.04 (with Gnome) today. After the first login I tried to run "sudo aptitude update && sudo aptitude dist-upgrade" but it failed like in the original comment. mvoncken's list worked for me.

Revision history for this message
Kovarththanan Rajaratnam (krj) wrote :

I've also hit this bug on a fresh Ubuntu 7.04. Using mvoncken's list sorted things out.

Revision history for this message
Johan Van Hellemont (johan-van-hellemont) wrote :

Same error here with fresh install Ubuntu Feisty 7.04 today.
sudo apt-get update && sudo dist-upgrade always return with error E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo touch /usr/share/fonts and sudo apt-get -f install the same.
I'll attach the output of sudo apt-get update && sudo dist-upgrade and sudo touch /usr/share/fonts && sudo apt-get -f install.

Revision history for this message
Pjotr12345 (computertip) wrote :

I had the same problem. It's a nasty bug: it also affects general system performance. For example: Firefox started much slower.

The suggested solution, using mvoncken's list, solved the problem. I hope this bug will be fixed in Gutsy.

Revision history for this message
Hlacos (h-lacos2) wrote :

sorry, My english is very bad.

I was the same problem, and when I reinstalled the fontconfig package, it prepared.
So I do this:
# sudo apt-get install fontconfig
# sudo apt-get update
# sudo apt-get dist-upgrade

Revision history for this message
wolfe99 (stw-heller) wrote :

Little improvement for the workarounds above, this will create the necessary directory list itself and do the touch:
apt-get install fontconfig 2>&1 | grep failed | cut -d : -f 1 | xargs touch

Revision history for this message
Daniel Burke (dan-p-burke) wrote :

Just finished a fresh install I started before finding this thread, and I can confirm...
It is localtime 2007 August 23rd, 12:34am, and all my font directories are timestamped at 2007-08-23 9:52, about 9:30 ahead of present (when I installed), which given that I live in Adelaide, which is GMT+9:30, I suggest that this bug be transfered to a bug in the install CD, as it has nothing to do with fontconfig at all.

Another solution to this problem, would be to wait (your GMT offset) between installing and your first boot of the system. Or to fiddle with your system clock. But wolfe99's solution is much quicker :-)

I am certain that no-one at Greenwich or west of Greenwich has encountered this bug.

I used the feisty-i386-alternative install cd, as my video card does not work with the desktop cd.

description: updated
Revision history for this message
CheolHan Yoon (mait) wrote :

sudo -i
apt-get install fontconfig 2>&1 | grep failed | cut -d : -f 1 | xargs touch

Thanks, wolfe99

Revision history for this message
Antti Kaihola (akaihola) wrote :

As Daniel Burke describes, this bug seems to be a symptom of #134074. Elias Aarnio has also verified it by doing a fresh install in Finland (GMT+2). Should this be marked as a duplicate of Bug #134074?

Revision history for this message
Daniel Burke (dan-p-burke) wrote :

I believe that while this bug is a symptom of Bug #134074, fontconfig should still be able to continue with fonts from the future. A fontconfig guru would be better qualified than I to comment on this.

Revision history for this message
Miguel Martinez (el-quark) wrote :

I'm nearly sure this won't add much, but this just happened to me on a freshly installed gutsy (Alternate CD), and wolfe's advise to use touch worked a charm. I'm on spain (CEST, GMT+2)

Revision history for this message
Bjørn Olai Bye (bjorn-bye) wrote :

Probably of little use, but I thought I'd report what I think is a similar problem I encountered when upgrading from Feisty to Gutsy. The Feisty was a fresh install, only updated.

The dist. upgrade GUI terminated while installing the Gutsy packages. In a terminal I ran apt-get update and upgrade. The output is attached.

I am fairly certain everything was corrected by wolfe99's suggestion. Thank you!

Revision history for this message
Frederik Elwert (frederik-elwert) wrote :

I can also confirm this bug on a fresh gutsy install.

After the installation, I was prompted to install available updates. The update of several openoffice.org-packages failed because of this bug. I got a message from update-manager that not all updates could be installed.

I think that this is a really bad first impression for new users. There is nothing fancy involved here, just a normal install and a normal update via update-manager. And the user is confronted with a system error that he or she doesn't know how to solve, leaving the computer in a possibly unusable state (according to the reports from Luca, luckily I did't reboot with the packages broken). Therefore, I think this should be of importance "High"!

Revision history for this message
Gazrang (gazrang) wrote :

I also have this issue on Gutsy fresh install. I live in South Korea and after installing Gutsy, it fails to install some elements of Openoffice.org packages.
I think this should be a "High" priority on launchpad. Is there any progress on this issue?

Revision history for this message
Namhyung Kim (namhyung) wrote :

this might be handled in ttf-opensymbol.postinst

Changed in openoffice:
assignee: nobody → namhyung
status: New → In Progress
Revision history for this message
Namhyung Kim (namhyung) wrote :

patch attached..
I'm gonna request sponsoring to main sponsor team. :-)

Namhyung Kim (namhyung)
Changed in openoffice:
assignee: namhyung → nobody
status: In Progress → Fix Committed
Revision history for this message
wolfe99 (stw-heller) wrote :

@Namhyung Kim: Thanks for your patch.
To ensure that no empty files are created I would suggest to use "touch -c".
(I know, I also forgot that in my workaround posted before).

Namhyung Kim (namhyung)
Changed in openoffice:
status: Fix Committed → Confirmed
status: Confirmed → New
Revision history for this message
Namhyung Kim (namhyung) wrote :

Good point! thanks, wolfe99..
Can you confirm this as openoffice bug?

here comes new patch.

Revision history for this message
Daniel Burke (dan-p-burke) wrote : Re: [Bug 104553] Re: upgrade failed when fontconfig cache dirs are newer than system date

It's caused by a "feature" of the cd installer, to do with UTC. However I
feel everyone is in agreement that OOo should be able to continue in the
event of this feature. It's just that, if this is caused by anything other
than the cd installer, then it's probably HDD corruption, and its probably a
good idea for it to fail like it does. Any other thoughts?

On Jan 11, 2008 12:39 PM, Namhyung Kim <email address hidden> wrote:

> Good point! thanks, wolfe99..
> Can you confirm this as openoffice bug?
>
> here comes new patch.
>
> ** Attachment added: "[patch] updated.."
>
> http://launchpadlibrarian.net/11276547/openoffice.org_2.3.0-1ubuntu5.4.debdiff
>
> --
> upgrade failed when fontconfig cache dirs are newer than system date
> https://bugs.launchpad.net/bugs/104553
> You received this bug notification because you are a direct subscriber
> of the bug.
>

--
http://www.users.on.net/~burito/

Revision history for this message
Namhyung Kim (namhyung) wrote : totally agree with you!

Yeah, it looks like a symptom of debian-installer's weird behavior.
But it should be handled safely in OOo.
so, please confirm this.. :-)

Chris Cheney (ccheney)
Changed in openoffice:
status: New → Invalid
status: Invalid → New
Jorge Castro (jorge)
Changed in fontconfig:
status: New → Confirmed
Revision history for this message
Michael Vogt (mvo) wrote :

The debian bug claims that the problem is fixed in the current fontconfig. If someone can come up with a way to reproduce the problem (preferable in a chroot) that would be much appreciated. I would like to fix the problem in fontconfig itself instead of in the postinst script because we would have to duplicate the fix in the postinst script for every font package.

If you look for a way to reproduce it, then pythons "os.utime()" may be useful to set mtime and atime of dirs/files. Best if probably to try to reproduce it on feisty or edgy first and then we can check if it affects newer versions still.

Thanks,
 Michael

Changed in fontconfig:
status: Confirmed → Incomplete
Revision history for this message
Michael Vogt (mvo) wrote :

I'm closing the ttf-opensymbol task because I think we should fix this bug in fontconfig instead than working around it in the postinst.

Changed in openoffice:
status: New → Invalid
Revision history for this message
jeroenl (jeroenl) wrote :

Actually I had this problem today with a fresh Gutsy installation on a PC. It is not my machine, so I can't get more information than I will give below. Note, that I installed Gutsy a few weeks ago, without problems, but with the Live CD.

1. Windows XP was already installed.
2. Used the alternate Gutsy Install CD.
3. There was already a Dapper installation on the partition used, but I manually rearranged the partitions. 1.5 GB Swap, 10 GB root and the 60 GB home. Windows NTFS partitions untouched. So overwriting the previous installation
4. Installation went fine.
5. Booting went fine.
6. Installing the upgrades (after doing an extra update) worked until the configuration of ttf-opensymbol. It gave exactly the same problem as the original poster. It also refused the upgrade the OOo packages, because of dependence of the most recent ttf-opensymbol.
7. After reading the forums and launchpad, I found out very quickly that I had do a "sudo touch" on all above directories that gave "failed to write cache".
8. Problem fixed.

I don't know if there is an other bug report I should give this information. Is so, please which one?

Cheers,

Jeroen

Revision history for this message
jeroenl (jeroenl) wrote :

P.S. The install of Gutsy with the Live CD was on another machine.

Revision history for this message
Ian Jackson (ijackson) wrote :

I just had exactly the same experience as jeroenvrp, and thanks to finding this report I was able to work around the problem. It's clear that fontconfig fails to deal properly with font directory timestamps in the future, so I'm setting this bug to Confirmed.

Also, the error message is deeply unhelpful.

Changed in fontconfig:
status: Incomplete → Confirmed
Revision history for this message
tweedledee (terrywatt-deactivatedaccount) wrote :

This bug is still very simple to reproduce - simply do a fresh Gutsy install, then immediately apply all updates. ttf-opensymbol will fail, causing all openoffice packages (15 more) to also fail, due to dependency problems. A really frustrating few minutes while I sorted this out, especially as the error message is so unhelpful, and apt kept the packages in a weird cache - I couldn't try to force a repeat of the update, but as soon as I installed an unrelated package, all the openoffice packages attempted (and failed, until I solved the problem) again.

Revision history for this message
Frederik Elwert (frederik-elwert) wrote :

I think that this bug is quite severe. Ubuntu wants to be a distribution suitable for beginners. But beginners will have absolutely no idea what went wrong and how they can fix it, when they install Gutsy, install the software updates, and the package management breaks. This is not a situation we should confront new users with.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Michael: could you please take a look at it?

Changed in fontconfig:
status: Unknown → Fix Released
mvoncken (mvoncken)
Changed in fontconfig (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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