This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Time zone woes

Tags: None
(comma "," separated)
ememem
Registered Member
Posts
33
Karma
0
OS

Re: Time zone woes

Sat Nov 30, 2013 11:51 pm
Ok, got it. Remind me to never again do this while I'm in a rush o)

4.8M file, 54,045 lines. Is there any certain part of it that you would like me to post?
I'm not sure what I'm looking for and the limits here on characters per post are rather slim.

Edit: If you need to browse the whole thing: tmpdumpfile

Last edited by ememem on Sun Dec 01, 2013 12:30 am, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Time zone woes

Sun Dec 01, 2013 12:29 am
I would suggest posting that file on paste.kde.org, or uploading it somewhere such as Dropbox so we can examine the whole file.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
luebking
Karma
0

Re: Time zone woes

Sun Dec 01, 2013 1:25 am
1505: open("/usr/local/kde4/lib/kde4/kded_ktimezoned.so",O_RDONLY,027757741350) ERR#24 'Too many open files'

you get 980 of those errors all over the place, includes kded modules, service files, ...

something in the process seems to open each and every desktop service and mime description and keeps them open - i've no idea what that causes, but it crosses the (default?) limit (1024)

ok, things opened before include /var/tmp/kdecache-my_friend/ksycoca4 and /usr/local/kde4/lib/kde4/kded_networkstatus.so
I assume something triggers a ksycocoa rebuild inside kded, long story short:

a) try whether this is also a problem for another user than my_friend
b) test whether some files are pre-dated (eg. in /usr/local/kde4/share/kde4/servicetypes/)
b) have my_friend run "kbuildsycoca4 --noincremental --checkstamps" and restart kded4
ememem
Registered Member
Posts
33
Karma
0
OS

Re: Time zone woes

Sun Dec 01, 2013 3:39 am
luebking wrote:1505: open("/usr/local/kde4/lib/kde4/kded_ktimezoned.so",O_RDONLY,027757741350) ERR#24 'Too many open files'

you get 980 of those errors all over the place, includes kded modules, service files, ...

something in the process seems to open each and every desktop service and mime description and keeps them open - i've no idea what that causes, but it crosses the (default?) limit (1024)

I've been wondering the same thing about hitting the file limit.

luebking wrote:a) try whether this is also a problem for another user than my_friend
b) test whether some files are pre-dated (eg. in /usr/local/kde4/share/kde4/servicetypes/)
b) have my_friend run "kbuildsycoca4 --noincremental --checkstamps" and restart kded4

a) Found some interesting entries in a brand new xsession-errors for newly created user
b) They all appear to have been created on 06/28/13
c) Give me a while on that... Konsole just locked up after running "kbuildsycoca4 --noincremental --checkstamps" then restarting kded4
luebking
Karma
0

Re: Time zone woes

Sun Dec 01, 2013 12:52 pm
i'd say there's a bug in the code that updates sycoca[1] - it cannot just try to keep open each and every file.

try:
ulimit -n 4096 #try raising this until the system says "exceeds hard limit"
kbuildsycoca4 --noincremental

notice that "ulimit" is only valid for the running shell ("konsole tab")

[1] on BSD, for i get zipzerono F_DUPFD on running kbuildsycoca4 - it's more like

