Author Topic: problems with filemanager plugin  (Read 17035 times)

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
problems with filemanager plugin
« on: March 02, 2014, 05:43:37 pm »
Hi everybody,

I recently erased all files pertaining to my c::b setup, did a clean checkout of the svn sources, and then recompiled c::b.

The version is svn9673, and I am running it under OpenSuSe 13.1. AMD machine with 4 processors.

I observed that c:b started alright and worked as expected, but when shutting it down closed the window but leaving a process behind which consumed 99% CPU and had to be killed in console.

I could narrow this down to the filemanager plugin as culprit. I had to edit the config file of c::b setting the bool to zero making c::b not load this particular plugin. Then c::b starts and works and shuts down as should be.

Starting c::b now is running it with filemanager plugin disabled. Now I can enable it without problem, but when I try to disable it again, I get random results from c::b between crashing directly or entering a loop (making it necessary to kill the whole process). I tried to debug it, but in debug mode everything seems to work just fine, I could never reproduce neither crash nor infinite loop.

On one crash I obtained a crash report, which I attach. Mostly the process just crashes without report or hangs in loop and doesn’t even save its settings if changes had been made.

I suppose filemanager has some serious problem. glibc is of version 2.17-4.7.1 on my system.

Regards

frithjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: problems with filemanager plugin
« Reply #1 on: March 02, 2014, 09:38:20 pm »
Search the forum for gamin or famin, the problem is there if I remember correctly.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #2 on: March 02, 2014, 11:09:28 pm »
You need to install (lib)gamin. One of these days I will convert it over to inotify.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: problems with filemanager plugin
« Reply #3 on: March 02, 2014, 11:27:59 pm »
Here is a snippet of frithjofh's debug-report:
Quote
    <module path="/usr/lib64/libgamin-1.so.0.1.10" address="7fdebb7b0000" size="00007000" version="0.1.10"/>
    <module path="/usr/lib64/libgamin-1.so.0.1.10" address="7fdebb9b7000" size="00001000" version="0.1.10"/>

It looks like libgamin is installed.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #4 on: March 02, 2014, 11:38:15 pm »
maybe needed gamin-devel when he compiled?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: problems with filemanager plugin
« Reply #5 on: March 02, 2014, 11:47:30 pm »
maybe needed gamin-devel when he compiled?
I don't think it compiles without gamin-devel, but I do not remember if I ever tried it.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #6 on: March 02, 2014, 11:54:12 pm »
maybe needed gamin-devel when he compiled?
I don't think it compiles without gamin-devel, but I do not remember if I ever tried it.

It shouldn't but wonder if there are conflicting versions or something.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: problems with filemanager plugin
« Reply #7 on: March 02, 2014, 11:59:13 pm »
fam-devel would possibly also work (if it still exists Fedora only provides gamin these days), but libfam and libgamin can not be installed at the same time as far as I know.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: problems with filemanager plugin
« Reply #8 on: March 03, 2014, 10:06:29 am »
hi, and thanks for the replies,

it turns out, I have libgamin installed with version 0.1.10-4.4.1 . Also gamin-devel and libfam0-gamin both with the same version number.

These packages were installed prior to compiling and installing c::b.

When I try to deinstall libfam, the system complains about gamin-devel depending on it. So I left it as is.

Regards

frithjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: problems with filemanager plugin
« Reply #9 on: March 07, 2014, 06:57:54 pm »
hi,

to whom it may concern:

I looked into the source and think that the problem is in the file dirctorymonitor.cpp in the destructor of DirMonitorThread. The hang definitively takes place on the line where Wait() is called on the wxThread.

So I read about wxThread, and after finding the hint that POSIX threads need the function TestDestroy() to be called on a wxThread object before Pause() or Delete() I assumed, that same might be true for Wait() on POSIX threads, so I added TestDestroy() to the conditional statement which triggers the Wait() command.

This certainly does it on Linux. The hangs or crashes are gone, no zombies left over.

I didn’t make a patch, because I am not very experienced in threads and want to put the decision up to the maintainer.

Regards

frithjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: problems with filemanager plugin
« Reply #10 on: March 07, 2014, 09:02:41 pm »
Please post a patch, so we can discuss it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #11 on: March 07, 2014, 09:21:12 pm »
+1 Sounds like a plausible solution, so please post a patch.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: problems with filemanager plugin
« Reply #12 on: March 07, 2014, 10:26:04 pm »
tomorrow. have to understand some loose ends first...  ;)
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #13 on: March 07, 2014, 10:59:56 pm »
Nevermind, I think I can just replace the code with a mutex.

EDIT: Code needs a much bigger overhaul but try this patch for linux -- untested, may not even compile...
« Last Edit: March 07, 2014, 11:19:26 pm by dmoore »

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #14 on: March 07, 2014, 11:20:49 pm »
should probably do something similar for windows, though oddly the same wait code doesn't fail.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: problems with filemanager plugin
« Reply #15 on: March 09, 2014, 06:02:18 pm »
Never mind my first post...

My changes only meant that Wait() was effectively never called... so not a fix at all. Sang victory too soon  ::)

I will keep investigating, though.

Sorry again
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #16 on: March 09, 2014, 06:05:43 pm »
Did you try my patch?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #17 on: March 17, 2014, 01:58:59 am »
Since no word from OP, and i don't have a system to reproduce, does anyone else? Killerbot, i think I recall that you had this problem on some linux variant. Could you try my patch and see if it makes a difference.  (No rush)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: problems with filemanager plugin
« Reply #18 on: March 17, 2014, 07:35:56 am »
ok, will look into it. Let's hope we can still reproduce, cause in the meantime OS upgrades occurred ...

Cheers,
Lieven

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: problems with filemanager plugin
« Reply #19 on: March 17, 2014, 08:39:57 am »
hi,

sorry for my late reply. didn’t have time. still didn't try the patch. maybe today...

frithjofh
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #20 on: March 17, 2014, 01:53:24 pm »
oops... wxMutex::LockTimeout isn't in wx2.8.12. Try this patch instead.

(Does nothing on windows)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: problems with filemanager plugin
« Reply #21 on: March 31, 2014, 03:56:46 pm »
ok, will look into it. Let's hope we can still reproduce, cause in the meantime OS upgrades occurred ...

Cheers,
Lieven

This problem is still alive, and it is even worse now, I can not disable the filemanager plugin, the spinner keeps on spinning on the manage plugins dialog.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: problems with filemanager plugin
« Reply #22 on: March 31, 2014, 04:03:57 pm »
I tried :  filemanagershutdown2.patch   ==> doesn't make any difference

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #23 on: March 31, 2014, 04:37:39 pm »
Thanks for trying. Wonder if this is due to some sort of pipe buffering.

What distro is it? Maybe i can try a live cd, VM or something.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: problems with filemanager plugin
« Reply #24 on: March 31, 2014, 07:37:19 pm »
hmm... soon I should be able to replace my buggy code with this: http://docs.wxwidgets.org/trunk/classwx_file_system_watcher.html (wx2.9+ only unfortunately)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: problems with filemanager plugin
« Reply #25 on: March 31, 2014, 07:37:42 pm »
opensuse, seen it on  12.2 / 12.3 and 13.1 (64 bit)