Created attachment 5895 Backtrace of infinite descending into /usr/share/zoneinfo/posix/posix/posix/posix/... On Gentoo, there is a symlink: /usr/share/zoneinfo/posix -> . It makes clock_plugin_configure_zoneinfo_model_insert() to infinitely descend into /usr/share/zoneinfo/posix/posix/posix/posix/... (the attached backtrace shows this process at its very beginning). I don't know why it doesn't crash because of stack overflow, but it doesn't crash, it just hangs for some long time, then continues working. I suggest either using some mechanism to determine symlink loops or just applying attached quick-and-dirty patch that makes clock plugin completely ignore symlinks to directories.
Created attachment 5896 Quick-and-dirty fix
Could we please have input from other distros? Is it normal that Gentoo uses a symlink and is it something we should expect? If so, what would the correct behaviour be? On ArchLinux, posix is a directory.
(In reply to Steve Dodier-Lazaro from comment #2) > Could we please have input from other distros? > > Is it normal that Gentoo uses a symlink and is it something we should > expect? If so, what would the correct behaviour be? > > On ArchLinux, posix is a directory. Gentoo bug reported here: https://bugs.gentoo.org/show_bug.cgi?id=538484 On Ubuntu, posix is also a directory containing symlinks to files in /usr/share/zoneinfo. I haven't seen any distribution that has /usr/share/zoneinfo/posix -> . symlink like Gentoo.
Thanks Maxim. I don't think that preventing symlinks is the proper way to solve this issue, as it appears only a specific symlink causes a problem. I haven't looked at the source code yet, but could you please describe what you expect the Clock plugin to do exactly, in your case? i.e. how can it find the proper configuration files for Gentoo users?
(In reply to Steve Dodier-Lazaro from comment #4) > Thanks Maxim. > > I don't think that preventing symlinks is the proper way to solve this > issue, as it appears only a specific symlink causes a problem. Of course, it's just a quick-and-dirty quirk for Gentoo that just drops /usr/share/zoneinfo/posix subdir. > I haven't looked at the source code yet, but could you please describe what > you expect the Clock plugin to do exactly, in your case? i.e. how can it > find the proper configuration files for Gentoo users? The best option will be if clock plugin behaved identically on Gentoo and other distributions. It should correctly display timezones from /usr/share/zoneinfo, /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right directories. The ways it could be done: 1. Ugly way. Just don't permit to enter /usr/share/zoneinfo/posix/posix and /usr/share/zoneinfo/right/right. Should fix things on Gentoo, but it's rather ugly hack. 2. Fixing Gentoo way. Gentoo is really cheating, its /usr/share/zoneinfo/posix -> . symlink breaks things, so we could report it and try to make Gentoo use the same approach the other distributions do. 3. Systemd way. There is a command "timedatectl list-timezones" that lists available timezones. What it does is reading and parsing /usr/share/zoneinfo/zone.tab file (and manually appends UTC timezone). We could implement the same thing. Disadvantages of this approach: - /usr/share/zoneinfo/zone.tab is marked as deprecated in its header. Maybe /usr/share/zoneinfo/zone1970.tab could be replacement? Anyway, I'm not sure. - "timedatectl list-timezones" does not list timezones in posix and right directories. Unfortunately /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right don't contain zone.tab (well, on Gentoo with its symlinking, zone.tab could be found under one of these directories). Maybe we could just prepend "posix/" and "right/" to all timezones we found? 4. Any other solutions?
Hm, if Gentoo is the only distro that has this issue, then why add a workaround in xfce4-terminal upstream? Imho this would either qualify as a distro-patch or you get Gentoo devs to fix that (option 2).
(In reply to Simon Steinbeiss from comment #6) > Hm, if Gentoo is the only distro that has this issue, then why add a > workaround in xfce4-terminal upstream? > Imho this would either qualify as a distro-patch or you get Gentoo devs to > fix that (option 2). I've made a comment on existing Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=486532#c8
The Gentoo maintainer has just 'fixed' the issue via removing 'posix' symlink completely with the following explanation: * Support for accessing posix/ and right/ directly has been dropped to match * upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx. * For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post * for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html Any suggestions how to proceed now?
@Michał: So the result is you get no timezone info at all in Gentoo..?
No but I suppose TZ=posix/... won't work anymore (→ people have to drop posix/ prefix).
Ok, I'll close this report as "doesn't apply anymore".