stat64("/usr/share/kde4/servicetypes/phononbackend.desktop", {st_mode=S_IFREG|0644, st_size=5026, ...}) = 0
open("/usr/share/kde4/servicetypes/phononbackend.desktop", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 8
fcntl64(8, F_SETFD, FD_CLOEXEC) = 0
fstat64(8, {st_mode=S_IFREG|0644, st_size=5026, ...}) = 0
fstat64(8, {st_mode=S_IFREG|0644, st_size=5026, ...}) = 0
fstat64(8, {st_mode=S_IFREG|0644, st_size=5026, ...}) = 0
read(8, "[Desktop Entry]\nType=ServiceType"..., 16384) = 5026
read(8, "", 11358) = 0
close(8)

so i'll never hit any limits.

You should contact your distro about this behavior (or other BSD gurus)
Ask them why the above would turn into stuff like

1505: write(2,"kded(1505)/kio (KDirWatch) KDirW"...,158) = 158 (0x9e)
1505: open("/usr/local/share/mime/application/vnd.oasis.opendocument.graphics-template.xml",O_CLOEXEC,00) = 512 (0x200)
1505: fcntl(512,F_SETFD,FD_CLOEXEC) = 0 (0x0)
1505: fcntl(512,F_DUPFD,0x400) = 1024 (0x400)
1505: close(512) = 0 (0x0)
1505: fcntl(1024,F_SETFD,FD_CLOEXEC) = 0 (0x0)
1505: fstat(1024,{ mode=-rw-r--r-- ,inode=2578731,size=2623,blksize=32768 }) = 0 (0x0)
1505: kevent(12,{0x400,EVFILT_VNODE,EV_ADD|EV_ENABLE|EV_CLEAR,111,0x0,0x0},1,0x0,0,0x0) = 0 (0x0)
1505: kevent(12,0x0,0,{0xd,EVFILT_READ,0x0,0,0x1,0x0},1,0x0) = 1 (0x1)
1505: write(14,"@",1) = 1 (0x1)
1505: read(13,"@",1) = 1 (0x1)
1505: stat("/usr/local/share/mime/application/vnd.oasis.opendocument.graphics.xml",{ mode=-rw-r--r-- ,inode=2578244,size=2591,blksize=32768 }) = 0 (0x0)
1505: getpid() = 1505 (0x5e1)

ie. the filehandle is first duplicated (ok that might be required and BSD specific) and then (most importantly) not closed.

My basic guess would be some code like

void function() {
QFile f("foo");
if (f.open()) {
bar();
}
} // here the QFile deconstructor would hit and likely (on linux) close the file, while this would not happen for you. NOTICE that this is only a GUESS on what might be the cause.


PS: as predicted, the issue behind your sissy timezone issue is far more severe ;-)
ememem
Registered Member
Posts
33
Karma
0
OS

Re: Time zone woes

Mon Dec 02, 2013 3:34 am
% ulimit -n 4096
ulimit: bad limit: Operation not permitted
% ulimit -n 2048
% kbuildsycoca4 --noincremental
Code: Select all
kbuildsycoca4 running...
kbuildsycoca4(1830) KBuildSycoca::recreate: Recreating ksycoca file ("/var/tmp/kdecache-my_friend/ksycoca4", version 221)
kbuildsycoca4(1830) VFolderMenu::pushDocInfo: Menu "applications-kmenuedit.menu" not found.
kbuildsycoca4(1830) VFolderMenu::processMenu: Processing KDE Legacy dirs for <KDE>
kbuildsycoca4(1830) VFolderMenu::processKDELegacyDirs:
kbuildsycoca4(1830) VFolderMenu::loadApplications: Looking up applications under "/usr/local/share/applications/"
kbuildsycoca4(1830) VFolderMenu::loadApplications: Looking up applications under "/usr/local/kde4/share/applications/"
kbuildsycoca4(1830) VFolderMenu::loadApplications: Looking up applications under "/usr/local/kde4/share/applications/kde4"
kbuildsycoca4(1830) VFolderMenu::loadApplications: Looking up applications under "/usr/home/my_friend/.local/share/applications/"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ServiceMenus/installfont.desktop" specifies undefined mimetype/servicetype "fonts/package"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ark_part.desktop" specifies undefined mimetype/servicetype "application/x-servicepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ark_part.desktop" specifies undefined mimetype/servicetype "application/lha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ark_part.desktop" specifies undefined mimetype/servicetype "application/maclha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "kmplayer_part.desktop" specifies undefined mimetype/servicetype "application/x-kmplayer"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "klinkstatus_part.desktop" specifies undefined mimetype/servicetype "text/english"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "klinkstatus_part.desktop" specifies undefined mimetype/servicetype "text/x-c++"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "cantor/cantor_part.desktop" specifies undefined mimetype/servicetype "application/x-cantor"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/cantor.desktop" specifies undefined mimetype/servicetype "application/x-cantor"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "kleopatra_decryptverifyfiles.desktop" specifies undefined mimetype/servicetype "applicaton/pkcs7-signature"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gimp.desktop" specifies undefined mimetype/servicetype "image/x-gimp-gbr"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gimp.desktop" specifies undefined mimetype/servicetype "image/x-gimp-pat"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gimp.desktop" specifies undefined mimetype/servicetype "image/x-gimp-gih"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gimp.desktop" specifies undefined mimetype/servicetype "image/x-psp"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ServiceMenus/ark_servicemenu.desktop" specifies undefined mimetype/servicetype "application/x-servicepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ServiceMenus/ark_servicemenu.desktop" specifies undefined mimetype/servicetype "application/lha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ServiceMenus/ark_servicemenu.desktop" specifies undefined mimetype/servicetype "application/maclha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "kerfuffle_clilha.desktop" specifies undefined mimetype/servicetype "application/lha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "kerfuffle_clilha.desktop" specifies undefined mimetype/servicetype "application/maclha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "video/mkv"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/aiff"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/x-pn-aiff"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/x-pn-au"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/x-8svx"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/8svx"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/x-16sv"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/168sv"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "image/ilbm"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "video/anim"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "image/x-png"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "video/mng"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/x-real-audio"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/x-pn-wav"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "phononbackends/gstreamer.desktop" specifies undefined mimetype/servicetype "audio/x-pn-windows-acm"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "windowsexethumbnail.desktop" specifies undefined mimetype/servicetype "application/x-msdownload"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "fileviewhgplugin.desktop" specifies undefined mimetype/servicetype "FileViewVersionControlPlugin2"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/kalgebra.desktop" specifies undefined mimetype/servicetype "application/x-kalgebra"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "application/x-musepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "audio/musepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "application/musepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "application/x-ape"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "audio/ape"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "application/x-id3"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "audio/x-mpeg-3"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "audio/mpc"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "audio/x-mpc"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "audio/mp"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "audio/x-mp"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "application/x-vorbis+ogg"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "application/x-flac"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/gnome-mplayer.desktop" specifies undefined mimetype/servicetype "video/matroska"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ffmpegthumbs.desktop" specifies undefined mimetype/servicetype "video/*"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ark_dndextract.desktop" specifies undefined mimetype/servicetype "application/x-servicepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ark_dndextract.desktop" specifies undefined mimetype/servicetype "application/lha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ark_dndextract.desktop" specifies undefined mimetype/servicetype "application/maclha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "fontthumbnail.desktop" specifies undefined mimetype/servicetype "fonts/package"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/share/applications/firefox.desktop" specifies undefined mimetype/servicetype "text/mml"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/rocs.desktop" specifies undefined mimetype/servicetype "application/x-rocs"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/rocs.desktop" specifies undefined mimetype/servicetype "application/x-rocsz"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/lokalize.desktop" specifies undefined mimetype/servicetype "application/x-lokalize-project"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ServiceMenus/dragonplayer_play_dvd.desktop" specifies undefined mimetype/servicetype "media/dvdvideo"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "kerfuffle_libarchive_readonly.desktop" specifies undefined mimetype/servicetype "application/x-servicepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "imagethumbnail.desktop" specifies undefined mimetype/servicetype "image/x-webp"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/ark.desktop" specifies undefined mimetype/servicetype "application/x-servicepack"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/ark.desktop" specifies undefined mimetype/servicetype "application/lha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/ark.desktop" specifies undefined mimetype/servicetype "application/maclha"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "ServiceMenus/imageconverter.desktop" specifies undefined mimetype/servicetype "image/*"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "/usr/local/kde4/share/applications/kde4/kmplayer.desktop" specifies undefined mimetype/servicetype "application/x-kmplayer"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "plasma-kpart.desktop" specifies undefined mimetype/servicetype "KParts/Part"
kbuildsycoca4(1830) KBuildServiceFactory::populateServiceTypes: "kfontviewpart.desktop" specifies undefined mimetype/servicetype "fonts/package"
kbuildsycoca4(1830) KMimeAssociations::parseAllMimeAppsList: Parsing "/usr/home/my_friend/.local/share/applications/mimeapps.list"
kbuildsycoca4(1830) KBuildSycoca::save: Saving
kbuildsycoca4(1830) kdemain: Emitting notifyDatabaseChanged ("servicetypes", "xdgdata-mime", "services", "apps")
%

I'm lost at this point.
ememem
Registered Member
Posts
33
Karma
0
OS

Re: Time zone woes

Mon Dec 02, 2013 4:43 am
In /boot/loader.conf I made the following changes:
Code: Select all

kern.maxproc=2000 #bumped up from 1000
kern.maxfilesperproc=3600 #doubled from 1800
kern.maxprocperuid=1800 #doubled from 900
...and now when I run %kcmshell4 kded I get: dateandtime.jpg

I always got that window but note that all Startup Services are running except for "Time Zone".
Before... none of them were running. I still can not start Time Zone but can start and stop the others.
I find it just a little weird that upping processes, files per process and processes per uid will help so many other kded services but specifically not the Time Zone service.
Does this give you any other ideas? Or am I looking at a forest and not seeing trees?
luebking
Karma
0

Re: Time zone woes

Mon Dec 02, 2013 8:12 am
Since buildsycoca was successfull before, it's not holding holding back kded any more in general.

But there are maaaaaany files in my /usr/share/zoneinfo (1756, to be precise)
You'd have to truss kded again and grep for 'ERR#24', but i guess you'll still be hitting the limit (the basic problem is not gone)
-> Check the actual user limit on "ulimit -n", raise it to the max, start kded4 from that session, see what happens.

What ever is the outcome of this, i do *strongly* recommend to get that "i keep every file i touch open" issue sorted out. That's gonna bite you more often (tried to open /dev in dolphin? ;-)
luebking
Karma
0

Re: Time zone woes

Mon Dec 02, 2013 10:03 pm
Came just to my mind:
is either /usr/local or $HOME on some "exotic" (including NFS ;-) filesystem?
ememem
Registered Member
Posts
33
Karma
0
OS

Re: Time zone woes

Tue Dec 03, 2013 6:37 am
No, /usr/local and $HOME are both on the same partition/slice as /

I'm going through my .cshrc, .profile, .xinitrc and .xprofile files now making sure they are tcsh compliant (ie: setenv instead of export, ()'s instead of "", etc). I had a couple of old additions that used export but nothing directly effecting kde. How do you personally set XDG_DATA_DIRS, XDG_CONFIG_DIRS, , XDG_DATA_HOME, KDEHOME, KDEDIR, LD_LIBRARY_PATH and PATH? Also, what difference would it make if they are not even set?
luebking
Karma
0

Re: Time zone woes

Tue Dec 03, 2013 7:01 pm
i didn't specifically set any of thos vars (except for adding ~/bin to PATH)

reg. the root filesystem, that would be sth. sane and not sth. stupid like VFAT, i assume?
ememem
Registered Member
Posts
33
Karma
0
OS

Re: Time zone woes

Wed Dec 04, 2013 7:00 am
Correct, no VFAT. Just a single partition using UFS. It is very straight forward. I've played around before with complexities and then figured out "You know what? I'm not running nfs, serving media to 10 separate machines, providing a hosting service or administering Yahoo's internal infrastructure so... why am I making things complicated?". At most I would now separate /home and swap but this time I skipped even those. I have an OpenBSD machine I use as a gateway and server which is fairly complex in order to cut down on arm/spindle movement. It's nothing to do with searching directories or desktop functions so that only has fluxbox installed because obsd doesn't play well w/Nvidia. An ancient 64m ati card there has enough power to run a few open shells on in emergencies so it... just works, set-it-and-forget-it style ;)


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]